[Pkg-electronics-commits] [pcb] 01/14: Imported Upstream version 20140316

Bdale Garbee bdale at moszumanska.debian.org
Mon Mar 17 15:56:29 UTC 2014


This is an automated email from the git hooks/post-receive script.

bdale pushed a commit to branch master
in repository pcb.

commit 9de23998654bcac10b8ecbca06a3fb0dec8269f3
Author: Bdale Garbee <bdale at gag.com>
Date:   Mon Mar 17 09:01:23 2014 -0600

    Imported Upstream version 20140316
---
 ChangeLog                                          | 3090 +++++++++
 Makefile.am                                        |    1 -
 Makefile.in                                        |  126 +-
 NEWS                                               |   55 +
 README                                             |    6 +-
 README.git                                         |    6 +-
 README_FILES/Makefile.am                           |    3 -
 README_FILES/Makefile.in                           |   49 +-
 acinclude.m4                                       |    2 -
 aclocal.m4                                         |  163 +-
 configure                                          |  940 +--
 configure.ac                                       |  150 +-
 data/Makefile.am                                   |   11 +-
 data/Makefile.in                                   |  150 +-
 data/pcb.appdata.xml                               |   20 +
 data/pcb.appdata.xml.in                            |   33 +
 data/pcb.desktop                                   |    3 +
 data/pcb.xml                                       |    5 +
 doc/Makefile.in                                    |  135 +-
 doc/actions.texi                                   | 1093 +--
 doc/ascii2texi.awk                                 |    4 -
 doc/eps2png                                        |   21 +-
 doc/extract-docs                                   |    4 +-
 doc/fractional_size.tab                            |    3 -
 doc/fractional_size.texi                           |    1 -
 doc/gcode.pdf                                      |  Bin 9111 -> 9131 bytes
 doc/gcode.png                                      |  Bin 10809 -> 10809 bytes
 doc/gcode_control_img.pdf                          |  Bin 6017 -> 6038 bytes
 doc/gcode_control_img.png                          |  Bin 4948 -> 4948 bytes
 doc/gcode_tool_path.pdf                            |  Bin 6212 -> 6235 bytes
 doc/gcode_tool_path.png                            |  Bin 16104 -> 16104 bytes
 doc/letter_size.tab                                |    3 -
 doc/letter_size.texi                               |    1 -
 doc/metric_size.tab                                |    3 -
 doc/metric_size.texi                               |    1 -
 doc/options.texi                                   |  395 +-
 doc/pad.pdf                                        |  Bin 8493 -> 8515 bytes
 doc/pad.png                                        |  Bin 1789 -> 10577 bytes
 doc/pcb.html                                       | 4280 ++++++------
 doc/pcb.info                                       |  579 +-
 doc/pcb.info-1                                     |  947 ++-
 doc/pcb.info-2                                     |  874 ++-
 doc/pcb.pdf                                        |  Bin 951860 -> 970315 bytes
 doc/pcb.texi                                       |  209 +-
 doc/pcbfile.texi                                   |   80 +-
 doc/puller.pdf                                     |  Bin 3025 -> 3047 bytes
 doc/puller.png                                     |  Bin 303 -> 1269 bytes
 doc/refcard.pdf                                    |  Bin 35991 -> 35987 bytes
 doc/refcard.tex                                    |    3 +-
 doc/stamp-vti                                      |    8 +-
 doc/thermal.pdf                                    |  Bin 6284 -> 6305 bytes
 doc/thermal.png                                    |  Bin 6632 -> 6632 bytes
 doc/version.texi                                   |    8 +-
 doc/wire_size.tab                                  |    3 -
 doc/wire_size.texi                                 |    1 -
 example/Makefile.am                                |    2 -
 example/Makefile.in                                |   75 +-
 example/libraries/Makefile.am                      |    2 -
 example/libraries/Makefile.in                      |   64 +-
 example/libraries/example.inc                      |    1 -
 example/libraries/example.m4                       |    1 -
 globalconst.h                                      |    3 +-
 gts/Makefile.am                                    |    6 +-
 gts/Makefile.in                                    |  158 +-
 gts/matrix.c                                       |    9 +-
 gts/refine.c                                       |   11 +-
 gts/split.c                                        |   13 +-
 gts/vopt.c                                         |    3 +-
 intl/plural.c                                      | 1996 ++++--
 lib/CreateLibrary.sh.in                            |    1 -
 lib/CreateLibraryContents.sh.in                    |    1 -
 lib/ListLibraryContents.sh                         |    1 -
 lib/ListLibraryContents.sh.in                      |    1 -
 lib/Makefile.in                                    |   82 +-
 lib/QueryLibrary.sh.in                             |    1 -
 lib/TTL_74xx_DIL.list                              |    1 -
 lib/TTL_74xx_DIL.m4                                |    1 -
 lib/amp.inc                                        |    1 -
 lib/amphenol.inc                                   |    1 -
 lib/amphenol.list                                  |    1 -
 lib/amphenol.m4                                    |    1 -
 lib/bourns.inc                                     |    1 -
 lib/candk.inc                                      |    1 -
 lib/common.m4                                      |    1 -
 lib/connector.inc                                  |    1 -
 lib/connector.list                                 |    1 -
 lib/connector.m4                                   |    1 -
 lib/crystal.list                                   |    1 -
 lib/crystal.m4                                     |    1 -
 lib/cts.inc                                        |    1 -
 lib/dil.inc                                        |    1 -
 lib/geda.inc                                       |    2 +-
 lib/gen_geda_list.awk                              |    2 -
 lib/gen_geda_m4.awk                                |    2 -
 lib/gen_list.awk                                   |    2 -
 lib/gen_m4.awk                                     |    2 -
 lib/generic.list                                   |    1 -
 lib/generic.m4                                     |    1 -
 lib/jerry.list                                     |    1 -
 lib/jerry.m4                                       |    2 -
 lib/johnstech.inc                                  |    1 -
 lib/linear.list                                    |    1 -
 lib/linear.m4                                      |    1 -
 lib/logic.list                                     |    1 -
 lib/logic.m4                                       |    1 -
 lib/lsi.list                                       |    1 -
 lib/lsi.m4                                         |    1 -
 lib/m4lib_to_newlib.sh                             |    3 -
 lib/memory.list                                    |    1 -
 lib/memory.m4                                      |    1 -
 lib/minicircuits.inc                               |    1 -
 lib/misc.inc                                       |    1 -
 lib/nichicon.inc                                   |    1 -
 lib/optek.inc                                      |    1 -
 lib/optical.list                                   |    1 -
 lib/optical.m4                                     |    1 -
 lib/panasonic.inc                                  |    1 -
 lib/pcblib                                         |    6 +-
 lib/pcblib-newlib/geda/DIP4.fp                     |   16 +
 lib/pcblib-newlib/geda/index.html                  |    4 +
 lib/pcblib.contents                                |    1 +
 lib/pci.inc                                        |    2 -
 lib/pci.list                                       |    3 -
 lib/pci.m4                                         |    1 -
 lib/plcc.inc                                       |    1 -
 lib/png_diff.sh                                    |    2 -
 lib/qfn.inc                                        |    1 -
 lib/qfp-ui.in                                      |    1 -
 lib/qfp.inc                                        |    1 -
 lib/qfp2.inc                                       |    1 -
 lib/qfpdj.inc                                      |    1 -
 lib/resistor_0.25W.list                            |    1 -
 lib/resistor_0.25W.m4                              |    1 -
 lib/resistor_adjust.list                           |    1 -
 lib/resistor_adjust.m4                             |    1 -
 lib/resistor_array.list                            |    1 -
 lib/resistor_array.m4                              |    1 -
 lib/rules.inc                                      |    1 -
 lib/smt.inc                                        |    1 -
 lib/texas_inst_amplifier.list                      |    1 -
 lib/texas_inst_amplifier.m4                        |    1 -
 lib/texas_inst_voltage_reg.list                    |    1 -
 lib/texas_inst_voltage_reg.m4                      |    1 -
 lib/transistor.list                                |    1 -
 lib/transistor.m4                                  |    1 -
 newlib/2_pin_thru-hole_packages/Makefile.am        |    3 -
 newlib/2_pin_thru-hole_packages/Makefile.in        |   64 +-
 newlib/Makefile.am                                 |    2 -
 newlib/Makefile.in                                 |   60 +-
 newlib/connectors/Makefile.am                      |    3 -
 newlib/connectors/Makefile.in                      |   64 +-
 newlib/crystal/Makefile.am                         |    3 -
 newlib/crystal/Makefile.in                         |   64 +-
 newlib/electro-optics/Makefile.am                  |    3 -
 newlib/electro-optics/Makefile.in                  |   64 +-
 newlib/headers/Makefile.am                         |    3 -
 newlib/headers/Makefile.in                         |   64 +-
 newlib/keystone/Makefile.am                        |    3 -
 newlib/keystone/Makefile.in                        |   64 +-
 newlib/msp430/Makefile.am                          |    3 -
 newlib/msp430/Makefile.in                          |   64 +-
 newlib/not_vetted_ingo/Makefile.am                 |    3 -
 newlib/not_vetted_ingo/Makefile.in                 |   64 +-
 newlib/sockets/Makefile.am                         |    3 -
 newlib/sockets/Makefile.in                         |   64 +-
 newlib/tests/Makefile.am                           |    3 -
 newlib/tests/Makefile.in                           |   64 +-
 po/LINGUAS                                         |    1 +
 po/Makefile.in.in                                  |   15 +-
 po/POTFILES.in                                     |   10 +-
 po/POTFILES.skip                                   |    2 +
 po/pt_BR.po                                        | 6989 ++++++++++++++++++++
 po/ru.po                                           | 5271 ++++++++-------
 src/Makefile.am                                    |   27 +-
 src/Makefile.in                                    |  284 +-
 src/action.c                                       |  693 +-
 src/action.h                                       |    1 -
 src/autoplace.c                                    |   60 +-
 src/autoplace.h                                    |    2 -
 src/autoroute.c                                    |  121 +-
 src/autoroute.h                                    |    2 -
 src/box.h                                          |    2 -
 src/buffer.c                                       |  193 +-
 src/buffer.h                                       |   23 +-
 src/change.c                                       |  359 +-
 src/change.h                                       |   12 +-
 src/clip.c                                         |    4 -
 src/clip.h                                         |    1 -
 src/command.c                                      |    4 -
 src/command.h                                      |    1 -
 src/compat.c                                       |    4 -
 src/compat.h                                       |    2 -
 src/const.h                                        |   81 +-
 src/copy.c                                         |   87 +-
 src/copy.h                                         |    6 +-
 src/create.c                                       |  175 +-
 src/create.h                                       |   72 +-
 src/crosshair.c                                    |  310 +-
 src/crosshair.h                                    |    1 -
 src/data.c                                         |    6 +-
 src/data.h                                         |    3 +-
 src/djopt.c                                        |   27 +-
 src/djopt.h                                        |    2 -
 src/dolists.h                                      |    2 -
 src/draw.c                                         |  622 +-
 src/draw.h                                         |   71 +-
 src/drill.c                                        |   47 +-
 src/drill.h                                        |    8 +-
 src/edif.c                                         |  709 +-
 src/edif.h                                         |   13 +-
 src/edif.y                                         |    8 +-
 src/error.c                                        |    5 -
 src/error.h                                        |    1 -
 src/file.c                                         |   85 +-
 src/find.c                                         | 1513 ++---
 src/find.h                                         |   34 +-
 src/flags.c                                        |  208 +-
 src/fontmode.c                                     |   12 +-
 src/gettext.h                                      |  280 +
 src/global.h                                       |  203 +-
 src/gpcb-menu.res.h                                | 1028 +++
 src/gpcb-menu.res.in                               |   95 +-
 src/heap.c                                         |    6 -
 src/heap.h                                         |    2 -
 src/hid.h                                          |   70 +-
 src/hid/batch/batch.c                              |   42 +-
 src/hid/bom/bom.c                                  |  292 +-
 src/hid/common/actions.c                           |    6 +-
 src/hid/common/draw_helpers.c                      |  281 +-
 src/hid/common/draw_helpers.h                      |   11 +-
 src/hid/common/extents.c                           |   61 +-
 src/hid/common/flags.c                             |    4 -
 src/hid/common/hid_resource.c                      |    4 +
 src/hid/common/hidgl.c                             |   94 +-
 src/hid/common/hidgl.h                             |    3 +-
 src/hid/common/hidinit.c                           |    5 +-
 src/hid/common/hidnogui.c                          |   61 +-
 src/hid/common/trackball.c                         |  324 +
 src/hid/common/trackball.h                         |   78 +
 src/hid/gcode/curve.c                              |    2 +-
 src/hid/gcode/decompose.c                          |    2 +-
 src/hid/gcode/decompose.h                          |    2 +-
 src/hid/gcode/gcode.c                              | 1450 ++--
 src/hid/gcode/gcode.h                              |    3 -
 src/hid/gcode/lists.h                              |    2 +-
 src/hid/gcode/trace.c                              |   18 +-
 src/hid/gcode/trace.h                              |    6 +-
 src/hid/gerber/gerber.c                            |  252 +-
 src/hid/gtk/ghid-cell-renderer-visibility.c        |   24 +-
 src/hid/gtk/ghid-layer-selector.c                  |  383 +-
 src/hid/gtk/ghid-layer-selector.h                  |    3 +-
 src/hid/gtk/ghid-main-menu.c                       |   14 +-
 src/hid/gtk/ghid-route-style-selector.c            |   45 +-
 src/hid/gtk/gtkhid-gdk.c                           |   66 +-
 src/hid/gtk/gtkhid-gl.c                            |  520 +-
 src/hid/gtk/gtkhid-main.c                          |  104 +-
 src/hid/gtk/gtkhid.h                               |    2 -
 src/hid/gtk/gui-command-window.c                   |    4 -
 src/hid/gtk/gui-config.c                           |  231 +-
 src/hid/gtk/gui-dialog-print.c                     |   48 +-
 src/hid/gtk/gui-dialog.c                           |  119 +-
 src/hid/gtk/gui-drc-window.c                       |  121 +-
 src/hid/gtk/gui-drc-window.h                       |    2 -
 src/hid/gtk/gui-icons-misc.data                    |    1 -
 src/hid/gtk/gui-icons-mode-buttons.data            |    2 -
 src/hid/gtk/gui-keyref-window.c                    |    4 -
 src/hid/gtk/gui-library-window.c                   |   19 +-
 src/hid/gtk/gui-log-window.c                       |    4 -
 src/hid/gtk/gui-misc.c                             |   17 +-
 src/hid/gtk/gui-netlist-window.c                   |   53 +-
 src/hid/gtk/gui-output-events.c                    |   13 +-
 src/hid/gtk/gui-pinout-preview.c                   |   40 +-
 src/hid/gtk/gui-pinout-preview.h                   |    4 +-
 src/hid/gtk/gui-pinout-window.c                    |    5 -
 src/hid/gtk/gui-top-window.c                       |  186 +-
 src/hid/gtk/gui-trackball.c                        |  459 ++
 src/hid/gtk/gui-trackball.h                        |   68 +
 src/hid/gtk/gui-utils.c                            |   39 +-
 src/hid/gtk/gui.h                                  |   19 +-
 src/hid/hidint.h                                   |    2 -
 src/hid/lesstif/dialogs.c                          |    4 -
 src/hid/lesstif/lesstif.h                          |    2 -
 src/hid/lesstif/library.c                          |    4 -
 src/hid/lesstif/main.c                             |   57 +-
 src/hid/lesstif/menu.c                             |   14 +-
 src/hid/lesstif/netlist.c                          |   32 +-
 src/hid/lesstif/styles.c                           |    4 -
 src/hid/lesstif/xincludes.h                        |    2 -
 src/hid/lpr/lpr.c                                  |   16 +-
 src/hid/nelma/nelma.c                              |   84 +-
 src/hid/png/png.c                                  |  331 +-
 src/hid/png/png.h                                  |    2 -
 src/hid/ps/eps.c                                   |   50 +-
 src/hid/ps/ps.c                                    |  160 +-
 src/hid/ps/ps.h                                    |    3 +-
 src/hid_draw.h                                     |   66 +
 src/icons/Makefile.am                              |    2 -
 src/icons/Makefile.in                              |   49 +-
 src/insert.c                                       |   37 +-
 src/insert.h                                       |    3 +-
 src/intersect.c                                    |   27 +-
 src/intersect.h                                    |    6 +-
 src/line.c                                         |   81 +-
 src/line.h                                         |    3 +-
 src/macro.h                                        |   58 +-
 src/main.c                                         |  137 +-
 src/mirror.c                                       |    9 +-
 src/mirror.h                                       |    3 +-
 src/misc.c                                         |  175 +-
 src/misc.h                                         |   47 +-
 src/move.c                                         |  179 +-
 src/move.h                                         |   11 +-
 src/mtspace.c                                      |    8 +-
 src/mtspace.h                                      |    2 -
 src/mymem.c                                        |  139 +-
 src/mymem.h                                        |   73 +-
 src/netlist.c                                      |   12 +-
 src/parse_l.c                                      |  425 +-
 src/parse_l.h                                      |    9 +-
 src/parse_l.l                                      |   28 +-
 src/parse_y.c                                      | 2097 +++---
 src/parse_y.h                                      |   19 +-
 src/parse_y.y                                      |   92 +-
 src/pcb-menu.res.h                                 |  998 +++
 src/pcb-menu.res.in                                |   24 +-
 src/pcb-printf.c                                   |  140 +-
 src/pcb-printf.h                                   |   30 +-
 src/pcbtest.sh.in                                  |    5 +-
 src/polygon.c                                      |  143 +-
 src/polygon.h                                      |   26 +-
 src/polygon1.c                                     |    8 +-
 src/print.c                                        |   57 +-
 src/print.h                                        |    1 -
 src/puller.c                                       |  100 +-
 src/rats.c                                         |  145 +-
 src/rats.h                                         |   13 +-
 src/remove.c                                       |   93 +-
 src/remove.h                                       |   15 +-
 src/report.c                                       |  236 +-
 src/report.h                                       |    1 -
 src/res_lex.c                                      |   31 +-
 src/res_lex.l                                      |    4 -
 src/res_parse.c                                    |  511 +-
 src/res_parse.h                                    |   15 +-
 src/res_parse.y                                    |   30 +-
 src/resource.h                                     |    2 -
 src/rotate.c                                       |   67 +-
 src/rotate.h                                       |   15 +-
 src/rtree.c                                        |    5 -
 src/rtree.h                                        |    2 -
 src/rubberband.c                                   |  107 +-
 src/rubberband.h                                   |    1 -
 src/search.c                                       |  350 +-
 src/search.h                                       |   25 +-
 src/select.c                                       |  220 +-
 src/select.h                                       |    9 +-
 src/set.c                                          |   20 +-
 src/set.h                                          |    3 -
 src/strflags.c                                     |    6 +-
 src/strflags.h                                     |    1 -
 src/thermal.c                                      |   12 +-
 src/thermal.h                                      |    3 +-
 src/toporouter.c                                   |  696 +-
 src/toporouter.h                                   |    6 +-
 src/undo.c                                         |  267 +-
 src/undo.h                                         |    8 +-
 src/vector.c                                       |    4 -
 src/vector.h                                       |    2 -
 src/vendor.c                                       |   96 +-
 src/vendor.h                                       |    4 +-
 tests/Makefile.in                                  |   73 +-
 tests/golden/Makefile.in                           |   60 +-
 tests/golden/hid_bom1/Makefile.am                  |    1 -
 tests/golden/hid_bom1/Makefile.in                  |   49 +-
 tests/golden/hid_bom1/bom_general.bom              |   11 +-
 tests/golden/hid_bom1/bom_general.xy               |   53 +-
 tests/golden/hid_bom2/Makefile.am                  |    4 +-
 tests/golden/hid_bom2/Makefile.in                  |   53 +-
 tests/golden/hid_bom2/bom_general.xy               |   53 +-
 tests/golden/hid_bom2/test.bom                     |   11 +-
 tests/golden/hid_bom3/Makefile.in                  |   49 +-
 tests/golden/hid_bom3/bom_general.bom              |   11 +-
 tests/golden/hid_bom3/test.xy                      |   53 +-
 tests/golden/hid_bom4/Makefile.in                  |   49 +-
 tests/golden/hid_bom4/bom_general.bom              |   11 +-
 tests/golden/hid_bom4/bom_general.xy               |   51 +-
 tests/golden/hid_gcode1/Makefile.am                |    7 +-
 tests/golden/hid_gcode1/Makefile.in                |   56 +-
 .../hid_gcode1/gcode_oneline-0.8890.drill.gcode    |   14 +
 ...gcode.bottom.cnc => gcode_oneline-bottom.gcode} |   23 +-
 .../golden/hid_gcode1/gcode_oneline-outline.gcode  |   23 +
 .../gcode_oneline-top.gcode}                       |   19 +-
 .../hid_gcode1/gcode_oneline.gcode.drill.cnc       |   12 -
 tests/golden/hid_gcode10/Makefile.am               |    7 +-
 tests/golden/hid_gcode10/Makefile.in               |   56 +-
 ...gcode.bottom.cnc => gcode_oneline-bottom.gcode} |   22 +-
 .../hid_gcode10/gcode_oneline-drillmill.gcode      |   26 +
 .../golden/hid_gcode10/gcode_oneline-outline.gcode |   23 +
 ...eline.gcode.top.cnc => gcode_oneline-top.gcode} |   19 +-
 .../hid_gcode10/gcode_oneline.gcode.drill.cnc      |   12 -
 tests/golden/hid_gcode11/Makefile.am               |    7 +-
 tests/golden/hid_gcode11/Makefile.in               |   56 +-
 .../hid_gcode11/gcode_oneline-0.0350.drill.gcode   |   14 +
 ...gcode.bottom.cnc => gcode_oneline-bottom.gcode} |   23 +-
 .../golden/hid_gcode11/gcode_oneline-outline.gcode |   23 +
 ...eline.gcode.top.cnc => gcode_oneline-top.gcode} |   19 +-
 .../hid_gcode11/gcode_oneline.gcode.drill.cnc      |   12 -
 tests/golden/hid_gcode2/Makefile.am                |    7 +-
 tests/golden/hid_gcode2/Makefile.in                |   56 +-
 tests/golden/hid_gcode2/out-0.8890.drill.gcode     |   14 +
 .../out-bottom.gcode}                              |   23 +-
 tests/golden/hid_gcode2/out-outline.gcode          |   23 +
 .../out-top.gcode}                                 |   19 +-
 tests/golden/hid_gcode2/out.drill.cnc              |   12 -
 tests/golden/hid_gcode3/Makefile.am                |    7 +-
 tests/golden/hid_gcode3/Makefile.in                |   56 +-
 .../hid_gcode3/gcode_oneline-0.8890.drill.gcode    |   14 +
 tests/golden/hid_gcode3/gcode_oneline-bottom.gcode |   49 +
 .../golden/hid_gcode3/gcode_oneline-outline.gcode  |   23 +
 tests/golden/hid_gcode3/gcode_oneline-top.gcode    |   45 +
 .../hid_gcode3/gcode_oneline.gcode.bottom.cnc      |   40 -
 .../hid_gcode3/gcode_oneline.gcode.drill.cnc       |   12 -
 .../golden/hid_gcode3/gcode_oneline.gcode.top.cnc  |   40 -
 tests/golden/hid_gcode4/Makefile.am                |    7 +-
 tests/golden/hid_gcode4/Makefile.in                |   56 +-
 .../hid_gcode4/gcode_oneline-0.8890.drill.gcode    |   14 +
 ...gcode.bottom.cnc => gcode_oneline-bottom.gcode} |   25 +-
 .../golden/hid_gcode4/gcode_oneline-outline.gcode  |   23 +
 ...eline.gcode.top.cnc => gcode_oneline-top.gcode} |   21 +-
 .../hid_gcode4/gcode_oneline.gcode.drill.cnc       |   12 -
 tests/golden/hid_gcode5/Makefile.am                |    7 +-
 tests/golden/hid_gcode5/Makefile.in                |   56 +-
 .../hid_gcode5/gcode_oneline-0.8890.drill.gcode    |   14 +
 ...gcode.bottom.cnc => gcode_oneline-bottom.gcode} |   23 +-
 .../golden/hid_gcode5/gcode_oneline-outline.gcode  |   23 +
 ...eline.gcode.top.cnc => gcode_oneline-top.gcode} |   19 +-
 .../hid_gcode5/gcode_oneline.gcode.drill.cnc       |   12 -
 tests/golden/hid_gcode6/Makefile.am                |    7 +-
 tests/golden/hid_gcode6/Makefile.in                |   56 +-
 .../hid_gcode6/gcode_oneline-0.8890.drill.gcode    |   14 +
 tests/golden/hid_gcode6/gcode_oneline-bottom.gcode |   42 +
 .../golden/hid_gcode6/gcode_oneline-outline.gcode  |   23 +
 tests/golden/hid_gcode6/gcode_oneline-top.gcode    |   38 +
 .../hid_gcode6/gcode_oneline.gcode.bottom.cnc      |   43 -
 .../hid_gcode6/gcode_oneline.gcode.drill.cnc       |   12 -
 .../golden/hid_gcode6/gcode_oneline.gcode.top.cnc  |   43 -
 tests/golden/hid_gcode7/Makefile.am                |    7 +-
 tests/golden/hid_gcode7/Makefile.in                |   56 +-
 .../hid_gcode7/gcode_oneline-0.8890.drill.gcode    |   14 +
 .../gcode_oneline-bottom.gcode}                    |   23 +-
 .../golden/hid_gcode7/gcode_oneline-outline.gcode  |   23 +
 .../gcode_oneline-top.gcode}                       |   19 +-
 .../hid_gcode7/gcode_oneline.gcode.drill.cnc       |   12 -
 tests/golden/hid_gcode8/Makefile.am                |    7 +-
 tests/golden/hid_gcode8/Makefile.in                |   56 +-
 .../hid_gcode8/gcode_oneline-0.8890.drill.gcode    |   14 +
 ...gcode.bottom.cnc => gcode_oneline-bottom.gcode} |   23 +-
 .../golden/hid_gcode8/gcode_oneline-outline.gcode  |   23 +
 .../gcode_oneline-top.gcode}                       |   19 +-
 .../hid_gcode8/gcode_oneline.gcode.drill.cnc       |   12 -
 tests/golden/hid_gcode9/Makefile.am                |    7 +-
 tests/golden/hid_gcode9/Makefile.in                |   56 +-
 ...gcode.bottom.cnc => gcode_oneline-bottom.gcode} |   22 +-
 .../hid_gcode9/gcode_oneline-drillmill.gcode       |   26 +
 .../golden/hid_gcode9/gcode_oneline-outline.gcode  |   23 +
 ...eline.gcode.top.cnc => gcode_oneline-top.gcode} |   19 +-
 .../hid_gcode9/gcode_oneline.gcode.drill.cnc       |   12 -
 tests/golden/hid_gerber1/Makefile.in               |   49 +-
 tests/golden/hid_gerber2/Makefile.in               |   49 +-
 tests/golden/hid_gerber3/Makefile.in               |   49 +-
 tests/golden/hid_png1/Makefile.in                  |   49 +-
 tests/golden/hid_png2/Makefile.in                  |   49 +-
 tests/golden/hid_png3/Makefile.in                  |   49 +-
 tests/golden/hid_png3/gerber_oneline.png           |  Bin 845 -> 1881 bytes
 tests/inputs/Makefile.in                           |   49 +-
 tests/run_tests.sh                                 |   81 +-
 tests/tests.list                                   |   55 +-
 tools/Makefile.am                                  |    6 +-
 tools/Makefile.in                                  |   85 +-
 tools/MergePCBPS                                   |    2 -
 tools/Merge_dimPCBPS                               |    2 -
 tools/pcbdiff                                      |   80 +
 tutorial/Makefile.am                               |    2 -
 tutorial/Makefile.in                               |   64 +-
 w32/Makefile.in                                    |   49 +-
 485 files changed, 36588 insertions(+), 18104 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 182a0ba..7a47b83 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,3093 @@
+This ChangeLog is automatically generated from the git commit messages
+during the snapshot process.  See README.snapshots and utils/git2cl.
+
+2014-03-16   DJ Delorie * dj AT delorie dot com *
+
+	* tests/golden/hid_gcode4/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode4/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode6/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode6/gcode_oneline-top.gcode: update gcode golden
+	files Checked with linuxcnc - the old goldens had zeros where the
+	parameters should have been.
+
+2014-02-23   Jorge Barros de Abreu * ficmatin10 AT gmail dot com *
+
+	* po/pt_BR.po: pt_BR adjusts and make update-po  Signed-off-by: bert * bert dot timmerman AT xs4all dot nl *
+
+2014-02-03   Jorge Barros de Abreu * ficmatin10 AT gmail dot com *
+
+	* po/pt_BR.po: pt_BR.po update Closes-bug: lp-1275446
+
+2014-02-03   Jorge Barros de Abreu * ficmatin10 AT gmail dot com *
+
+	* po/pt_BR.po: Minor changes in po pt_BR.po file Closes-bug: lp-1274404
+
+2014-02-03   Vladimir Zhbanov * vzhbanov AT gmail dot com *
+
+	* src/hid/gtk/gui-config.c: Fix segfault caused by lack of commas in
+	a format expression Closes-bug: lp-1275407
+
+2014-02-01   Jorge Barros de Abreu * ficmatin10 AT gmail dot com *
+
+	* po/pt_BR.po: Preferencias do PCB to Preferências...   Signed-off-by: bert * bert dot timmerman AT xs4all dot nl *
+
+2014-02-01   Vladimir Zhbanov * vzhbanov AT gmail dot com *
+
+	* doc/pcb.texi: Fix order of sections in the documentation Prevent warnings output by "make" when pcb.texi is processed.
+
+2014-01-31   Vladimir Zhbanov * vzhbanov AT gmail dot com *
+
+	* doc/pcb.texi: Fix several typos in the documentation
+
+2014-01-31   أحمد المحمودي (Ahmed El-Mahmoudy) * aelmahmoudy AT sabily dot org *
+
+	* src/pcbtest.sh.in: Fix 'make distcheck' Use proper target directory for pcblib-newlib.  Closes-bug: lp-855405  Commit-message-by: Vladimir Zhbanov * vzhbanov AT gmail dot com *
+
+2014-01-31   Vladimir Zhbanov * vzhbanov AT gmail dot com *
+
+	* po/POTFILES.in, po/POTFILES.skip: Add one more localized file to
+	POTFILES.in Additionally, the file generated from it is moved to POTFILES.skip
+
+2013-01-30   Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+	* src/action.c, src/buffer.c, src/hid/common/actions.c,
+	src/hid/gtk/gtkhid-main.c, src/hid/gtk/gui-config.c,
+	src/hid/gtk/gui-dialog.c, src/hid/gtk/gui-drc-window.c,
+	src/hid/gtk/gui-output-events.c, src/hid/gtk/gui-top-window.c,
+	src/hid/lpr/lpr.c, src/misc.c, src/parse_y.y, src/report.c,
+	src/toporouter.c, src/vendor.c: Add strings to localization  Signed-off-by: Bert Timmerman * bert dot timmerman AT xs4all dot nl
+	*  Signed-off-by: bert * bert dot timmerman AT xs4all dot nl *
+
+2014-01-30   Vladimir Zhbanov * vzhbanov AT gmail dot com *
+
+	* src/hid/bom/bom.c: Don't use localized unit names in comments of
+	the X-Y files Fix a bug causing 'make distcheck' to fail for all bom_hid# tests in
+	localized environments because of using of a localized unit name in
+	a comment line of the output X-Y file.
+
+2014-01-29   Vladimir Zhbanov * vzhbanov AT gmail dot com *
+
+	* po/POTFILES.in: Add a missing file to POTFILES.in
+
+2014-01-29   Vladimir Zhbanov * vzhbanov AT gmail dot com *
+
+	* data/Makefile.am: Remove a duplicated line INTLTOOL_XML_RULE is used twice in Makefile.am, which results in
+	having two same lines in generated Makefile.
+
+2014-01-29   Vladimir Zhbanov * vzhbanov AT gmail dot com *
+
+	* data/Makefile.am: Fix 'make distcheck' 'make distcheck' has been broken again in
+	c74ba603517380bae59f1ff68a5f100c2fb1c960
+
+2014-01-29   Vladimir Zhbanov * vzhbanov AT gmail dot com *
+
+	* src/Makefile.am: Fix 'make distcheck' Fix a bug introduced in 6aa50cc4c93fec243cba9cd37c86090496af3feb
+
+2012-12-04   Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+	* src/hid/gtk/gui-utils.c: Allow hotkeys in button labels Use _with_mnemonic functions to allow '_' hotkey.   Signed-off-by: bert * bert dot timmerman AT xs4all dot nl *
+
+2012-12-02   Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+	* src/hid/gtk/gui-output-events.c, src/macro.h: Add UNKNOWN_NAME
+	macro UNKNOWN_NAME macro is the same as UNKNOWN, but allow to specify
+	"unknown name", which can be useful for localization.   Signed-off-by: bert * bert dot timmerman AT xs4all dot nl *
+
+2014-01-26   Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+	* src/hid/gtk/gui-top-window.c: Add tooltips to mode menu buttons  Signed-off-by: bert * bert dot timmerman AT xs4all dot nl *
+
+2014-01-18   Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+	* po/POTFILES.in, src/hid/lpr/lpr.c, src/hid/ps/ps.c: Add strings
+	from LPR and PS HID's to translation  Signed-off-by: bert * bert dot timmerman AT xs4all dot nl *
+
+2012-12-02   Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+	* src/hid/gtk/gui-dialog-print.c: Print dialog i18n  Signed-off-by: bert * bert dot timmerman AT xs4all dot nl *
+
+2014-01-26   bert * bert dot timmerman AT xs4all dot nl *
+
+	* data/.gitignore: Ignore data/pcb.appdata.xml.   Signed-off-by: bert * bert dot timmerman AT xs4all dot nl *
+
+2014-01-25   bert * bert dot timmerman AT xs4all dot nl *
+
+	* data/Makefile.am, data/pcb.appdata.xml, data/pcb.appdata.xml.in,
+	po/POTFILES.in: Let appdata have translatable strings.   Signed-off-by: bert * bert dot timmerman AT xs4all dot nl *
+
+2014-01-12   bert * bert dot timmerman AT xs4all dot nl *
+
+	* data/Makefile.am: Added the appdata target to the Makefile.   Signed-off-by: bert * bert dot timmerman AT xs4all dot nl *
+
+2014-01-12   bert * bert dot timmerman AT xs4all dot nl *
+
+	* data/pcb.appdata.xml: Added an appdata file.   Signed-off-by: bert * bert dot timmerman AT xs4all dot nl *
+
+2013-02-03   Bert Timmerman * bert dot timmerman AT xs4all dot nl *
+
+	* src/hid/gtk/gui-netlist-window.c: Fixing a typo.   Signed-off-by: Bert Timmerman * bert dot timmerman AT xs4all dot nl
+	*  Signed-off-by: bert * bert dot timmerman AT xs4all dot nl *
+
+2013-02-03   Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+	* src/hid/gtk/gui-config.c, src/hid/gtk/gui-misc.c,
+	src/hid/gtk/gui-netlist-window.c, src/report.c: Add strings to
+	translation with context  Signed-off-by: Bert Timmerman * bert dot timmerman AT xs4all dot nl
+	*  Signed-off-by: bert * bert dot timmerman AT xs4all dot nl *
+
+2012-12-01   Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+	* src/gettext.h, src/global.h: Use gettext.h for pgettext()  Signed-off-by: bert * bert dot timmerman AT xs4all dot nl *
+
+2014-01-26   Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+	* po/ru.po: Updated Russian translation  Signed-off-by: bert * bert dot timmerman AT xs4all dot nl *
+
+2014-01-25   Jorge Barros de Abreu * ficmatin10 AT gmail dot com *
+
+	* po/pt_BR.po: pt_BR language update  Signed-off-by: bert * bert dot timmerman AT xs4all dot nl *
+
+2013-09-02   Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+	* src/find.c: Use ngettext for message with plural form  Signed-off-by: bert * bert dot timmerman AT xs4all dot nl *
+
+2014-01-16   xmd * shinobi dot jack AT gmail dot com *
+
+	* src/hid/gerber/gerber.c: gerber.c: added an option for Hackvana
+	file name convention.   Signed-off-by: bert * bert dot timmerman AT xs4all dot nl *
+
+2012-12-01   Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+	* src/hid/gtk/ghid-main-menu.c: Menu items i18n This adds i18n for gtk menus Closes-bug: lp-1113758
+
+2014-01-20   Vladimir Zhbanov * vzhbanov AT gmail dot com *
+
+	* autogen.sh, src/.gitignore, src/Makefile.am: Fix menu
+	gettextization Changes were made to eliminate errors output by 'make distcheck' or
+	'make -C po update-po'.  Closes-bug: lp-913458
+
+2012-12-01   Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+	* po/POTFILES.in: Fix .res.in to .res.h in POTFILES.in Affects-bug: lp-913458
+
+2014-01-18   Jorge Barros de Abreu * ficmatin10 AT gmail dot com *
+
+	* po/LINGUAS, po/pt_BR.po: Added pt_BR translation file.   Signed-off-by: bert * bert dot timmerman AT xs4all dot nl *
+
+2013-10-10   Kevin Redon * kevredon AT mail dot tsaitgaist dot info *
+
+	* src/djopt.c: add missing option splitlines in djopt_syntax  Signed-off-by: bert * bert dot timmerman AT xs4all dot nl *
+
+2013-10-10   Kevin Redon * kevredon AT mail dot tsaitgaist dot info *
+
+	* src/action.c: fix missing ) typo in changeclearsize_syntax  Signed-off-by: bert * bert dot timmerman AT xs4all dot nl *
+
+2013-10-27   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/gtk/gui-misc.c, src/hid/gtk/gui-top-window.c: Fix lockup
+	when a scroll event is received outside the drawing area This can occur if the user is dragging a component in the drawing
+	area (hence a pointer grab is in operation), and during this drag,
+	the user moves the mouse outside the drawing area and touches the
+	scroll wheel.  We then hit the scroll event handler, mouse action handler, action
+	dispatcher etc.. and find we do not have a current location known.
+	(The cursor is outside the drawing area).  We then prompt for a
+	location, and using a recursive main- loop, wait for some kind (e.g.
+	a mouse click) which gives one.  The problem appears to be caused by the fact it is likely we get a
+	second scroll event with the first, and that we process this from
+	within the recursive main-loop. We are still outside the drawing
+	area, so prompt the user for a location, and enter another level of
+	recursion. (In my tests, I was able to hit 6 or 7 levels deep of
+	main-loop recursion).  Our code fails to exit its recursive main-loop if it rucurses, and
+	in any case, we would not want to prompt the user "n" times in a
+	row. The failure to exit from recursion is probably due to the event
+	handlers attached by the first recursive main-loop being called
+	prior to those attached later. (We attempt to quit the first
+	recursive main-loop, but cannot, as there are others now running).  As a quick work-around to the immediate problem, prevent scroll
+	events being received from within the recursive main-loop. This
+	prevents the lockup, but ideally we should re-think how we handle
+	these events to avoid requiring the user to click on a coordinate.  I have also added a GDK_THREADS_{LEAVE,ENTER} pair around running
+	the main-loop, as this is what GTK's code does for gtk_dialog_run().
+
+2013-08-03   Markus Hitter * mah AT jump-ing dot de *
+
+	* tests/golden/hid_bom1/Makefile.am,
+	tests/golden/hid_bom1/bom_general.bom,
+	tests/golden/hid_bom1/bom_general.xy,
+	tests/golden/hid_bom2/Makefile.am,
+	tests/golden/hid_bom2/bom_general.xy,
+	tests/golden/hid_bom2/test.bom,
+	tests/golden/hid_bom3/bom_general.bom,
+	tests/golden/hid_bom3/test.xy,
+	tests/golden/hid_bom4/bom_general.bom,
+	tests/golden/hid_bom4/bom_general.xy: Regenerate tests after "Make
+	xy file output IPC 7531 compliant.".
+
+2012-12-31   dark141 AT gmail dot com * dark141 AT gmail dot com *
+
+	* src/hid/bom/bom.c: Make xy file output IPC 7531 compliant.   Improved code style by Bert Timmerman * bert dot timmerman AT
+	xs4all dot nl * dot
+
+2013-08-02   Eugene Mikhantiev * mikhantiev AT gmail dot com *
+
+	* po/POTFILES.skip: Add intl/plural.c to POTFILES.skip
+
+2012-11-08   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/action.c: src/action.c: add a number of comments.  ... in the hope they're right.
+
+2013-07-31   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/res_parse.y: src/res_parse.y: handle resource globals
+	gracefully.  Likely, res_file is used somewhere to check something. In case a
+	resource file was loaded earlier, but the current parsing is from a
+	string, res_file is still != NULL, so this check would mislead.  Solution: Clear res_file and res_filename as soon as the file           behind it gets closed.  Also replace a number of zeros with the more appropriate NULL.  Affects-bug: lp-1206882
+
+2013-07-15   DJ Delorie * dj AT delorie dot com *
+
+	* src/action.c: Additional checks for existing names In ActionElementList, add an additional check for
+	DESCRIPTION_NAME(e) before comparing with an old footprint.
+
+2013-06-22   Bert Timmerman * bert dot timmerman AT xs4all dot nl *
+
+	* src/Makefile.am: src/Makefile.am: revert the AM_CPPFLAGS change as
+	it breaks the building process.   Signed-off-by: Bert Timmerman * bert dot timmerman AT xs4all dot nl
+	*
+
+2013-06-18   Leo Bärring * leo dot barring AT gmail dot com *
+
+	* configure.ac, doc/extract-docs, doc/pcb.texi, gts/Makefile.am,
+	src/Makefile.am, src/hid/lesstif/main.c: Patch to resolve archlinux
+	build warn/errors.   Signed-off-by: Bert Timmerman * bert dot timmerman AT xs4all dot nl
+	*
+
+2013-04-19   Gabriel Paubert * paubert AT iram dot es *
+
+	* src/hid/gerber/gerber.c: Gerber: use 0.1mil resolution for
+	imperial drill files.   Acked-by: Andrew Poelstra * apoelstra AT wpsoftware dot net *
+	 Acked-by: Peter Stuge * peter AT stuge dot se *
+
+2013-04-19   Gabriel Paubert * paubert AT iram dot es *
+
+	* src/pcb-printf.c, src/pcb-printf.h: pcb-printf: Add 0.1mil
+	resolution, improve documentation and a small cleanup.  0.1mil resolution is needed for improved imperial drill file
+	generation.  Apart form this, the list of %m unit modifiers is now
+	fully documented and a redundant test was removed.   Acked-by: Andrew Poelstra * apoelstra AT wpsoftware dot net *
+	 Acked-by: Peter Stuge * peter AT stuge dot se *
+
+2013-04-19   Gabriel Paubert * paubert AT iram dot es *
+
+	* src/hid/gerber/gerber.c: Gerber: reset aperture numbers on
+	initialization.  This prevents aperture numbers from growing to infinity if you
+	export several times to Gerber in the same GUI session.   Acked-by: Andrew Poelstra * apoelstra AT wpsoftware dot net *
+	 Acked-by: Peter Stuge * peter AT stuge dot se *
+
+2013-04-13   Bert Timmerman * bert dot timmerman AT xs4all dot nl *
+
+	* src/hid/ps/ps.c: ps.c: correction in printer calibration.   Reported-by: Stephen R. Besch * sbesch AT buffalo dot edu *  Signed-off-by: Bert Timmerman * bert dot timmerman AT xs4all dot nl
+	*
+
+2012-11-01   Bert Timmerman * bert dot timmerman AT xs4all dot nl *
+
+	* doc/gs/installation.texi: doc/gs/installation.texi: better use
+	"yum localinstall" to keep the updater synchronised.  Corrected some typos.   Signed-off-by: Bert Timmerman * bert dot timmerman AT xs4all dot nl
+	*
+
+2012-04-18   Bert Timmerman * bert dot timmerman AT xs4all dot nl *
+
+	* doc/gs/installation.texi: doc/gs/installation.texi: Added a remark
+	about administrator-privileges.   Signed-off-by: Bert Timmerman * bert dot timmerman AT xs4all dot nl
+	*
+
+2012-01-11   Bert Timmerman * bert dot timmerman AT xs4all dot nl *
+
+	* doc/gs/installation.texi: doc/gs/installation.texi: Added
+	information how to install pcb on Fedora.   Signed-off-by: Bert Timmerman * bert dot timmerman AT xs4all dot nl
+	*
+
+2012-08-13   Kai-Martin Knaak * kmk AT lilalaser dot de *
+
+	* src/.gitignore: add parse_y.output to src/.gitignore  Signed-off-by: Bert Timmerman * bert dot timmerman AT xs4all dot nl
+	*
+
+2012-12-02   Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+	* src/hid/gtk/ghid-cell-renderer-visibility.c: Don't localize signal
+	name  Signed-off-by: Bert Timmerman * bert dot timmerman AT xs4all dot nl
+	*
+
+2013-01-03   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c: find.c: Remove some "flag" variable usage in DRCFind() Avoid confusion by passing *FLAG constants directly to some
+	functions.  This removes several cases where we would set the
+	variable, use it once, then change it for the next usage, making the
+	code more succinct.  I was not able to remove the flag variable entirely, as the while
+	loop calling DoIt() relies on it being changed inside the loop in
+	order to terminate. It should be possible to re-write the loop exit
+	condition if desired, but I'm not sure I completely understand the
+	behaviour of the existing code yet.
+
+2013-01-03   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c: find.c: Remove "flag" variable in DRCAll(), and pass
+	explicitly each time.  This avoids confusion by making the flag passed to each call
+	clearer.  It removes several cases where we would set the variable,
+	use it once, then change it for the next usage, making the code more
+	succinct.
+
+2013-01-03   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c: find.c: Fix flag passed to ListStart() in DRCFind().  We should have set the flag before calling ListStart(), as it marks
+	the first item with that flag.
+
+2013-01-03   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c: find.c: Fix possible un-assigned use of "flag" in
+	DRCFind(), fix bloated test.  Caught by inspection.. no idea why the compiler didn't notice.  Before commit 4cbfadfb7a496e60c25f47c88bdb374b4d3777bb, our local
+	"flag" variable was the file-global "TheFlag". If the "shrink" test
+	was not run, the code called ClearFlagOnAllObjects() with the
+	previously assigned "TheFlag". After the above commit, we would use
+	"flag" unassigned.  If the shrink test is executed, the "FOUNDFLAG" is cleared from
+	objects, leaving a SELECTEDFLAG image on the copper in question as a
+	reference to compare against when considering the bloated geometry.
+	(This is the wrong reference, as we should be comparing against the
+	non-shrunk case).  If the shrink test was not run, we left no reference for the boated
+	test.  We should clear FOUNDFLAG _and_ SELECTEDFLAG after the shrunk test,
+	then construct a new reference to start with, using non-bloated
+	geometry.  This partly fixes the behaviour of the bloated test, as it is now
+	run against a non-bloated reference, not a shrunk reference. This
+	fixes false reports of "Copper areas too close" for track objects
+	encountered after a "Potential for broken trace" warning.  There are still other issues with the bloated DRC test. One
+	important one is that it may run multiple times on the same geometry
+	if a "Potential for broken trace" error is present, or if the
+	"shrink" test is not run.  The repeated runs are because in the "Potential for broken trace"
+	case, only part of the track (or none if we skip the shrink test)
+	will get the DRCFLAG set. DRCFind then will be called repeatedly on
+	all pins, pads and vias, despite having already touched the geometry
+	with the bloated test.  To fix this, we need to separate the shrink
+	and bloat tests into distinct passes, and set the DRCFLAG on objects
+	during both tests. We can't simply set the DRCFLAG from the bloated
+	test as it stands, as doing so would mask investigating "Potential
+	for broken trace" cases after the first encountered.  An example of false "Copper areas too close" being fixed by this
+	commit is the following test-case: FileVersion[20091103] PCB["" 65.000mm 15.0000mm] Grid[984.251969 0.0000 0.0000 1] PolyArea[3100.006200]
+	Thermal[0.500000] DRC[0.5000mm 0.5000mm 0.5000mm 0.2500mm 0.4000mm
+	0.5000mm] Flags("nameonpcb,uniquename,clearnew,snappin")
+	Groups("1,c:2,s:3:4")
+
+	Styles["Signal,0.5000mm,1.0000mm,0.5000mm,0.2500mm:Power,25.00mil,60.00mil,35.00mil,10.00mil:Fat,40.00mil,60.00mil,35.00mil,10.00mil:Skinny,6.00mil,24.02mil,11.81mil,6.00mil"]Attribute("PCB::grid::unit" "mm") Attribute("PCB::grid::size"
+	"0.2500mm") Via[9.7500mm 7.2500mm 1.6000mm 0.5000mm 0.0000 0.5000mm "" ""]
+	Via[53.5000mm 7.2500mm 1.6000mm 0.5000mm 0.0000 0.5000mm "" ""]
+	Layer(1 "top") ( 	Line[9.7500mm 8.5000mm 28.0000mm 8.5000mm 0.5000mm 0.5000mm
+		"clearline"] Line[9.7500mm 7.2500mm 9.7500mm 8.5000mm 0.5000mm
+		0.5000mm "clearline"] Line[28.2500mm 8.5000mm 53.5000mm 8.5000mm
+		0.5000mm 0.5000mm "clearline"] Line[53.5000mm 7.2500mm 53.5000mm
+	8.5000mm 0.5000mm 0.5000mm "clearline"] ) Layer(2 "bottom") ( )
+	Layer(3 "silk") ( ) Layer(4 "silk") ( )
+
+2013-01-03   DJ Delorie * dj AT delorie dot com *
+
+	* src/hid/png/png.c: png: --fill-holes Add an option to the PNG exporter to draw pin/via drill holes as
+	filled instead of hollow, for use with CNC machines that don't need
+	a "helper" hole in the copper.  Also fixed a doc typo.
+
+2013-01-03   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c: find.c: Use SetThing, rather than open-coding
+	assignments to thing_* I'm trying to identify all uses of SetThing and similar consructs,
+	so I can eventually kill them.
+
+2013-01-03   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c: find.c: Remove unnecessary PIN/VIA test from
+	SetThing() This is not needed since commit
+	d581a90edc7fb7c0b4c6351611cc4a6689d7620b which put similar code into
+	ADD_PV_TO_LIST(), the only caller which could have previously
+	resulted in a SetThing call with the wrong type.
+
+2013-01-03   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* configure.ac: configure.ac: Test for libgd once, not per HID which
+	uses it.  This avoids some repeated tests, so should help to speed up the
+	configure process a little. This commit also enforces testing for
+	the required PNG support in libgd if the gcode or nelma HIDs are
+	selected.
+
+2013-01-03   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* configure.ac: configure.ac: Remove CC_OR_CXX_FLAGS substitution
+	from configure.ac
+
+2013-01-03   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/Makefile.am: src/Makefile.am: We don't gain anything by
+	setting AM_CFLAGS to C_OR_CXX_FLAGS We were duplicating command-line flags un-necessarily, and it does
+	not stop the a build with the C++ compiler using CFLAGS, as was (in
+	hindsight) the original intention before commit
+	72cdf2ecef3361a00fbd0ee3e540f7383e62272c where I changed a complete
+	CFLAGS override to a AM_CFLAGS addition.  As we should not override CFLAGS in a Makefile (it prevents the user
+	from setting CFLAGS at "make" time), I'm removing this completely.
+
+2013-01-03   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* configure.ac: configure.ac: Use CPPFLAGS, not CFLAGS for our
+	include directives.  We were previously using CFLAGS for adding pre-processor includes,
+	where these should really end up in the CPPFLAGS variable.
+	Confusingly, their constituents tend to come from variables set by
+	autoconf / pkgconfig expansions in the form of LIBNAME_CFLAGS.  Doing this allows the user to easily override CFLAGS at build time
+	without needing to replicate the enture include path list.
+
+2013-01-03   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* configure.ac: configure.ac: Save and restore CPPFLAGS either side
+	of test for libgd Ensure we add GD_CFLAGS to the the main flag list later instead.
+
+2013-01-03   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* configure.ac: configure.ac: Don't add GD_CFLAGS to CFLAGS, only
+	CPPFLAGS GD_CFLAGS will almost certainly contain pre-processor flags, not
+	strictly compiler flags, and we don't need to have a copy in CFLAGS
+	as well.
+
+2013-01-03   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* configure.ac: configure.ac: Save and restore CPPFLAGS either side
+	of test for X11 stuff We add X_CFLAGS and X_LIBS to the main flag list later, so don't
+	leave an extra copy lying around in the CPPFLAGS variable.
+
+2013-01-03   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* configure.ac: configure.ac: Don't copy CFLAGS into CPPFLAGS for
+	X11 tests CFLAGS should work in its own right, and CPPFLAGS does not need a
+	copy.
+
+2013-01-03   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* configure.ac: configure.ac: Don't add win32 build flags to
+	CPPFLAGS as well as CFLAGS These are compiler flags only, not preprocessor flags.
+
+2013-01-03   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* configure.ac: Remove CYGWIN_CFLAGS and CYGWIN_CPPFLAGS from
+	configure.ac We no longer ship a build-script which requries these. Any specific
+	CFLAGS for a given build should be overridden by specifying CFLAGS
+	at configure or make time.
+
+2013-01-01   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/gcode/gcode.c: hid/gcode: Add a more direct "#include
+	<locale.h>" for setlocale() The lack of this include caused a failure to build on my machine
+	when compiled without optimisation (-O0). With any optimisation
+	turned on, the build would work without the include.  Having chased this strangeness down, it turns out that we were
+	including libintl.h via global.h, and that libintl.h includes
+	locale.h, IFF optimisation is turned on at the time it is
+	pre-processed.
+
+2013-01-01   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c: find.c: Remove some unnecessary includes.
+
+2013-01-01   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c: find.c: Move file-global "NumberOfPads" into the
+	function which uses it
+
+2012-12-24   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c: find.c: Pass flags to sub-functions without using
+	static variable "TheFlag".
+
+2012-12-30   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c: find.c: Remove some un-needed forward declarations of
+	static functions
+
+2012-12-25   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c, src/polygon.c, src/polygon.h: Refactor signature of
+	PlowsPolygon callback to take userdata This allows callers to pass arbitrary data into their callbacks
+	without resorting to nasty workarounds like global variables.
+
+2012-12-30   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* : commit 6963cfda0ca661a7a1397ef5b54e418f76b89260  Author: Peter
+	Clifton * peter AT clifton-electronics dot co dot uk * Date:   Mon
+	Dec 24 00:13:41 2012 +0000
+
+2012-12-30   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/main.c: Change FOUND objects colour from green to purple...  Aim to differentiate the region connected to the search origin from
+	those which should be (but are not yet) connected to it.
+
+2012-12-10   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/action.c: Tag physically/logically connected items differently
+	in the "Find" action This commit restores the semantic meaning of the "found" flag to
+	what it was before commit 764c3560a722c768a7048f5c70811ec363862882,
+	and uses the "connected" flag to identify which of the "found"
+	(logically connected) items are physically connected to the search
+	origin.  The aim here is to differentiate between what an ohm-meter would
+	show connected with the board as-currently designed, and what it
+	would read if all rat-lines were implemented.
+
+2012-12-24   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c: find.c: Use pointers to objects, not shallow copies of
+	their structures Since commit 4658e4074b4446337467f99fa2b8f9b7147e7e01, we don't
+	modify the copied objects, so we can use pointers instead.
+
+2012-12-23   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/action.c, src/gpcb-menu.res.in, src/pcb-menu.res.in: Add
+	option to "Select" action, differentiating "FOUND" and "SELECTED"
+	objects The exising "Select" action included the variant
+	"Select(Connected)", which selected any object with the "FOUNDFLAG"
+	set.  As we now make a distinction between logical and physical
+	connectivity (FOUND and SELECTED) respectively, this commit
+	introduces a split into "Select(Found)" and "Select(Connected)"
+	variants.  There is a change here, in that "Select(Connected)" now acts on
+	objects with the CONNECTED flag set, (not the FOUND flag as it did
+	previously).
+
+2012-12-23   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/draw.c, src/undo.h: draw.c: Support for coloring objects with
+	CONNECTEDFLAG set We now color objects with the FOUNDFLAG set in the FoundColor, not
+	the ConnectedColor as we did previously. Unsurprisingly, objects
+	with the CONNECTEDFLAG set get rendered in the ConnectedColor.  CONNECTEDFLAG is tested before FOUNDFLAG, and takes precidence if an
+	object has both flags set.
+
+2012-12-23   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/create.c, src/global.h, src/main.c: Add FoundColor to resource
+	settings, distinct from the Connected color For now, set ConnectedColour and FoundColor to the same green, so we
+	can introduce this patch series without flip-flopping the renderered
+	colours.
+
+2012-12-22   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/const.h, src/strflags.c: Add a new flag, "connected" /
+	CONNECTEDFLAG.  The intended use of this flag is to mark physical connections.
+
+2012-12-22   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c: find.c: Avoid adding any rat-lines at all when AndRats
+	is false.  Previously we were adding some rat-lines when searching for physical
+	connections. We should stop at the physical->rat boundary, not the
+	opposite end of the ratline.
+
+2012-12-23   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c: find.c: Fix inverted logic in LookupConnection() When AndRats is true, we may consider starting with a ratline
+	object, otherwise we do no. I got this backwards by mistake.
+
+2012-12-25   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c: find.c: Remove file-global "IsBad", use
+	PlowsPolygons() return value.  This variable was used to communicate state from the drc_callback(),
+	however PlowsPolygons() returns the sum of the values returned by
+	its callback function. As our callback returns 0 on success, 1 on
+	DRC failure, we know any non-zero return from PlowsPolygons()
+	implies a DRC problem.
+
+2012-12-24   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c: find.c: Avoid modifying bounds of the objects we are
+	passing down Bloat the bounding box into a local BoxType structure instead, to
+	avoid passing inconsistent objects to lower level functions.
+
+2012-12-27   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c: find.c: Avoid repeated lookup of layer pointer by
+	number Rename a few "layer" varaibles to "layer_no", and re-use "layer"
+	where necessary as a LayerType *, rather than a Cardinal.
+
+2012-12-24   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c: find.c: Tidy up some macro definitions (Whitespace only changes)
+
+2012-12-24   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c: find.c: Remove unused function pv_touch_callback()
+
+2012-12-24   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/action.c: action.c: Fix drawing lines on silkscreen with
+	auto-enforce DRC enabled The auto-enforce DRC code was not incorrectly setting FOUNDFLAG on
+	one of each pair of line-segments drawn with a mouse-click.  Completes the fix from commit
+	aa7196dc29a761ecddda1a40d68fedf39ab78c31 Affects-bug: lp-699291
+
+2012-12-23   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/action.c, src/find.c, src/find.h,
+	src/hid/gtk/gui-drc-window.c, src/hid/gtk/gui-netlist-window.c,
+	src/hid/lesstif/netlist.c, src/rats.c, src/report.c, src/select.c,
+	src/set.c: Rename ResetFound{LinesAndPolygons,PinsViasAndPads} and
+	ResetConnections These functions are not specific to the "found" flag, (or the soon
+	to be introduced "connected" flag, so to avoid confusion, rename
+	them:   ClearFlagOnLinesAndPolygons ()   ClearFlagOnPinsViasAndPads ()   ClearFlagOnAllObjects ()
+
+2012-12-23   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/buffer.c, src/const.h, src/copy.c: Add #define list of flags
+	to unset when copying into a buffer Previously, the removal of FOUNDFLAG was hard-coded in various
+	places, lets consolidate the location to one header file, as when we
+	split the FOUNDFLAG to differentiate logical and physical
+	connectivity, we will only have one location to update.
+
+2012-12-23   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/gtk/gui-drc-window.c: hid/gtk/gui-drc-window.c: Refactor
+	unset_found_flags() to use ResetConnections() There is a lot of code in this function which matches
+	ResetConnections(), we only need to take care of the undo buffer
+	management at the end.
+
+2012-12-23   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/const.h: const.h: Re-indent flags with spaces, rather than
+	tabs Whitespace only change. Allows adding flags with longer hex-strings
+	without having to shuffle the indenting too much.
+
+2012-12-23   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/const.h: const.h: Fix flag documentation for the NOPASTE flag We were listing the wrong flag value for this flag.
+
+2012-12-19   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c: find.c: Refactor some duplicated code for adding
+	objects to various lists
+
+2012-12-22   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/gtk/gtkhid-gl.c: hid/gtk: (GL) Disable scissor test for
+	pinout preview widget.  The partial drawing is interacting badly with our double-buffering,
+	as we are not painting the entire buffer we are swapping onto the
+	screen.  I have left a comment and some debug code, as this may need
+	revisiting to address what is really going on here.
+
+2012-12-22   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/gtk/gtkhid-gl.c: hid/gtk: Disable GL alpha-blending for
+	the pinout preview We aren't using subcompositing for this, so don't alpha-blend.
+
+2012-12-23   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/gtk/gtkhid-gl.c: hid/gtk: (GL) Start with the stencil test
+	disabled in all rendering Keep the pinout preview and pixmap rendering paths as close as
+	possible to the main drawing window one. There was probably no real
+	issue here, but it doesn't hurt to be consistent.
+
+2012-12-22   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/gtk/gtkhid-gl.c: hid/gtk: Use common GL setup and teardown
+	code for different expose paths
+
+2012-12-22   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/buffer.c, src/copy.c, src/create.c, src/create.h,
+	src/parse_y.y: create.c: Remove Element parameter to
+	CreateNewElement() Lets always make a new element, not re-use old memory. It seems
+	saner to do this when we have an API with "New" in the name! No callers use the facility to fill in a pre-allocated (or already
+	used) ElementType structure any more.
+
+2012-12-22   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/parse_y.y: parse_y.y: Pass NULL explicitly to
+	CreateNewElement(), rather than via yyElement This makes things clearer.
+
+2012-12-22   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/buffer.c, src/copy.c, src/copy.h,
+	src/hid/gtk/gui-pinout-preview.c: copy.c: Remove "Dest" variable to
+	CopyElementLowLevel() function We no longer require this, as all callers pass NULL in order that
+	CopyElementLowLevel() allocates memory for the new element.
+
+2012-12-22   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/buffer.c: AddElementToBuffer(): Let CopyElementLowLevel()
+	create the element to copy into.
+
+2012-12-22   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/gtk/gtkhid-gdk.c, src/hid/gtk/gtkhid-gl.c,
+	src/hid/gtk/gui-pinout-preview.c, src/hid/gtk/gui-pinout-preview.h: 
+	hid/gtk: Make the pinout preview element use dynamicly allocated
+	memory.  By embedding the element structure in our data-structure, we were
+	forcing various element initialisation and copy routines to be
+	require operating on a pre-allocated ElementType - rather than just
+	returning us a pointer to a newly allocated ElementType.
+
+2012-12-22   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/mymem.c: mymem.c: Allow elements to exist independently of a
+	buffer.  If the DataType pointer to GetElementMemory is NULL, we allocate
+	memory but don't add to the buffer's element list or counters.  This is useful as it will allow rendering of pinout previews without
+	needing separate (or static) memory allocation to hold the previewed
+	Element.
+
+2012-12-22   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/draw.c: draw.c: Always draw pin / hole names when in pinout
+	preview This was removed a long time ago by mistake when refactoring some of
+	this drawing code, and causes missing text in the Lesstif HID pinout
+	preview.
+
+2012-12-22   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/common/extents.c: hid/common: Fix extents computation in
+	nm units We still had some fallout from the nm units conversion here, using
+	MAXINT rather than COORD_MAX for some bounds checking.  This was completely breaking the lesstif HID pinout preview window.
+
+2012-12-22   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/buffer.c, src/copy.c, src/copy.h,
+	src/hid/gtk/gui-pinout-preview.c: copy.c: Add mask_flags parameter
+	to CopyElementLowLevel() This avoids us needing to unset ExtraFlags separately in buffer.c
+
+2012-12-22   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/action.c, src/hid/gtk/gui-netlist-window.c,
+	src/hid/lesstif/netlist.c, src/select.c, src/select.h: select.c:
+	Rename SelectConnection() to SelectByFlag() and add flag parameter
+
+2012-12-22   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/select.c: select.c: Rename "Flag" to "select" for clarity.  This will help avoid confusion when adding a "flag" parameter to
+	specify which flag to check in SelectConnection().
+
+2012-12-19   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c, src/find.h: find.c: Make some setup / teardown
+	functions not used outside of find.c static.  This makes the following functions private to find.c:   InitComponentLookup   FreeComponentLookupMemory   InitLayoutLookup   FreeLayoutLookupMemory
+
+2012-12-18   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c, src/find.h: find.c: Remove unused APIs SaveFindFlag()
+	and RestoreFindFlag() The find.c APIs which require flags setting up now take the flag as
+	a function parameter.
+
+2012-12-18   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/gtk/gui-netlist-window.c, src/hid/lesstif/netlist.c,
+	src/rats.c, src/select.c: Remove calls to SaveFindFlag() These were needed before our APIs specified which flags they
+	operated on, but are now redundant. All entrypoints in find.c which
+	use flags now set the flag before commencing work.
+
+2012-12-18   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c, src/find.h, src/hid/gtk/gui-netlist-window.c,
+	src/hid/lesstif/netlist.c, src/rats.c, src/select.c: find.c: Add
+	flag parameter to RatFindHook() API.  This saves us having to expose an API to save and restore the find.c
+	static "theFlag" variable.  The key difference (once the save/restore are removed), is that we
+	then won't restore "TheFlag" variable after we are done. This will
+	not matter as all entry-points in find.c now take a flag parameter
+	and there should not be reentrancy in these calls.
+
+2012-12-16   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/batch/batch.c: hid/batch: Add missing #include
+	"hid_draw.h" I should have built-tested all HIDs when I refectored this.. oops.
+
+2012-12-16   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/lesstif/main.c: hid/lesstif: Fix incorrect structure
+	assignment due to bad refactoring.  I should have built-tested all HIDs when I refectored this.. oops.   Reported-by: Ralf Gerbig * rge AT quengel dot org *
+
+2012-12-15   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c, src/find.h: find.c: Make
+	Is{Arc,Line,Pad,Polygon}InPolygon() functions static These are only used from within find.c, so make them static so the
+	compiler is more free to optimise their usage.
+
+2012-12-15   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c: Remove unused functions {LO,PV}TouchesLine() and their
+	callbacks Unused since we removed the unused function clearLine()
+
+2012-12-15   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c, src/find.h: find.c: Remove unused function lineClear()
+
+2012-12-14   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/action.c, src/find.c, src/find.h,
+	src/hid/gtk/gui-netlist-window.c, src/hid/lesstif/netlist.c,
+	src/rats.c, src/report.c, src/select.c, src/set.c: Add flag
+	parameters to ResetFound{LinesAndPolygons,PinsViasAndPads},
+	ResetConnections This avoids relying on the state to be magically correct
+
+2012-12-14   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/autoroute.c: autoroute.c: Remove setting the Find flag to
+	DRCFLAG We don't use the find features directly, those we do already take
+	care of setting the appropriate flag.
+
+2012-12-14   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/find.c: find.c: Set TheFlag to FOUNDFLAG explicitly in
+	LookupUnusedPins() We relied on it being set to an appropriate value, instead set it to
+	FOUNDFLAG, similar to how LookupElementConnections() does.
+
+2012-12-14   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/gtk/gui-netlist-window.c, src/hid/lesstif/netlist.c: (GTK, Lesstif): Netlist window - Set find flag to FOUNDFLAG
+	explicitly Our "Select net" functionality depends on find.c's "TheFlag"
+	variable being set to FOUNDFLAG. In some circumstances (e.g. after a
+	DRC check), this may not be the case, and selecting nets from the
+	netlist window breaks.
+
+2012-12-14   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/select.c: select.c: Set an explicit flag to search using when
+	selecting nets by name If find.c's "TheFlag" variable is not equal to FOUNDFLAG, our code
+	for selecting nets by name did not work. This could happen, for
+	example - after a DRC check, where "TheFlag" appears to be left
+	equal to SELECTEDFLAG.
+
+2012-12-14   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/toporouter.c: toporouter.c: Remove un-necessary call to
+	ResetConnections() This is not required by the call to CollectSubnets() which follows
+	it, and we don't have any other requirement to clear flags.  Futhermore, as toporouter.c does not setup which flag is being
+	operated on, the effect of this call will depend on which flag has
+	been left in "TheFlag" variable in find.c.
+
+2012-12-14   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/autoroute.c: autoroute.c: Remove unnecessary call to
+	ResetConnections() This is not required to call CollectSubnets, (as the rats.c internal
+	function GatherSubnets() cleans the flag from objects before it uses
+	it).  We also use DRCFLAG to mark nets in CreateRouteData(), however: 1. We should be able to assume the DRCFLAG is clear on all objects
+	   at the point we un-necessary to reset it.  2. We call GatherSubnets() after we reset the DRCFLAG contents, and    that leaves the objects in a clean state without that flag set.
+
+2012-12-13   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/ps/ps.c: hid/ps: Add support for rendering "fullpoly"
+	polygons Affects-bug: lp-1089532
+
+2012-12-13   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/common/draw_helpers.c: hid/common/draw_helpers.c: Fix
+	thindraw for "fullpoly" polygons Affects-bug: lp-1089532
+
+2012-12-13   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/common/hidgl.c: hid/common/hidgl.c: Add support for
+	rendering "fullpoly" polygons This finally bit someone (and eneded up with them producing a bad
+	batch of boards), so it is about time I fixed this.  Affects-bug: lp-1089532
+
+2012-12-07   Kevin Redon * kevredon AT mail dot tsaitgaist dot info *
+
+	* src/create.c: Don't merge lines with different clearances When multiple lines (with same direction, thickness, and clear
+	flags) are moved, they are merged into one line. We should also
+	check the line clearances match to ensure the lines are suitable for
+	merging.  [Commit message re-worded by Peter Clifton]  Signed-off-by: Kevin Redon * kevredon AT mail dot tsaitgaist dot
+	info *
+
+2012-12-02   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/common/hidgl.c: hid/common/hidgl.c: Make (polygon->clipped
+	== NULL) test silent This is the case for other implementations of this API, so we should
+	aim to be consistent.
+
+2012-12-02   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/draw.c, src/hid/common/draw_helpers.c: Move polygon->Clipped
+	test into the HID implementations which require it.  This keeps draw.c more consistent between object types.
+
+2012-12-02   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/gtk/gtkhid-gl.c: hid/gtk: Call ghid_fill_pcb_polygon via
+	(HID_DRAW *)->fill_pcb_polygon() This indirection allows a more graceful fallback in the case where
+	we run out of stencil bits and replace our (HID_DRAW
+	*)->fill_pcb_polygon() vfunc pointer with the
+	common_fill_pcb_polygon() implementation.
+
+2012-12-02   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/draw.c, src/hid/common/draw_helpers.c,
+	src/hid/common/draw_helpers.h, src/hid/common/hidnogui.c,
+	src/hid/gtk/gtkhid-main.c, src/hid/lesstif/main.c, src/hid/ps/ps.c,
+	src/hid_draw.h: Add (HID_DRAW *)->draw_pcb_polygon() API This pushes special case thindraw vs. fill handling out of the core,
+	and into each individual HID implementation. We retain the old
+	implementation as a helper function, common_gui_draw_pcb_polygon()
+	in hid/common/draw_helpers.c.  This keeps the API more consistent between polygons and other object
+	types by introducing the new (HID_DRAW *)->draw_pcb_polygon() API.  I've left the (HID_DRAW *)->{fill,thindraw}_pcb_polygon() APIs for
+	now, as it means we can avoid a little code duplucation between the
+	GUIs. We may consider removing (or hiding) these APIs at some point,
+	as they are now _NOT_ intended to be called from outside of the
+	GUI's (HID_DRAW *)->draw_pcb_polygon() implementation.
+
+2012-12-02   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/common/draw_helpers.c, src/hid/common/draw_helpers.h: 
+	hid/common: Fix including draw_helpers.h from draw_helpers.c The prototype for hid_common_fill_pcb_pv() was incorrect. To avoid
+	this kind of mistake in the future, include the header file from the
+	.c file.
+
+2012-11-24   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/draw.c: draw.c: Collapse line and arc drawing wrapper
+	functions into only callers
+
+2012-11-24   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/draw.c, src/draw.h, src/hid/common/draw_helpers.c,
+	src/hid_draw.h, src/print.c: Move DrawTextLowlevel() routine from
+	draw.c into the HID_DRAW API The API is now called draw_pcb_text, and the default implementation
+	resides in hid/common/draw_helpers.c
+
+2012-11-24   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/draw.c, src/hid/common/draw_helpers.c, src/hid_draw.h: Move
+	_draw_arc() routine from draw.c into HID_DRAW API The API is now called draw_pcb_arc, and the default implementation
+	resides in hid/common/draw_helpers.c
+
+2012-11-24   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/draw.c, src/hid/common/draw_helpers.c, src/hid_draw.h: Move
+	_draw_line() routine from draw.c into HID_DRAW API The API is now called draw_pcb_line, and the default implementation
+	resides in hid/common/draw_helpers.c
+
+2012-11-24   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/common/hidgl.c: hidgl: Fixup signature gluTessCallback
+	functions to work on Win32 On windows these callbacks are invoked using stdcall calling
+	convention and we need to annotate then with the "CALLBACK" macro to
+	achieve this.  If we ever end up using glew.h, we can probably drop the #ifndef
+	CALLBACK check which #defines CALLBACK to an empty string on other
+	platforms.
+
+2012-11-23   Eugene Mikhantiev * mikhantiev AT gmail dot com *
+
+	* src/Makefile.am: Add hid_draw.h to PCB_SRC in Makefile  Signed-off-by: Bert Timmerman * bert dot timmerman AT xs4all dot nl
+	*
+
+2012-11-23   Markus Hitter * mah AT jump-ing dot de *
+
+	* tests/golden/hid_gcode1/Makefile.am,
+	tests/golden/hid_gcode1/gcode_oneline-drillmill.gcode,
+	tests/golden/hid_gcode10/gcode_oneline-drillmill.gcode,
+	tests/golden/hid_gcode11/Makefile.am,
+	tests/golden/hid_gcode11/gcode_oneline-drillmill.gcode,
+	tests/golden/hid_gcode2/Makefile.am,
+	tests/golden/hid_gcode2/out-drillmill.gcode,
+	tests/golden/hid_gcode3/Makefile.am,
+	tests/golden/hid_gcode3/gcode_oneline-drillmill.gcode,
+	tests/golden/hid_gcode4/Makefile.am,
+	tests/golden/hid_gcode4/gcode_oneline-drillmill.gcode,
+	tests/golden/hid_gcode5/Makefile.am,
+	tests/golden/hid_gcode5/gcode_oneline-drillmill.gcode,
+	tests/golden/hid_gcode6/Makefile.am,
+	tests/golden/hid_gcode6/gcode_oneline-drillmill.gcode,
+	tests/golden/hid_gcode7/Makefile.am,
+	tests/golden/hid_gcode7/gcode_oneline-drillmill.gcode,
+	tests/golden/hid_gcode8/Makefile.am,
+	tests/golden/hid_gcode8/gcode_oneline-drillmill.gcode,
+	tests/golden/hid_gcode9/gcode_oneline-drillmill.gcode,
+	tests/tests.list: gcode HID: regenerate the test files.  This covers the fixes introduced in the last three commits and also
+	removes a number of golden output files.
+
+2012-11-23   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: distribute drillmill radius' to
+	all drills.  Previously, it was distributed to only the first of it's size.
+
+2012-11-22   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: don't write "empty" drillmill
+	files.  All changes except the first and the last line are whitespace
+	changes.  Closes-bug: lp-1074196
+
+2012-11-22   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: choose the right set of
+	drillmill drills.  The logic was inverted.
+
+2012-11-22   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/draw.c: draw.c: Refactor color setting code to be more compact
+
+2012-11-21   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/crosshair.c, src/draw.c, src/hid.h,
+	src/hid/common/draw_helpers.c, src/hid/common/extents.c,
+	src/hid/common/hidnogui.c, src/hid/gcode/gcode.c,
+	src/hid/gerber/gerber.c, src/hid/gtk/gui.h, src/hid/lesstif/main.c,
+	src/hid/nelma/nelma.c, src/hid/png/png.c, src/hid/ps/eps.c,
+	src/hid/ps/ps.c, src/hid_draw.h, src/print.c: Move HID drawing API
+	prototypes into a separate header file Due to the mess of places we define various things in and the order
+	we pull in headers, we cannot easily create APIs in hid.h which rely
+	on being passed PCB data-structures.
+
+2012-11-21   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid.h, src/hid/batch/batch.c, src/hid/common/draw_helpers.c,
+	src/hid/common/draw_helpers.h, src/hid/common/extents.c,
+	src/hid/common/hidnogui.c, src/hid/gcode/gcode.c,
+	src/hid/gerber/gerber.c, src/hid/gtk/gtkhid-gl.c,
+	src/hid/gtk/gtkhid-main.c, src/hid/lesstif/main.c,
+	src/hid/nelma/nelma.c, src/hid/png/png.c, src/hid/ps/eps.c,
+	src/hid/ps/ps.c, src/hid/ps/ps.h: Rename HID_DRAW_API to just
+	HID_DRAW Just because its neater
+
+2012-08-01   Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+	* src/hid/gtk/gui-top-window.c: Add strings to translation  Signed-off-by: Bert Timmerman * bert dot timmerman AT xs4all dot nl
+	*
+
+2012-11-21   Eugene Mikhantiev * mikhantiev AT gmail dot com *
+
+	* po/ru.po: Updated Russian translation  Signed-off-by: Bert Timmerman * bert dot timmerman AT xs4all dot nl
+	*
+
+2012-11-20   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/gtk/gtkhid-main.c, src/hid/lesstif/main.c: Revert moving
+	common_draw_helpers_init() call in lesstif and GTK HIDs Not a functional change.. I'm just being anal and wishing to keep
+	these matching the other HIDs.
+
+2012-11-19   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/crosshair.c, src/draw.c, src/hid.h, src/hid/batch/batch.c,
+	src/hid/common/draw_helpers.c, src/hid/common/draw_helpers.h,
+	src/hid/common/extents.c, src/hid/common/hidnogui.c,
+	src/hid/gcode/gcode.c, src/hid/gerber/gerber.c,
+	src/hid/gtk/gtkhid-gl.c, src/hid/gtk/gtkhid-main.c,
+	src/hid/lesstif/main.c, src/hid/nelma/nelma.c, src/hid/png/png.c,
+	src/hid/ps/eps.c, src/hid/ps/ps.c: HID: Merge {fill/thindraw}_pcb_*
+	APIs into HID_DRAW_API structure I wanted to keep these separate from the pure graphics APIs, but
+	after poking at this more and more, it seems hard to justify why we
+	should do that.
+
+2012-11-20   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/autoroute.c: autoroute.c: Destroy debug graphics context when
+	we're finished with it I caught this one by inspection, as we don't tend to build with
+	autorouter debugging enabled. I tested quickly before comitting, and
+	this change doesn't break anything. This said, I couldn't see any
+	debug rendering output either (before or after this patch).. so that
+	might be broken somewhere.
+
+2012-11-19   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/lpr/lpr.c: hid/lpr: Don't initiialise the graphics API
+	vtable Just being picky here..  I spent ages trying to work out why the old code didn't segfault,
+	given it does not call common_draw_helpers_init() to setup the
+	various pad, pin and polygon drawing routines.  It turns out that when we actually go to export, we call into the ps
+	HID directly - and ignore the lpr.c HID vtables.  Lets avoid confusion by partly setting up the lpr vtables, and leave
+	the graphics HID member as NULL.
+
+2012-11-19   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/batch/batch.c: hid/batch: Fix build after splitting out
+	graphics APIs I forgot this one, along with build-testing lesstif - oops.  Fixes breakage from commit 273b243d90cda84e09f52b7ff995fa82afdc3de0            and from commit 741f203565ba9f92b0ace80d858073f75ced2716
+
+2012-11-19   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/draw.c, src/draw.h, src/print.c: draw.c: Add hidGC parameter
+	to DrawTextLowLevel() function Avoid it assuming the correct gc to use is Output.fgGC
+
+2012-11-19   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/draw.c: draw.c: Add gc parameter to _draw_line() function Avoid it assuming the correct GC is Output.fgGC
+
+2012-11-18   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/lesstif/main.c: Make lesstif_hid struct static again Changed to non-static un-necessarily in commit
+	a1d8ee04cc571cca4cbe7ef86b40bef612a0c387
+
+2012-11-18   Eugene Mikhantiev * mikhantiev AT gmail dot com *
+
+	* src/hid/lesstif/main.c: lesstif: corrections on recent HID API
+	changes.   Reported by Eugene Mikhantiev * mikhantiev AT gmail dot com * PCB can not be built with `--with-gui=lesstif' due to the HID API
+	changes in commit 73b243d90cda84e09f52b7ff995fa82afdc3de0  Signed-off-by: Bert Timmerman * bert dot timmerman AT xs4all dot nl
+	*
+
+2012-11-15   Bert Timmerman * bert dot timmerman AT xs4all dot nl *
+
+	* configure.ac: configure.ac: fixed a typo.   Signed-off-by: Bert Timmerman * bert dot timmerman AT xs4all dot nl
+	*
+
+2012-11-15   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/action.c, src/find.c, src/find.h, src/netlist.c, src/report.c: 
+	Stop "find connected" following rat-lines. Fixes confusing output.  Suppose we have two nets, A and B, and some components. If we
+	connect a pin of a component which was supposed to be connected to
+	net A, to net B, the "f" (find connected) action will falsely show
+	the entirity of net A and net B connected to each other. In reality,
+	the nets are not electrically connected, it is just the ratline
+	between the mis-connected component pin (mis-connected to Net B),
+	and net A, where the ratline for that pin should end up.  It MIGHT be better if we fix this bug by not adding rat-lines to
+	shorted connections, as often those rat-lines would take some
+	convoluted route through the copper of the net which is shorted to
+	that connection end-point. These rat-line(s) would no longer be
+	spatially associated with the mis-connected wiring, and encourage
+	the user to further short net A and net B together to complete the
+	ratline.  This bug was a contributing factor to a mistake in a production
+	board I made recently, where as a last step in production, I added a
+	star- ground short between two different ground planes (analogue and
+	digital).  The "find connected" action, "f" showed them connected
+	together (as I expected), but unfortunately, due to a thermal I left
+	out, they were not actually connected - despite PCB's green
+	rendering suggesting that they were.
+
+2012-11-15   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/autoroute.c, src/crosshair.c, src/draw.c, src/hid.h,
+	src/hid/common/draw_helpers.c, src/hid/common/extents.c,
+	src/hid/common/hidnogui.c, src/hid/gcode/gcode.c,
+	src/hid/gerber/gerber.c, src/hid/gtk/gtkhid-main.c,
+	src/hid/lpr/lpr.c, src/hid/nelma/nelma.c, src/hid/png/png.c,
+	src/hid/ps/eps.c, src/hid/ps/ps.c, src/hid/ps/ps.h, src/print.c: 
+	HID: Move non-PCB specific drawing calls into a separate API
+
+2012-11-14   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/Makefile.am, src/hid/gcode/gcode.c, src/hid/gcode/gcode.h: 
+	hid/gcode: Make gcode_hid structure static
+
+2012-11-14   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid.h, src/hid/common/extents.c, src/hid/common/hidnogui.c,
+	src/hid/gcode/gcode.c, src/hid/gerber/gerber.c,
+	src/hid/gtk/gtkhid-gdk.c, src/hid/gtk/gtkhid-gl.c,
+	src/hid/gtk/gui.h, src/hid/nelma/nelma.c, src/hid/png/png.c,
+	src/hid/ps/eps.c, src/hid/ps/ps.c: Convert mask type to enum
+
+2012-11-14   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/djopt.c, src/flags.c, src/hid.h, src/hid/gtk/gtkhid-main.c,
+	src/hid/lesstif/main.c, src/vendor.c: Convert argument in HID_Flags
+	to (void *) rather than (int) void * allows us to pass pointers on all platforms, 64bit or
+	otherwise. We can still use casting macros to safely pass integer
+	values via this pointer.  Avoids the ugliness of castnig a size_t sized offset_of value into
+	an int. Due to the size of our structures, this did not cause any
+	actual bugs, but was not good practice.
+
+2012-11-13   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/djopt.c, src/draw.h: Remove unused references to
+	SwitchDrawingWindow()
+
+2012-11-14   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/action.c, src/set.h: Remove unused prototypes SetZoom and
+	RedrawZoom, along with old #ifdef'd code SetZoom() was removed in commit
+	94e927e03850bfc0e8a0f3b161ae99b6784747f0 There were a few references to SetZoom left under an #ifdef
+	HAVE_LIBSTROKE, which will not work, so I have commented those as
+	well.
+
+2012-11-14   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/create.c, src/global.h, src/parse_y.y: Remove unused zoom
+	settings from the PCB and settings data-structures
+
+2012-11-13   Bert Timmerman * bert dot timmerman AT xs4all dot nl *
+
+	* src/parse_y.y: parse_y.y: As of November 2012 the cursor position
+	is not written to file anymore  Signed-off-by: Bert Timmerman * bert dot timmerman AT xs4all dot nl
+	*
+
+2012-11-13   Bert Timmerman * bert dot timmerman AT xs4all dot nl *
+
+	* src/file.c: Removed the cursor position from being written to the
+	pcb file.   Signed-off-by: Bert Timmerman * bert dot timmerman AT xs4all dot nl
+	*
+
+2012-11-10   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/common/hidgl.c, src/hid/common/hidgl.h,
+	src/hid/gtk/gtkhid-gl.c: hid/common/hidgl: Add API to initialise a
+	rendering pass Serves as a place to perform any necessary initialisation within
+	hidgl.c, saving lots of separate calls being made by its callers.
+
+2012-11-10   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/ps/ps.c: Fix outline drawing to only apply on copper
+	layers This matches the old comments in the code, and fixes (removes)
+	outline drawing on the solder mask prints.  This partially reverts commit
+	294494e56695251e63c0da9f243d6f59447f1c9f "Fix PS rect/outline
+	logic", which changed the logic, and commit
+	d2458383a60b670ad1c42163ac24fcc63fcab457 where I changed the comment
+	to match the code.
+
+2012-11-10   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/gtk/ghid-layer-selector.c: hid/gtk: Fix stupid (missing
+	semicolon) bug breaking compile I was _sure_ I'd buid tested this before pusing... obviously not!
+
+2011-09-09   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/ghid-layer-selector.c: hid/gtk: Avoid using
+	g_object_{set,set}_data() where we don't need to Personally I hate to see data stashed and recalled with these
+	functions, especially where is just a case of passing appropriate
+	data to callback functions.
+
+2012-11-10   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/gtkhid-gl.c, src/hid/gtk/gui-top-window.c,
+	src/hid/gtk/gui.h: Use trackball to allow rotation of 3D view
+
+2012-11-10   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/gtk/gui-trackball.c: hid/gtk: Make the trackball widget
+	sexy * Use cairo to render a nice sphere with radial gradients.  * Use widget sensitivity of the track-ball drawing to better.    differentiate between 2D / 3D views.  * Allow double-clicking on the track-ball to reset the 3D view.
+
+2012-11-10   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* po/POTFILES.in, src/Makefile.am, src/hid/common/trackball.c,
+	src/hid/common/trackball.h, src/hid/gtk/gui-trackball.c,
+	src/hid/gtk/gui-trackball.h: Add virtual trackball code
+
+2012-11-10   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/gtkhid-gl.c: hid/gtk: Add feature to force an
+	immediate redraw if framerate is low If more than a certain time (currently hard-coded at 50ms) has
+	elapsed since the last expose callback, invalidate_all() will wait
+	and process updates before returning.  This is handy to allow animation of auto-router progress, where the
+	gui mainloop is not hit until the auto-routing operation is fully
+	complete.
+
+2012-11-01   Markus Hitter * mah AT jump-ing dot de *
+
+	* tests/golden/hid_gcode1/Makefile.am,
+	tests/golden/hid_gcode1/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode1/gcode_oneline-0.8890.drill.gcode,
+	tests/golden/hid_gcode1/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode1/gcode_oneline-drillmill.gcode,
+	tests/golden/hid_gcode1/gcode_oneline-outline.gcode,
+	tests/golden/hid_gcode1/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode10/Makefile.am,
+	tests/golden/hid_gcode10/gcode_oneline-0.8890.drill.gcode,
+	tests/golden/hid_gcode10/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode10/gcode_oneline-drillmill.gcode,
+	tests/golden/hid_gcode10/gcode_oneline-outline.gcode,
+	tests/golden/hid_gcode10/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode11/Makefile.am,
+	tests/golden/hid_gcode11/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode11/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode11/gcode_oneline-drillmill.gcode,
+	tests/golden/hid_gcode11/gcode_oneline-outline.gcode,
+	tests/golden/hid_gcode11/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode2/Makefile.am,
+	tests/golden/hid_gcode2/out-0.0350.drill.gcode,
+	tests/golden/hid_gcode2/out-0.8890.drill.gcode,
+	tests/golden/hid_gcode2/out-bottom.gcode,
+	tests/golden/hid_gcode2/out-drillmill.gcode,
+	tests/golden/hid_gcode2/out-outline.gcode,
+	tests/golden/hid_gcode2/out-top.gcode,
+	tests/golden/hid_gcode3/Makefile.am,
+	tests/golden/hid_gcode3/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode3/gcode_oneline-0.8890.drill.gcode,
+	tests/golden/hid_gcode3/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode3/gcode_oneline-drillmill.gcode,
+	tests/golden/hid_gcode3/gcode_oneline-outline.gcode,
+	tests/golden/hid_gcode3/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode4/Makefile.am,
+	tests/golden/hid_gcode4/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode4/gcode_oneline-0.8890.drill.gcode,
+	tests/golden/hid_gcode4/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode4/gcode_oneline-drillmill.gcode,
+	tests/golden/hid_gcode4/gcode_oneline-outline.gcode,
+	tests/golden/hid_gcode4/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode5/Makefile.am,
+	tests/golden/hid_gcode5/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode5/gcode_oneline-0.8890.drill.gcode,
+	tests/golden/hid_gcode5/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode5/gcode_oneline-drillmill.gcode,
+	tests/golden/hid_gcode5/gcode_oneline-outline.gcode,
+	tests/golden/hid_gcode5/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode6/Makefile.am,
+	tests/golden/hid_gcode6/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode6/gcode_oneline-0.8890.drill.gcode,
+	tests/golden/hid_gcode6/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode6/gcode_oneline-drillmill.gcode,
+	tests/golden/hid_gcode6/gcode_oneline-outline.gcode,
+	tests/golden/hid_gcode6/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode7/Makefile.am,
+	tests/golden/hid_gcode7/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode7/gcode_oneline-0.8890.drill.gcode,
+	tests/golden/hid_gcode7/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode7/gcode_oneline-drillmill.gcode,
+	tests/golden/hid_gcode7/gcode_oneline-outline.gcode,
+	tests/golden/hid_gcode7/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode8/Makefile.am,
+	tests/golden/hid_gcode8/gcode_oneline-0.8890.drill.gcode,
+	tests/golden/hid_gcode8/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode8/gcode_oneline-drillmill.gcode,
+	tests/golden/hid_gcode8/gcode_oneline-outline.gcode,
+	tests/golden/hid_gcode8/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode9/Makefile.am,
+	tests/golden/hid_gcode9/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode9/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode9/gcode_oneline-drillmill.gcode,
+	tests/golden/hid_gcode9/gcode_oneline-outline.gcode,
+	tests/golden/hid_gcode9/gcode_oneline-top.gcode, tests/tests.list: 
+	gocde HID: refresh all the G-code exporter tests.  There have been a lot of new features recently and a bunch of
+	comments refinements. Also the default unit was changed from inch to
+	mm, so don't be surprised too much there's nothing left as before.
+	All new test results have been hand-verified in a G-code viewer.
+
+2012-11-01   Markus Hitter * mah AT jump-ing dot de *
+
+	* tests/run_tests.sh: testsuite: regenerate also Makefile.am.  Previously, running ./run_tests.sh --regen <some test> would have
+	simply deleted Makefile.am, which is required by the automatic
+	Makefile generation mechanism. Now this file is regenerated
+	properly, too.
+
+2012-11-01   Markus Hitter * mah AT jump-ing dot de *
+
+	* tests/run_tests.sh: testsuite: limit regenerations to one test at
+	a time.  Previously, an accidental "./run_tests.sh --regen" without arguments
+	would regenerate all tests, causing a big mess.
+
+2012-11-01   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: don't predrill drillmill holes.  As mill bits - in opposite to drill bits - are expected to be stiff,
+	predrilling drillmill holes is a waste of time.
+
+2012-11-01   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: remove an obsolete TODO comment.  Units come along in groups, units other than mm and inch should be
+	handled properly already.
+
+2012-11-01   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: don't drill drillmill holes.  Actually, this just avoids writing out the drill G-code file for
+	sizes >= drillmill diameters. While files written out can be
+	ignored, not writing them should reduce confusion among all the
+	written files.
+
+2010-12-03   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: implement drill-milling.  This is, if a hole is equal or bigger than the milling tool, use the
+	milling tool instead of a drill tool to manufacture the hole. Big
+	advantage is, milling tools can create holes of arbitrary sizes by
+	moving a circle.  The feature is optional, on by default.  G02/G03 circle movements are avoided, as not all machine controllers
+	understand them. Instead, a polygon is milled, with enough sides to
+	stay for any hole size  within the user choosen accuracy.  If the hole is only slightly bigger than the mill tool, don't move
+	the circle; a simple plunge is enough.
+
+2012-10-28   Bert Timmerman * bert dot timmerman AT xs4all dot nl *
+
+	* src/parse_y.y: Correction of two typos.  Closes-bug: lp-1072285  Signed-off-by: Bert Timmerman * bert dot timmerman AT xs4all dot nl
+	*
+
+2012-09-03   Larry Doolittle * ldoolitt AT recycle dot lbl dot gov *
+
+	* tools/pcbdiff: pcbdiff: add PCBDIFF_DPI to allow user-defined
+	resolution.  This should be the last part of fixing bug #1045907.
+
+2012-09-03   Larry Doolittle * ldoolitt AT recycle dot lbl dot gov *
+
+	* tools/pcbdiff: pcbdiff: take out --only-visible.  This option leads to PNGs of different sizes and making stereo
+	images of PNGs of different sizes is (apparently) not possible.
+
+2012-09-09   Markus Hitter * mah AT jump-ing dot de *
+
+	* tools/pcbdiff: pcbdiff: allow spaces in file names / file paths.
+
+2012-09-09   Markus Hitter * mah AT jump-ing dot de *
+
+	* tools/pcbdiff: pcbdiff: add a level of abstraction for binaries.  This may help for future developments, where searching in places
+	other than PATH may be advised. It helps right now for quick
+	debugging hacks.
+
+2012-08-30   Larry Doolittle * ldoolitt AT recycle dot lbl dot gov *
+
+	* ChangeLog, README, utils/git2cl: Improve documentation of
+	ChangeLog file Note in the file where it comes from.  Mention it and git commit
+	messages in the README.
+
+2012-08-30   Larry Doolittle * ldoolitt AT recycle dot lbl dot gov *
+
+	* src/hid/ps/eps.c: fix a format string mismatch
+
+2012-08-30   Larry Doolittle * ldoolitt AT recycle dot lbl dot gov *
+
+	* ChangeLog, README, README.git, doc/pcb.texi, doc/refcard.tex,
+	src/hid/batch/batch.c, src/main.c, src/misc.c: replace gpleda.org
+	with geda-project.org
+
+2010-11-30   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: add user defined feedrates for
+	outline milling.  This includes two new fields in the GUI, as plunging (moving into
+	the material) has a different feedrate than the normal feedrate now.
+	These different feedrates are needed by many tools, e.g. end mills.
+
+2010-11-30   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: add user defined feedrates for
+	drilling.  This includes a new field in the GUI.
+
+2010-11-30   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c, src/hid/gcode/trace.c,
+	src/hid/gcode/trace.h: gcode HID: add user defined feedrates for
+	isolation milling.  This includes two new fields in the GUI, as plunging (moving into
+	the material) has a different feedrate from the normal feedrate now.
+	These different feedrates are needed by many tools, e.g. end mills.
+
+2012-08-27   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: move all the code common on file
+	open into a subroutine.
+
+2012-08-27   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: remove an unused struct.  The common HID code has now a better alternative, anyways, so it's
+	unlikely this will ever be used again.
+
+2012-08-27   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: fix a potential memory leak.
+
+2012-08-27   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: correct a few comments.
+
+2010-11-09   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: create G-code for milling the
+	outline of the board.  This is a rarther simple implementation, which mills a rectangle
+	with the maximum extents of the board.
+
+2010-11-02   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: reorder user interface to a more
+	logical sequence.  The new sequence is: general - isolation milling - drilling -
+	milling - output options.  Also completed the term "mill" to "iso-mill", as outline milling is
+	around the corner.  Default measurement unit changed to mm, as I'm not aware of a single
+	machine accepting "mil" as G-code unit.
+
+2012-08-22   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: another few cleanups.
+
+2012-08-22   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: release the PNG a lot earlier.
+
+2012-08-22   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: rename gcode_f2 to gcode_f.  ... as there's no longer a gcode_f used.
+
+2012-08-22   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: make usage of gcode_f local.  There's no need to keep a file open all the time, all the processing
+	is done in memory.
+
+2012-08-22   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: simplify the backside flipping
+	algorithm.  As the PNG has to be copied to a bitmap anyways, this can also be
+	used to flip the back layer.  The code flipping the PNG is still in place, but only needed for the
+	PNG written do a file (for error checking).
+
+2012-08-22   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: remove an untrue comment.  Actually, gdImageCreate() creates an pallette-based image.
+
+2012-08-22   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: fix the bug producing an
+	inverted image.  For copying an pallette-based image, the pallette has to be copied,
+	too.
+
+2012-08-20   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: make G-code output aware of
+	dynamic extents.  This also offsets the produced G-code so the rectangular edge
+	closest to {0, 0} in pcb is {0, 0} in the G-code. Very useful when
+	actually producing boards.  The most simple way to achieve this is to draw just the part inside
+	the outline into the intermediate image. No change to the PNG tracer
+	needed.  Unfortunately, this exposes a bug, making the traced PNG image
+	inverted. This will be fixed with the next commit.
+
+2012-08-13   Kai-Martin Knaak * kmk AT lilalaser dot de *
+
+	* src/hid/ps/eps.c: make EPS boundingbox parameters integers
+	Currently, the bounding box parameters given in the header of an EPS
+	file are floats. The standard calls for integers, though. Some
+	applications like epstool fail if the boundingbox is anything but
+	integer. This patch uses llrint() to output the nearest integer as
+	bounding box parameters. In addition, it adds a high resolution
+	header for the benefit of applications that can use the extra
+	precision.   Example of the bounding box lines produced by the patch:  %%BoundingBox: 0 0 370 426  %%HiResBoundingBox: 0.000000 0.000000 369.503937 426.196850  Closes-bug: lp-1035999
+
+2012-08-20   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: add header required for
+	UpdateExtents().
+
+2012-08-20   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: write board size according to
+	dynamic extent.  This isn't much, so far, more on dynamic extent to come.
+
+2012-08-20   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: make gcode_toolradius an int.  It's always used as such.
+
+2012-08-19   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/change.c, src/change.h, src/global.h: Introduce dynamic board
+	size.  The goal is to eventually define the board's extent by the outline
+	layer, only. That way, all the exporters can export properly sized
+	layouts.  Undoubtly, this can also influence the GUIs. For example, "zoom to
+	fit" becomes a slightly different meaning and drawing outside the
+	board's extent becomes possible. Autorouting and similars can be
+	limited to the actual board size. Resizing a board to the lower left
+	no longer requires the error-prone moving of all the stuff and keeps
+	file diffs small.
+
+2012-07-15   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: write drill size into the file,
+	too.  So far, drill size was given by the file name only, which can change
+	accidently.
+
+2012-07-15   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: gcode HID: implement predrilling Predrilling is using the milling tool to mark all drill spots. This
+	eases and enhances accuracy of manual drilling.  This resolves patch #12 and obsoletes patch #11 and #13 of
+	Traumflug's wishlist: https://bugs.launchpad.net/pcb/+bug/699497 The difference between patch #12 and this patch is, drills for
+	predrilling are sorted regardless of size, so performance should be
+	better.
+
+2012-07-08   Eric Brombaugh * ebrombaugh1 AT cox dot net *
+
+	* src/hid/gtk/gui-dialog.c: gtk: point file selector dialogs at the
+	current directory Recent Gtk versions (at least 3 and onward) have broken the file
+	selection dialog in the case that no default directory was
+	specified: rather than using the current working directory, it uses
+	a fake "Recently Chosen Items" directory, from which save/load
+	doesn't work.  This patch fixes the behavior.  Commit by Andrew Poelstra
+
+2012-07-07   Gabriel Paubert * paubert AT iram dot es *
+
+	* src/hid/gerber/gerber.c: gerber: Implement option for metric
+	output Compiles cleanly, all tests pass, default behaviour is completely
+	unchanged. --Andrew
+
+2012-07-06   Andrew Poelstra * apoelstra AT wpsoftware dot net *
+
+	* tests/golden/hid_bom1/bom_general.xy,
+	tests/golden/hid_bom2/bom_general.xy, tests/golden/hid_bom3/test.xy: 
+	Fix comments in golden samples for hid_bom[123] tests With the nanometers switchover, a comment in the BOM output changes
+	from "output in mils" to "output in mil", breaking tests.
+
+2012-07-06   Andrew Poelstra * apoelstra AT wpsoftware dot net *
+
+	* src/hid/bom/bom.c: Fix bom.c behavior regarding xy-in-mm option If the --xy-in-mm option is passed, that should override any other
+	unit selection behavior (since this is a legacy option, so anyone
+	using it is not expecting the new many-unit features).  Also, fix a test-breaking change in output precision.  This has apparently been broken since da403312 (audit bom.c for the
+	nanometers switchover), but was only noticed recently when the HID
+	tests were fixed.
+
+2012-07-06   Andrew Poelstra * apoelstra AT wpsoftware dot net *
+
+	* tests/golden/hid_bom1/bom_general.bom,
+	tests/golden/hid_bom1/bom_general.xy,
+	tests/golden/hid_bom2/bom_general.xy,
+	tests/golden/hid_bom2/test.bom,
+	tests/golden/hid_bom3/bom_general.bom,
+	tests/golden/hid_bom3/test.xy,
+	tests/golden/hid_bom4/bom_general.bom,
+	tests/golden/hid_bom4/bom_general.xy: Fix bom HID tests after commit
+	d30d3142 changed the line ordering Due to changes in macro.h, the ordering of the BOM output changed,
+	causing test failures.
+
+2012-06-14   Benjamin Bergman * ben AT benbergman dot ca *
+
+	* src/hid/png/png.c: Add options to change photo-mode colors.  Original patchset by Benjamin Bergman. Minor changes from Andrew
+	Poelstra.  Closes-bug: lp-1004796
+
+2012-05-25   DJ Delorie * dj AT delorie dot com *
+
+	* src/hid/ps/ps.c: Fix ps-bloat logic The ps-bloat option was using the int_value field instead of the
+	coord-value field, resulting in a bloat of zero all the time.
+	Fixed.
+
+2012-03-29   Andrew Poelstra * apoelstra AT wpsoftware dot net *
+
+	* src/rats.c: Remove manhattan check from rats.c Since commit 644f8d9, I cannot get the autorouter to segfault when
+	it attempts to deal with ratlines connected to non-manhattan lines.
+	So, I see no reason not to draw such lines in the first place.  However, when the autorouter is used, it will ignore any rats which
+	lead to a non-manhattan line. (And therefore not connect two points,
+	if the shortest connection would involve connecting diagonal
+	traces.) This is unexpected behavior, though IMO no more unexpected than the
+	old behavior, which was to ignore diagonal line segments and simply
+	route amongst the manhattan ones.  Closes-bug: lp-699248
+
+2012-03-29   Andrew Poelstra * apoelstra AT wpsoftware dot net *
+
+	* src/autoroute.c: Fix segfault when routing to non-straight pads Since the autorouter does not handle non-manhattan lines, it will
+	not route to non-straight pads. Therefore, when the autorouter
+	searches for the pins/pads at the endpoints of a rat, it ignores any
+	non-straght pads, returning NULL from the search.  The autorouter then tries to dereference this pointer and crashes.  The rest of the code, it seems, works to avoid ever giving such rats
+	to the autorouter, but it can be done if the user explicitly selects
+	such a rat and selects "Auto-route selected rats".  This patch catches the NULL pointer and simply ignores the rat.  It is possible that this is the cause of bug lp-699255, but this
+	seems unlikely, since the backtrace on that report does not show the
+	same NULL dereference, and the reporter was using "10-pin headers",
+	which presumably have no pads that could be marked as non-straight.  Affects-bug: lp-699255
+
+2012-03-29   Andrew Poelstra * apoelstra AT wpsoftware dot net *
+
+	* src/hid/gcode/gcode.c: Wrap gcode_do_export in setlocale() calls During gcode export, we temporarily switch locales to C to ensure
+	that output uses the proper decimal separator.  Closes-bug: lp-912077
+
+2012-03-29   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/find.c: Fix infinite loop on PCB::skip-drc attribute When doing a DRC check, pcb skips checking any layers who have the
+	PCB::skip-drc attribute set. However, when determining whether the
+	check is complete (via the ListsEmpty()) function, it doesn't skip
+	these layers.  The result is an infinite loop, since if there is work to be done on
+	a skip-drc layer, the checker will keep running until it is done --
+	i.e., will keep running forever.  This patch skips skip-drc layers in ListsEmpty().  Closes-bug: lp-829123
+
+2012-03-28   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/hid/gtk/gui-top-window.c, src/hid/lesstif/menu.c: Make
+	SelectLayer() respond to layer name as well as index Closes-bug: lp-699470
+
+2012-03-28   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/parse_l.l: Parse floating-point values without leading 0
+	correctly Closes-bug: lp-916984
+
+2012-03-28   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/hid/lesstif/main.c: Add missing const in lesstif/main.c
+
+2012-03-28   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/hid/gtk/gui-config.c, src/main.c: Allow saving of user
+	increment settings in Gtk.  It seems there is no clean way of implementing this without really
+	tearing up the setting-saving code and fixing the
+	SettingType/PCBType dichotomy, but at 26 lines, this was at least
+	short.  Closes-bug: lp-699464
+
+2012-03-28   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/hid/gtk/gui-config.c: Save CONFIG_Coord settings in Gtk The "Safe board width as default" checkbox has not been working
+	since commit fa2a0e35 back in August, when I added HID_Coord and
+	CONFIG_Coord to a couple of enums and forgot to update a switch
+	statement.  This patch fixes that. :-}
+
+2012-03-28   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/hid/gtk/gui-config.c, src/main.c, src/pcb-printf.c,
+	src/pcb-printf.h: Add grid-increment-mm (and similar) settings Added the following settings:   grid-increment-mm       grid-increment-mil   size-increment-mm       size-increment-mil   line-increment-mm       line-increment-mil   clear-increment-mm     clear-increment-mil These behave differently than the old settings of the same names
+	(from 20090929 and earlier). They take a measure, not a real number.
+	The -mm versions affect the increment settings when the user is
+	using a metric grid, and the -mil versions affect the settings for
+	imperial grids.  Old ~/.pcb/preferences files likely have lines like   grid-increment-mil = 5 which have been hanging around for several pcb versions. These
+	should be safely ignored, since, for example, "5" is now read as
+	"5nm", which is well below the minimum allowed increment setting.  These settings can be read but (so far) not written out, either to
+	the pcb or to the preferences file.
+
+2012-03-28   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/hid/gtk/gui-config.c: Add separate metric and imperial
+	increment settings to Gtk gui.
+
+2012-03-28   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/hid/gtk/gtkhid-main.c, src/hid/lesstif/main.c, src/main.c,
+	src/pcb-printf.c, src/pcb-printf.h: Collapse giant default increment
+	table into only two We now store two sets of increments - one for imperial and one for
+	metric. These will both be individually modifiable by the user.
+
+2012-02-06   Kai-Martin Knaak * kmk AT lilalaser dot de *
+
+	* ChangeLog, src/draw.c, src/main.c, src/parse_l.l, src/parse_y.y,
+	src/pcb-printf.c: Add "px" to the units allowed for --rat-thickness Add "px" to the set of units allowed for option --rat-thickness. The
+	purpose is to give thickness in terms of a fixed number of screen
+	pixels. Internally, this special unit is treated like nm. The
+	drawing routine decides to go for fixed width if rat thickness is
+	below 100nm.  Commit by Andrew Poelstra.  Closes-bug: lp-927422
+
+2012-03-27   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/gpcb-menu.res.in, src/pcb-menu.res.in: Change menus to use
+	user's settings for increments
+
+2012-03-27   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/action.c: Allow '+' and '-' (without magnitudes) for
+	user-preference in menu This does not actually change any menu files, just adds the
+	capability to use the user's settings in the Increments dialog for
+	controlling pcb.
+
+2012-03-26   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/misc.c: Check sscanf() return value in GetValue().  In case the user passes something like "+" with no digits to
+	GetValue, sscanf fails and the function returns an indeterminate
+	result. This patch fixes that, returning 0 instead if sscanf fails.
+
+2012-03-26   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/change.c: Remove empty if statement from change.c git blame dates an empty-body if statement back to 2003, so (presumably) the correct behavior is that it be empty. Therefore, I
+	removed the if to avoid confusing humans.  After this commit, pcb compiles completely and cleanly with:   clang version 2.9 (tags/RELEASE_29/final)   gcc version 4.6.2 20111027 (Red Hat 4.6.2-1)
+
+2012-03-26   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/res_parse.y: Add missing const in res_parse.y
+
+2012-03-26   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/djopt.c: Remove superfluous check that unsigned int is
+	nonnegative.  It seems to me that we'll sooner fix layer management altogether,
+	than change an index from an unsigned to signed variable. And in the
+	meantime, this check is unnecessary and potentially confusing.
+
+2012-03-26   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/change.c: Change no-ops from self-assignments to (void) casts This makes both clang and gcc happy (with nothing, both complain
+	about unused variables, and clang doesn't like the self-assignment).  splint still complains, but I think we'll have to live with that.
+
+2012-03-26   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/hid/gtk/gui-dialog.c: Add missing cast in hid/gtk/gui-dialog.c
+
+2012-03-17   Sergey Alyoshin * alyoshin dot s AT gmail dot com *
+
+	* src/parse_y.y: Fix segfault when reading Layer() with no name When reading pcb file with a line like   Layer (2 "") the lexer gives us a NULL in place of the empty string, which caused
+	a NULL-dereference and segfault. This patch allocates a new ""
+	string when reading nameless layers.  See
+
+	http://www.delorie.com/archives/browse.cgi?p=geda-user/2012/03/17/10:13:37
+
+2012-03-02   Felix Ruoff * Felix AT posaunenmission dot de *
+
+	* doc/pcb.texi: Fit docu to latest menu-item changes Affects-bug: lp-907040
+
+2012-03-06   Braddock Gaskill * braddock AT braddock dot com *
+
+	* src/gpcb-menu.res.in: Standardize gtk-menu Changes some names of menu-items. Also reodered some of them. This
+	will normalize the menu items to more closely follow modern menu
+	conventions like the Gnome user interface guidelines.  Closes-bug: lp-907040
+
+2012-03-02   Felix Ruoff * Felix AT posaunenmission dot de *
+
+	* doc/pcb.texi: actualize outdated menu-docu actualized some documentation for the menue. Some items has changed
+	their name and/or location in the past which was not changed in the
+	documentaion.
+
+2012-03-02   Felix Ruoff * Felix AT posaunenmission dot de *
+
+	* doc/pcb.texi: Actualize docu for (g)pcb-menu.res.in Today, pcb checks for more than one keyword in the
+	(g)pcb-menu.res.in: "Main Menu" and "Mouse".
+
+2012-02-21   Felix Ruoff * Felix AT posaunenmission dot de *
+
+	* src/hid/gtk/gui-dialog.c: Add file-filter for schematics import
+
+2012-02-17   Dan White * dan AT whiteaudio dot com *
+
+	* src/hid/gtk/gtkhid-main.c, src/hid/gtk/gui-dialog.c,
+	src/hid/gtk/gui.h: hid/gtk: ImportGUI() can select multiple files ..with one small modification to the original patch by Felix Ruoff Closes-bug: lp-934616
+
+2011-12-18   Vladimir Zhbanov * vzhbanov AT gmail dot com *
+
+	* src/main.c: Fixed command line batch output for some exporters This problem affects some exporters: gcode, eps, ps, nelma, probably
+	gerber (although it should already have been fixed for it). When
+	building pcb with non-C locale, pcb uses for output this locale's
+	settings. With locales using comma as numeric separator it causes
+	the wrong output for those formats. The problem does not affect an
+	export from GUI.  Closes-bug: lp-905968
+
+2012-01-20   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/line.c: Fiddle with the 45-degre line snapping code The results should be identical, but hopefully this is clearer code.  I believe there were some masked bugs lurking in the old
+	calculations, which shouldn't be present in the new code.
+
+2012-01-21   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/gtk/gtkhid-gl.c: hid/gtk: Remove XOR colour logic from the
+	GL rederer.  This code was not being used, so remove it.
+
+2012-01-22   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/common/draw_helpers.c: hid/common/draw_helpers.c: Fix
+	prototype to draw_octagon_poly() The thin_draw parameter is a bool, not a Coord.
+
+2011-12-27   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/move.c: move.c: Fix off-by one in memory copy loop.  Shorten the loop so we don't don't try to memmove a zero length
+	chunk off the end of our array. Might have been harmless, but lets
+	not take the chance.  Rename some variables to make things a bit clearer as well.  (Caught by Coverity).  Coverity-CID: 12
+
+2012-01-12   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/action.c: Set changed flag on PCB when locking / unlocking
+	objects
+
+2012-01-03   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/buffer.c: Update the crosshair constraints after mirroring or
+	rotating the buffer.  Avoids a bug where the paste location of the mirrored or rotated
+	buffer contents are improperly constrained based upon their old
+	bounding box.
+
+2011-12-26   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/djopt.c: djopt.c: Fix incorrect allocation.  I missed this fix from the commit
+	ff2492399fd4743c3fd89ffd4fe6650ad0d80a4a (Caught by coverity) Coverity-cid: 239
+
+2011-12-25   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* gts/matrix.c, gts/refine.c, gts/split.c, gts/vopt.c: gts: Avoid
+	performing computations with side-effects in g_assert statements g_assert (like assert), can be disabled at build time, so assertions
+	should therefore not contain any expressions which have
+	side-effects.  Coverity caught a number of these in the copy gts library we have
+	embedded.  There were also a couple which coverity didn't complain
+	about, which appear to be the same class of problem. Fix them by
+	separating the computation and the assertion test, adding a
+	temporary result variable as necessary.  Coverity-cid: 56 Coverity-cid: 57 Coverity-cid: 57 Coverity-cid: 58
+	Coverity-cid: 59
+
+2011-12-25   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/gtk/gui-netlist-window.c: hid/gtk: Avoid warnings when
+	netlist window is not created.  1. When the NetlistChanged action is fired, we should only update if
+	   the netlist window is visible. (It will be created up to date when
+	   the user asks for it).  2. Always show the netlist window when requested, even if it has no    entries. This is good for consistent UI behaviour anyway, as the
+	   user should be shown a blank netlist window if they request it..
+	   even if the is no content to display.
+
+2011-12-24   Peter Clifton * peter AT clifton-electronics dot co dot uk *
+
+	* src/hid/gtk/ghid-cell-renderer-visibility.c: hid/gtk: Add subtle
+	gradient effect to layer selector swatches Just because gradients are pretty ;)
+
+2011-12-24   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/gui-netlist-window.c: hid/gtk: Fix NetlistChanged
+	action crash when exporting from the commandline.  I broke this in commit 7308f512307158944482227d58e66373fd023d62 when
+	I added a missing notification to the GUI when free'ing the netlist.
+	It turns out that a command-line invoked export (such as used to
+	export images in the doc/ build) will hit this code-path, and
+	provoke the GUI netlist window code to try and update before the GUI
+	is actually loaded.  For now, lets fix this with a bandaid and just skip the netlist
+	update if the GUI is not up.  A brief inspection of the code (and test for the doc/ build)
+	suggests that the Lesstif HID is not affected by this problem. (It
+	has similar code to avoid creating the netlist window if the main
+	window is not already created).
+
+2011-12-24   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/gtkhid-main.c, src/hid/gtk/gui.h: hid/gtk: Move
+	ghid_gui_is_up variable into the ghidgui structure.  This lets us access it outside of gtkhid-main.c
+
+2011-12-24   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/global.h, src/mymem.h: Remove *TypePtr and *TypeHandle aliases
+	now we no longer use them (May break build of plugins, hence keeping this as a separately
+	revertable commit).
+
+2011-12-24   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/action.c, src/autoplace.c, src/autoroute.c, src/buffer.c,
+	src/buffer.h, src/change.c, src/change.h, src/copy.c, src/copy.h,
+	src/create.c, src/create.h, src/crosshair.c, src/data.c,
+	src/data.h, src/djopt.c, src/draw.c, src/draw.h, src/drill.c,
+	src/drill.h, src/edif.y, src/file.c, src/find.c, src/find.h,
+	src/fontmode.c, src/global.h, src/hid/gerber/gerber.c,
+	src/hid/gtk/gtkhid-gl.c, src/hid/gtk/gtkhid-main.c,
+	src/hid/gtk/gui-drc-window.c, src/hid/gtk/gui-netlist-window.c,
+	src/hid/gtk/gui-output-events.c, src/hid/gtk/gui.h,
+	src/hid/lesstif/netlist.c, src/hid/nelma/nelma.c, src/hid/ps/ps.c,
+	src/insert.c, src/insert.h, src/intersect.c, src/intersect.h,
+	src/line.c, src/line.h, src/macro.h, src/mirror.c, src/mirror.h,
+	src/misc.c, src/misc.h, src/move.c, src/move.h, src/mtspace.c,
+	src/mymem.c, src/mymem.h, src/netlist.c, src/parse_l.h,
+	src/parse_l.l, src/parse_y.y, src/polygon.c, src/polygon.h,
+	src/polygon1.c, src/print.c, src/puller.c, src/rats.c, src/rats.h,
+	src/remove.c, src/remove.h, src/report.c, src/rotate.c,
+	src/rotate.h, src/rubberband.c, src/search.c, src/search.h,
+	src/select.c, src/select.h, src/thermal.c, src/thermal.h,
+	src/toporouter.c, src/undo.c, src/undo.h, src/vendor.c,
+	src/vendor.h: Remove usage of *TypePtr and *TypeHandle type aliases Coverity already caught several bugs where we mixed up the various
+	FooType FooTypePtr and FooTypeHandle types when passing to sizeof().  Personally I find it much easier to follow FooType * and FooType **,
+	so drop the aliases and hopefully keep things earier to follow.
+
+2011-12-24   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/mymem.c: mymem.c: Fix incorrect types passed to sizeof() in a
+	couple of places (Caught by coverity) Coverity-cid: 242 Coverity-cid: 243 Coverity-cid: 244 Coverity-cid:
+	245
+
+2011-12-24   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/djopt.c: djopt.c: Allocate correct size for structure pointer (Caught by coverity) Coverity-cid: 239
+
+2011-12-24   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/undo.c: undo.c: Fix incorrect sizeof() when allocting memory
+	for netlist undo (Caught by coverity) Coverity-cid: 241
+
+2011-12-24   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/action.c: action.c: Unconditionally notify NetlistChanged()
+	when loading new netlist We need to call NetlistChanged() even if the loading failed,
+	otherwise the GUI is not informed that we free'd the old netlist.
+
+2011-12-24   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/mymem.c: Fix crash upon pressing "f" hotkey (find connected)
+	after a board revert.  Reproduction of this crash (before fix!): 1. Load a PCB with a netlist.  2. Open the netlist window to initialise the netlist.  3. File->Revert the PCB 4. Hit "f" key whilst the croshair is over any pad Analysis: When you File->Revert the layout, the GTK GUI's netlist window is
+	not cleared as the old layout is free'd (or as an equivalent cause..
+	"NetlistChanged(0)" is not called the reverted layout is loaded).  Having had the netlist window open before the revert, the
+	data-structures in the GUI are initialised, but point to the
+	pre-revert layout. They are not explicitly updated with a
+	"NetlistChanged" notification, so when the user next hits "f" for
+	find, it will try to use the stale pointers it already had.  Fix: Call "NetlistChanged (0);" after free'ing the netlist memory. The
+	"FreeNetlistMemory()" call only free's the individual nets, the
+	parent netlist structure which points to that memory and identifies
+	how many nets are present is zeroed by the FreeNetlistMemory() call,
+	so we can safely call NetlistChanged() at this point, before we have
+	reloaded a new netlist.
+
+2011-12-24   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* doc/pcb.texi, src/hid/bom/bom.c,
+	tests/golden/hid_bom1/bom_general.bom,
+	tests/golden/hid_bom1/bom_general.xy,
+	tests/golden/hid_bom2/bom_general.xy,
+	tests/golden/hid_bom2/test.bom,
+	tests/golden/hid_bom3/bom_general.bom,
+	tests/golden/hid_bom3/test.xy,
+	tests/golden/hid_bom4/bom_general.bom,
+	tests/golden/hid_bom4/bom_general.xy: Remove $Id$ lines from bom
+	exporter .xy and .bom output Modern version control systems don't use this kind of expansion, so
+	these lines don't serve much purpose.
+
+2011-12-23   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* Makefile.am, README.cvs_branches, README_FILES/Makefile.am,
+	acinclude.m4, autogen.sh, doc/ascii2texi.awk, doc/eps2png,
+	doc/extract-docs, doc/fractional_size.tab, doc/gs/gs.texi,
+	doc/gs/print-eps.scm, doc/ideas/database.txt,
+	doc/ideas/keepouts.txt, doc/letter_size.tab, doc/metric_size.tab,
+	doc/pcb.texi, doc/refcard.tex, doc/wire_size.tab, doc/wishlist.txt,
+	example/Makefile.am, example/libraries/Makefile.am,
+	example/libraries/example.inc, example/libraries/example.m4,
+	globalconst.h, lib/CreateLibrary.sh.in,
+	lib/CreateLibraryContents.sh.in, lib/ListLibraryContents.sh.in,
+	lib/QueryLibrary.sh.in, lib/TTL_74xx_DIL.list, lib/TTL_74xx_DIL.m4,
+	lib/amp.inc, lib/amphenol.inc, lib/amphenol.list, lib/amphenol.m4,
+	lib/bourns.inc, lib/candk.inc, lib/common.m4, lib/connector.inc,
+	lib/connector.list, lib/connector.m4, lib/crystal.list,
+	lib/crystal.m4, lib/cts.inc, lib/dil.inc, lib/geda.inc,
+	lib/gen_geda_list.awk, lib/gen_geda_m4.awk, lib/gen_list.awk,
+	lib/gen_m4.awk, lib/generic.list, lib/generic.m4, lib/jerry.list,
+	lib/jerry.m4, lib/johnstech.inc, lib/linear.list, lib/linear.m4,
+	lib/logic.list, lib/logic.m4, lib/lsi.list, lib/lsi.m4,
+	lib/m4lib_to_newlib.sh, lib/memory.list, lib/memory.m4,
+	lib/minicircuits.inc, lib/misc.inc, lib/nichicon.inc,
+	lib/optek.inc, lib/optical.list, lib/optical.m4, lib/panasonic.inc,
+	lib/pci.inc, lib/pci.list, lib/pci.m4, lib/plcc.inc,
+	lib/png_diff.sh, lib/qfn.inc, lib/qfp-ui.in, lib/qfp.inc,
+	lib/qfp2.inc, lib/qfpdj.inc, lib/resistor_0.25W.list,
+	lib/resistor_0.25W.m4, lib/resistor_adjust.list,
+	lib/resistor_adjust.m4, lib/resistor_array.list,
+	lib/resistor_array.m4, lib/rules.inc, lib/smt.inc,
+	lib/texas_inst_amplifier.list, lib/texas_inst_amplifier.m4,
+	lib/texas_inst_voltage_reg.list, lib/texas_inst_voltage_reg.m4,
+	lib/transistor.list, lib/transistor.m4,
+	newlib/2_pin_thru-hole_packages/Makefile.am, newlib/Makefile.am,
+	newlib/connectors/Makefile.am, newlib/crystal/Makefile.am,
+	newlib/electro-optics/Makefile.am, newlib/headers/Makefile.am,
+	newlib/keystone/Makefile.am, newlib/msp430/Makefile.am,
+	newlib/not_vetted_ingo/Makefile.am, newlib/sockets/Makefile.am,
+	newlib/tests/Makefile.am, src/Makefile.am, src/action.h,
+	src/autoplace.c, src/autoplace.h, src/autoroute.c, src/autoroute.h,
+	src/box.h, src/buffer.c, src/buffer.h, src/change.c, src/change.h,
+	src/clip.c, src/clip.h, src/command.c, src/command.h, src/compat.c,
+	src/compat.h, src/const.h, src/copy.c, src/copy.h, src/create.c,
+	src/create.h, src/crosshair.c, src/crosshair.h, src/data.c,
+	src/data.h, src/djopt.c, src/djopt.h, src/dolists.h, src/draw.c,
+	src/draw.h, src/drill.c, src/drill.h, src/error.c, src/error.h,
+	src/file.c, src/find.c, src/find.h, src/flags.c, src/fontmode.c,
+	src/gather-actions, src/global.h, src/heap.c, src/heap.h,
+	src/hid/batch/batch.c, src/hid/bom/bom.c, src/hid/common/actions.c,
+	src/hid/common/extents.c, src/hid/common/flags.c,
+	src/hid/common/hidinit.c, src/hid/common/hidnogui.c,
+	src/hid/gcode/curve.c, src/hid/gcode/decompose.c,
+	src/hid/gcode/decompose.h, src/hid/gcode/gcode.h,
+	src/hid/gcode/lists.h, src/hid/gcode/trace.c,
+	src/hid/gcode/trace.h, src/hid/gerber/gerber.c,
+	src/hid/gtk/gtkhid-gdk.c, src/hid/gtk/gtkhid-gl.c,
+	src/hid/gtk/gtkhid-main.c, src/hid/gtk/gtkhid.h,
+	src/hid/gtk/gui-command-window.c, src/hid/gtk/gui-config.c,
+	src/hid/gtk/gui-dialog-print.c, src/hid/gtk/gui-dialog.c,
+	src/hid/gtk/gui-drc-window.c, src/hid/gtk/gui-drc-window.h,
+	src/hid/gtk/gui-icons-misc.data,
+	src/hid/gtk/gui-icons-mode-buttons.data,
+	src/hid/gtk/gui-keyref-window.c, src/hid/gtk/gui-library-window.c,
+	src/hid/gtk/gui-log-window.c, src/hid/gtk/gui-misc.c,
+	src/hid/gtk/gui-netlist-window.c, src/hid/gtk/gui-pinout-preview.c,
+	src/hid/gtk/gui-pinout-preview.h, src/hid/gtk/gui-pinout-window.c,
+	src/hid/gtk/gui-top-window.c, src/hid/gtk/gui-utils.c,
+	src/hid/gtk/gui.h, src/hid/hidint.h, src/hid/lesstif/dialogs.c,
+	src/hid/lesstif/lesstif.h, src/hid/lesstif/library.c,
+	src/hid/lesstif/main.c, src/hid/lesstif/menu.c,
+	src/hid/lesstif/netlist.c, src/hid/lesstif/styles.c,
+	src/hid/lesstif/xincludes.h, src/hid/lpr/lpr.c,
+	src/hid/nelma/nelma.c, src/hid/png/png.h, src/hid/ps/eps.c,
+	src/hid/ps/ps.c, src/hid/ps/ps.h, src/icon.data,
+	src/icons/Makefile.am, src/insert.c, src/insert.h, src/intersect.c,
+	src/intersect.h, src/line.c, src/line.h, src/macro.h, src/main.c,
+	src/mirror.c, src/mirror.h, src/misc.c, src/misc.h,
+	src/mode_icon.data, src/move.c, src/move.h, src/mtspace.c,
+	src/mtspace.h, src/mymem.c, src/mymem.h, src/netlist.c,
+	src/parse_l.h, src/parse_l.l, src/parse_y.y, src/pcbtest.sh.in,
+	src/polygon.h, src/print.c, src/print.h, src/puller.c, src/rats.c,
+	src/rats.h, src/remove.c, src/remove.h, src/report.h,
+	src/res_lex.l, src/res_parse.y, src/resource.h, src/rotate.c,
+	src/rotate.h, src/rtree.c, src/rtree.h, src/rubberband.c,
+	src/rubberband.h, src/search.c, src/search.h, src/select.c,
+	src/select.h, src/set.c, src/set.h, src/strflags.c, src/strflags.h,
+	src/thermal.c, src/thermal.h, src/undo.c, src/undo.h, src/vector.c,
+	src/vector.h, src/vendor.c, src/vendor.h, tests/run_tests.sh,
+	tools/Makefile.am, tools/MergePCBPS, tools/Merge_dimPCBPS,
+	tutorial/Makefile.am: Remove remaining RCS $Id$ identifiers left
+	over from our CVS days (Including a couple of $Id magic strings from files we got from
+	potrace, which are used by the gcode exporter).
+
+2011-12-24   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* doc/eps2png: doc/eps2png: Remove version information from this
+	utility This is obsolete since we switched from CVS, and refers to something
+	called "Sciurix" (perhaps where we got this code from). Remove it
+	for clarity.  Also remove the -ident command line option, which we don't use, and
+	refers to the above removed version information.
+
+2011-12-23   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/action.c, src/crosshair.c, src/global.h,
+	src/hid/lesstif/main.c: Remove change log like comments from file
+	headers We use git to track changes, not individual file headers.
+
+2011-12-23   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/common/hidgl.c: hid/common/hidgl.c: Simplify angle
+	calculation for drawing line caps Make use of atan2 to avoid special casing horizontal lines, and move
+	make the input variables doubles to be consistent with that
+	function.  Our use of "tanl" was inappropriate for the float input,
+	dobule output variables we were using before (spotted by Dan
+	McMahill).  I have modified the semantic meaning of angle, to keep the more
+	conventional angle = atan2 (dy, dx); geometry. This means the angle
+	now refers to the angle of the line, not the angle of the line-cap
+	start. (The angle is adjusted before passing into the cap drawing
+	routines).
+
+2011-12-22   Dan McMahill * dan AT mcmahill dot net *
+
+	* : commit c2a56b84d76e2c23eafce8cd0a562cb39b381c66  Author: Dan
+	McMahill * dan AT mcmahill dot net * Date:   Thu Dec 22 19:01:51
+	2011 -0500
+
+2011-12-22   DJ Delorie * dj AT delorie dot com *
+
+	* gts/Makefile.am: Don't install gts files Closes-bug: lp-854396
+
+2011-12-22   Andrew Poelstra * asp11 AT sfu dot ca *
+
+	* src/set.c: Properly cancel rubberband move when user changes mode Closes-bug: lp-853609
+
+2011-12-21   Andrew Poelstra * asp11 AT sfu dot ca *
+
+	* src/move.c: Update line RUBBERENDFLAG after move, even for trivial
+	moves If you move a line segment, then drop it in its original place, the
+	rubberband preview will be incorrect every other time you do this.
+	This patch fixes that.  Note that there is still incorrect behavior if the user starts a
+	rubberband move, then hits Esc, then tries again.  Affects-bug: lp-853609
+
+2011-12-21   Andrew Poelstra * asp11 AT sfu dot ca *
+
+	* src/buffer.c, src/create.c, src/global.h, src/polygon.c: Revert
+	previous commit, only update clipping for visible buffers This also fixes the undo bug, but without the performance hit.  (It
+	may not fix other synchronization bugs, but given that we haven't
+	seen any, this should be okay.) Affects-bug: lp-699272
+
+2011-12-21   Andrew Poelstra * asp11 AT sfu dot ca *
+
+	* src/buffer.c: Clip polygons after moving between buffers When moving a polygon between buffers (i.e., from the undo buffer to
+	the PCB->Data buffer or vice-versa), line- and via-clipping is not
+	recalculated. This means that any elements drawn on a buffer before
+	the polygon is moved there, will not clip the polygon.  One way (the only way, AFAIK) to make this happen is by bug
+	lp-699272, which can reproduced as follows. I have inclided my
+	explanation of what is happening at each step.    1. Draw a polygon with a line intersecting it, with clearpoly      set and visible clearance between the two.a   2. Delete the polygon. [This moves the polygon verbatim, including      its clipped form, from PCB->Data to RemoveList, the undo
+	     buffer.]   3. Delete the line. [This moves it from PCB->Data to RemoveList,      calling RestoreToPolygon() to unclip any polygons on the screen      (but there aren't any!), then ClearFromPolygon() to clip the      polygon in the undo buffer (but this is already clipped!). In      other words, the line is deleted and the polygon unchanged.]   4. Hit undo. [This moves the line from the undo buffer back to      PCB->Data, calling RestoreToPolygon() to unclip the polygon in      the  [...]
+	     on the screen (but there aren't any!). So the polygon is no
+	     longer clipped.]   5. Hit undo. [This brings the polygon back, copying it verbatim
+	     from the undo buffer to PCB->Data. As it is not clipped here, it
+	     isn't clipped on the screen, giving rise to the "no clipping" bug.] This patch adds a call to InitClip() to MovePolygonToBuffer(), which
+	forces a recalculation of a polygon's clipping when it is moved
+	between buffers. This is perhaps not the most efficient fix, but
+	will prevent any such synchronization bugs.  Closes-bug: lp-699272
+
+2011-12-20   Andrew Poelstra * asp11 AT sfu dot ca *
+
+	* src/hid/gtk/ghid-route-style-selector.c: gtk: allow route style
+	selector to have nothing selected The affects the the function ghid_route_style_selector_sync()
+	function, which is called from the RouteStylesChanged action to keep
+	the GUI in sync with pcb's state. It selects the route style that
+	matches pcb's state, or if none exists, does nothing.  This patch replaces "does nothing" with "deselects all styles", so
+	that the GUI will not be misleading.  Closes-bug: lp-699299
+
+2011-12-20   Andrew Poelstra * asp11 AT sfu dot ca *
+
+	* src/hid/gtk/ghid-route-style-selector.c: gtk: fix memory leak in
+	route style selector When the route style selector is emptied (e.g., when new styles are
+	loaded from a .pcb file), any route style data not owned by pcb core
+	is freed. However, this did not apply to all temporary route style
+	data, even though the pcb core is completely unaware of those.  This commit frees all temporary route style data.
+
+2011-12-20   Andrew Poelstra * asp11 AT sfu dot ca *
+
+	* src/hid/gtk/ghid-main-menu.c: gtk: Add "plus" and "minus" to
+	allowable keyboard shortcuts Closes-bug: sf-3081102
+
+2011-12-20   Andrew Poelstra * asp11 AT sfu dot ca *
+
+	* src/hid/gtk/ghid-main-menu.c: gtk: check accelerator uniqueness in
+	a case-insensitive way Closes-bug: lp-699496
+
+2011-12-20   Andrew Poelstra * asp11 AT sfu dot ca *
+
+	* src/hid/gtk/ghid-route-style-selector.c,
+	src/hid/gtk/gui-top-window.c: gtk: fix route style selector
+	accelerators When the route-style list is changed, the menu items are not updated
+	properly. (In fact, they come out of sync and point to invalid
+	memory and lose their accelerators.) This commit fixes all that.
+
+2011-12-20   Andrew Poelstra * asp11 AT sfu dot ca *
+
+	* src/hid/gtk/gui-library-window.c: gtk: library window: ignore
+	element if LoadElementToBuffer fails In gtk/gui-library-window.c, the library window's selection-change
+	callback calls LoadElementToBuffer() to read the selected element,
+	so it can show a preview and select the element if necessary.  The return value of this determines whether to set pcb's mode to
+	PASTEBUFFER_MODE. However, the library window preview is attempted
+	regardless. If LoadElementToBuffer failed, this causes a NULL
+	reference and segfault.  This patch skips the preview in the case that LoadElementToBuffer.  Closes-bug: lp-853628 Closes-bug: lp-852600
+
+2011-12-19   Dan McMahill * dan AT mcmahill dot net *
+
+	* : commit 93d1b34f9a0f3dae4f90f7fb4638626169d152d0  Author: Dan
+	McMahill * dan AT mcmahill dot net * Date:   Mon Dec 19 11:47:54
+	2011 -0500
+
+2011-12-19   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gerber/gerber.c: hid/gerber: Fixup trailing zeros from
+	commit b90fb6ae22ae83fdc0c802268dcbe74005bc705e (The trailing zero needs to be outside the format specifier)
+
+2011-12-19   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/action.c: action.c: Fix leak of schname in ActionImport()
+
+2011-12-19   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/heap.c: heap.c: Don't set the v variable twice to the same
+	value in __upheap.  (Caught with clang)
+
+2011-12-19   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/find.c: find.c: Tidy up some ugly code in
+	LookupLOConnectionsToLOList() Cleaned up whilst chasing some clang warnings. It appears there is
+	no real problem here, as max_copper_layers is going to be >0 for any
+	PCB. If not, there are potential uses of uninitialised data.
+
+2011-12-19   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/action.c: src/action.c: Abort the Import(setnewport,mask)
+	action if the mask isn't set This avoids using an uninitialised variable.  (Caught by clang)
+
+2011-12-19   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/png/png.c: hid/png/png.c: Remove buggy code for swapping
+	x1/x2 and y1/y2 Since the png hid works, and this code is ineffective due to a typo,
+	we probably ought to remove it.  (Caught by clang)
+
+2011-12-19   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gerber/gerber.c: gerber.c: Tidy up use_gc() routine to
+	avoid a static anlysis warning Don't unconditionally access the aptr variable right after we just
+	NULL tested it.  (Caught by clang)
+
+2011-12-19   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gerber/gerber.c: hid/gerber: Fix a couple of typos in
+	drill_sort routine Should fix sorting of drill holes by coordinate.  (Caught by clang)
+
+2011-12-19   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gerber/gerber.c: hid/gerber: Remove dead colour selection
+	code
+
+2011-12-19   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gcode/gcode.c, src/hid/nelma/nelma.c: Remove dead colour
+	selection code from nelma and gcode hids (Silences some unused code warnings from clang)
+
+2011-12-19   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/action.c: action.c: Fixup some syntax so it appears as legal C
+	before macro expansion "if TEST_FLAG (...) {" does not look like legal C until the
+	TEST_FLAG macro is expanded. This works because the macro is wrapped
+	with a () like all good function-like pre-processor macros.  This bad style was upsetting cppcheck, which flagged up a syntax
+	error for this line. (Obviously it was not expanding macros before
+	checking).
+
+2011-12-19   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/gui-netlist-window.c: hid/gtk: Remove some assigned,
+	but unused variables in the netlist window (Caught with clang)
+
+2011-12-19   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/gui-netlist-window.c: hid/gtk: Fix broken pad-center
+	finding code in the netlist window Looks like I made a copy+paste error in the code which shows the
+	user the location of a particular netlist connection.  (Caught with clang)
+
+2011-12-18   Andrew Poelstra * asp11 AT sfu dot ca *
+
+	* tests/tests.list: Increase DPI of test hid_png3 Since the nanometers conversion, hid_png3 has failed due to rounding
+	changes. I have changed the test's output DPI from 300 to 600, to
+	decrease the chances of this happening in the future.  Fixes-bug: lp-860037
+
+2011-12-18   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/ghid-layer-selector.c: hid/gtk/ghid_layer_selector.c:
+	Use g_malloc for the new_layer structure This eventually gets free'd with g_free(). We need match these
+	allocations and de-allocations carefully, otherwise various
+	corruption and crashes could occur.  (Caught with cppcheck)
+
+2011-12-18   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/common/hidnogui.c: hid/common/hidnogui.c: Plug leak in
+	nogui_prompt_for and nogui_fileselect We forgot to free() the memory returned from read_stdin_line().
+	There is actually no need to strdup the answer anyway, so pass the
+	returned value directly and let the caller free it.  (Caught with cppcheck)
+
+2011-12-18   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/common/hidinit.c: hid/common: Don't leak the dir resource
+	in hid_load_dir() Add missing closedir() call.  (Caught with cppcheck)
+
+2011-12-18   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/file.c: file.c: Cleanup mixed pclose() / fclose() in
+	ReadNetlist() In the "Empty netlist file!" error path, we called pclose()
+	unconditionally where we should have tested "used_popen" first.  (Caught with cppcheck)
+
+2011-12-18   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/file.c: file.c: Plug leak of libpaths variable in
+	ParseLibraryTree() function (Caught with cppcheck)
+
+2011-12-18   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/gtkhid-main.c: hid/gtk: Free share_dir variable after
+	use (Caught with cppcheck)
+
+2011-12-18   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gcode/gcode.c: hid/gcode: Fix memory leak in error path (Caught with cppcheck)
+
+2011-12-18   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gcode/gcode.c: hid/gcode: Fix mismatched g_strdup_printf()
+	and free() Allocations from the g_*() functions shuold be free'd with g_free().  (Caught with cppcheck)
+
+2011-12-18   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/lpr/lpr.c: hid/lpr: Don't mis-match popen and fclose
+	(should be pclose) (Caught with cppcheck)
+
+2011-12-16   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/search.c: search.c: Return the pad who's center is closest to
+	the queried coordinate When snapping to pads we often find the case where the search radius
+	is wider than the spacing between pads. SearchPadByLocation()
+	previously returned the first pad it found whthin the search area,
+	meaning you could have the crosshair right above a particular pad,
+	yet snap to a different pad due to it being within the search radius
+	of the crosshair, and happening to be tested first by the r-tree
+	search code.  This proof of concept change makes SearchPadByLocation() return the
+	pad whos center coordinate is closest to the center of the search
+	location.  This fixes another annoying snapping behaviour for some parts such
+	as "0805", when operating with a fairly course grid. (NB: Search
+	radius for snapping is related to the size of the current grid).
+
+2011-12-16   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/crosshair.c: crosshair.c: Be paranoid about overflow when
+	finding an pad-center coordinates Not aiming to fix any particular bug here, but I noticed the
+	potential overflow here and thought I'd fix it. Longer term, we
+	perhaps ought to write some convenience functions for performing
+	operations like this correctly.
+
+2011-12-16   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/crosshair.c: crosshair.c: Snap to later-tested objects
+	equi-distant with the current snap.  This inequality adjustment means that when an element mark is
+	on-grid, and the first-snap is a grid location snap, the test
+	against the element mark will now pass, and mark the snap as a
+	non-grid snap.  This fixes the rather irritating bug where certain footprints, such
+	as SMT resistors became impossible to grab by their element mark
+	when that mark landed exactly on a grid point.
+
+2011-12-15   Andrew Poelstra * asp11 AT sfu dot ca *
+
+	* src/hid/gerber/gerber.c: Fix plated-drill overflow bug in gerber.c Plated drills are printed in 1/10 mils rather than mils (it's a
+	funny format). This was previously achieved by multiplying
+	coordinates by 10, then printing them as mils. However, this caused
+	an overflow for medium-large boards on 32-bit systems.  This fix just prints a trailing 0 onto the measures, rather than
+	computing the value times ten.
+
+2011-12-08   Dan McMahill * dan AT mcmahill dot net *
+
+	* src/main.c: Add (protected) include for locale.h.  Needed for
+	setlocale() prototype as well as LC_ALL on some systems.
+
+2011-11-25   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/hid/gerber/gerber.c: gerber.c: Use ` modifier in pcb-printf to
+	fix internationalization bug
+
+2011-11-25   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/hid/gerber/gerber.c: Revert "Fix locale-dependent gerber
+	output" This reverts commit 2473e26c7d9581753a28f1f55a4a4b7ff109a3f2.  A better fix would be to use the new pcb-printf specifier, rather
+	than manually using g_ascii_strtod with the COORD_TO_ macros.
+
+2011-11-25   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/pcb-printf.c, src/pcb-printf.h: Add ` modifier to pcb-printf,
+	which forces '.' as a decimal separator This should be used for the gerber exporter and other formats that
+	need to use '.' regardless of locale in order to obey their
+	standards.  Note that the %mr specifier (which restricts suffixes to mm and mil
+	so that old pcb versions can read them) uses this by default, so no
+	changes need to be made to file.c.
+
+2011-11-20   Dima Kogan * dima AT secretsauce dot net *
+
+	* tests/golden/hid_gcode1/Makefile.am,
+	tests/golden/hid_gcode10/Makefile.am,
+	tests/golden/hid_gcode11/Makefile.am,
+	tests/golden/hid_gcode2/Makefile.am,
+	tests/golden/hid_gcode3/Makefile.am,
+	tests/golden/hid_gcode4/Makefile.am,
+	tests/golden/hid_gcode5/Makefile.am,
+	tests/golden/hid_gcode6/Makefile.am,
+	tests/golden/hid_gcode7/Makefile.am,
+	tests/golden/hid_gcode8/Makefile.am,
+	tests/golden/hid_gcode9/Makefile.am: gcode test Makefiles now dist
+	the golden results with the new filenames
+
+2011-11-20   Dima Kogan * dima AT secretsauce dot net *
+
+	* tests/run_tests.sh: gcode tests: date-stripping now supports all
+	valid dates
+
+2011-11-19   DJ Delorie * dj AT delorie dot com *
+
+	* src/set.c: Add missing pcb-printf.h set.c was calling pcb_g_strdup_printf() without #including
+	pcb-printf.h, resulting in a missing prototype warning.
+
+2011-11-16   Dima Kogan * dima AT secretsauce dot net *
+
+	* src/hid/png/png.c: png hid: fixed some instances of an 'int' being
+	used instead of Coord.  After the unit switch, some cases where an int has sufficed
+	previously no longer work. An example is png output of tilted,
+	square pads. Before this patch those pads do not get drawn
+	correctly; their size is completely wrong.
+
+2011-11-19   Dima Kogan * dima AT secretsauce dot net *
+
+	* src/hid/gcode/gcode.c: g-code hid: converted use of hypot() to
+	Distance()
+
+2011-11-19   DJ Delorie * dj AT delorie dot com *
+
+	* src/hid/gerber/gerber.c: Fix locale-dependent gerber output pcb_printf doesn't have a modifier that lets you select a unit (%mi)
+	and locale-independent format (like %mr) at the same time.  The
+	gerber hid was using %mi to output to a file, but that resulted in
+	',' instead of '.' for some locales.  This patch switches it to call
+	g_ascii_formatd() on the value first, to ensure it's output with
+	'.'.
+
+2011-11-19   Ahmed El-Mahmoudy * aelmahmoudy AT sabily dot org *
+
+	* src/hid/common/hidgl.c: Fix typo (recieved -> received)
+
+2011-10-02   Alan Somers * asomers AT gmail dot com *
+
+	* tools/Makefile.am, tools/pcbdiff: Adding a script to graphically
+	diff PCB files
+
+2011-11-13   Dima Kogan * dima AT secretsauce dot net *
+
+	* tests/golden/hid_gcode1/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode1/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode1/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode10/gcode_oneline-0.8890.drill.gcode,
+	tests/golden/hid_gcode10/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode10/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode11/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode11/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode11/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode2/out-0.0350.drill.gcode,
+	tests/golden/hid_gcode2/out-bottom.gcode,
+	tests/golden/hid_gcode2/out-top.gcode,
+	tests/golden/hid_gcode3/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode3/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode3/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode4/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode4/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode4/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode5/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode5/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode5/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode6/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode6/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode6/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode7/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode7/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode7/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode8/gcode_oneline-0.8890.drill.gcode,
+	tests/golden/hid_gcode8/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode8/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode9/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode9/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode9/gcode_oneline-top.gcode: reference gcode
+	tests now match the latest generated gcode
+
+2011-11-13   Dima Kogan * dima AT secretsauce dot net *
+
+	* tests/run_tests.sh: gcode tests: stripping creation timestamp more
+	robustly
+
+2011-11-13   Dima Kogan * dima AT secretsauce dot net *
+
+	* tests/run_tests.sh: fixed broken bom, xy and gcode testing I was comparing the reference files to themselves. Now comparing
+	reference and test files
+
+2011-11-13   Dima Kogan * dima AT secretsauce dot net *
+
+	* tests/run_tests.sh: test script: local-ized all variables passed
+	into functions. stuff no longer gets overwritten
+
+2011-11-13   Dima Kogan * dima AT secretsauce dot net *
+
+	* tests/run_tests.sh: test script: added missing boilerplate to set
+	normalized filenames
+
+2011-11-13   Dima Kogan * dima AT secretsauce dot net *
+
+	* tests/run_tests.sh: unit test script: fixed incorrect file
+	existence check
+
+2011-11-13   Dima Kogan * dima AT secretsauce dot net *
+
+	* tests/golden/hid_gcode1/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode1/gcode_oneline-drill.gcode,
+	tests/golden/hid_gcode10/gcode_oneline-0.8890.drill.gcode,
+	tests/golden/hid_gcode10/gcode_oneline-drill.gcode,
+	tests/golden/hid_gcode11/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode11/gcode_oneline-drill.gcode,
+	tests/golden/hid_gcode2/out-0.0350.drill.gcode,
+	tests/golden/hid_gcode2/out-drill.gcode,
+	tests/golden/hid_gcode3/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode3/gcode_oneline-drill.gcode,
+	tests/golden/hid_gcode4/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode4/gcode_oneline-drill.gcode,
+	tests/golden/hid_gcode5/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode5/gcode_oneline-drill.gcode,
+	tests/golden/hid_gcode6/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode6/gcode_oneline-drill.gcode,
+	tests/golden/hid_gcode7/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode7/gcode_oneline-drill.gcode,
+	tests/golden/hid_gcode8/gcode_oneline-0.8890.drill.gcode,
+	tests/golden/hid_gcode8/gcode_oneline-drill.gcode,
+	tests/golden/hid_gcode9/gcode_oneline-0.0350.drill.gcode,
+	tests/golden/hid_gcode9/gcode_oneline-drill.gcode, tests/tests.list: 
+	gcode tests now look for the new size-specific drill files
+
+2011-11-13   Dima Kogan * dima AT secretsauce dot net *
+
+	* tests/tests.list: updated tests.list to use tool diameter instead
+	of radius when testing gcode
+
+2011-11-13   Dima Kogan * dima AT secretsauce dot net *
+
+	* tests/tests.list: fixed incorrect comment in tests.list
+
+2011-11-13   Dima Kogan * dima AT secretsauce dot net *
+
+	* src/hid/gcode/gcode.c: added some forgotten newlines in the gcode
+	output
+
+2011-11-13   Dima Kogan * dima AT secretsauce dot net *
+
+	* src/hid/gcode/gcode.c: g-code exporter now outputs NC-drills for
+	different hole sizes into different files
+
+2011-11-13   Dima Kogan * dima AT secretsauce dot net *
+
+	* src/hid/gcode/gcode.c: a few tab->spaces conversions in comments
+
+2011-11-13   Dima Kogan * dima AT secretsauce dot net *
+
+	* src/hid/gcode/gcode.c: removed some trailing whitespace in
+	comments
+
+2011-09-10   Dima Kogan * dima AT secretsauce dot net *
+
+	* src/hid/gcode/gcode.c: gcode exporter: reworked and cleaned up
+	sort_drill() This function no longer deallocates the memory passed into it, which
+	is a potential source of issues for the unsuspecting caller. Instead
+	it sorts the data in-place
+
+2011-09-09   Dima Kogan * dima AT secretsauce dot net *
+
+	* src/hid/gcode/gcode.c: gcode exporter: minor whitespace
+	corrections
+
+2011-09-09   Dima Kogan * dima AT secretsauce dot net *
+
+	* src/hid/gcode/gcode.c: gcode exporter: made some functions static
+
+2011-11-13   Dima Kogan * dima AT secretsauce dot net *
+
+	* tests/golden/hid_gcode1/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode1/gcode_oneline-drill.gcode,
+	tests/golden/hid_gcode1/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode1/gcode_oneline.gcode.bottom.cnc,
+	tests/golden/hid_gcode1/gcode_oneline.gcode.drill.cnc,
+	tests/golden/hid_gcode1/gcode_oneline.gcode.top.cnc,
+	tests/golden/hid_gcode10/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode10/gcode_oneline-drill.gcode,
+	tests/golden/hid_gcode10/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode10/gcode_oneline.gcode.bottom.cnc,
+	tests/golden/hid_gcode10/gcode_oneline.gcode.drill.cnc,
+	tests/golden/hid_gcode10/gcode_oneline.gcode.top.cnc,
+	tests/golden/hid_gcode11/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode11/gcode_oneline-drill.gcode,
+	tests/golden/hid_gcode11/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode11/gcode_oneline.gcode.bottom.cnc,
+	tests/golden/hid_gcode11/gcode_oneline.gcode.drill.cnc,
+	tests/golden/hid_gcode11/gcode_oneline.gcode.top.cnc,
+	tests/golden/hid_gcode2/out-bottom.gcode,
+	tests/golden/hid_gcode2/out-drill.gcode,
+	tests/golden/hid_gcode2/out-top.gcode,
+	tests/golden/hid_gcode2/out.bottom.cnc,
+	tests/golden/hid_gcode2/out.drill.cnc,
+	tests/golden/hid_gcode2/out.top.cnc,
+	tests/golden/hid_gcode3/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode3/gcode_oneline-drill.gcode,
+	tests/golden/hid_gcode3/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode3/gcode_oneline.gcode.bottom.cnc,
+	tests/golden/hid_gcode3/gcode_oneline.gcode.drill.cnc,
+	tests/golden/hid_gcode3/gcode_oneline.gcode.top.cnc,
+	tests/golden/hid_gcode4/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode4/gcode_oneline-drill.gcode,
+	tests/golden/hid_gcode4/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode4/gcode_oneline.gcode.bottom.cnc,
+	tests/golden/hid_gcode4/gcode_oneline.gcode.drill.cnc,
+	tests/golden/hid_gcode4/gcode_oneline.gcode.top.cnc,
+	tests/golden/hid_gcode5/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode5/gcode_oneline-drill.gcode,
+	tests/golden/hid_gcode5/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode5/gcode_oneline.gcode.bottom.cnc,
+	tests/golden/hid_gcode5/gcode_oneline.gcode.drill.cnc,
+	tests/golden/hid_gcode5/gcode_oneline.gcode.top.cnc,
+	tests/golden/hid_gcode6/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode6/gcode_oneline-drill.gcode,
+	tests/golden/hid_gcode6/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode6/gcode_oneline.gcode.bottom.cnc,
+	tests/golden/hid_gcode6/gcode_oneline.gcode.drill.cnc,
+	tests/golden/hid_gcode6/gcode_oneline.gcode.top.cnc,
+	tests/golden/hid_gcode7/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode7/gcode_oneline-drill.gcode,
+	tests/golden/hid_gcode7/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode7/gcode_oneline.gcode.bottom.cnc,
+	tests/golden/hid_gcode7/gcode_oneline.gcode.drill.cnc,
+	tests/golden/hid_gcode7/gcode_oneline.gcode.top.cnc,
+	tests/golden/hid_gcode8/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode8/gcode_oneline-drill.gcode,
+	tests/golden/hid_gcode8/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode8/gcode_oneline.gcode.bottom.cnc,
+	tests/golden/hid_gcode8/gcode_oneline.gcode.drill.cnc,
+	tests/golden/hid_gcode8/gcode_oneline.gcode.top.cnc,
+	tests/golden/hid_gcode9/gcode_oneline-bottom.gcode,
+	tests/golden/hid_gcode9/gcode_oneline-drill.gcode,
+	tests/golden/hid_gcode9/gcode_oneline-top.gcode,
+	tests/golden/hid_gcode9/gcode_oneline.gcode.bottom.cnc,
+	tests/golden/hid_gcode9/gcode_oneline.gcode.drill.cnc,
+	tests/golden/hid_gcode9/gcode_oneline.gcode.top.cnc,
+	tests/tests.list: renamed golden test files to match new gcode
+	output filenames
+
+2011-11-16   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/file.c, src/set.c: Add attribute PCB::grid::size for user's
+	grid setting This stores the grid size using pcb-printf for full precision; the
+	ordinary value in Grid[] needs to be in cmils for backward
+	compatibility, so it cannot store metric settings correctly.
+
+2011-11-12   Richard Barlow * richard AT richardbarlow dot co dot uk *
+
+	* src/pcb-printf.c: Fix parsing of route styles with units A bug appeared after route styles started being saved with units
+	suffixed. When loading a PCB file the units were ignored and
+	therefore it was assumed the values were in cmils.  This was a problem in the get_unit_struct() function which didn't
+	handle long strings well. If the unit was followed by more
+	characters strcmp would return non-zero. The function has already
+	worked out the length of the unit text and therefore strncmp should
+	be used.
+
+2011-11-06   DJ Delorie * dj AT delorie dot com *
+
+	* lib/geda.inc: Add 4-pin DIP Add DIP4 to the collection of standard DIP packages
+
+2011-11-06   DJ Delorie * dj AT delorie dot com *
+
+	* src/hid/ps/ps.c: Fix postscript alignment marks The delta-x and delta-y parameters of corner() are scales, not
+	coordinates.  Change them to "int" so the +1/-1 won't get scaled to
+	zero.
+
+2010-10-22   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: HID-gcode: use drill cycles only for
+	advanced G-code.  Not all machine controllers understand drill cycles, so a more
+	common denominatior is needed. Gladly, almost all the code was there
+	in comments already.  Affects-bug: lp-699497
+
+2010-10-22   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: HID-gcode: simplify code a bit.  This is mostly for additional code coming soon.  Affects-bug: lp-699497
+
+2010-10-21   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: HID-gcode: add a comment about the tool
+	diameter into the G-code file.  Affects-bug: lp-699497
+
+2010-10-21   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: HID-gcode: switch from tool-radius to
+	tool-diameter in the user interface.  Affects-bug: lp-699497
+
+2011-10-26   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/insert.c: Fix computation of 45-degree edges when inserting a
+	point into an edge Fixes a few mistakes introduced in commit
+	b59ab044afe3ac362f8cb4da10ea410280b4323a which was bisected to and
+	identified as the cuplrit by Gabriel Paubert.   Reported-by: Gabriel Paubert * paubert AT iram dot es *
+
+2010-10-22   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: HID-gcode: remove a leftover debug-printf.  Affects-bug: lp-699497
+
+2010-10-20   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: HID-gcode: Avoid more than one G or M code
+	per line for advanced G-code.  Some primitive G-code interpreters can't deal with multiple G or M
+	codes in one line, so avoid them at no cost. Alberto Maccioni asked
+	on geda-user make this optional.  Affects-bug: lp-699497
+
+2010-10-21   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c, src/hid/gcode/trace.c,
+	src/hid/gcode/trace.h: HID-gcode: add a flag wether to produce
+	advanced G-code.  Some primitive machine controllers don't understand what a variable
+	is, while those understanding variables can work without as well.
+	After all, using variables is just a convenience for later
+	hand-editing of the G-code programs. More changes for primitive
+	controllers are to come.  Affects-bug: lp-699497
+
+2010-10-21   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: HID-gcode: create better file names.  If the user adds a suffix to a file name in the dialog, he expects
+	the resulting files to have these suffixes as well.  This patch is a combination of the following two patches by Markus
+	Hitter.  0001-HID-gcode-let-the-system-library-allocate-the-tempor.patch
+	0004-HID-gcode-create-better-file-names.patch The original patches are avaiable at the bug-report on launchpad
+	lp-699497. The combination and modifications where done by Felix
+	Ruoff.  Affects-bug: lp-699497
+
+2010-10-31   Markus Hitter * mah AT jump-ing dot de *
+
+	* src/hid/gcode/gcode.c: HID-gcode: get rid of tabulators in
+	gcode.c. Pure whitespace change.  Developers should decide wether to use tabs or not, but not mix
+	both.  Rebased to git head by Felix Ruoff Affects-bug: lp-699497
+
+2011-10-20   Kai-Martin Knaak * knaak AT iqo dot uni-hannover dot de *
+
+	* src/.gitignore: add gpcb-menu.res and pcb-menu.res to gitignore The files src/gpcb-menu.res and src/pcb-menu.res are generated
+	during the build. So git should not care for them.  Closes-bug: lp-879086
+
+2011-10-20   Kai-Martin Knaak * knaak AT iqo dot uni-hannover dot de *
+
+	* doc/.gitignore: add options.texi to gitignore The file doc/options.texi is produced by a script at compile time.
+	So git should not take care for it.  Affects-bug: lp-879086
+
+2011-10-20   Kai-Martin Knaak * knaak AT iqo dot uni-hannover dot de *
+
+	* doc/.gitignore: add gcode related files to gitignore The files   doc/gcode.pdf   doc/gcode.png   doc/gcode_control_img.pdf   doc/gcode_control_img.png   doc/gcode_tool_path.pdf   doc/gcode_tool_path.png are produced at compile time. So git
+	should not care for them.  Affects-bug: lp-879086
+
+2011-10-23   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/file.c: Bump PCB_FILE_VERSION_BASELINE up to 20091103.  The unit-parsing support that we now require from the pcb parser was
+	added by DJ in December 2008. So I am bumping up the output version
+	in file.c to the next release, 20091103.
+
+2011-10-23   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/pcb-printf.c, src/pcb-printf.h: Make pcb-printf output unit
+	suffixes with %mr spec This marks a change in the file format, but as we only use the mm
+	and mil suffixes (for now, anyway), it should not be a breaking one.  I did not update the file format version that is output.
+
+2011-05-22   Felix Ruoff * Felix AT posaunenmission dot de *
+
+	* src/gpcb-menu.res.in: hid/gtk: Remove double 'Remove Connected'
+	menu-item
+
+2011-09-19   Kai-Martin Knaak * kmk AT lilalaser dot de *
+
+	* src/hid/gtk/gui-config.c: 
+	top-bottom-in-preference-dialog-of-GTK-HID This patch replaces "component" and "solder" in the preference
+	dialog of GTK HID with "top" and "bottom". Incindences were in the
+	layer group tab and in the text of the info tab.
+
+2011-09-19   Kai-Martin Knaak * kmk AT lilalaser dot de *
+
+	* src/hid/gtk/gui-misc.c: top/bottom in status line of GTK-HID This patch replaces "component" and "solder" in the leftmost item of
+	the status line of the GTK HID with "top" and "bottom".
+
+2011-10-11   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/gpcb-menu.res.in, src/hid/common/hid_resource.c: Add support
+	for mice / touchpads with a left/right scroll-wheel  Tested-by: Dave McGuire * mcguire AT neurotica dot com *
+
+2011-10-05   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* globalconst.h, src/const.h, src/crosshair.c, src/global.h,
+	src/misc.c, src/move.h, src/rotate.c, src/search.c: Add snapping to
+	arc end-points
+
+2011-10-03   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/gtkhid-gdk.c, src/hid/gtk/gtkhid-gl.c: hid/gtk: Fix
+	pinout preview rendering for back-side elements NB: There are still some bugs, in that when the board view is
+	flipped, this doesn't currently trigger a repaint of any preview
+	widgets which are open. They will refresh with the updated
+	coordinate system when they are next repainted. (Which might requre
+	a resize of the window on a compositing window manager).  Ideally we would track the correct view with the preview widget, but
+	for now this is a simple fix.
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/toporouter.c: toporouter.c: Convert some debugging constants
+	to COORD units properly (Broken since we switched to nanometers)
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/toporouter.c: toporouter.c: Fix print of time taken by the
+	toporouter The old code conflated microseconds, milliseconds and was generally
+	nuts.
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/toporouter.c: toporouter.c: Remove unused, commented
+	print_trace() function
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/toporouter.c, src/toporouter.h: toporouter.c: Remove unused
+	(toporouter_t *)->stublength
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/toporouter.c, src/toporouter.h: toporouter.c: Remove unused
+	(toporouter_t *)->viamax
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/toporouter.c, src/toporouter.h: toporouter.c: Remove unused
+	(toporouter_t *)->serpintine_half_amplitude
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/toporouter.c: toporouter.c: Re-write
+	{coord,point}_intersect_prop() to increase clariry.  Since the wind_* values computed in this function can be -1, 0 or 1,
+	it is clearer to test them using equality relations, not perform XOR
+	operations on their bit-patterns.  I believe the old code worked, but it would return an strange
+	constant for "true". To ram the point home, I've changed the
+	function to return bool.
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/toporouter.c: toporouter.c: Remove commented
+	tvertex_intersect() function The implementation being used is a macro in toporouter.h
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/toporouter.c: toporouter.c: Remove unused function
+	tvertex_intersect_prop()
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/toporouter.c: toporouter.c: Re-arrange the maths in
+	{vertices,coords}_on_line() Should given an identical result, but with a couple fewer
+	operations.
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/toporouter.c: toporouter.c: Remove unused function
+	points_on_line()
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/toporouter.c: toporouter.c: Remove unused wind_double()
+	function
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/toporouter.c: toporouter.c: Remove unused sloppy_.*wind()
+	functions
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/toporouter.c: toporouter: Re-implement functions using atan
+	with atan2 Simplifies and condenses the code a lot.
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/toporouter.c: toporouter.c: Replace coord_xangle() with
+	coord_angle() The new function returning the "normal" coordinate system angle one
+	would expect. Replace usage of coord_xangle() in
+	export_pcb_drawarc() with the new function.  PCB's arc angles are a bit nutty, so lets try to contain that
+	strangeness to the arc exporting routine!
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/toporouter.c: toporouter.c: Remove unused point_xangle()
+	function (Unused since the previous commit)
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/toporouter.c: toporouter.c: Remove unused region_span()
+	function
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/toporouter.c: toporouter: Remove unused
+	vertex_move_towards_point[_values]() functions
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/toporouter.c: toporouter.c: Fix constants which assumed CMIL
+	for PCB's internal units This should make the toporouter work again.
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/toporouter.c: toporouter.c: Fixup and clean
+	read_board_constraints() and create_board_edge() Introduce a #defined constant which expresses how fine to break the
+	board edges into (the old hard-coded constant was broken since we
+	changed to nanometers).
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/toporouter.c: toporoute.c: Remove runtime Copyright message
+	from toporouter Not only is Anthony now not the only author of this code, we don't
+	do this for anything else.. why should we for this. It could
+	potentially act to discorage others from working on this code, and
+	we don't want that.
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/toporouter.c, src/toporouter.h: toporouter.[ch]: Add generic
+	"contributors" copyright notice "Copyright (C) 2009-2011 PCB Contibrutors (See ChangeLog for
+	details)"
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/change.c: Revert "Change change.c to treat text scale as mils"
+	and fix harder..  This reverts commit 9396377717f7c49cf38d753a35e32d004294b09e and
+	fixes what was probably the underlying issue... I made a mistake in
+	commit 2d21a8ad8f38e07b17450450a096f1ce4b3bef0e such that it added
+	the existing text scale when setting an "absolute" text size, but
+	ignored it when setting a relative change. (Clearly backwards).  Additionally, I've switched to computing the new value in double
+	arithmetic to avoid a potential overflow when the input value is
+	large and we are using a 32-bit Coord type.  See commit 2d21a8ad8f38e07b17450450a096f1ce4b3bef0e for a
+	description of how text scale is defined and used. If we want to
+	change how our text is sized / scaled in the future, we would need
+	to change usage in many more places than the reverted commit
+	touched.
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/action.c: action.c: Fix the SetValue(TextScale, ...) action
+	after nanometer conversion
+
+2011-10-01   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/gtkhid-gl.c: hid/gtk: (GL Renderer) Use direct
+	rendering for off-screen pixmaps We use direct rendering for the rest (where possible), so why slow
+	down pixmap rendering. Also fixes a bug on my pcb+gl_experimental
+	branch where pixel shaders can't be shared between the direct
+	rendered widgets and the pixmap rendering code.
+
+2011-09-29   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/ghid-layer-selector.c,
+	src/hid/gtk/ghid-layer-selector.h, src/hid/gtk/gui-top-window.c: 
+	hid/gtk: Extend layer selector to allow editing layer names in situ Contains an unfortunate abstraciton break in the layer selector in
+	order to temporarily disable PCB's accelerators whilst the layer is
+	being renamed. It would be lovely to fix this and make things
+	cleaner in the future.
+
+2011-09-29   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/ghid-layer-selector.c,
+	src/hid/gtk/ghid-layer-selector.h: hid/gtk: Layer selector - Rename
+	"activatable" to "selectable" GTK has a special meaning for the word "activatable", meaning that
+	the item can be double-clicked, or "activated" by hitting enter on
+	it. We use it to mean selectable - so change the code to make this
+	clear.
+
+2011-09-29   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/ghid-layer-selector.c: hid/gtk: Layer selector -
+	remove unused variable
+
+2011-09-29   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/ghid-layer-selector.c: hid/gtk: Refactor to remove
+	some duplicated code in the layer selector
+
+2011-09-29   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/ghid-layer-selector.c: hid/gtk: Better encapsulate
+	some of the layer selector initialisation The work we do within ghid_layer_selector_new() is better placed in
+	the appropriate class initialiser functions, otherwise we needn't go
+	to the trouble of subclassing a widget in the first place.
+
+2011-09-29   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/ghid-layer-selector.c: hid/gtk: Don't refleak the
+	accel group created by the layer selector When the accel group is created, we have a reference to it - we
+	don't need another.
+
+2011-09-29   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/gui-utils.c, src/hid/gtk/gui.h: hid/gtk: Remove the
+	unused function utf8_dup_string
+
+2011-09-29   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/gui-config.c: hid/gtk: Don't use dup_string where
+	doing so would mix g_free() and free() The core uses malloc(), strdup(), free() etc..  The GTK HID
+	primarily uses g_malloc(), g_strdup(), g_free() etc..  Mixing them can lead to bad behaviour and hard to debug crashes.
+	This commit is not aimed at fixing any known bugs, but is "by
+	inspection", as I spotted some of these when working on a layer
+	selector patch.
+
+2011-09-12   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/draw.c, src/draw.h, src/hid/gtk/gtkhid-main.c: draw.c: Expose
+	some drawing APIs for the HIDs to use directly...  Exposes:   DrawLayerGroup   DrawPaste   DrawSilk   DrawMask   DrawHoles   PrintAssembly
+
+2011-09-29   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/gtkhid-gl.c: hid/gtk: Simplify and correct
+	ghid_show_crosshair() logic for the GL renderer Drop the always-true parameter we were passed, and combine the code
+	from ghid_show_crosshair() and draw_crosshair() into one function.
+
+2011-09-29   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/gtkhid-gdk.c: hid/gtk: Remove always-true parameter
+	from show_crosshair() in GDK renderer Pass the render_priv pointer instead - this is vaguely useful. Also
+	tidy the function a little to make it clearer, rolling the code from
+	show_crosshair() and draw_crosshair() together into a combined
+	"draw_crosshair()" function.  The function no longer rejects negative x drawing coordinates, but
+	we aren't passed those anyway.
+
+2011-09-29   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/gtkhid-gl.c: hid/gtk: Fix z-coordinate scaling for GL
+	views.  (Fixes a 3D rendering bug in my PCB+GL branches, no visible effect
+	for git HEAD builds).
+
+2011-09-23   Andrew Poelstra (local) * apoelstra AT wpsoftware dot net *
+
+	* src/pcb-printf.c: Move pcb-printf #if 0 guards for %mr specifier
+	to fix internationalization Since the previous version of pcb cannot read files with suffixes on
+	its measures, right now the %mr specifier outputs measures in cmils,
+	no suffix.  The future behavior would be to select appropriate units and use
+	those, but for now this is disabled by an #if 0 block around the
+	relevant call to CoordToString.  This patch moves the #if 0 block to the suffix-specific part of the
+	code, since we DO want the other behavior of the %mr spec,
+	specifically, the forcing of '.' as a decimal separator.
+
+2011-09-23   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/create.c: create.c: Don't emit RouteStylesChanged from within
+	CreateNewPCB() The route style selector is hanging onto pointers of the current
+	PCB's route styles. When the action "RouteStylesChanged" is called,
+	these are compared against the current route style to identify which
+	one the GUI should show as selected.  When this call comes from within CreateNewPCB, and the OLD PCB has
+	already been free'd, this causes free'd memory to be read, resulting
+	in valgrind output such as:     ==22404== Invalid read of size 8     ==22404==    at 0x4D82B3: ghid_route_style_selector_sync
+	    (ghid-route-style-selector.c:594) ==22404==    by 0x4BAB28:
+	    RouteStylesChanged (gtkhid-main.c:1157) ==22404==    by 0x49E0D3:
+	    hid_actionv (actions.c:247) ==22404==    by 0x447B7B: CreateNewPCB
+	    (create.c:194) ==22404==    by 0x4273E8: ActionNew (action.c:5902)     ==22404==  Address 0xd3c4458 is 13,880 bytes inside a block of
+	    size 14,120 free'd ==22404==    at 0x4C282E0: free
+	    (vg_replace_malloc.c:366) ==22404==    by 0x4273DE: ActionNew
+	(action.c:5901) Strictly speaking though - since CreateNewPCB does not directly
+	assign to the current PCB variable - it has no business in calling
+	the "RouteStylesChanged" action anyway.  Suitable update is taken care of later on in ActionNew(), as it
+	calls the "PCBChanged" action - the GTK implementation of which in
+	turn updates the route selector correctly.  Closes-bug: lp-856909
+
+2011-09-23   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/action.c: action.c: Set PCB = NULL; after freeing it in
+	ActionNew() When we call CreateNewPCB(), it trips over some code which wants to
+	access the current PCB in order to determine whether to auto-save at
+	exit. The code in question does check if PCB is NULL first, so this
+	is a sufficient fix for this case.  Fixes valgrind output such as:     ==22404== Invalid read of size 8     ==22404==    at 0x470944: Parse (parse_l.l:282)     ==22404==    by 0x471913: ParseFont (parse_l.l:356)     ==22404==    by 0x447973: CreateDefaultFont (create.c:941)     ==22404==    by 0x447C58: CreateNewPCB (create.c:211)     ==22404==    by 0x4273E8: ActionNew (action.c:5902)     ==22404==  Address 0xd3c4538 is 14,104 bytes inside a block of
+	    size 14,120 free'd ==22404==    at 0x4C282E0: free
+	    (vg_replace_malloc.c:366) ==22404==    by 0x4273DE: ActionNew
+	(action.c:5901) Which is seen when starting an new layout from within PCB.  Affects-bug: lp-856909
+
+2011-09-19   Peter Clifton * pcjc2 AT cam dot ac dot uk *
+
+	* src/hid/gtk/gtkhid-main.c: hid/gtk: Fix Pan action to stop after
+	button release outside window Previously, we required in-view coordinates to stop and start the
+	pan-action, and when the button was released outside the viewport,
+	the code was querying the user to click at a particular location.  Since the pan action doesn't even use the passed in coordinates,
+	simply remove the requirement for the x-y coordinates from this
+	action.  Closes-bug: lp-699307
+
+2011-09-18   DJ Delorie * dj AT delorie dot com *
+
+	* doc/Makefile.am: Add options.texi to dist files
+
+2011-09-18   DJ Delorie * dj AT delorie dot com *
+
+	* NEWS: Today is the 18th :-)
+
+2011-09-18   DJ Delorie * dj AT delorie dot com *
+
+	* ChangeLog, NEWS: Update Changelog and NEWS for 20110918
+
 2011-09-18   DJ Delorie * dj AT delorie dot com *
 
 	* po/POTFILES.in: Remove src/hid/common/hidgl_package_vrml_y.c from
diff --git a/Makefile.am b/Makefile.am
index c6927f1..6f9a94d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,4 @@
 ## -*- makefile -*-
-## $Id$
 ##
 ## Top level automake file for PCB
 
diff --git a/Makefile.in b/Makefile.in
index 9d495c8..6b8ab24 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -78,6 +95,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	install-pdf-recursive install-ps-recursive install-recursive \
 	installcheck-recursive installdirs-recursive pdf-recursive \
 	ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
   distclean-recursive maintainer-clean-recursive
 AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
@@ -89,9 +111,11 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 am__remove_distdir = \
-  { test ! -d "$(distdir)" \
-    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr "$(distdir)"; }; }
+  if test -d "$(distdir)"; then \
+    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+      && rm -rf "$(distdir)" \
+      || { sleep 5 && rm -rf "$(distdir)"; }; \
+  else :; fi
 am__relativize = \
   dir0=`pwd`; \
   sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -120,11 +144,14 @@ am__relativize = \
 DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -137,7 +164,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -203,6 +229,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -311,6 +341,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -343,7 +375,7 @@ all: config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
 
 .SUFFIXES:
-am--refresh:
+am--refresh: Makefile
 	@:
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
@@ -379,10 +411,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 
 config.h: stamp-h1
-	@if test ! -f $@; then \
-	  rm -f stamp-h1; \
-	  $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
-	else :; fi
+	@if test ! -f $@; then rm -f stamp-h1; else :; fi
+	@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
 
 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
 	@rm -f stamp-h1
@@ -566,13 +596,10 @@ distdir: $(DISTFILES)
 	done
 	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(MKDIR_P) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
+	    $(am__make_dryrun) \
+	      || test -d "$(distdir)/$$subdir" \
+	      || $(MKDIR_P) "$(distdir)/$$subdir" \
+	      || exit 1; \
 	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
 	    $(am__relativize); \
 	    new_distdir=$$reldir; \
@@ -604,7 +631,11 @@ dist-gzip: distdir
 	$(am__remove_distdir)
 
 dist-bzip2: distdir
-	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-lzip: distdir
+	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
 	$(am__remove_distdir)
 
 dist-lzma: distdir
@@ -612,7 +643,7 @@ dist-lzma: distdir
 	$(am__remove_distdir)
 
 dist-xz: distdir
-	tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
 	$(am__remove_distdir)
 
 dist-tarZ: distdir
@@ -643,6 +674,8 @@ distcheck: dist
 	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
 	*.tar.lzma*) \
 	  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+	*.tar.lz*) \
+	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
 	*.tar.xz*) \
 	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
 	*.tar.Z*) \
@@ -652,7 +685,7 @@ distcheck: dist
 	*.zip*) \
 	  unzip $(distdir).zip ;;\
 	esac
-	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	chmod -R a-w $(distdir); chmod u+w $(distdir)
 	mkdir $(distdir)/_build
 	mkdir $(distdir)/_inst
 	chmod a-w $(distdir)
@@ -663,6 +696,7 @@ distcheck: dist
 	  && $(am__cd) $(distdir)/_build \
 	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
 	    --with-included-gettext \
+	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
 	    $(DISTCHECK_CONFIGURE_FLAGS) \
 	  && $(MAKE) $(AM_MAKEFLAGS) \
 	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
@@ -691,8 +725,16 @@ distcheck: dist
 	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
 	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
-	@$(am__cd) '$(distuninstallcheck_dir)' \
-	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+	@test -n '$(distuninstallcheck_dir)' || { \
+	  echo 'ERROR: trying to run $@ with an empty' \
+	       '$$(distuninstallcheck_dir)' >&2; \
+	  exit 1; \
+	}; \
+	$(am__cd) '$(distuninstallcheck_dir)' || { \
+	  echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+	  exit 1; \
+	}; \
+	test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
 	   || { echo "ERROR: files left after uninstall:" ; \
 	        if test -n "$(DESTDIR)"; then \
 	          echo "  (check DESTDIR support)"; \
@@ -723,10 +765,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
@@ -815,17 +862,18 @@ uninstall-am:
 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
 	all all-am am--refresh check check-am clean clean-generic \
 	ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
-	dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \
-	distclean distclean-generic distclean-hdr distclean-tags \
-	distcleancheck distdir distuninstallcheck dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs installdirs-am maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
-	pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
+	dist-lzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
+	distcheck distclean distclean-generic distclean-hdr \
+	distclean-tags distcleancheck distdir distuninstallcheck dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs installdirs-am \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/NEWS b/NEWS
index 3036428..a8f436d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,59 @@
 ========================================================================
+Release Notes for PCB snapshot 20140316
+========================================================================
+This release represents over 421 commits (mostly bugfixes and code
+refactoring) and as such this summary clearly is not complete.  See
+the ChangeLog file for the complete list of changes.
+
+Features
+--------
+
+- GTK gui uses GL now, including a pseudo-3D mode.
+- Brazilian translation added, others updated.
+- Many internationalization tweaks.
+- Mice with right-left scroll wheels now supported.
+- Major upgrades to the GCode exporter.
+- rat-thickness parameter can take a 'px' suffix
+- metric and imperial grids are now more independent.
+- photo exporter supports multiple color schemes.
+- gerbers can be output in metric.
+- There's now a difference between "found" (what the netlist wants)
+  and "connected" (what the copper says).
+- PNG exporter has --fill-holes to omit the "drill helper" completely.
+- gerber drill files now 0.1mil resolution.
+- XY file is now IPC 7531 compliant.
+
+Bug Fixes
+---------
+
+- Fix pan locking up pcb if you leave the window.
+- Many bugfixes related to the metric conversion, including the two
+  autorouters.
+- ps alignment marks fixed.
+- route styles in *.pcb files may contain units.
+- able to select more parts by their mark when their mark is on-grid.
+- gtk route selector may now have nothing selected, if the board has
+  custom route settings.
+- drc no longer hangs when some layers are skipped.
+- ps_bloat works again.
+- EPS header is more standards-compliant.
+- PS outlines are only drawn on copper layers, not mask layers.
+- cursor position and zoom are no longer written to the *.pcb file.
+- lines with different clearances aren't auto-merged.
+- pin names are drawn in the pinout window.
+- gerber aperture numbers won't increase between runs.
+- misc doc tweaks and fixes.
+
+Other
+-----
+
+- Many tweaks to the source code to make it cleaner.
+- The top and bottom layers are now consistently called "top" and
+  "bottom" instead of "solder" and "component"
+- *.pcb file version bumped to 20091103 to reflect coordinate units change.
+- gEDA/pcb project moved to geda-project.org
+
+========================================================================
 Release Notes for PCB snapshot 20110918
 ========================================================================
 This release represents over 797 commits and as such this summary 
diff --git a/README b/README
index 9b9da9a..6906d17 100644
--- a/README
+++ b/README
@@ -4,10 +4,12 @@ design of printed circuit boards.
 For installing the release refer to the file 'INSTALL'.
 For additional information read the manual (doc/pcb.pdf) 
 
-If you are updating you may wish to read the ChangeLog
+If you are updating to a new snapshot, you may wish to read
+the ChangeLog file.  People using git are expected to look
+at the git commit messages, instead.
 
 There is also a bug tracking system available which can
-be found from http://pcb.gpleda.org.  
+be found from http://pcb.geda-project.org.  
 
 
 -------------------------------------------------------------------------
diff --git a/README.git b/README.git
index 27b4fd8..06f4be1 100644
--- a/README.git
+++ b/README.git
@@ -67,7 +67,7 @@ the updating section.
 
 To clone the PCB repository to your computer, run:
 
-  git clone git://git.gpleda.org/pcb.git
+  git clone git://git.geda-project.org/pcb.git
 
 This will download the entire version control history for PCB to
 your computer, and will take some time.
@@ -114,7 +114,7 @@ contribute patches back to the community, or gain 'push' permissions
 for the PCB git repository, please see the gEDA wiki for more
 information:
 
-  http://geda.seul.org/wiki/geda:scm
+  http://wiki.geda-project.org/geda:scm
 
 ------------------------
 Using CVS instead of git
@@ -123,7 +123,7 @@ Using CVS instead of git
 It is still possible to use CVS to access the PCB sources.  You can
 checkout the latest version using the command:
 
-  cvs -z3 -d:pserver:anonymous at git.gpleda.org/home/git/pcb.git co master
+  cvs -z3 -d:pserver:anonymous at git.geda-project.org/home/git/pcb.git co master
 
 And update them using:
 
diff --git a/README_FILES/Makefile.am b/README_FILES/Makefile.am
index ca74b2d..78f0801 100644
--- a/README_FILES/Makefile.am
+++ b/README_FILES/Makefile.am
@@ -1,6 +1,3 @@
-## $Id$
-##
-
 EXTRA_DIST= \
 	CHANGES \
 	Tools \
diff --git a/README_FILES/Makefile.in b/README_FILES/Makefile.in
index 600886d..dd7d794 100644
--- a/README_FILES/Makefile.in
+++ b/README_FILES/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -363,10 +391,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/acinclude.m4 b/acinclude.m4
index 9ab3758..dab11df 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1,5 +1,3 @@
-dnl $Id$
-dnl
 dnl the FC_* macros were copied from the freeciv program.  The use here
 dnl is to figure out if we need -DNARROWPROTO and the correct setting
 dnl for FUNCPROTO.  Without these set right, it has been observed that
diff --git a/aclocal.m4 b/aclocal.m4
index d583f3e..f8d2ee9 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,7 +1,8 @@
-# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -13,15 +14,15 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.66],,
-[m4_warning([this file was generated for autoconf 2.66.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
 
 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
-# serial 40 IT_PROG_INTLTOOL
+# serial 42 IT_PROG_INTLTOOL
 AC_DEFUN([IT_PROG_INTLTOOL], [
 AC_PREREQ([2.50])dnl
 AC_REQUIRE([AM_NLS])dnl
@@ -34,13 +35,11 @@ case "$am__api_version" in
     ;;
 esac
 
+INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
+INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 if test -n "$1"; then
     AC_MSG_CHECKING([for intltool >= $1])
-
-    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
-    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
-    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
-    ]
     AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
 	AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
@@ -53,25 +52,48 @@ if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT";
     AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
 fi
 
-  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
-     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
-      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
-   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+if test -z "$AM_DEFAULT_VERBOSITY"; then
+  AM_DEFAULT_VERBOSITY=1
+fi
+AC_SUBST([AM_DEFAULT_VERBOSITY])
+
+INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
+INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
+INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
+AC_SUBST(INTLTOOL_V_MERGE)
+AC_SUBST(INTLTOOL__v_MERGE_)
+AC_SUBST(INTLTOOL__v_MERGE_0)
+
+INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
+intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
+intltool__v_merge_options_0='-q'
+AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
+AC_SUBST(intltool__v_merge_options_)
+AC_SUBST(intltool__v_merge_options_0)
+
+  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
+     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
+      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
+else
+      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
+fi
+      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
@@ -117,7 +139,7 @@ $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
 if test $? -ne 0; then
    AC_MSG_ERROR([perl 5.8.1 is required for intltool])
 else
-   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
+   IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
    AC_MSG_RESULT([$IT_PERL_VERSION])
 fi
 if test "x$2" != "xno-xml"; then
@@ -371,12 +393,15 @@ else
 fi[]dnl
 ])# PKG_CHECK_MODULES
 
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_AUTOMAKE_VERSION(VERSION)
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
@@ -386,7 +411,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
 [am__api_version='1.11'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.11.1], [],
+m4_if([$1], [1.11.6], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -402,19 +427,21 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.1])dnl
+[AM_AUTOMAKE_VERSION([1.11.6])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
@@ -496,14 +523,14 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 10
+# serial 12
 
 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
@@ -543,6 +570,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
   # instance it was reported that on HP-UX the gcc test will end up
   # making a dummy file named `D' -- because `-MD' means `put the output
   # in D'.
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -607,7 +635,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
 	break
       fi
       ;;
-    msvisualcpp | msvcmsys)
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
       # This compiler won't grok `-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
@@ -672,10 +700,13 @@ AC_DEFUN([AM_DEP_TRACK],
 if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
+  am__nodep='_no'
 fi
 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 AC_SUBST([AMDEPBACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
 ])
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
@@ -758,18 +789,6 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 ])
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-
 # Do all the work for Automake.                             -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
@@ -909,12 +928,15 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_PROG_INSTALL_SH
 # ------------------
 # Define $install_sh.
@@ -975,8 +997,8 @@ fi])
 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 # From Jim Meyering
 
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
+# 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -996,7 +1018,7 @@ AC_DEFUN([AM_MAINTAINER_MODE],
        [disable], [m4_define([am_maintainer_other], [enable])],
        [m4_define([am_maintainer_other], [enable])
         m4_warn([syntax], [unexpected argument to AM@&t at _MAINTAINER_MODE: $1])])
-AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
   AC_ARG_ENABLE([maintainer-mode],
 [  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
@@ -1142,12 +1164,15 @@ else
 fi
 ])
 
-# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_PROG_MKDIR_P
 # ---------------
 # Check for `mkdir -p'.
@@ -1170,13 +1195,14 @@ esac
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 5
 
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
@@ -1184,13 +1210,13 @@ AC_DEFUN([_AM_MANGLE_OPTION],
 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
 # _AM_SET_OPTION(NAME)
-# ------------------------------
+# --------------------
 # Set option NAME.  Presently that only means defining a flag for this option.
 AC_DEFUN([_AM_SET_OPTION],
 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
 # _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
+# ------------------------
 # OPTIONS is a space-separated list of Automake options.
 AC_DEFUN([_AM_SET_OPTIONS],
 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
@@ -1266,12 +1292,14 @@ Check your system clock])
 fi
 AC_MSG_RESULT(yes)])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_PROG_INSTALL_STRIP
 # ---------------------
 # One issue with vendor `install' (even GNU) is that you can't
@@ -1294,13 +1322,13 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
+# serial 3
 
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
@@ -1309,13 +1337,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
 AC_DEFUN([_AM_SUBST_NOTMAKE])
 
 # AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
+# --------------------------
 # Public sister of _AM_SUBST_NOTMAKE.
 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1337,10 +1365,11 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 # a tarball read from stdin.
 #     $(am__untar) < result.tar
 AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
+[# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
 m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
      [m4_case([$1], [ustar],, [pax],,
               [m4_fatal([Unknown tar format])])
 AC_MSG_CHECKING([how to create a $1 tar archive])
diff --git a/configure b/configure
index 17256aa..9f7cc64 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.66 for pcb 20110918.
+# Generated by GNU Autoconf 2.68 for pcb 20140316.
 #
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -89,6 +89,7 @@ fi
 IFS=" ""	$as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -214,11 +215,18 @@ IFS=$as_save_IFS
   # We cannot yet assume a decent shell, so we have to provide a
 	# neutralization value for shells without unset; and this also
 	# works around shells that cannot unset nonexistent variables.
+	# Preserve -v and -x to the replacement shell.
 	BASH_ENV=/dev/null
 	ENV=/dev/null
 	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 	export CONFIG_SHELL
-	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+	case $- in # ((((
+	  *v*x* | *x*v* ) as_opts=-vx ;;
+	  *v* ) as_opts=-v ;;
+	  *x* ) as_opts=-x ;;
+	  * ) as_opts= ;;
+	esac
+	exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
 fi
 
     if test x$as_have_required = xno; then :
@@ -549,8 +557,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='pcb'
 PACKAGE_TARNAME='pcb'
-PACKAGE_VERSION='20110918'
-PACKAGE_STRING='pcb 20110918'
+PACKAGE_VERSION='20140316'
+PACKAGE_STRING='pcb 20140316'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -603,7 +611,6 @@ PCBTREEDIR
 LIBRARYFILENAME
 PCBLIBDIR
 FONTFILENAME
-CC_OR_CXX_FLAGS
 CC_OR_CXX
 DEBUG_BUILD_FALSE
 DEBUG_BUILD_TRUE
@@ -720,6 +727,13 @@ INTLTOOL_PROP_RULE
 INTLTOOL_KEYS_RULE
 INTLTOOL_DIRECTORY_RULE
 INTLTOOL_DESKTOP_RULE
+intltool__v_merge_options_0
+intltool__v_merge_options_
+INTLTOOL_V_MERGE_OPTIONS
+INTLTOOL__v_MERGE_0
+INTLTOOL__v_MERGE_
+INTLTOOL_V_MERGE
+AM_DEFAULT_VERBOSITY
 INTLTOOL_EXTRACT
 INTLTOOL_MERGE
 INTLTOOL_UPDATE
@@ -786,6 +800,7 @@ CPP
 am__fastdepCC_FALSE
 am__fastdepCC_TRUE
 CCDEPMODE
+am__nodep
 AMDEPBACKSLASH
 AMDEP_FALSE
 AMDEP_TRUE
@@ -987,8 +1002,9 @@ do
   fi
 
   case $ac_option in
-  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)	ac_optarg=yes ;;
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
   esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
@@ -1328,7 +1344,7 @@ Try \`$0 --help' for more information"
     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1466,7 +1482,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures pcb 20110918 to adapt to many kinds of systems.
+\`configure' configures pcb 20140316 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1540,7 +1556,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of pcb 20110918:";;
+     short | recursive ) echo "Configuration of pcb 20140316:";;
    esac
   cat <<\_ACEOF
 
@@ -1608,8 +1624,9 @@ Some influential environment variables:
   CPP         C preprocessor
   CXX         C++ compiler command
   CXXFLAGS    C++ compiler flags
-  YACC        The `Yet Another C Compiler' implementation to use. Defaults to
-              the first program found out of: `bison -y', `byacc', `yacc'.
+  YACC        The `Yet Another Compiler Compiler' implementation to use.
+              Defaults to the first program found out of: `bison -y', `byacc',
+              `yacc'.
   YFLAGS      The list of arguments that will be passed by default to $YACC.
               This script will default YFLAGS to the empty string to avoid a
               default value of `-d' given by some make applications.
@@ -1699,8 +1716,8 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-pcb configure 20110918
-generated by GNU Autoconf 2.66
+pcb configure 20140316
+generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
@@ -1746,7 +1763,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_compile
@@ -1772,7 +1789,7 @@ $as_echo "$ac_try_echo"; } >&5
     mv -f conftest.er1 conftest.err
   fi
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } >/dev/null && {
+  test $ac_status = 0; } > conftest.i && {
 	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        }; then :
@@ -1783,7 +1800,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
     ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_cpp
@@ -1796,10 +1813,10 @@ fi
 ac_fn_c_check_header_mongrel ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if eval "test \"\${$3+set}\"" = set; then :
+  if eval \${$3+:} false; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 fi
 eval ac_res=\$$3
@@ -1835,7 +1852,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 else
   ac_header_preproc=no
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
 $as_echo "$ac_header_preproc" >&6; }
 
@@ -1862,7 +1879,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
 esac
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   eval "$3=\$ac_header_compiler"
@@ -1871,7 +1888,7 @@ eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_mongrel
 
@@ -1912,7 +1929,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
        ac_retval=$ac_status
 fi
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_run
@@ -1926,7 +1943,7 @@ ac_fn_c_check_header_compile ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1944,7 +1961,7 @@ fi
 eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_compile
 
@@ -1981,7 +1998,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_cxx_try_compile
@@ -2027,7 +2044,7 @@ fi
   # interfere with the next link command; also delete a directory that is
   # left behind by Apple's compiler.  We do this before executing the actions.
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_link
@@ -2041,7 +2058,7 @@ ac_fn_c_check_type ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   eval "$3=no"
@@ -2082,7 +2099,7 @@ fi
 eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_type
 
@@ -2094,7 +2111,7 @@ ac_fn_c_check_func ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2149,7 +2166,7 @@ fi
 eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_func
 
@@ -2326,7 +2343,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 rm -f conftest.val
 
   fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_compute_int
@@ -2334,8 +2351,8 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by pcb $as_me 20110918, which was
-generated by GNU Autoconf 2.66.  Invocation command line was
+It was created by pcb $as_me 20140316, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
 
@@ -2735,7 +2752,7 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
 $as_echo_n "checking for a BSD-compatible install... " >&6; }
 if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then :
+if ${ac_cv_path_install+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2912,7 +2929,7 @@ if test "$cross_compiling" != no; then
 set dummy ${ac_tool_prefix}strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$STRIP"; then
@@ -2952,7 +2969,7 @@ if test -z "$ac_cv_prog_STRIP"; then
 set dummy strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_STRIP"; then
@@ -3005,7 +3022,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
 if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then :
+  if ${ac_cv_path_mkdir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3056,7 +3073,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
@@ -3096,7 +3113,7 @@ done
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -3154,7 +3171,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='pcb'
- VERSION='20110918'
+ VERSION='20140316'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3184,11 +3201,11 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
+# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
 
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
 
 
 
@@ -3246,6 +3263,7 @@ fi
 if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
+  am__nodep='_no'
 fi
  if test "x$enable_dependency_tracking" != xno; then
   AMDEP_TRUE=
@@ -3266,7 +3284,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -3306,7 +3324,7 @@ if test -z "$ac_cv_prog_CC"; then
 set dummy gcc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -3359,7 +3377,7 @@ if test -z "$CC"; then
 set dummy ${ac_tool_prefix}cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -3399,7 +3417,7 @@ if test -z "$CC"; then
 set dummy cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -3458,7 +3476,7 @@ if test -z "$CC"; then
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -3502,7 +3520,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -3785,7 +3803,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
 ac_clean_files=$ac_clean_files_save
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
 $as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
+if ${ac_cv_objext+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3836,7 +3854,7 @@ OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3873,7 +3891,7 @@ ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
 $as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
@@ -3951,7 +3969,7 @@ else
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
@@ -4050,7 +4068,7 @@ depcc="$CC"   am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -4059,6 +4077,7 @@ else
   # instance it was reported that on HP-UX the gcc test will end up
   # making a dummy file named `D' -- because `-MD' means `put the output
   # in D'.
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -4118,7 +4137,7 @@ else
 	break
       fi
       ;;
-    msvisualcpp | msvcmsys)
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
       # This compiler won't grok `-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
@@ -4186,7 +4205,7 @@ if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then :
+  if ${ac_cv_prog_CPP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
@@ -4216,7 +4235,7 @@ else
   # Broken: fails on valid input.
 continue
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
@@ -4232,11 +4251,11 @@ else
 ac_preproc_ok=:
 break
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then :
   break
 fi
@@ -4275,7 +4294,7 @@ else
   # Broken: fails on valid input.
 continue
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
@@ -4291,11 +4310,11 @@ else
 ac_preproc_ok=:
 break
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then :
 
 else
@@ -4314,7 +4333,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$GREP"; then
@@ -4377,7 +4396,7 @@ $as_echo "$ac_cv_path_GREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
 $as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -4444,7 +4463,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
 $as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4573,7 +4592,7 @@ done
 
 
   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
-if test "x$ac_cv_header_minix_config_h" = x""yes; then :
+if test "x$ac_cv_header_minix_config_h" = xyes; then :
   MINIX=yes
 else
   MINIX=
@@ -4595,7 +4614,7 @@ $as_echo "#define _MINIX 1" >>confdefs.h
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
-if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
+if ${ac_cv_safe_to_define___extensions__+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4775,7 +4794,7 @@ $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
 $as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
+if ${ac_cv_build+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_build_alias=$build_alias
@@ -4809,7 +4828,7 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
 $as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
+if ${ac_cv_host+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "x$host_alias" = x; then
@@ -4846,15 +4865,10 @@ PCB_PATH_DELIMETER=":"
 PCB_DIR_SEPARATOR_S="/"
 PCB_DIR_SEPARATOR_C='/'
 case $host in
-	*-*-cygwin* )
-		CFLAGS="$CFLAGS ${CYGWIN_CFLAGS}"
-		CPPFLAGS="$CPPFLAGS ${CYGWIN_CPPFLAGS}"
-		;;
-
 	*-*-mingw* )
 		WIN32=yes
 		CFLAGS="$CFLAGS ${MINGW_CFLAGS:--mms-bitfields -mwindows}"
-		CPPFLAGS="$CPPFLAGS ${MINGW_CPPFLAGS:--mms-bitfields -mwindows}"
+		CPPFLAGS="$CPPFLAGS ${MINGW_CPPFLAGS}"
 		;;
 
 	* )
@@ -4906,7 +4920,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -4946,7 +4960,7 @@ if test -z "$ac_cv_prog_CC"; then
 set dummy gcc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -4999,7 +5013,7 @@ if test -z "$CC"; then
 set dummy ${ac_tool_prefix}cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -5039,7 +5053,7 @@ if test -z "$CC"; then
 set dummy cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -5098,7 +5112,7 @@ if test -z "$CC"; then
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -5142,7 +5156,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -5226,7 +5240,7 @@ done
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5263,7 +5277,7 @@ ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
 $as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
@@ -5341,7 +5355,7 @@ else
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
@@ -5440,7 +5454,7 @@ depcc="$CC"   am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -5449,6 +5463,7 @@ else
   # instance it was reported that on HP-UX the gcc test will end up
   # making a dummy file named `D' -- because `-MD' means `put the output
   # in D'.
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -5508,7 +5523,7 @@ else
 	break
       fi
       ;;
-    msvisualcpp | msvcmsys)
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
       # This compiler won't grok `-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
@@ -5579,7 +5594,7 @@ if test -z "$CXX"; then
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then :
+if ${ac_cv_prog_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CXX"; then
@@ -5623,7 +5638,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CXX"; then
@@ -5701,7 +5716,7 @@ done
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5738,7 +5753,7 @@ ac_test_CXXFLAGS=${CXXFLAGS+set}
 ac_save_CXXFLAGS=$CXXFLAGS
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then :
+if ${ac_cv_prog_cxx_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
@@ -5824,7 +5839,7 @@ depcc="$CXX"  am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -5833,6 +5848,7 @@ else
   # instance it was reported that on HP-UX the gcc test will end up
   # making a dummy file named `D' -- because `-MD' means `put the output
   # in D'.
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -5892,7 +5908,7 @@ else
 	break
       fi
       ;;
-    msvisualcpp | msvcmsys)
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
       # This compiler won't grok `-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
@@ -5954,7 +5970,7 @@ if test "x$WIN32" = "xyes" ; then
 set dummy ${ac_tool_prefix}windres; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_WINDRES+set}" = set; then :
+if ${ac_cv_prog_WINDRES+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$WINDRES"; then
@@ -5994,7 +6010,7 @@ if test -z "$ac_cv_prog_WINDRES"; then
 set dummy windres; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
+if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_WINDRES"; then
@@ -6119,7 +6135,7 @@ rm -f conf$$.file
 set dummy msgfmt; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_MSGFMT+set}" = set; then :
+if ${ac_cv_path_MSGFMT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case "$MSGFMT" in
@@ -6159,7 +6175,7 @@ fi
 set dummy gmsgfmt; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GMSGFMT+set}" = set; then :
+if ${ac_cv_path_GMSGFMT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $GMSGFMT in
@@ -6230,7 +6246,7 @@ rm -f conf$$.file
 set dummy xgettext; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_XGETTEXT+set}" = set; then :
+if ${ac_cv_path_XGETTEXT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case "$XGETTEXT" in
@@ -6301,7 +6317,7 @@ rm -f conf$$.file
 set dummy msgmerge; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_MSGMERGE+set}" = set; then :
+if ${ac_cv_path_MSGMERGE+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case "$MSGMERGE" in
@@ -6369,7 +6385,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
+if ${ac_cv_prog_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$RANLIB"; then
@@ -6409,7 +6425,7 @@ if test -z "$ac_cv_prog_RANLIB"; then
 set dummy ranlib; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_RANLIB"; then
@@ -6459,7 +6475,7 @@ fi
 
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror in -lcposix" >&5
 $as_echo_n "checking for strerror in -lcposix... " >&6; }
-if test "${ac_cv_lib_cposix_strerror+set}" = set; then :
+if ${ac_cv_lib_cposix_strerror+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -6493,7 +6509,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cposix_strerror" >&5
 $as_echo "$ac_cv_lib_cposix_strerror" >&6; }
-if test "x$ac_cv_lib_cposix_strerror" = x""yes; then :
+if test "x$ac_cv_lib_cposix_strerror" = xyes; then :
   LIBS="$LIBS -lcposix"
 fi
 
@@ -6501,7 +6517,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if test "${ac_cv_c_const+set}" = set; then :
+if ${ac_cv_c_const+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6582,7 +6598,7 @@ fi
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed" >&5
 $as_echo_n "checking for signed... " >&6; }
-if test "${bh_cv_c_signed+set}" = set; then :
+if ${bh_cv_c_signed+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6613,7 +6629,7 @@ $as_echo "#define signed /**/" >>confdefs.h
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
 $as_echo_n "checking for inline... " >&6; }
-if test "${ac_cv_c_inline+set}" = set; then :
+if ${ac_cv_c_inline+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_c_inline=no
@@ -6654,7 +6670,7 @@ _ACEOF
 esac
 
 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
-if test "x$ac_cv_type_off_t" = x""yes; then :
+if test "x$ac_cv_type_off_t" = xyes; then :
 
 else
 
@@ -6665,7 +6681,7 @@ _ACEOF
 fi
 
 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = x""yes; then :
+if test "x$ac_cv_type_size_t" = xyes; then :
 
 else
 
@@ -6678,7 +6694,7 @@ fi
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long" >&5
 $as_echo_n "checking for long long... " >&6; }
-if test "${ac_cv_type_long_long+set}" = set; then :
+if ${ac_cv_type_long_long+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6712,7 +6728,7 @@ $as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
 $as_echo_n "checking for long double... " >&6; }
-if test "${gt_cv_c_long_double+set}" = set; then :
+if ${gt_cv_c_long_double+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "$GCC" = yes; then
@@ -6753,7 +6769,7 @@ $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
 $as_echo_n "checking for wchar_t... " >&6; }
-if test "${gt_cv_c_wchar_t+set}" = set; then :
+if ${gt_cv_c_wchar_t+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6786,7 +6802,7 @@ $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
 $as_echo_n "checking for wint_t... " >&6; }
-if test "${gt_cv_c_wint_t+set}" = set; then :
+if ${gt_cv_c_wint_t+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6819,7 +6835,7 @@ $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
 $as_echo_n "checking for inttypes.h... " >&6; }
-if test "${jm_ac_cv_header_inttypes_h+set}" = set; then :
+if ${jm_ac_cv_header_inttypes_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6854,7 +6870,7 @@ _ACEOF
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
 $as_echo_n "checking for stdint.h... " >&6; }
-if test "${jm_ac_cv_header_stdint_h+set}" = set; then :
+if ${jm_ac_cv_header_stdint_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6891,7 +6907,7 @@ _ACEOF
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
 $as_echo_n "checking for intmax_t... " >&6; }
-if test "${gt_cv_c_intmax_t+set}" = set; then :
+if ${gt_cv_c_intmax_t+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6933,7 +6949,7 @@ $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf() supports POSIX/XSI format strings" >&5
 $as_echo_n "checking whether printf() supports POSIX/XSI format strings... " >&6; }
-if test "${gt_cv_func_printf_posix+set}" = set; then :
+if ${gt_cv_func_printf_posix+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -6997,7 +7013,7 @@ $as_echo "#define HAVE_POSIX_PRINTF 1" >>confdefs.h
 # for constant arguments.  Useless!
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
 $as_echo_n "checking for working alloca.h... " >&6; }
-if test "${ac_cv_working_alloca_h+set}" = set; then :
+if ${ac_cv_working_alloca_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7030,7 +7046,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
 $as_echo_n "checking for alloca... " >&6; }
-if test "${ac_cv_func_alloca_works+set}" = set; then :
+if ${ac_cv_func_alloca_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7049,7 +7065,7 @@ else
  #pragma alloca
 #   else
 #    ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
+void *alloca (size_t);
 #    endif
 #   endif
 #  endif
@@ -7093,7 +7109,7 @@ $as_echo "#define C_ALLOCA 1" >>confdefs.h
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
-if test "${ac_cv_os_cray+set}" = set; then :
+if ${ac_cv_os_cray+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7134,7 +7150,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
 $as_echo_n "checking stack direction for C alloca... " >&6; }
-if test "${ac_cv_c_stack_direction+set}" = set; then :
+if ${ac_cv_c_stack_direction+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "$cross_compiling" = yes; then :
@@ -7209,7 +7225,7 @@ done
 for ac_func in getpagesize
 do :
   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
-if test "x$ac_cv_func_getpagesize" = x""yes; then :
+if test "x$ac_cv_func_getpagesize" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_GETPAGESIZE 1
 _ACEOF
@@ -7219,7 +7235,7 @@ done
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
 $as_echo_n "checking for working mmap... " >&6; }
-if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
+if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "$cross_compiling" = yes; then :
@@ -7386,7 +7402,7 @@ rm -f conftest.mmap conftest.txt
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2.1 or newer" >&5
 $as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; }
-if test "${ac_cv_gnu_library_2_1+set}" = set; then :
+if ${ac_cv_gnu_library_2_1+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7421,7 +7437,7 @@ $as_echo "$ac_cv_gnu_library_2_1" >&6; }
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether integer division by zero raises SIGFPE" >&5
 $as_echo_n "checking whether integer division by zero raises SIGFPE... " >&6; }
-if test "${gt_cv_int_divbyzero_sigfpe+set}" = set; then :
+if ${gt_cv_int_divbyzero_sigfpe+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -7502,7 +7518,7 @@ _ACEOF
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long" >&5
 $as_echo_n "checking for unsigned long long... " >&6; }
-if test "${ac_cv_type_unsigned_long_long+set}" = set; then :
+if ${ac_cv_type_unsigned_long_long+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7555,7 +7571,7 @@ $as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
 $as_echo_n "checking for inttypes.h... " >&6; }
-if test "${gt_cv_header_inttypes_h+set}" = set; then :
+if ${gt_cv_header_inttypes_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -7594,7 +7610,7 @@ _ACEOF
   if test $gt_cv_header_inttypes_h = yes; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
-if test "${gt_cv_inttypes_pri_broken+set}" = set; then :
+if ${gt_cv_inttypes_pri_broken+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -7636,7 +7652,7 @@ _ACEOF
   for ac_header in stdint.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdint_h" = x""yes; then :
+if test "x$ac_cv_header_stdint_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_STDINT_H 1
 _ACEOF
@@ -7733,7 +7749,7 @@ _ACEOF
   for ac_header in stdint.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdint_h" = x""yes; then :
+if test "x$ac_cv_header_stdint_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_STDINT_H 1
 _ACEOF
@@ -7819,7 +7835,7 @@ else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
 $as_echo_n "checking for non-GNU ld... " >&6; }
 fi
-if test "${acl_cv_path_LD+set}" = set; then :
+if ${acl_cv_path_LD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$LD"; then
@@ -7856,7 +7872,7 @@ fi
 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${acl_cv_prog_gnu_ld+set}" = set; then :
+if ${acl_cv_prog_gnu_ld+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
@@ -7875,7 +7891,7 @@ with_gnu_ld=$acl_cv_prog_gnu_ld
 
                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
 $as_echo_n "checking for shared library run path origin... " >&6; }
-if test "${acl_cv_rpath+set}" = set; then :
+if ${acl_cv_rpath+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -8293,7 +8309,7 @@ fi
 
 
   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
-if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
 
 else
 
@@ -8335,7 +8351,7 @@ done
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _snprintf is declared" >&5
 $as_echo_n "checking whether _snprintf is declared... " >&6; }
-if test "${ac_cv_have_decl__snprintf+set}" = set; then :
+if ${ac_cv_have_decl__snprintf+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8376,7 +8392,7 @@ _ACEOF
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _snwprintf is declared" >&5
 $as_echo_n "checking whether _snwprintf is declared... " >&6; }
-if test "${ac_cv_have_decl__snwprintf+set}" = set; then :
+if ${ac_cv_have_decl__snwprintf+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8418,7 +8434,7 @@ _ACEOF
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether feof_unlocked is declared" >&5
 $as_echo_n "checking whether feof_unlocked is declared... " >&6; }
-if test "${ac_cv_have_decl_feof_unlocked+set}" = set; then :
+if ${ac_cv_have_decl_feof_unlocked+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8459,7 +8475,7 @@ _ACEOF
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fgets_unlocked is declared" >&5
 $as_echo_n "checking whether fgets_unlocked is declared... " >&6; }
-if test "${ac_cv_have_decl_fgets_unlocked+set}" = set; then :
+if ${ac_cv_have_decl_fgets_unlocked+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8500,7 +8516,7 @@ _ACEOF
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getc_unlocked is declared" >&5
 $as_echo_n "checking whether getc_unlocked is declared... " >&6; }
-if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then :
+if ${ac_cv_have_decl_getc_unlocked+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8595,7 +8611,7 @@ _ACEOF
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
 $as_echo_n "checking for iconv... " >&6; }
-if test "${am_cv_func_iconv+set}" = set; then :
+if ${am_cv_func_iconv+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -8670,7 +8686,7 @@ $as_echo "$LIBICONV" >&6; }
   if test "$am_cv_func_iconv" = yes; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
 $as_echo_n "checking for iconv declaration... " >&6; }
-    if test "${am_cv_proto_iconv+set}" = set; then :
+    if ${am_cv_proto_iconv+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -8721,7 +8737,7 @@ _ACEOF
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
-if test "${am_cv_langinfo_codeset+set}" = set; then :
+if ${am_cv_langinfo_codeset+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8756,7 +8772,7 @@ $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
 $as_echo_n "checking for LC_MESSAGES... " >&6; }
-if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
+if ${am_cv_val_LC_MESSAGES+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8794,7 +8810,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_INTLBISON+set}" = set; then :
+if ${ac_cv_prog_INTLBISON+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$INTLBISON"; then
@@ -8912,7 +8928,7 @@ $as_echo "$nls_cv_force_use_gnu_gettext" >&6; }
 
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
 $as_echo_n "checking for GNU gettext in libc... " >&6; }
-if test "${gt_cv_func_gnugettext1_libc+set}" = set; then :
+if ${gt_cv_func_gnugettext1_libc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -9322,7 +9338,7 @@ fi
 
           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
 $as_echo_n "checking for GNU gettext in libintl... " >&6; }
-if test "${gt_cv_func_gnugettext1_libintl+set}" = set; then :
+if ${gt_cv_func_gnugettext1_libintl+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   gt_save_CPPFLAGS="$CPPFLAGS"
@@ -9542,14 +9558,12 @@ case "$am__api_version" in
     ;;
 esac
 
+INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.35.0 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
+INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 if test -n "0.35.0"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intltool >= 0.35.0" >&5
 $as_echo_n "checking for intltool >= 0.35.0... " >&6; }
-
-    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.35.0 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
-    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
-    INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
-
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found" >&5
 $as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
@@ -9560,7 +9574,7 @@ fi
 set dummy intltool-update; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_INTLTOOL_UPDATE+set}" = set; then :
+if ${ac_cv_path_INTLTOOL_UPDATE+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $INTLTOOL_UPDATE in
@@ -9600,7 +9614,7 @@ fi
 set dummy intltool-merge; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_INTLTOOL_MERGE+set}" = set; then :
+if ${ac_cv_path_INTLTOOL_MERGE+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $INTLTOOL_MERGE in
@@ -9640,7 +9654,7 @@ fi
 set dummy intltool-extract; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_INTLTOOL_EXTRACT+set}" = set; then :
+if ${ac_cv_path_INTLTOOL_EXTRACT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $INTLTOOL_EXTRACT in
@@ -9680,25 +9694,48 @@ if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT";
     as_fn_error $? "The intltool scripts were not found. Please install intltool." "$LINENO" 5
 fi
 
-  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@'
-     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@'
-      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+if test -z "$AM_DEFAULT_VERBOSITY"; then
+  AM_DEFAULT_VERBOSITY=1
+fi
+
+
+INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
+INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
+INTLTOOL__v_MERGE_0='@echo "  ITMRG " $@;'
+
+
+
+
+INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
+intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
+intltool__v_merge_options_0='-q'
+
+
+
+
+  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< $@'
+     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
+      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< $@'
+else
+      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.$$RANDOM && mkdir $$_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u $$_it_tmp_dir $< $@ && rmdir $$_it_tmp_dir'
+fi
+      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
 
 
 
@@ -9801,7 +9838,7 @@ INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcar
 set dummy xgettext; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_XGETTEXT+set}" = set; then :
+if ${ac_cv_path_XGETTEXT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $XGETTEXT in
@@ -9841,7 +9878,7 @@ fi
 set dummy msgmerge; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_MSGMERGE+set}" = set; then :
+if ${ac_cv_path_MSGMERGE+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $MSGMERGE in
@@ -9881,7 +9918,7 @@ fi
 set dummy msgfmt; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_MSGFMT+set}" = set; then :
+if ${ac_cv_path_MSGFMT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $MSGFMT in
@@ -9921,7 +9958,7 @@ fi
 set dummy gmsgfmt; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GMSGFMT+set}" = set; then :
+if ${ac_cv_path_GMSGFMT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $GMSGFMT in
@@ -9972,7 +10009,7 @@ fi
 set dummy perl; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then :
+if ${ac_cv_path_INTLTOOL_PERL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $INTLTOOL_PERL in
@@ -10017,7 +10054,7 @@ $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
 if test $? -ne 0; then
    as_fn_error $? "perl 5.8.1 is required for intltool" "$LINENO" 5
 else
-   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
+   IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IT_PERL_VERSION" >&5
 $as_echo "$IT_PERL_VERSION" >&6; }
 fi
@@ -10056,7 +10093,7 @@ else
   case $host in
     *-*-solaris*)
                         ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
-if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then :
+if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
   DATADIRNAME=share
 else
   DATADIRNAME=lib
@@ -10079,7 +10116,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
 $as_echo_n "checking for inline... " >&6; }
-if test "${ac_cv_c_inline+set}" = set; then :
+if ${ac_cv_c_inline+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_c_inline=no
@@ -10125,7 +10162,7 @@ esac
   *) :
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
-if test "${ac_cv_prog_cc_c99+set}" = set; then :
+if ${ac_cv_prog_cc_c99+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c99=no
@@ -10300,7 +10337,7 @@ if test "x$ac_cv_prog_cc_c99" != xno; then :
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
@@ -10396,7 +10433,7 @@ fi
 esac
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
-  if test "${ac_cv_prog_cc_stdc+set}" = set; then :
+  if ${ac_cv_prog_cc_stdc+:} false; then :
   $as_echo_n "(cached) " >&6
 fi
 
@@ -10421,7 +10458,7 @@ $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
 fi
 set dummy $CC; ac_cc=`$as_echo "$2" |
 		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then :
+if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10550,7 +10587,7 @@ if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then :
+  if ${ac_cv_prog_CPP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
@@ -10580,7 +10617,7 @@ else
   # Broken: fails on valid input.
 continue
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
@@ -10596,11 +10633,11 @@ else
 ac_preproc_ok=:
 break
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then :
   break
 fi
@@ -10639,7 +10676,7 @@ else
   # Broken: fails on valid input.
 continue
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
@@ -10655,11 +10692,11 @@ else
 ac_preproc_ok=:
 break
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then :
 
 else
@@ -10681,7 +10718,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
@@ -10725,7 +10762,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_LEX+set}" = set; then :
+if ${ac_cv_prog_LEX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$LEX"; then
@@ -10795,7 +10832,7 @@ $as_echo "$ac_try_echo"; } >&5
   test $ac_status = 0; }
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
 $as_echo_n "checking lex output file root... " >&6; }
-if test "${ac_cv_prog_lex_root+set}" = set; then :
+if ${ac_cv_prog_lex_root+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -10814,7 +10851,7 @@ LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
 if test -z "${LEXLIB+set}"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
 $as_echo_n "checking lex library... " >&6; }
-if test "${ac_cv_lib_lex+set}" = set; then :
+if ${ac_cv_lib_lex+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -10844,7 +10881,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
 $as_echo_n "checking whether yytext is a pointer... " >&6; }
-if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then :
+if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   # POSIX says lex can declare yytext either as a pointer or an array; the
@@ -10855,7 +10892,8 @@ ac_save_LIBS=$LIBS
 LIBS="$LEXLIB $ac_save_LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#define YYTEXT_POINTER 1
+
+  #define YYTEXT_POINTER 1
 `cat $LEX_OUTPUT_ROOT.c`
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
@@ -10883,7 +10921,7 @@ fi
 set dummy $LEX; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_LEX_PATH+set}" = set; then :
+if ${ac_cv_path_LEX_PATH+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $LEX_PATH in
@@ -10934,7 +10972,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_YACC+set}" = set; then :
+if ${ac_cv_prog_YACC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$YACC"; then
@@ -10975,7 +11013,7 @@ test -n "$YACC" || YACC="yacc"
 set dummy $YACC; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_YACC_PATH+set}" = set; then :
+if ${ac_cv_path_YACC_PATH+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $YACC_PATH in
@@ -11025,7 +11063,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
+if ${ac_cv_prog_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$RANLIB"; then
@@ -11065,7 +11103,7 @@ if test -z "$ac_cv_prog_RANLIB"; then
 set dummy ranlib; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_RANLIB"; then
@@ -11120,7 +11158,7 @@ fi
 set dummy xpmtoppm; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_XPMTOPPM+set}" = set; then :
+if ${ac_cv_path_XPMTOPPM+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $XPMTOPPM in
@@ -11161,7 +11199,7 @@ fi
 set dummy ppmtowinicon; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PPMTOWINICON+set}" = set; then :
+if ${ac_cv_path_PPMTOWINICON+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PPMTOWINICON in
@@ -11202,7 +11240,7 @@ fi
 set dummy convert; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CONVERT+set}" = set; then :
+if ${ac_cv_path_CONVERT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $CONVERT in
@@ -11248,7 +11286,7 @@ if test "X$docs_yesno" = "Xyes" -a "X$pcb_git_version" = "Xyes" ; then
 set dummy makeinfo; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_MKINFO+set}" = set; then :
+if ${ac_cv_path_MKINFO+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $MKINFO in
@@ -11321,7 +11359,7 @@ the documentation with --disable-doc
 set dummy texi2dvi; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_TEXI2DVI+set}" = set; then :
+if ${ac_cv_path_TEXI2DVI+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $TEXI2DVI in
@@ -11370,7 +11408,7 @@ installed.  Alternatively, you can disable building the documentation with
 set dummy perl; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PERL+set}" = set; then :
+if ${ac_cv_path_PERL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PERL in
@@ -11420,7 +11458,7 @@ Alternatively, you can disable building the documentation with
 set dummy kpsewhich; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_KPSEWHICH+set}" = set; then :
+if ${ac_cv_path_KPSEWHICH+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $KPSEWHICH in
@@ -11636,7 +11674,7 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PKG_CONFIG in
@@ -11679,7 +11717,7 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
 set dummy pkg-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $ac_pt_PKG_CONFIG in
@@ -11935,7 +11973,7 @@ $as_echo "yes" >&6; }
 		 for ac_func in dbus_watch_get_unix_fd
 do :
   ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd"
-if test "x$ac_cv_func_dbus_watch_get_unix_fd" = x""yes; then :
+if test "x$ac_cv_func_dbus_watch_get_unix_fd" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_DBUS_WATCH_GET_UNIX_FD 1
 _ACEOF
@@ -12003,7 +12041,7 @@ if test "x$with_x" = xno; then
 else
   case $x_includes,$x_libraries in #(
     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
-    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
+    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   # One or both of the vars are not set, and there is no cached value.
@@ -12106,7 +12144,7 @@ else
   fi
 done
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 fi # $ac_x_includes = no
 
 if test "$ac_x_libraries" = no; then
@@ -12182,7 +12220,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then :
+if ${ac_cv_path_SED+:} false; then :
   $as_echo_n "(cached) " >&6
 else
             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
@@ -12374,7 +12412,7 @@ $as_echo_n "checking whether pthreads work with $flag... " >&6; }
 set dummy pthread-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ax_pthread_config+set}" = set; then :
+if ${ac_cv_prog_ax_pthread_config+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ax_pthread_config"; then
@@ -12535,7 +12573,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then :
+if ${ac_cv_prog_PTHREAD_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$PTHREAD_CC"; then
@@ -12609,7 +12647,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the Microsoft C compiler" >&5
 $as_echo_n "checking whether we are using the Microsoft C compiler... " >&6; }
-if test "${ax_cv_c_compiler_ms+set}" = set; then :
+if ${ax_cv_c_compiler_ms+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -12652,7 +12690,7 @@ fi
 for ac_header in windows.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
-if test "x$ac_cv_header_windows_h" = x""yes; then :
+if test "x$ac_cv_header_windows_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_WINDOWS_H 1
 _ACEOF
@@ -12690,7 +12728,7 @@ CPPFLAGS=$ax_save_CPPFLAGS
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL library" >&5
 $as_echo_n "checking for OpenGL library... " >&6; }
-if test "${ax_cv_check_gl_libgl+set}" = set; then :
+if ${ax_cv_check_gl_libgl+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ax_cv_check_gl_libgl=no
@@ -12928,7 +12966,7 @@ CPPFLAGS=$ax_save_CPPFLAGS
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL Utility library" >&5
 $as_echo_n "checking for OpenGL Utility library... " >&6; }
-if test "${ax_cv_check_glu_libglu+set}" = set; then :
+if ${ax_cv_check_glu_libglu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ax_cv_check_glu_libglu=no
@@ -13065,7 +13103,7 @@ fi
 if test "X$ax_cv_check_glu_libglu" != Xno; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for varargs GLU tesselator callback function type" >&5
 $as_echo_n "checking for varargs GLU tesselator callback function type... " >&6; }
-if test "${ax_cv_varargs_glu_tesscb+set}" = set; then :
+if ${ax_cv_varargs_glu_tesscb+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_ext=cpp
@@ -13182,7 +13220,7 @@ fi
 for hid in $HIDLIST; do
     F=$srcdir/src/hid/$hid/hid.conf
     if test -f $F ; then
-        echo checking $hid depedencies
+        echo checking $hid dependencies
         deps=
         . $F
         for dep in $deps; do
@@ -13211,7 +13249,7 @@ done
 set dummy env; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_SETENV+set}" = set; then :
+if ${ac_cv_path_SETENV+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $SETENV in
@@ -13251,7 +13289,7 @@ fi
 set dummy gtk-update-icon-path; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GTK_UPDATE_ICON_CACHE_BIN+set}" = set; then :
+if ${ac_cv_path_GTK_UPDATE_ICON_CACHE_BIN+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $GTK_UPDATE_ICON_CACHE_BIN in
@@ -13345,7 +13383,7 @@ if test x$enable_update_desktop_database = xyes ; then
 set dummy update-desktop-database; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_UPDATE_DESKTOP_DATABASE+set}" = set; then :
+if ${ac_cv_path_UPDATE_DESKTOP_DATABASE+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $UPDATE_DESKTOP_DATABASE in
@@ -13409,7 +13447,7 @@ if test x$enable_update_mime_database = xyes ; then
 set dummy update-mime-database; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_UPDATE_MIME_DATABASE+set}" = set; then :
+if ${ac_cv_path_UPDATE_MIME_DATABASE+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $UPDATE_MIME_DATABASE in
@@ -13460,7 +13498,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_M4+set}" = set; then :
+if ${ac_cv_path_M4+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $M4 in
@@ -13526,7 +13564,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_WISH+set}" = set; then :
+if ${ac_cv_path_WISH+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $WISH in
@@ -13588,7 +13626,7 @@ _ACEOF
 set dummy pdflatex; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PDFLATEX+set}" = set; then :
+if ${ac_cv_path_PDFLATEX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PDFLATEX in
@@ -13638,7 +13676,7 @@ fi
 set dummy texi2dvi; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_TEXI2DVI+set}" = set; then :
+if ${ac_cv_path_TEXI2DVI+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $TEXI2DVI in
@@ -13688,7 +13726,7 @@ fi
 set dummy ps2pdf; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PS2PDF+set}" = set; then :
+if ${ac_cv_path_PS2PDF+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PS2PDF in
@@ -13739,7 +13777,7 @@ fi
 set dummy gschem; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GSCHEM+set}" = set; then :
+if ${ac_cv_path_GSCHEM+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $GSCHEM in
@@ -13813,7 +13851,7 @@ fi
 set dummy animate; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_IM_ANIMATE+set}" = set; then :
+if ${ac_cv_path_IM_ANIMATE+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $IM_ANIMATE in
@@ -13854,7 +13892,7 @@ fi
 set dummy compare; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_IM_COMPARE+set}" = set; then :
+if ${ac_cv_path_IM_COMPARE+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $IM_COMPARE in
@@ -13895,7 +13933,7 @@ fi
 set dummy composite; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_IM_COMPOSITE+set}" = set; then :
+if ${ac_cv_path_IM_COMPOSITE+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $IM_COMPOSITE in
@@ -13936,7 +13974,7 @@ fi
 set dummy convert; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_IM_CONVERT+set}" = set; then :
+if ${ac_cv_path_IM_CONVERT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $IM_CONVERT in
@@ -13977,7 +14015,7 @@ fi
 set dummy display; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_IM_DISPLAY+set}" = set; then :
+if ${ac_cv_path_IM_DISPLAY+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $IM_DISPLAY in
@@ -14018,7 +14056,7 @@ fi
 set dummy montage; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_IM_MONTAGE+set}" = set; then :
+if ${ac_cv_path_IM_MONTAGE+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $IM_MONTAGE in
@@ -14095,7 +14133,7 @@ test $have_magick = yes || have_test_tools=no
 set dummy gerbv; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GERBV+set}" = set; then :
+if ${ac_cv_path_GERBV+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $GERBV in
@@ -14160,7 +14198,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
 $as_echo_n "checking for sqrt in -lm... " >&6; }
-if test "${ac_cv_lib_m_sqrt+set}" = set; then :
+if ${ac_cv_lib_m_sqrt+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -14194,7 +14232,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
 $as_echo "$ac_cv_lib_m_sqrt" >&6; }
-if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
+if test "x$ac_cv_lib_m_sqrt" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBM 1
 _ACEOF
@@ -14205,7 +14243,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
 $as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+if ${ac_cv_lib_dl_dlopen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -14239,7 +14277,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBDL 1
 _ACEOF
@@ -14250,7 +14288,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lxnet" >&5
 $as_echo_n "checking for gethostbyname in -lxnet... " >&6; }
-if test "${ac_cv_lib_xnet_gethostbyname+set}" = set; then :
+if ${ac_cv_lib_xnet_gethostbyname+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -14284,7 +14322,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_gethostbyname" >&5
 $as_echo "$ac_cv_lib_xnet_gethostbyname" >&6; }
-if test "x$ac_cv_lib_xnet_gethostbyname" = x""yes; then :
+if test "x$ac_cv_lib_xnet_gethostbyname" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBXNET 1
 _ACEOF
@@ -14295,7 +14333,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yywrap in -lfl" >&5
 $as_echo_n "checking for yywrap in -lfl... " >&6; }
-if test "${ac_cv_lib_fl_yywrap+set}" = set; then :
+if ${ac_cv_lib_fl_yywrap+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -14329,7 +14367,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fl_yywrap" >&5
 $as_echo "$ac_cv_lib_fl_yywrap" >&6; }
-if test "x$ac_cv_lib_fl_yywrap" = x""yes; then :
+if test "x$ac_cv_lib_fl_yywrap" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBFL 1
 _ACEOF
@@ -14341,7 +14379,7 @@ fi
 for ac_func in strerror
 do :
   ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
-if test "x$ac_cv_func_strerror" = x""yes; then :
+if test "x$ac_cv_func_strerror" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_STRERROR 1
 _ACEOF
@@ -14376,7 +14414,7 @@ done
 for ac_func in vsnprintf
 do :
   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
-if test "x$ac_cv_func_vsnprintf" = x""yes; then :
+if test "x$ac_cv_func_vsnprintf" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_VSNPRINTF 1
 _ACEOF
@@ -14411,7 +14449,7 @@ done
 for ac_func in stat
 do :
   ac_fn_c_check_func "$LINENO" "stat" "ac_cv_func_stat"
-if test "x$ac_cv_func_stat" = x""yes; then :
+if test "x$ac_cv_func_stat" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_STAT 1
 _ACEOF
@@ -14423,7 +14461,7 @@ done
 for ac_func in mkdtemp
 do :
   ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
-if test "x$ac_cv_func_mkdtemp" = x""yes; then :
+if test "x$ac_cv_func_mkdtemp" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_MKDTEMP 1
 _ACEOF
@@ -14436,7 +14474,7 @@ done
 for ac_func in popen
 do :
   ac_fn_c_check_func "$LINENO" "popen" "ac_cv_func_popen"
-if test "x$ac_cv_func_popen" = x""yes; then :
+if test "x$ac_cv_func_popen" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_POPEN 1
 _ACEOF
@@ -14460,7 +14498,7 @@ done
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether canonicalize_file_name must be declared" >&5
 $as_echo_n "checking whether canonicalize_file_name must be declared... " >&6; }
-if test "${libiberty_cv_decl_needed_canonicalize_file_name+set}" = set; then :
+if ${libiberty_cv_decl_needed_canonicalize_file_name+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14510,7 +14548,7 @@ fi
 for ac_func in _spawnvp
 do :
   ac_fn_c_check_func "$LINENO" "_spawnvp" "ac_cv_func__spawnvp"
-if test "x$ac_cv_func__spawnvp" = x""yes; then :
+if test "x$ac_cv_func__spawnvp" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE__SPAWNVP 1
 _ACEOF
@@ -14521,7 +14559,7 @@ done
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
 $as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14660,7 +14698,7 @@ done
 for ac_header in dlfcn.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
-if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_DLFCN_H 1
 _ACEOF
@@ -14674,7 +14712,7 @@ if test "x${WIN32}" = "xyes" ; then
 	for ac_header in windows.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
-if test "x$ac_cv_header_windows_h" = x""yes; then :
+if test "x$ac_cv_header_windows_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_WINDOWS_H 1
 _ACEOF
@@ -14767,6 +14805,11 @@ $as_echo "yes" >&6; }
 
 fi
 
+need_gdlib=no
+with_gif=no
+with_png=no
+with_jpeg=no
+
 for e in $HIDLIST; do
     case $e in
       lesstif )
@@ -14870,7 +14913,7 @@ if ac_fn_c_try_link "$LINENO"; then :
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
-if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
+if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -14904,14 +14947,14 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
-if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
+if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
 fi
 
     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
-if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
+if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -14945,7 +14988,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
-if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
+if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
 fi
 
@@ -14964,14 +15007,14 @@ rm -f core conftest.err conftest.$ac_objext \
     # The functions gethostbyname, getservbyname, and inet_addr are
     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
     ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
-if test "x$ac_cv_func_gethostbyname" = x""yes; then :
+if test "x$ac_cv_func_gethostbyname" = xyes; then :
 
 fi
 
     if test $ac_cv_func_gethostbyname = no; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
-if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
+if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -15005,14 +15048,14 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
-if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
+if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
 fi
 
       if test $ac_cv_lib_nsl_gethostbyname = no; then
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
-if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
+if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -15046,7 +15089,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
-if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
+if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
 fi
 
@@ -15061,14 +15104,14 @@ fi
     # must be given before -lnsl if both are needed.  We assume that
     # if connect needs -lnsl, so does gethostbyname.
     ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
-if test "x$ac_cv_func_connect" = x""yes; then :
+if test "x$ac_cv_func_connect" = xyes; then :
 
 fi
 
     if test $ac_cv_func_connect = no; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
 $as_echo_n "checking for connect in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_connect+set}" = set; then :
+if ${ac_cv_lib_socket_connect+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -15102,7 +15145,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
 $as_echo "$ac_cv_lib_socket_connect" >&6; }
-if test "x$ac_cv_lib_socket_connect" = x""yes; then :
+if test "x$ac_cv_lib_socket_connect" = xyes; then :
   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
 fi
 
@@ -15110,14 +15153,14 @@ fi
 
     # Guillermo Gomez says -lposix is necessary on A/UX.
     ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
-if test "x$ac_cv_func_remove" = x""yes; then :
+if test "x$ac_cv_func_remove" = xyes; then :
 
 fi
 
     if test $ac_cv_func_remove = no; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
 $as_echo_n "checking for remove in -lposix... " >&6; }
-if test "${ac_cv_lib_posix_remove+set}" = set; then :
+if ${ac_cv_lib_posix_remove+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -15151,7 +15194,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
 $as_echo "$ac_cv_lib_posix_remove" >&6; }
-if test "x$ac_cv_lib_posix_remove" = x""yes; then :
+if test "x$ac_cv_lib_posix_remove" = xyes; then :
   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
 fi
 
@@ -15159,14 +15202,14 @@ fi
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
-if test "x$ac_cv_func_shmat" = x""yes; then :
+if test "x$ac_cv_func_shmat" = xyes; then :
 
 fi
 
     if test $ac_cv_func_shmat = no; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
 $as_echo_n "checking for shmat in -lipc... " >&6; }
-if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
+if ${ac_cv_lib_ipc_shmat+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -15200,7 +15243,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
-if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
+if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
 fi
 
@@ -15218,7 +15261,7 @@ fi
   # John Interrante, Karl Berry
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
-if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
+if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -15252,7 +15295,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
-if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
+if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
 fi
 
@@ -15260,10 +15303,11 @@ fi
 
 fi
 
-	CPPFLAGS="$CFLAGS $X_CFLAGS"
+	save_CPPFLAGS="$CPPFLAGS"
+	CPPFLAGS="$X_CFLAGS"
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XOpenDisplay in -lX11" >&5
 $as_echo_n "checking for XOpenDisplay in -lX11... " >&6; }
-if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then :
+if ${ac_cv_lib_X11_XOpenDisplay+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -15297,7 +15341,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_X11_XOpenDisplay" >&5
 $as_echo "$ac_cv_lib_X11_XOpenDisplay" >&6; }
-if test "x$ac_cv_lib_X11_XOpenDisplay" = x""yes; then :
+if test "x$ac_cv_lib_X11_XOpenDisplay" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBX11 1
 _ACEOF
@@ -15308,7 +15352,7 @@ fi
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lICE" >&5
 $as_echo_n "checking for main in -lICE... " >&6; }
-if test "${ac_cv_lib_ICE_main+set}" = set; then :
+if ${ac_cv_lib_ICE_main+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -15336,7 +15380,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_main" >&5
 $as_echo "$ac_cv_lib_ICE_main" >&6; }
-if test "x$ac_cv_lib_ICE_main" = x""yes; then :
+if test "x$ac_cv_lib_ICE_main" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBICE 1
 _ACEOF
@@ -15347,7 +15391,7 @@ fi
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lSM" >&5
 $as_echo_n "checking for main in -lSM... " >&6; }
-if test "${ac_cv_lib_SM_main+set}" = set; then :
+if ${ac_cv_lib_SM_main+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -15375,7 +15419,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_main" >&5
 $as_echo "$ac_cv_lib_SM_main" >&6; }
-if test "x$ac_cv_lib_SM_main" = x""yes; then :
+if test "x$ac_cv_lib_SM_main" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBSM 1
 _ACEOF
@@ -15386,7 +15430,7 @@ fi
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXext" >&5
 $as_echo_n "checking for main in -lXext... " >&6; }
-if test "${ac_cv_lib_Xext_main+set}" = set; then :
+if ${ac_cv_lib_Xext_main+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -15414,7 +15458,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_main" >&5
 $as_echo "$ac_cv_lib_Xext_main" >&6; }
-if test "x$ac_cv_lib_Xext_main" = x""yes; then :
+if test "x$ac_cv_lib_Xext_main" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBXEXT 1
 _ACEOF
@@ -15425,7 +15469,7 @@ fi
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XtOpenDisplay in -lXt" >&5
 $as_echo_n "checking for XtOpenDisplay in -lXt... " >&6; }
-if test "${ac_cv_lib_Xt_XtOpenDisplay+set}" = set; then :
+if ${ac_cv_lib_Xt_XtOpenDisplay+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -15459,7 +15503,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xt_XtOpenDisplay" >&5
 $as_echo "$ac_cv_lib_Xt_XtOpenDisplay" >&6; }
-if test "x$ac_cv_lib_Xt_XtOpenDisplay" = x""yes; then :
+if test "x$ac_cv_lib_Xt_XtOpenDisplay" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBXT 1
 _ACEOF
@@ -15470,7 +15514,7 @@ fi
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXmu" >&5
 $as_echo_n "checking for main in -lXmu... " >&6; }
-if test "${ac_cv_lib_Xmu_main+set}" = set; then :
+if ${ac_cv_lib_Xmu_main+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -15498,7 +15542,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_main" >&5
 $as_echo "$ac_cv_lib_Xmu_main" >&6; }
-if test "x$ac_cv_lib_Xmu_main" = x""yes; then :
+if test "x$ac_cv_lib_Xmu_main" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBXMU 1
 _ACEOF
@@ -15509,7 +15553,7 @@ fi
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXpm" >&5
 $as_echo_n "checking for main in -lXpm... " >&6; }
-if test "${ac_cv_lib_Xpm_main+set}" = set; then :
+if ${ac_cv_lib_Xpm_main+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -15537,7 +15581,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_main" >&5
 $as_echo "$ac_cv_lib_Xpm_main" >&6; }
-if test "x$ac_cv_lib_Xpm_main" = x""yes; then :
+if test "x$ac_cv_lib_Xpm_main" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBXPM 1
 _ACEOF
@@ -15546,9 +15590,9 @@ _ACEOF
 
 fi
 
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmCreateMainWindow in -lXm" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmCreateMainWindow in -lXm" >&5
 $as_echo_n "checking for XmCreateMainWindow in -lXm... " >&6; }
-if test "${ac_cv_lib_Xm_XmCreateMainWindow+set}" = set; then :
+if ${ac_cv_lib_Xm_XmCreateMainWindow+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -15582,7 +15626,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xm_XmCreateMainWindow" >&5
 $as_echo "$ac_cv_lib_Xm_XmCreateMainWindow" >&6; }
-if test "x$ac_cv_lib_Xm_XmCreateMainWindow" = x""yes; then :
+if test "x$ac_cv_lib_Xm_XmCreateMainWindow" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBXM 1
 _ACEOF
@@ -15591,6 +15635,7 @@ _ACEOF
 
 fi
 
+	CPPFLAGS="$save_CPPFLAGS"
 	case $ac_cv_lib_Xm_XmCreateMainWindow in
 	  no )
 	    as_fn_error $? "You don't seem to have the Lesstif development environment installed." "$LINENO" 5
@@ -15600,7 +15645,7 @@ fi
 	for ac_header in Xm/Xm.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
-if test "x$ac_cv_header_Xm_Xm_h" = x""yes; then :
+if test "x$ac_cv_header_Xm_Xm_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_XM_XM_H 1
 _ACEOF
@@ -15623,7 +15668,7 @@ done
 set dummy pkg-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PKG_CONFIG in
@@ -15826,13 +15871,93 @@ fi
 
 	;;
 
-      gcode|nelma|png )
+      png)
+	need_gdlib=yes
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if GIF output from the png HID is desired" >&5
+$as_echo_n "checking if GIF output from the png HID is desired... " >&6; }
+	# Check whether --enable-gif was given.
+if test "${enable_gif+set}" = set; then :
+  enableval=$enable_gif;
+		if test "X$enable_gif" != "Xno" ; then
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+			with_gif=yes
+		else
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+		fi
+
+else
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+		with_gif=yes
+
+fi
+
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if JPEG output from the png HID is desired" >&5
+$as_echo_n "checking if JPEG output from the png HID is desired... " >&6; }
+	# Check whether --enable-jpeg was given.
+if test "${enable_jpeg+set}" = set; then :
+  enableval=$enable_jpeg;
+		if test "X$enable_jpeg" != "Xno" ; then
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+			with_jpeg=yes
+		else
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+		fi
+
+else
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+		with_jpeg=yes
+
+fi
+
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if PNG output from the png HID is desired" >&5
+$as_echo_n "checking if PNG output from the png HID is desired... " >&6; }
+	# Check whether --enable-png was given.
+if test "${enable_png+set}" = set; then :
+  enableval=$enable_png;
+		if test "X$enable_png" != "Xno" ; then
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+			with_png=yes
+		else
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+		fi
+
+else
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+		with_png=yes
+
+fi
+
+	;;
+
+      gcode|nelma)
+	need_gdlib=yes
+	with_png=yes
+	;;
+
+    esac
+done
+
+if test "$need_gdlib" = "yes"; then
 	# Check for gdlib-config for gd (www.boutell.com/gd)
 	# Extract the first word of "gdlib-config", so it can be a program name with args.
 set dummy gdlib-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GDLIB_CONFIG+set}" = set; then :
+if ${ac_cv_path_GDLIB_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $GDLIB_CONFIG in
@@ -15885,7 +16010,7 @@ you will get lucky.
 		if test "$WIN32" != "yes" ; then
 			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgd" >&5
 $as_echo_n "checking for main in -lgd... " >&6; }
-if test "${ac_cv_lib_gd_main+set}" = set; then :
+if ${ac_cv_lib_gd_main+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -15913,7 +16038,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_main" >&5
 $as_echo "$ac_cv_lib_gd_main" >&6; }
-if test "x$ac_cv_lib_gd_main" = x""yes; then :
+if test "x$ac_cv_lib_gd_main" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBGD 1
 _ACEOF
@@ -15927,7 +16052,7 @@ fi
 		else
 			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lbgd" >&5
 $as_echo_n "checking for main in -lbgd... " >&6; }
-if test "${ac_cv_lib_bgd_main+set}" = set; then :
+if ${ac_cv_lib_bgd_main+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -15955,7 +16080,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bgd_main" >&5
 $as_echo "$ac_cv_lib_bgd_main" >&6; }
-if test "x$ac_cv_lib_bgd_main" = x""yes; then :
+if test "x$ac_cv_lib_bgd_main" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBBGD 1
 _ACEOF
@@ -15988,12 +16113,12 @@ $as_echo "$GD_LIBS" >&6; }
 	# since some linux systems evidently install gdlib-config but fail to
 	# install the headers (nice), check for the header too and fail if it
 	# is not there.
-	CFLAGS="$CFLAGS $GD_CFLAGS"
+	save_CPPFLAGS="$CPPFLAGS"
 	CPPFLAGS="$CPPFLAGS $GD_CFLAGS"
 	for ac_header in gd.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "gd.h" "ac_cv_header_gd_h" "$ac_includes_default"
-if test "x$ac_cv_header_gd_h" = x""yes; then :
+if test "x$ac_cv_header_gd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_GD_H 1
 _ACEOF
@@ -16002,6 +16127,7 @@ fi
 
 done
 
+	CPPFLASS="$save_CPPFLAGS"
 	case $ac_cv_header_gd_h in
 	     no )
 		as_fn_error $? "
@@ -16018,34 +16144,11 @@ This is needed for the nelma and/or png HID.
 	save_LIBS="$LIBS"
 	LIBS="$save_LIBS $GD_LIBS $X_LIBS"
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if GIF output from the png HID is desired" >&5
-$as_echo_n "checking if GIF output from the png HID is desired... " >&6; }
-	# Check whether --enable-gif was given.
-if test "${enable_gif+set}" = set; then :
-  enableval=$enable_gif;
-		if test "X$enable_gif" != "Xno" ; then
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-			with_gif=yes
-		else
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-			with_gif=no
-		fi
-
-else
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-		with_gif=yes
-
-fi
-
 	if test "X$with_gif" = "Xyes" ; then
 		for ac_func in gdImageGif
 do :
   ac_fn_c_check_func "$LINENO" "gdImageGif" "ac_cv_func_gdImageGif"
-if test "x$ac_cv_func_gdImageGif" = x""yes; then :
+if test "x$ac_cv_func_gdImageGif" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_GDIMAGEGIF 1
 _ACEOF
@@ -16060,34 +16163,11 @@ gif export with --disable-gif" "$LINENO" 5
 		fi
 	fi
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if JPEG output from the png HID is desired" >&5
-$as_echo_n "checking if JPEG output from the png HID is desired... " >&6; }
-	# Check whether --enable-jpeg was given.
-if test "${enable_jpeg+set}" = set; then :
-  enableval=$enable_jpeg;
-		if test "X$enable_jpeg" != "Xno" ; then
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-			with_jpeg=yes
-		else
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-			with_jpeg=no
-		fi
-
-else
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-		with_jpeg=yes
-
-fi
-
 	if test "X$with_jpeg" = "Xyes" ; then
 		for ac_func in gdImageJpeg
 do :
   ac_fn_c_check_func "$LINENO" "gdImageJpeg" "ac_cv_func_gdImageJpeg"
-if test "x$ac_cv_func_gdImageJpeg" = x""yes; then :
+if test "x$ac_cv_func_gdImageJpeg" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_GDIMAGEJPEG 1
 _ACEOF
@@ -16102,35 +16182,11 @@ JPEG export with --disable-jpeg" "$LINENO" 5
 		fi
 	fi
 
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if PNG output from the png HID is desired" >&5
-$as_echo_n "checking if PNG output from the png HID is desired... " >&6; }
-	# Check whether --enable-png was given.
-if test "${enable_png+set}" = set; then :
-  enableval=$enable_png;
-		if test "X$enable_png" != "Xno" ; then
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-			with_png=yes
-		else
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-			with_png=no
-		fi
-
-else
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-		with_png=yes
-
-fi
-
 	if test "X$with_png" = "Xyes" ; then
 		for ac_func in gdImagePng
 do :
   ac_fn_c_check_func "$LINENO" "gdImagePng" "ac_cv_func_gdImagePng"
-if test "x$ac_cv_func_gdImagePng" = x""yes; then :
+if test "x$ac_cv_func_gdImagePng" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_GDIMAGEPNG 1
 _ACEOF
@@ -16145,11 +16201,7 @@ PNG export with --disable-png" "$LINENO" 5
 		fi
 	fi
 	LIBS="$save_LIBS"
-	;;
-
-    esac
-done
-
+fi
 
  if test x$with_png = xyes; then
   PNG_TRUE=
@@ -16248,7 +16300,7 @@ if test "X$cross_compiling" = "Xyes" ; then
 set dummy pcb; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PCB+set}" = set; then :
+if ${ac_cv_path_PCB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PCB in
@@ -16311,7 +16363,7 @@ fi
 have_xrender=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
 $as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
-if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
+if ${ac_cv_lib_Xrender_XRenderQueryExtension+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -16345,7 +16397,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
 $as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
-if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
+if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = xyes; then :
   have_xrender=yes
 else
   have_xrender=no
@@ -16372,7 +16424,7 @@ esac
 have_xinerama=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryExtension in -lXinerama" >&5
 $as_echo_n "checking for XineramaQueryExtension in -lXinerama... " >&6; }
-if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then :
+if ${ac_cv_lib_Xinerama_XineramaQueryExtension+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -16406,7 +16458,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
 $as_echo "$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6; }
-if test "x$ac_cv_lib_Xinerama_XineramaQueryExtension" = x""yes; then :
+if test "x$ac_cv_lib_Xinerama_XineramaQueryExtension" = xyes; then :
   have_xinerama=yes
 else
   have_xinerama=no
@@ -16440,7 +16492,7 @@ if test "X$enable_dmalloc" != "Xno" ; then
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 	ac_fn_c_check_header_mongrel "$LINENO" "dmalloc.h" "ac_cv_header_dmalloc_h" "$ac_includes_default"
-if test "x$ac_cv_header_dmalloc_h" = x""yes; then :
+if test "x$ac_cv_header_dmalloc_h" = xyes; then :
 
 else
   as_fn_error $? "You have requested dmalloc debugging but dmalloc.h could not be found" "$LINENO" 5
@@ -16449,7 +16501,7 @@ fi
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ldmalloc" >&5
 $as_echo_n "checking for main in -ldmalloc... " >&6; }
-if test "${ac_cv_lib_dmalloc_main+set}" = set; then :
+if ${ac_cv_lib_dmalloc_main+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -16477,7 +16529,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dmalloc_main" >&5
 $as_echo "$ac_cv_lib_dmalloc_main" >&6; }
-if test "x$ac_cv_lib_dmalloc_main" = x""yes; then :
+if test "x$ac_cv_lib_dmalloc_main" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBDMALLOC 1
 _ACEOF
@@ -16517,7 +16569,7 @@ if test "X$enable_efence" != "Xno" ; then
 $as_echo "yes" >&6; }
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lefence" >&5
 $as_echo_n "checking for main in -lefence... " >&6; }
-if test "${ac_cv_lib_efence_main+set}" = set; then :
+if ${ac_cv_lib_efence_main+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -16545,7 +16597,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_efence_main" >&5
 $as_echo "$ac_cv_lib_efence_main" >&6; }
-if test "x$ac_cv_lib_efence_main" = x""yes; then :
+if test "x$ac_cv_lib_efence_main" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBEFENCE 1
 _ACEOF
@@ -16693,7 +16745,7 @@ done
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir takes one argument" >&5
 $as_echo_n "checking whether mkdir takes one argument... " >&6; }
-if test "${ac_cv_mkdir_takes_one_arg+set}" = set; then :
+if ${ac_cv_mkdir_takes_one_arg+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -16733,7 +16785,7 @@ fi
 for ac_header in stdint.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdint_h" = x""yes; then :
+if test "x$ac_cv_header_stdint_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_STDINT_H 1
 _ACEOF
@@ -16796,9 +16848,9 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-# ------------- Complete set of CFLAGS and LIBS -------------------
+# ------------- Complete set of CPPFLAGS and LIBS -------------------
 
-CFLAGS="$CFLAGS $X_CFLAGS $DBUS_CFLAGS $GLIB_CFLAGS $GTK_CFLAGS $CAIRO_CFLAGS $GTKGLEXT_CFLAGS $GLU_CFLAGS $GL_CFLAGS"
+CPPFLAGS="$CPPFLAGS $X_CFLAGS $DBUS_CFLAGS $GLIB_CFLAGS $GTK_CFLAGS $GD_CFLAGS $CAIRO_CFLAGS $GTKGLEXT_CFLAGS $GLU_CFLAGS $GL_CFLAGS"
 LIBS="$LIBS $XM_LIBS $DBUS_LIBS $X_LIBS $GLIB_LIBS $GTK_LIBS $DMALLOC_LIBS $GD_LIBS $INTLLIBS $CAIRO_LIBS $GTKGLEXT_LIBS $GLU_LIBS $GL_LIBS"
 
 
@@ -16896,16 +16948,13 @@ fi
 case "$ENABLE_BUILD_WITH_CXX" in
   yes)
     CC_OR_CXX="$CXX"
-    CC_OR_CXX_FLAGS="$CXXFLAGS"
     ;;
   no)
     CC_OR_CXX="$CC"
-    CC_OR_CXX_FLAGS="$CFLAGS"
     ;;
 esac
 
 
-
 # font filename
 FONTFILENAME=${FONTFILENAME:-"default_font"}
 
@@ -17502,10 +17551,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      :end' >>confcache
 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
   if test -w "$cache_file"; then
-    test "x$cache_file" != "x/dev/null" &&
+    if test "x$cache_file" != "x/dev/null"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
 $as_echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+	cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+	  mv -f confcache "$cache_file"$$ &&
+	  mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+	  mv -f confcache "$cache_file" ;;
+	esac
+      fi
+    fi
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
@@ -17645,7 +17705,7 @@ if test -z "${DEBUG_BUILD_TRUE}" && test -z "${DEBUG_BUILD_FALSE}"; then
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -17746,6 +17806,7 @@ fi
 IFS=" ""	$as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -18052,8 +18113,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by pcb $as_me 20110918, which was
-generated by GNU Autoconf 2.66.  Invocation command line was
+This file was extended by pcb $as_me 20140316, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -18118,8 +18179,8 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-pcb config.status 20110918
-configured by $0, generated by GNU Autoconf 2.66,
+pcb config.status 20140316
+configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -18140,11 +18201,16 @@ ac_need_defaults=:
 while test $# != 0
 do
   case $1 in
-  --*=*)
+  --*=?*)
     ac_option=`expr "X$1" : 'X\([^=]*\)='`
     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
     ac_shift=:
     ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
   *)
     ac_option=$1
     ac_optarg=$2
@@ -18166,6 +18232,7 @@ do
     $ac_shift
     case $ac_optarg in
     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
     esac
     as_fn_append CONFIG_FILES " '$ac_optarg'"
     ac_need_defaults=false;;
@@ -18334,9 +18401,10 @@ fi
 # after its creation but before its name has been assigned to `$tmp'.
 $debug ||
 {
-  tmp=
+  tmp= ac_tmp=
   trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
 ' 0
   trap 'as_fn_exit 1' 1 2 13 15
 }
@@ -18344,12 +18412,13 @@ $debug ||
 
 {
   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
+  test -d "$tmp"
 }  ||
 {
   tmp=./conf$$-$RANDOM
   (umask 077 && mkdir "$tmp")
 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -18371,7 +18440,7 @@ else
   ac_cs_awk_cr=$ac_cr
 fi
 
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
 _ACEOF
 
 
@@ -18399,7 +18468,7 @@ done
 rm -f conf$$subs.sh
 
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
 _ACEOF
 sed -n '
 h
@@ -18447,7 +18516,7 @@ t delim
 rm -f conf$$subs.awk
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
   for (key in S) S_is_set[key] = 1
   FS = ""
 
@@ -18479,7 +18548,7 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
 else
   cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
 _ACEOF
 
@@ -18513,7 +18582,7 @@ fi # test -n "$CONFIG_FILES"
 # No need to generate them if there are no CONFIG_HEADERS.
 # This happens for instance with `./config.status Makefile'.
 if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
 BEGIN {
 _ACEOF
 
@@ -18525,8 +18594,8 @@ _ACEOF
 # handling of long lines.
 ac_delim='%!_!# '
 for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
     break
   elif $ac_last_try; then
     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
@@ -18646,7 +18715,7 @@ do
     for ac_f
     do
       case $ac_f in
-      -) ac_f="$tmp/stdin";;
+      -) ac_f="$ac_tmp/stdin";;
       *) # Look for the file first in the build tree, then in the source tree
 	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
 	 # because $ac_f cannot contain `:'.
@@ -18681,7 +18750,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
     esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
@@ -18818,21 +18887,22 @@ s&@INSTALL@&$ac_INSTALL&;t t
 s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined" >&5
 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined" >&2;}
 
-  rm -f "$tmp/stdin"
+  rm -f "$ac_tmp/stdin"
   case $ac_file in
-  -) cat "$tmp/out" && rm -f "$tmp/out";;
-  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
   esac \
   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  ;;
@@ -18843,20 +18913,20 @@ which seems to be undefined.  Please make sure it is defined" >&2;}
   if test x"$ac_file" != x-; then
     {
       $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+    } >"$ac_tmp/config.h" \
       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
 $as_echo "$as_me: $ac_file is unchanged" >&6;}
     else
       rm -f "$ac_file"
-      mv "$tmp/config.h" "$ac_file" \
+      mv "$ac_tmp/config.h" "$ac_file" \
 	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
     $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
       || as_fn_error $? "could not create -" "$LINENO" 5
   fi
 # Compute "$ac_file"'s index in $config_headers.
diff --git a/configure.ac b/configure.ac
index b416dff..f34bc72 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,11 @@
 dnl Process this file with autoconf to produce a configure script.
 
-AC_INIT([pcb], [20110918])
+AC_INIT([pcb], [20140316])
 AC_CONFIG_SRCDIR([src/draw.c])
 AC_PREREQ([2.60])
 AM_INIT_AUTOMAKE([1.9])
 AC_GNU_SOURCE
-AM_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
 
 ##########################################################################
 #
@@ -88,15 +88,10 @@ PCB_PATH_DELIMETER=":"
 PCB_DIR_SEPARATOR_S="/"
 PCB_DIR_SEPARATOR_C='/'
 case $host in
-	*-*-cygwin* )
-		CFLAGS="$CFLAGS ${CYGWIN_CFLAGS}"
-		CPPFLAGS="$CPPFLAGS ${CYGWIN_CPPFLAGS}"
-		;;
-
 	*-*-mingw* )
 		WIN32=yes
 		CFLAGS="$CFLAGS ${MINGW_CFLAGS:--mms-bitfields -mwindows}"
-		CPPFLAGS="$CPPFLAGS ${MINGW_CPPFLAGS:--mms-bitfields -mwindows}"
+		CPPFLAGS="$CPPFLAGS ${MINGW_CPPFLAGS}"
 		;;
 
 	* )
@@ -464,7 +459,7 @@ fi
 for hid in $HIDLIST; do
     F=$srcdir/src/hid/$hid/hid.conf
     if test -f $F ; then
-        echo checking $hid depedencies
+        echo checking $hid dependencies
         deps=
         . $F
         for dep in $deps; do
@@ -706,11 +701,17 @@ You may want to review the following errors:
 $GLIB_PKG_ERRORS])]
 )
 
+need_gdlib=no
+with_gif=no
+with_png=no
+with_jpeg=no
+
 for e in $HIDLIST; do
     case $e in
       lesstif )
 	AC_PATH_XTRA
-	CPPFLAGS="$CFLAGS $X_CFLAGS"
+	save_CPPFLAGS="$CPPFLAGS"
+	CPPFLAGS="$X_CFLAGS"
 	AC_CHECK_LIB(X11, XOpenDisplay, , , $X_LIBS)
 	AC_CHECK_LIB(ICE, main, , , $X_LIBS)
 	AC_CHECK_LIB(SM, main, , , $X_LIBS)
@@ -718,7 +719,8 @@ for e in $HIDLIST; do
 	AC_CHECK_LIB(Xt, XtOpenDisplay, , , $X_LIBS)
 	AC_CHECK_LIB(Xmu, main, , , $X_LIBS)
 	AC_CHECK_LIB(Xpm, main, , , $X_LIBS)
-        AC_CHECK_LIB(Xm, XmCreateMainWindow, , , $X_LIBS)
+	AC_CHECK_LIB(Xm, XmCreateMainWindow, , , $X_LIBS)
+	CPPFLAGS="$save_CPPFLAGS"
 	case $ac_cv_lib_Xm_XmCreateMainWindow in
 	  no )
 	    AC_MSG_ERROR([You don't seem to have the Lesstif development environment installed.])
@@ -761,7 +763,66 @@ $GTKGLEXT_PKG_ERRORS])]
 
 	;;
 
-      gcode|nelma|png )
+      png)
+	need_gdlib=yes
+	AC_MSG_CHECKING([if GIF output from the png HID is desired])
+	AC_ARG_ENABLE([gif],
+		[  --disable-gif           Disable support for gif output when the png HID is used [[default=include gif support]]],
+		[
+		if test "X$enable_gif" != "Xno" ; then
+			AC_MSG_RESULT([yes])
+			with_gif=yes
+		else
+			AC_MSG_RESULT([no])
+		fi
+		],
+		[
+		AC_MSG_RESULT([yes])
+		with_gif=yes
+		])
+
+	AC_MSG_CHECKING([if JPEG output from the png HID is desired])
+	AC_ARG_ENABLE([jpeg],
+		[  --disable-jpeg          Disable support for JPEG output when the png HID is used [[default=include JPEG support]]],
+		[
+		if test "X$enable_jpeg" != "Xno" ; then
+			AC_MSG_RESULT([yes])
+			with_jpeg=yes
+		else
+			AC_MSG_RESULT([no])
+		fi
+		],
+		[
+		AC_MSG_RESULT([yes])
+		with_jpeg=yes
+		])
+
+	AC_MSG_CHECKING([if PNG output from the png HID is desired])
+	AC_ARG_ENABLE([png],
+		[  --disable-png           Disable support for PNG output when the png HID is used [[default=include PNG support]]],
+		[
+		if test "X$enable_png" != "Xno" ; then
+			AC_MSG_RESULT([yes])
+			with_png=yes
+		else
+			AC_MSG_RESULT([no])
+		fi
+		],
+		[
+		AC_MSG_RESULT([yes])
+		with_png=yes
+		])
+	;;
+
+      gcode|nelma)
+	need_gdlib=yes
+	with_png=yes
+	;;
+
+    esac
+done
+
+if test "$need_gdlib" = "yes"; then
 	# Check for gdlib-config for gd (www.boutell.com/gd)
 	AC_PATH_PROG(GDLIB_CONFIG, gdlib-config, no)
 	if test "$GDLIB_CONFIG" = "no"; then
@@ -795,9 +856,10 @@ you will get lucky.
 	# since some linux systems evidently install gdlib-config but fail to
 	# install the headers (nice), check for the header too and fail if it
 	# is not there.
-	CFLAGS="$CFLAGS $GD_CFLAGS"
+	save_CPPFLAGS="$CPPFLAGS"
 	CPPFLAGS="$CPPFLAGS $GD_CFLAGS"
 	AC_CHECK_HEADERS(gd.h)
+	CPPFLASS="$save_CPPFLAGS"
 	case $ac_cv_header_gd_h in
 	     no )
 		AC_MSG_ERROR([
@@ -814,22 +876,6 @@ This is needed for the nelma and/or png HID.
 	save_LIBS="$LIBS"
 	LIBS="$save_LIBS $GD_LIBS $X_LIBS"
 
-	AC_MSG_CHECKING([if GIF output from the png HID is desired])
-	AC_ARG_ENABLE([gif],
-		[  --disable-gif           Disable support for gif output when the png HID is used [[default=include gif support]]],
-		[
-		if test "X$enable_gif" != "Xno" ; then
-			AC_MSG_RESULT([yes])
-			with_gif=yes
-		else
-			AC_MSG_RESULT([no])
-			with_gif=no
-		fi
-		],
-		[
-		AC_MSG_RESULT([yes])
-		with_gif=yes
-		])
 	if test "X$with_gif" = "Xyes" ; then
 		AC_CHECK_FUNCS(gdImageGif)
 		if test "$ac_cv_func_gdImageGif" != "yes"; then
@@ -839,22 +885,6 @@ gif export with --disable-gif])
 		fi
 	fi
 
-	AC_MSG_CHECKING([if JPEG output from the png HID is desired])
-	AC_ARG_ENABLE([jpeg],
-		[  --disable-jpeg          Disable support for JPEG output when the png HID is used [[default=include JPEG support]]],
-		[
-		if test "X$enable_jpeg" != "Xno" ; then
-			AC_MSG_RESULT([yes])
-			with_jpeg=yes
-		else
-			AC_MSG_RESULT([no])
-			with_jpeg=no
-		fi
-		],
-		[
-		AC_MSG_RESULT([yes])
-		with_jpeg=yes
-		])
 	if test "X$with_jpeg" = "Xyes" ; then
 		AC_CHECK_FUNCS(gdImageJpeg)
 		if test "$ac_cv_func_gdImageJpeg" != "yes"; then
@@ -864,23 +894,6 @@ JPEG export with --disable-jpeg])
 		fi
 	fi
 
-
-	AC_MSG_CHECKING([if PNG output from the png HID is desired])
-	AC_ARG_ENABLE([png],
-		[  --disable-png           Disable support for PNG output when the png HID is used [[default=include PNG support]]],
-		[
-		if test "X$enable_png" != "Xno" ; then
-			AC_MSG_RESULT([yes])
-			with_png=yes
-		else
-			AC_MSG_RESULT([no])
-			with_png=no
-		fi
-		],
-		[
-		AC_MSG_RESULT([yes])
-		with_png=yes
-		])
 	if test "X$with_png" = "Xyes" ; then
 		AC_CHECK_FUNCS(gdImagePng)
 		if test "$ac_cv_func_gdImagePng" != "yes"; then
@@ -890,11 +903,7 @@ PNG export with --disable-png])
 		fi
 	fi
 	LIBS="$save_LIBS"
-	;;
-
-    esac
-done
-
+fi
 
 AM_CONDITIONAL(PNG, test x$with_png = xyes)
 AM_CONDITIONAL(GIF, test x$with_gif = xyes)
@@ -1108,9 +1117,9 @@ AC_DEFINE_UNQUOTED([COORD_TYPE],[$COORD_TYPE],
 AC_DEFINE_UNQUOTED([COORD_MAX],[$COORD_MAX],
   [Maximum value of coordinate type])
 
-# ------------- Complete set of CFLAGS and LIBS -------------------
+# ------------- Complete set of CPPFLAGS and LIBS -------------------
 
-CFLAGS="$CFLAGS $X_CFLAGS $DBUS_CFLAGS $GLIB_CFLAGS $GTK_CFLAGS $CAIRO_CFLAGS $GTKGLEXT_CFLAGS $GLU_CFLAGS $GL_CFLAGS"
+CPPFLAGS="$CPPFLAGS $X_CFLAGS $DBUS_CFLAGS $GLIB_CFLAGS $GTK_CFLAGS $GD_CFLAGS $CAIRO_CFLAGS $GTKGLEXT_CFLAGS $GLU_CFLAGS $GL_CFLAGS"
 LIBS="$LIBS $XM_LIBS $DBUS_LIBS $X_LIBS $GLIB_LIBS $GTK_LIBS $DMALLOC_LIBS $GD_LIBS $INTLLIBS $CAIRO_LIBS $GTKGLEXT_LIBS $GLU_LIBS $GL_LIBS"
 
 
@@ -1171,15 +1180,12 @@ ENABLE_BUILD_WITH_CXX=no)
 case "$ENABLE_BUILD_WITH_CXX" in
   yes)
     CC_OR_CXX="$CXX"
-    CC_OR_CXX_FLAGS="$CXXFLAGS"
     ;;
   no)
     CC_OR_CXX="$CC"
-    CC_OR_CXX_FLAGS="$CFLAGS"
     ;;
 esac
 AC_SUBST(CC_OR_CXX)
-AC_SUBST(CC_OR_CXX_FLAGS)
 
 # font filename
 FONTFILENAME=${FONTFILENAME:-"default_font"}
diff --git a/data/Makefile.am b/data/Makefile.am
index 13f519e..70d630b 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -42,6 +42,11 @@ desktopdir=$(xdgdatadir)/applications
 desktop_in_files = pcb.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
+ at INTLTOOL_XML_RULE@
+appdatadir = $(datadir)/appdata
+appdata_DATA = $(appdata_in_files:.xml.in=.xml)
+appdata_in_files = pcb.appdata.xml.in
+
 @INTLTOOL_DESKTOP_RULE@
 
 
@@ -51,7 +56,6 @@ xmldir = $(mimedir)/packages
 xml_in_files = pcb.xml.in
 xml_DATA = $(xml_in_files:.xml.in=.xml)
 
- at INTLTOOL_XML_RULE@
 
 kdedatadir=@KDEDATADIR@
 mimelnkdir = $(kdedatadir)/mimelnk
@@ -65,8 +69,6 @@ application_in_files = \
 	x-excellon.desktop.in
 application_DATA = $(application_in_files:.desktop.in=.desktop)
 
- at INTLTOOL_DESKTOP_RULE@
-
 install_icon_exec = \
 	$(SETENV) GTK_UPDATE_ICON_CACHE_BIN="@GTK_UPDATE_ICON_CACHE_BIN@" \
 	$(SHELL) $(top_srcdir)/icon-theme-installer \
@@ -98,8 +100,9 @@ endif
 	$(install_icon_exec) -u $(theme_icons)
 
 MAINTAINERCLEANFILES = *.log core FILE *~ Makefile.in
-DISTCLEANFILES = $(xml_DATA) $(application_DATA) $(desktop_DATA)
+DISTCLEANFILES = $(xml_DATA) $(appdata_DATA) $(application_DATA) $(desktop_DATA)
 EXTRA_DIST = $(mime_icon_files) $(mime_icon_sources) \
+             $(appdata_in_files) $(appdata_DATA) \
              $(xml_in_files) $(xml_DATA) \
              $(application_in_files) \
              $(app_icon_files) \
diff --git a/data/Makefile.in b/data/Makefile.in
index bf11fdc..3965240 100644
--- a/data/Makefile.in
+++ b/data/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,6 +16,23 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -65,6 +82,11 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -86,14 +108,22 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(applicationdir)" \
-	"$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(xmldir)"
-DATA = $(application_DATA) $(desktop_DATA) $(xml_DATA)
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__installdirs = "$(DESTDIR)$(appdatadir)" \
+	"$(DESTDIR)$(applicationdir)" "$(DESTDIR)$(desktopdir)" \
+	"$(DESTDIR)$(xmldir)"
+DATA = $(appdata_DATA) $(application_DATA) $(desktop_DATA) $(xml_DATA)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -106,7 +136,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -172,6 +201,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -280,6 +313,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -339,6 +374,9 @@ theme_icons = \
 desktopdir = $(xdgdatadir)/applications
 desktop_in_files = pcb.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+appdatadir = $(datadir)/appdata
+appdata_DATA = $(appdata_in_files:.xml.in=.xml)
+appdata_in_files = pcb.appdata.xml.in
 mimedir = $(xdgdatadir)/mime
 xmldir = $(mimedir)/packages
 xml_in_files = pcb.xml.in
@@ -365,8 +403,9 @@ install_icon_exec = \
 	-x "$(INSTALL_DATA)"
 
 MAINTAINERCLEANFILES = *.log core FILE *~ Makefile.in
-DISTCLEANFILES = $(xml_DATA) $(application_DATA) $(desktop_DATA)
+DISTCLEANFILES = $(xml_DATA) $(appdata_DATA) $(application_DATA) $(desktop_DATA)
 EXTRA_DIST = $(mime_icon_files) $(mime_icon_sources) \
+             $(appdata_in_files) $(appdata_DATA) \
              $(xml_in_files) $(xml_DATA) \
              $(application_in_files) \
              $(app_icon_files) \
@@ -406,10 +445,34 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
+install-appdataDATA: $(appdata_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(appdata_DATA)'; test -n "$(appdatadir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(appdatadir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(appdatadir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appdatadir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(appdatadir)" || exit $$?; \
+	done
+
+uninstall-appdataDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(appdata_DATA)'; test -n "$(appdatadir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(appdatadir)'; $(am__uninstall_files_from_dir)
 install-applicationDATA: $(application_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(applicationdir)" || $(MKDIR_P) "$(DESTDIR)$(applicationdir)"
 	@list='$(application_DATA)'; test -n "$(applicationdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(applicationdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(applicationdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -423,13 +486,14 @@ uninstall-applicationDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(application_DATA)'; test -n "$(applicationdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(applicationdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(applicationdir)" && rm -f $$files
+	dir='$(DESTDIR)$(applicationdir)'; $(am__uninstall_files_from_dir)
 install-desktopDATA: $(desktop_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(desktopdir)"
 	@list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(desktopdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(desktopdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -443,13 +507,14 @@ uninstall-desktopDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(desktopdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(desktopdir)" && rm -f $$files
+	dir='$(DESTDIR)$(desktopdir)'; $(am__uninstall_files_from_dir)
 install-xmlDATA: $(xml_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(xmldir)" || $(MKDIR_P) "$(DESTDIR)$(xmldir)"
 	@list='$(xml_DATA)'; test -n "$(xmldir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(xmldir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(xmldir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -463,9 +528,7 @@ uninstall-xmlDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(xml_DATA)'; test -n "$(xmldir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(xmldir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(xmldir)" && rm -f $$files
+	dir='$(DESTDIR)$(xmldir)'; $(am__uninstall_files_from_dir)
 tags: TAGS
 TAGS:
 
@@ -507,7 +570,7 @@ check-am: all-am
 check: check-am
 all-am: Makefile $(DATA)
 installdirs:
-	for dir in "$(DESTDIR)$(applicationdir)" "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(xmldir)"; do \
+	for dir in "$(DESTDIR)$(appdatadir)" "$(DESTDIR)$(applicationdir)" "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(xmldir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-am
@@ -520,10 +583,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
@@ -557,8 +625,8 @@ info: info-am
 
 info-am:
 
-install-data-am: install-applicationDATA install-data-local \
-	install-desktopDATA install-xmlDATA
+install-data-am: install-appdataDATA install-applicationDATA \
+	install-data-local install-desktopDATA install-xmlDATA
 	@$(NORMAL_INSTALL)
 	$(MAKE) $(AM_MAKEFLAGS) install-data-hook
 install-dvi: install-dvi-am
@@ -603,28 +671,26 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-applicationDATA uninstall-desktopDATA \
-	uninstall-xmlDATA
+uninstall-am: uninstall-appdataDATA uninstall-applicationDATA \
+	uninstall-desktopDATA uninstall-xmlDATA
 	@$(NORMAL_INSTALL)
 	$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
 .MAKE: install-am install-data-am install-strip uninstall-am
 
 .PHONY: all all-am check check-am clean clean-generic distclean \
 	distclean-generic distdir dvi dvi-am html html-am info info-am \
-	install install-am install-applicationDATA install-data \
-	install-data-am install-data-hook install-data-local \
-	install-desktopDATA install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip install-xmlDATA \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
-	pdf-am ps ps-am uninstall uninstall-am \
-	uninstall-applicationDATA uninstall-desktopDATA uninstall-hook \
-	uninstall-xmlDATA
-
+	install install-am install-appdataDATA install-applicationDATA \
+	install-data install-data-am install-data-hook \
+	install-data-local install-desktopDATA install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip install-xmlDATA installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
+	uninstall-am uninstall-appdataDATA uninstall-applicationDATA \
+	uninstall-desktopDATA uninstall-hook uninstall-xmlDATA
 
- at INTLTOOL_DESKTOP_RULE@
 
 @INTLTOOL_XML_RULE@
 
diff --git a/data/pcb.appdata.xml b/data/pcb.appdata.xml
new file mode 100644
index 0000000..1fbff8e
--- /dev/null
+++ b/data/pcb.appdata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application>
+  <id type="desktop">gnome-power-statistics.desktop</id>
+  <licence>GFDL</licence>
+  <description>
+    <p>PCB is an interactive printed circuit board editor for Unix, Linux, Windows, and Mac systems.</p>
+    <p xml:lang="pt_BR">PCB é um editor de placa de circuito impresso interativo para sistemas Unix, Linux, Windows, e Mac.</p>
+    <p>PCB includes a rats nest feature and schematic/netlist import, design rule checking, and can provide industry standard RS-274X (Gerber), NC drill, and centroid data (X-Y data) output for use in the board fabrication and assembly process, as well as photorealistic and design review images.</p>
+    <p xml:lang="pt_BR">PCB inclui um recurso de importação de ninhos de rato and diagramas esquemáticos e netlist, verificação de regras de desenho, e pode fornecer o padrão industrial RS-274X (Gerber), perfuração NC, e saída de dados de cantroid (dados X-Y) para uso em fabricação de placas e processo de fabricação, bem como imagens fotorealisticas e imagens de exibição de desenho.</p>
+    <p>PCB offers high end features such as an autorouter and trace optimizer which can tremendously reduce layout time.</p>
+    <p xml:lang="pt_BR">PCB ofereca recursos de alta qualidade tais como roteamento automático e otimizador de trilha que pode reduzir tremendamente o tempo do desenho do traçado.</p>
+    <p>For custom requirements, PCB offers a plug-in API for inserting new functionality and using that functionality from within the GUI as well as in scripts.</p>
+    <p xml:lang="pt_BR">Para requisitos personalizados, PCB oferece uma API de recursos adicionais para inserção de novas funcionalidades e utilização dessa nova funcionalidade a partir de dentro da interface gráfica do usuário bem com em scripts.</p>
+  </description>
+  <screenshots>
+    <screenshot width="320" type="default" height="222">http://wiki.geda-project.org/_media/geda:screenshot_pcb_thumb.png</screenshot>
+  </screenshots>
+  <url type="homepage">http://pcb.geda-project.org/</url>
+  <updatecontact>bert.timmerman at xs4all.nl</updatecontact>
+</application>
\ No newline at end of file
diff --git a/data/pcb.appdata.xml.in b/data/pcb.appdata.xml.in
new file mode 100644
index 0000000..2fa637b
--- /dev/null
+++ b/data/pcb.appdata.xml.in
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2014 Bert Timmerman <bert.timmerman at xs4all.nl> -->
+<application>
+  <id type="desktop">gnome-power-statistics.desktop</id>
+  <licence>GFDL</licence>
+  <description>
+    <_p>
+      PCB is an interactive printed circuit board editor for Unix, Linux,
+      Windows, and Mac systems.
+    </_p>
+    <_p>
+      PCB includes a rats nest feature and schematic/netlist import,
+      design rule checking, and can provide industry standard RS-274X
+      (Gerber), NC drill, and centroid data (X-Y data) output for use in
+      the board fabrication and assembly process, as well as
+      photorealistic and design review images.
+    </_p>
+    <_p>
+      PCB offers high end features such as an autorouter and trace
+      optimizer which can tremendously reduce layout time.
+    </_p>
+    <_p>
+      For custom requirements, PCB offers a plug-in API for inserting
+      new functionality and using that functionality from within the GUI
+      as well as in scripts.
+    </_p>
+  </description>
+  <screenshots>
+    <screenshot type="default" width="320" height="222">http://wiki.geda-project.org/_media/geda:screenshot_pcb_thumb.png</screenshot>
+  </screenshots>
+  <url type="homepage">http://pcb.geda-project.org/</url>
+  <updatecontact>bert.timmerman at xs4all.nl</updatecontact>
+</application>
diff --git a/data/pcb.desktop b/data/pcb.desktop
index 8b141c9..1a2f0cc 100644
--- a/data/pcb.desktop
+++ b/data/pcb.desktop
@@ -2,12 +2,15 @@
 Version=1.0
 Name=PCB Designer
 Name[nl]=PCB Ontwerper
+Name[pt_BR]=Desenhista do PCB
 Name[ru]=Редактор PCB
 GenericName=PCB Design
 GenericName[nl]=PCB Ontwerp
+GenericName[pt_BR]=Desenho do PCB
 GenericName[ru]=Проект PCB
 Comment=Create and edit printed circuit board designs
 Comment[nl]=Creer en bewerk gedrukte bedrading ontwerpen
+Comment[pt_BR]=Cria e edita desenhos de placa de circuito impresso
 Comment[ru]=Создание и редактирование проектов печатных плат
 Type=Application
 Exec=pcb %f
diff --git a/data/pcb.xml b/data/pcb.xml
index 7b8f904..ea32350 100644
--- a/data/pcb.xml
+++ b/data/pcb.xml
@@ -4,6 +4,7 @@
     <sub-class-of type="text/plain"/>
     <comment>PCB layout</comment>
     <comment xml:lang="nl">PCB opmaak</comment>
+    <comment xml:lang="pt_BR">Traçado PCB</comment>
     <comment xml:lang="ru">PCB трассировка</comment>
     <glob pattern="*.pcb"/>
     <magic priority="50">
@@ -14,6 +15,7 @@
     <sub-class-of type="text/plain"/>
     <comment>PCB footprint</comment>
     <comment xml:lang="nl">PCB voetafdruk</comment>
+    <comment xml:lang="pt_BR">Matriz PCB</comment>
     <comment xml:lang="ru">PCB посадочное место</comment>
     <glob pattern="*.fp"/>
     <magic priority="50">
@@ -24,6 +26,7 @@
     <sub-class-of type="text/plain"/>
     <comment>PCB netlist</comment>
     <comment xml:lang="nl">PCB netlijst</comment>
+    <comment xml:lang="pt_BR">Netlist PCB</comment>
     <comment xml:lang="ru">PCB список соединений</comment>
     <glob pattern="*.net"/>
   </mime-type>
@@ -31,6 +34,7 @@
     <sub-class-of type="text/plain"/>
     <comment>Gerber file</comment>
     <comment xml:lang="nl">Gerber bestand</comment>
+    <comment xml:lang="pt_BR">Arquivo Gerber</comment>
     <comment xml:lang="ru">Gerber-файл</comment>
     <glob pattern="*.gbr"/>
     <magic priority="50">
@@ -41,6 +45,7 @@
     <sub-class-of type="text/plain"/>
     <comment>Excellon drill file</comment>
     <comment xml:lang="nl">Excellon boor bestand</comment>
+    <comment xml:lang="pt_BR">Arquivo de perfuração Excellon</comment>
     <comment xml:lang="ru">Файл сверловки Excellon</comment>
     <glob pattern="*.cnc"/>
     <magic priority="50">
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 3974b3e..2f716c7 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,6 +16,23 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -77,6 +94,11 @@ TEXINFOS = pcb.texi
 TEXI2PDF = $(TEXI2DVI) --pdf --batch
 MAKEINFOHTML = $(MAKEINFO) --html
 DVIPS = dvips
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" \
 	"$(DESTDIR)$(htmldir)" "$(DESTDIR)$(pdfdir)"
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -100,6 +122,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 man1dir = $(mandir)/man1
 NROFF = nroff
 MANS = $(dist_man_MANS)
@@ -109,6 +137,7 @@ ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -121,7 +150,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -187,6 +215,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -295,6 +327,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -525,9 +559,7 @@ uninstall-html-am:
 
 uninstall-info-am:
 	@$(PRE_UNINSTALL)
-	@if test -d '$(DESTDIR)$(infodir)' && \
-	    (install-info --version && \
-	     install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+	@if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \
 	  list='$(INFO_DEPS)'; \
 	  for file in $$list; do \
 	    relfile=`echo "$$file" | sed 's|^.*/||'`; \
@@ -595,11 +627,18 @@ maintainer-clean-aminfo:
 	done
 install-man1: $(dist_man_MANS)
 	@$(NORMAL_INSTALL)
-	test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
-	@list=''; test -n "$(man1dir)" || exit 0; \
-	{ for i in $$list; do echo "$$i"; done; \
-	l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
-	  sed -n '/\.1[a-z]*$$/p'; \
+	@list1=''; \
+	list2='$(dist_man_MANS)'; \
+	test -n "$(man1dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.1[a-z]*$$/p'; \
+	fi; \
 	} | while read p; do \
 	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; echo "$$p"; \
@@ -628,13 +667,14 @@ uninstall-man1:
 	  sed -n '/\.1[a-z]*$$/p'; \
 	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
 	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
-	test -z "$$files" || { \
-	  echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
-	  cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+	dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
 install-dist_htmlDATA: $(dist_html_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
 	@list='$(dist_html_DATA)'; test -n "$(htmldir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -648,13 +688,14 @@ uninstall-dist_htmlDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(dist_html_DATA)'; test -n "$(htmldir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(htmldir)" && rm -f $$files
+	dir='$(DESTDIR)$(htmldir)'; $(am__uninstall_files_from_dir)
 install-dist_pdfDATA: $(dist_pdf_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
 	@list='$(dist_pdf_DATA)'; test -n "$(pdfdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -668,9 +709,7 @@ uninstall-dist_pdfDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(dist_pdf_DATA)'; test -n "$(pdfdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(pdfdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(pdfdir)" && rm -f $$files
+	dir='$(DESTDIR)$(pdfdir)'; $(am__uninstall_files_from_dir)
 tags: TAGS
 TAGS:
 
@@ -743,10 +782,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
@@ -787,8 +831,11 @@ install-dvi: install-dvi-am
 
 install-dvi-am: $(DVIS)
 	@$(NORMAL_INSTALL)
-	test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
 	@list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -803,18 +850,22 @@ install-html: install-html-am
 
 install-html-am: $(HTMLS)
 	@$(NORMAL_INSTALL)
-	test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
 	@list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  $(am__strip_dir) \
-	  if test -d "$$d$$p"; then \
+	  d2=$$d$$p; \
+	  if test -d "$$d2"; then \
 	    echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
 	    $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
-	    echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
-	    $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
+	    echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+	    $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
 	  else \
-	    list2="$$list2 $$d$$p"; \
+	    list2="$$list2 $$d2"; \
 	  fi; \
 	done; \
 	test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
@@ -826,9 +877,12 @@ install-info: install-info-am
 
 install-info-am: $(INFO_DEPS)
 	@$(NORMAL_INSTALL)
-	test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
 	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
 	list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \
+	fi; \
 	for file in $$list; do \
 	  case $$file in \
 	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
@@ -846,8 +900,7 @@ install-info-am: $(INFO_DEPS)
 	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
 	  $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
 	@$(POST_INSTALL)
-	@if (install-info --version && \
-	     install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+	@if $(am__can_run_installinfo); then \
 	  list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
 	  for file in $$list; do \
 	    relfile=`echo "$$file" | sed 's|^.*/||'`; \
@@ -861,8 +914,11 @@ install-pdf: install-pdf-am
 
 install-pdf-am: $(PDFS)
 	@$(NORMAL_INSTALL)
-	test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
 	@list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -874,8 +930,11 @@ install-ps: install-ps-am
 
 install-ps-am: $(PSS)
 	@$(NORMAL_INSTALL)
-	test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
 	@list='$(PSS)'; test -n "$(psdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
diff --git a/doc/actions.texi b/doc/actions.texi
index 0c5f248..f767d2e 100644
--- a/doc/actions.texi
+++ b/doc/actions.texi
@@ -1,5 +1,5 @@
 @c key actions
- at c ./../src/action.c 225
+ at c ./../src/action.c 224
 
 Many actions take a @code{delta} parameter as the last parameter,
 which is an amount to change something.  That @code{delta} may include
@@ -18,7 +18,7 @@ Action(Object,-1)
 Actions which take a @code{delta} parameter which do not accept all
 these options will specify what they do take.
 
- at c ./../src/action.c 229
+ at c ./../src/action.c 228
 
 @macro pinshapes
 
@@ -35,7 +35,7 @@ either round or, if the octagon flag is set, octagonal.
 
 @end macro
 
- at c ./../src/command.c 64
+ at c ./../src/command.c 60
 
 @macro colonaction
 
@@ -46,7 +46,7 @@ is documented for that purpose.
 
 @end macro
 
- at c ./../src/action.c 227
+ at c ./../src/action.c 226
 
 Many actions act on indicated objects on the board.  They will have
 parameters like @code{ToggleObject} or @code{SelectedVias} to indicate
@@ -86,105 +86,105 @@ Affects all objects which are both selected and of the @var{Type} specified.
 @node core actions
 @section Core actions
 @menu
-* AddRats Action:: Add one or more rat lines to the board.
-* ApplyVendor Action:: Applies the currently loaded vendor drill table to the current design.
-* Atomic Action:: Save or restore the undo serial number.
-* Attributes Action:: Let the user edit the attributes of the layout, current or given
-layer, or selected element.
-* AutoPlaceSelected Action:: Auto-place selected components.
-* AutoRoute Action:: Auto-route some or all rat lines.
-* ChangeClearSize Action:: Changes the clearance size of objects.
-* ChangeDrillSize Action:: Changes the drilling hole size of objects.
-* ChangeFlag Action:: Sets or clears flags on objects.
-* ChangeHole Action:: Changes the hole flag of objects.
-* ChangeJoin Action:: Changes the join (clearance through polygons) of objects.
-* ChangeName Action:: Sets the name of objects.
-* ChangeOctagon Action:: Changes the octagon-flag of pins and vias.
-* ChangePaste Action:: Changes the no paste flag of objects.
-* ChangePinName Action:: Sets the name of a specific pin on a specific element.
-* ChangeSize Action:: Changes the size of objects.
-* ChangeSquare Action:: Changes the square flag of pins and pads.
-* ClearOctagon Action:: Clears the octagon-flag of pins and vias.
-* ClearSquare Action:: Clears the square-flag of pins and pads.
-* ClrFlag Action:: Clears flags on objects.
-* Connection Action:: Searches connections of the object at the cursor position.
-* Delete Action:: Delete stuff.
-* DeleteRats Action:: Delete rat lines.
-* DisableVendor Action:: Disables automatic drill size mapping.
-* DisperseElements Action:: Disperses elements.
-* Display Action:: Several display-related actions.
+* AddRats Action::   N_("Add one or more rat lines to the board.");
+* ApplyVendor Action::   N_("Applies the currently loaded vendor drill table to the current design.");
+* Atomic Action::  N_("Save or restore the undo serial number.");
+* Attributes Action::   N_("Let the user edit the attributes of the layout, current or given
+layer, or selected element.");
+* AutoPlaceSelected Action::  N_("Auto-place selected components.");
+* AutoRoute Action::  N_("Auto-route some or all rat lines.");
+* ChangeClearSize Action::   N_("Changes the clearance size of objects.");
+* ChangeDrillSize Action::   N_("Changes the drilling hole size of objects.");
+* ChangeFlag Action::  N_("Sets or clears flags on objects.");
+* ChangeHole Action::  N_("Changes the hole flag of objects.");
+* ChangeJoin Action::   N_("Changes the join (clearance through polygons) of objects.");
+* ChangeName Action::  N_("Sets the name of objects.");
+* ChangeOctagon Action::   N_("Changes the octagon-flag of pins and vias.");
+* ChangePaste Action::   N_("Changes the no paste flag of objects.");
+* ChangePinName Action::   N_("Sets the name of a specific pin on a specific element.");
+* ChangeSize Action::  N_("Changes the size of objects.");
+* ChangeSquare Action::   N_("Changes the square flag of pins and pads.");
+* ClearOctagon Action::   N_("Clears the octagon-flag of pins and vias.");
+* ClearSquare Action::   N_("Clears the square-flag of pins and pads.");
+* ClrFlag Action::  N_("Clears flags on objects.");
+* Connection Action::   N_("Searches connections of the object at the cursor position.");
+* Delete Action::  N_("Delete stuff.");
+* DeleteRats Action::  N_("Delete rat lines.");
+* DisableVendor Action::   N_("Disables automatic drill size mapping.");
+* DisperseElements Action::  N_("Disperses elements.");
+* Display Action::  N_("Several display-related actions.");
 * djopt Action:: Perform various optimizations on the current board.
-* DRC Action:: Invoke the DRC check.
-* DumpLibrary Action:: Display the entire contents of the libraries.
-* elementlist Action:: Adds the given element if it doesn't already exist.
-* elementsetattr Action:: Sets or clears an element-specific attribute.
-* EnableVendor Action:: Enables automatic drill size mapping.
-* execcommand Action:: Runs a command.
-* ExecuteFile Action:: Run actions from the given file.
-* Flip Action:: Flip an element to the opposite side of the board.
+* DRC Action::  N_("Invoke the DRC check.");
+* DumpLibrary Action::   N_("Display the entire contents of the libraries.");
+* elementlist Action::   N_("Adds the given element if it doesn't already exist.");
+* elementsetattr Action::   N_("Sets or clears an element-specific attribute.");
+* EnableVendor Action::   N_("Enables automatic drill size mapping.");
+* execcommand Action::  N_("Runs a command.");
+* ExecuteFile Action::  N_("Run actions from the given file.");
+* Flip Action::   N_("Flip an element to the opposite side of the board.");
 * FontEdit Action:: Convert the current font to a PCB for editing.
 * FontSave Action:: Convert the current PCB back to a font.
-* FreeRotateBuffer Action:: Rotates the current paste buffer contents by the specified angle.  The
+* FreeRotateBuffer Action::   N_("Rotates the current paste buffer contents by the specified angle.  The
 angle is given in degrees.  If no angle is given, the user is prompted
 for one.
-
+");
 * GlobalPuller Action:: Pull all traces tight.
 * h Action:: Print a help message for commands.
-* Import Action:: Import schematics.
+* Import Action::  N_("Import schematics.");
 * l Action:: Loads layout data.
 * le Action:: Loads an element into the current buffer.
-* LoadFootprint Action:: Loads a single footprint by name.
-* LoadFrom Action:: Load layout data from a file.
-* LoadVendorFrom Action:: Loads the specified vendor resource file.
+* LoadFootprint Action::   N_("Loads a single footprint by name.");
+* LoadFrom Action::  N_("Load layout data from a file.");
+* LoadVendorFrom Action::   N_("Loads the specified vendor resource file.");
 * m Action:: Loads a layout into the current buffer.
-* MarkCrosshair Action:: Set/Reset the Crosshair mark.
-* Message Action:: Writes a message to the log window.
-* MinClearGap Action:: Ensures that polygons are a minimum distance from objects.
-* MinMaskGap Action:: Ensures the mask is a minimum distance from pins and pads.
-* Mode Action:: Change or use the tool mode.
-* MorphPolygon Action:: Converts dead polygon islands into separate polygons.
+* MarkCrosshair Action::  N_("Set/Reset the Crosshair mark.");
+* Message Action::  N_("Writes a message to the log window.");
+* MinClearGap Action::   N_("Ensures that polygons are a minimum distance from objects.");
+* MinMaskGap Action::   N_("Ensures the mask is a minimum distance from pins and pads.");
+* Mode Action::  N_("Change or use the tool mode.");
+* MorphPolygon Action::   N_("Converts dead polygon islands into separate polygons.");
 * MoveLayer Action:: Moves/Creates/Deletes Layers.
-* MoveObject Action:: Moves the object under the crosshair.
-* MoveToCurrentLayer Action:: Moves objects to the current layer.
+* MoveObject Action::   N_("Moves the object under the crosshair.");
+* MoveToCurrentLayer Action::   N_("Moves objects to the current layer.");
 * Netlist Action:: Perform various actions on netlists.
-* New Action:: Starts a new layout.
+* New Action::  N_("Starts a new layout.");
 * OptAutoOnly Action:: Toggles the optimize-only-autorouted flag.
-* PasteBuffer Action:: Various operations on the paste buffer.
-* Polygon Action:: Some polygon related stuff.
+* PasteBuffer Action::   N_("Various operations on the paste buffer.");
+* Polygon Action::  N_("Some polygon related stuff.");
 * Puller Action:: Pull an arc-line junction tight.
 * q Action:: Quits the application after confirming.
 * q! Action:: Quits the application without confirming.
-* Quit Action:: Quits the application after confirming.
-* Redo Action:: Redo recent``undo''operations.
-* RemoveSelected Action:: Removes any selected objects.
-* Renumber Action:: Renumber all elements.  The changes will be recorded to filename
-for use in backannotating these changes to the schematic.
-* Report Action:: Produce various report.
-* ReportDialog Action:: Report on the object under the crosshair
-* RipUp Action:: Ripup auto-routed tracks, or convert an element to parts.
+* Quit Action::  N_("Quits the application after confirming.");
+* Redo Action::  N_("Redo recent``undo''operations.");
+* RemoveSelected Action::  N_("Removes any selected objects.");
+* Renumber Action::   N_("Renumber all elements.  The changes will be recorded to filename
+for use in backannotating these changes to the schematic.");
+* Report Action::  N_("Produce various report.");
+* ReportDialog Action::   N_("Report on the object under the crosshair");
+* RipUp Action::   N_("Ripup auto-routed tracks, or convert an element to parts.");
 * rn Action:: Reads netlist.
-* RouteStyle Action:: Copies the indicated routing style into the current sizes.
+* RouteStyle Action::   N_("Copies the indicated routing style into the current sizes.");
 * s Action:: Saves layout data.
-* SaveSettings Action:: Saves settings.
-* SaveTo Action:: Saves data to a file.
-* Select Action:: Toggles or sets the selection.
-* SetFlag Action:: Sets flags on objects.
-* SetOctagon Action:: Sets the octagon-flag of objects.
-* SetSame Action:: Sets current layer and sizes to match indicated item.
-* SetSquare Action:: sets the square-flag of objects.
-* SetThermal Action:: Set the thermal (on the current layer) of pins or vias to the given style.
+* SaveSettings Action::  N_("Saves settings.");
+* SaveTo Action::  N_("Saves data to a file.");
+* Select Action::  N_("Toggles or sets the selection.");
+* SetFlag Action::  N_("Sets flags on objects.");
+* SetOctagon Action::  N_("Sets the octagon-flag of objects.");
+* SetSame Action::   N_("Sets current layer and sizes to match indicated item.");
+* SetSquare Action::  N_("sets the square-flag of objects.");
+* SetThermal Action::   N_("Set the thermal (on the current layer) of pins or vias to the given style.
 Style = 0 means no thermal.
 Style = 1 has diagonal fingers with sharp edges.
 Style = 2 has horizontal and vertical fingers with sharp edges.
 Style = 3 is a solid connection to the plane.Style = 4 has diagonal fingers with rounded edges.
 Style = 5 has horizontal and vertical fingers with rounded edges.
-
-* SetValue Action:: Change various board-wide values and sizes.
-* ToggleHideName Action:: Toggles the visibility of element names.
-* ToggleVendor Action:: Toggles the state of automatic drill size mapping.
-* Undo Action:: Undo recent changes.
-* UnloadVendor Action:: Unloads the current vendor drill mapping table.
-* Unselect Action:: Unselects the object at the pointer location or the specified objects.
+");
+* SetValue Action::   N_("Change various board-wide values and sizes.");
+* ToggleHideName Action::   N_("Toggles the visibility of element names.");
+* ToggleVendor Action::   N_("Toggles the state of automatic drill size mapping.");
+* Undo Action::  N_("Undo recent changes.");
+* UnloadVendor Action::   N_("Unloads the current vendor drill mapping table.");
+* Unselect Action::   N_("Unselects the object at the pointer location or the specified objects.");
 * w Action:: Saves layout data.
 * wq Action:: Saves the layout data and quits.
 @end menu
@@ -193,11 +193,12 @@ Style = 5 has horizontal and vertical fingers with rounded edges.
 @c key AddRats in hid 
 @cartouche
 @format
-AddRats(AllRats|SelectedRats|Close)@end format
+ N_("AddRats(AllRats|SelectedRats|Close)");
+ at end format
 @end cartouche
 
-Add one or more rat lines to the board.
- at c ./../src/action.c 3310
+  N_("Add one or more rat lines to the board.");
+ at c ./../src/action.c 3311
 
 @table @code
 
@@ -220,11 +221,12 @@ Selects the shortest unselected rat on the board.
 @c key ApplyVendor in hid 
 @cartouche
 @format
-ApplyVendor()@end format
+ N_("ApplyVendor()");
+ at end format
 @end cartouche
 
-Applies the currently loaded vendor drill table to the current design.
- at c ./../src/vendor.c 112
+  N_("Applies the currently loaded vendor drill table to the current design.");
+ at c ./../src/vendor.c 108
 @cindex vendor map 
 @cindex vendor drill table
 @findex ApplyVendor()
@@ -237,11 +239,12 @@ sizes for your vendor.
 @c key Atomic in hid 
 @cartouche
 @format
-Atomic(Save|Restore|Close|Block)@end format
+ N_("Atomic(Save|Restore|Close|Block)");
+ at end format
 @end cartouche
 
-Save or restore the undo serial number.
- at c ./../src/action.c 1720
+ N_("Save or restore the undo serial number.");
+ at c ./../src/action.c 1707
 
 This action allows making multiple-action bindings into an atomic
 operation that will be undone by a single Undo command.  For example,
@@ -277,13 +280,14 @@ Does a Restore if there was nothing to undo, else does a Close.
 @c key Attributes in hid 
 @cartouche
 @format
-Attributes(Layout|Layer|Element)
-Attributes(Layer,layername)@end format
+  N_("Attributes(Layout|Layer|Element)
+Attributes(Layer,layername)");
+ at end format
 @end cartouche
 
-Let the user edit the attributes of the layout, current or given
-layer, or selected element.
- at c ./../src/action.c 6761
+  N_("Let the user edit the attributes of the layout, current or given
+layer, or selected element.");
+ at c ./../src/action.c 6793
 
 This just pops up a dialog letting the user edit the attributes of the
 pcb, an element, or a layer.
@@ -294,11 +298,12 @@ pcb, an element, or a layer.
 @c key AutoPlaceSelected in hid 
 @cartouche
 @format
-AutoPlaceSelected()@end format
+ N_("AutoPlaceSelected()");
+ at end format
 @end cartouche
 
-Auto-place selected components.
- at c ./../src/action.c 3450
+ N_("Auto-place selected components.");
+ at c ./../src/action.c 3451
 
 Attempts to re-arrange the selected components such that the nets
 connecting them are minimized.  Note that you cannot undo this.
@@ -309,11 +314,12 @@ connecting them are minimized.  Note that you cannot undo this.
 @c key AutoRoute in hid 
 @cartouche
 @format
-AutoRoute(AllRats|SelectedRats)@end format
+ N_("AutoRoute(AllRats|SelectedRats)");
+ at end format
 @end cartouche
 
-Auto-route some or all rat lines.
- at c ./../src/action.c 3471
+ N_("Auto-route some or all rat lines.");
+ at c ./../src/action.c 3472
 
 @table @code
 
@@ -340,14 +346,15 @@ responsive.
 @c key ChangeClearSize in hid 
 @cartouche
 @format
-ChangeClearSize(Object, delta)
+  N_("ChangeClearSize(Object, delta)
 ChangeClearSize(SelectedPins|SelectedPads|SelectedVias, delta)
 ChangeClearSize(SelectedLines|SelectedArcs, delta
-ChangeClearSize(Selected|SelectedObjects, delta)@end format
+ChangeClearSize(Selected|SelectedObjects, delta)");
+ at end format
 @end cartouche
 
-Changes the clearance size of objects.
- at c ./../src/action.c 3686
+  N_("Changes the clearance size of objects.");
+ at c ./../src/action.c 3690
 
 If the solder mask is currently showing, this action changes the
 solder mask clearance.  If the mask is not showing, this action
@@ -359,12 +366,13 @@ changes the polygon clearance.
 @c key ChangeDrillSize in hid 
 @cartouche
 @format
-ChangeDrillSize(Object, delta)
-ChangeDrillSize(SelectedPins|SelectedVias|Selected|SelectedObjects, delta)@end format
+  N_("ChangeDrillSize(Object, delta)
+ChangeDrillSize(SelectedPins|SelectedVias|Selected|SelectedObjects, delta)");
+ at end format
 @end cartouche
 
-Changes the drilling hole size of objects.
- at c ./../src/action.c 3630
+  N_("Changes the drilling hole size of objects.");
+ at c ./../src/action.c 3634
 
 
 @node ChangeFlag Action
@@ -372,16 +380,17 @@ Changes the drilling hole size of objects.
 @c key ChangeFlag in hid 
 @cartouche
 @format
-ChangeFlag(Object|Selected|SelectedObjects, flag, value)
+  N_("ChangeFlag(Object|Selected|SelectedObjects, flag, value)
 ChangeFlag(SelectedLines|SelectedPins|SelectedVias, flag, value)
 ChangeFlag(SelectedPads|SelectedTexts|SelectedNames, flag, value)
 ChangeFlag(SelectedElements, flag, value)
 flag = square | octagon | thermal | join
-value = 0 | 1 at end format
+value = 0 | 1");
+ at end format
 @end cartouche
 
-Sets or clears flags on objects.
- at c ./../src/action.c 5750
+ N_("Sets or clears flags on objects.");
+ at c ./../src/action.c 5779
 
 Toggles the given flag on the indicated object(s).  The flag may be
 one of the flags listed above (square, octagon, thermal, join).  The
@@ -394,11 +403,12 @@ cleared.  If the value is 1, the flag is set.
 @c key ChangeHole in hid 
 @cartouche
 @format
-ChangeHole(ToggleObject|Object|SelectedVias|Selected)@end format
+  N_("ChangeHole(ToggleObject|Object|SelectedVias|Selected)");
+ at end format
 @end cartouche
 
-Changes the hole flag of objects.
- at c ./../src/action.c 4571
+ N_("Changes the hole flag of objects.");
+ at c ./../src/action.c 4578
 
 The "hole flag" of a via determines whether the via is a
 plated-through hole (not set), or an unplated hole (set).
@@ -409,11 +419,12 @@ plated-through hole (not set), or an unplated hole (set).
 @c key ChangeJoin in hid 
 @cartouche
 @format
-ChangeJoin(ToggleObject|SelectedLines|SelectedArcs|Selected)@end format
+  N_("ChangeJoin(ToggleObject|SelectedLines|SelectedArcs|Selected)");
+ at end format
 @end cartouche
 
-Changes the join (clearance through polygons) of objects.
- at c ./../src/action.c 4199
+  N_("Changes the join (clearance through polygons) of objects.");
+ at c ./../src/action.c 4206
 
 The join flag determines whether a line or arc, drawn to intersect a
 polygon, electrically connects to the polygon or not.  When joined,
@@ -427,12 +438,13 @@ polygon, insulating them from each other.
 @c key ChangeName in hid 
 @cartouche
 @format
-ChangeName(Object)
-ChangeName(Layout|Layer)@end format
+  N_("ChangeName(Object)
+ChangeName(Layout|Layer)");
+ at end format
 @end cartouche
 
-Sets the name of objects.
- at c ./../src/action.c 4005
+ N_("Sets the name of objects.");
+ at c ./../src/action.c 4012
 
 @table @code
 
@@ -453,12 +465,13 @@ Changes the name of the currently active layer.
 @c key ChangeOctagon in hid 
 @cartouche
 @format
-ChangeOctagon(Object|ToggleObject|SelectedObjects|Selected)
-ChangeOctagon(SelectedElements|SelectedPins|SelectedVias)@end format
+  N_("ChangeOctagon(Object|ToggleObject|SelectedObjects|Selected)
+ChangeOctagon(SelectedElements|SelectedPins|SelectedVias)");
+ at end format
 @end cartouche
 
-Changes the octagon-flag of pins and vias.
- at c ./../src/action.c 4403
+  N_("Changes the octagon-flag of pins and vias.");
+ at c ./../src/action.c 4410
 
 @pinshapes
 
@@ -468,11 +481,12 @@ Changes the octagon-flag of pins and vias.
 @c key ChangePaste in hid 
 @cartouche
 @format
-ChangePaste(ToggleObject|Object|SelectedPads|Selected)@end format
+  N_("ChangePaste(ToggleObject|Object|SelectedPads|Selected)");
+ at end format
 @end cartouche
 
-Changes the no paste flag of objects.
- at c ./../src/action.c 4611
+  N_("Changes the no paste flag of objects.");
+ at c ./../src/action.c 4618
 
 The "no paste flag" of a pad determines whether the solderpaste
  stencil will have an opening for the pad (no set) or if there wil be
@@ -485,11 +499,12 @@ The "no paste flag" of a pad determines whether the solderpaste
 @c key ChangePinName in hid 
 @cartouche
 @format
-ChangePinName(ElementName,PinNumber,PinName)@end format
+  N_("ChangePinName(ElementName,PinNumber,PinName)");
+ at end format
 @end cartouche
 
-Sets the name of a specific pin on a specific element.
- at c ./../src/action.c 3924
+  N_("Sets the name of a specific pin on a specific element.");
+ at c ./../src/action.c 3931
 
 This can be especially useful for annotating pin names from a
 schematic to the layout without requiring knowledge of the pcb file
@@ -505,15 +520,16 @@ ChangePinName(U3, 7, VCC)
 @c key ChangeSize in hid 
 @cartouche
 @format
-ChangeSize(Object, delta)
+  N_("ChangeSize(Object, delta)
 ChangeSize(SelectedObjects|Selected, delta)
 ChangeSize(SelectedLines|SelectedPins|SelectedVias, delta)
 ChangeSize(SelectedPads|SelectedTexts|SelectedNames, delta)
-ChangeSize(SelectedElements, delta)@end format
+ChangeSize(SelectedElements, delta)");
+ at end format
 @end cartouche
 
-Changes the size of objects.
- at c ./../src/action.c 3543
+ N_("Changes the size of objects.");
+ at c ./../src/action.c 3544
 
 For lines and arcs, this changes the width.  For pins and vias, this
 changes the overall diameter of the copper annulus.  For pads, this
@@ -527,13 +543,14 @@ of the silk layer lines and arcs for this element.
 @c key ChangeSquare in hid 
 @cartouche
 @format
-ChangeSquare(ToggleObject)
+  N_("ChangeSquare(ToggleObject)
 ChangeSquare(SelectedElements|SelectedPins)
-ChangeSquare(Selected|SelectedObjects)@end format
+ChangeSquare(Selected|SelectedObjects)");
+ at end format
 @end cartouche
 
-Changes the square flag of pins and pads.
- at c ./../src/action.c 4250
+  N_("Changes the square flag of pins and pads.");
+ at c ./../src/action.c 4257
 
 Note that @code{Pins} means both pins and pads.
 
@@ -545,12 +562,13 @@ Note that @code{Pins} means both pins and pads.
 @c key ClearOctagon in hid 
 @cartouche
 @format
-ClearOctagon(ToggleObject|Object|SelectedObjects|Selected)
-ClearOctagon(SelectedElements|SelectedPins|SelectedVias)@end format
+  N_("ClearOctagon(ToggleObject|Object|SelectedObjects|Selected)
+ClearOctagon(SelectedElements|SelectedPins|SelectedVias)");
+ at end format
 @end cartouche
 
-Clears the octagon-flag of pins and vias.
- at c ./../src/action.c 4515
+  N_("Clears the octagon-flag of pins and vias.");
+ at c ./../src/action.c 4522
 
 @pinshapes
 
@@ -560,11 +578,12 @@ Clears the octagon-flag of pins and vias.
 @c key ClearSquare in hid 
 @cartouche
 @format
-ClearSquare(ToggleObject|SelectedElements|SelectedPins)@end format
+  N_("ClearSquare(ToggleObject|SelectedElements|SelectedPins)");
+ at end format
 @end cartouche
 
-Clears the square-flag of pins and pads.
- at c ./../src/action.c 4352
+  N_("Clears the square-flag of pins and pads.");
+ at c ./../src/action.c 4359
 
 Note that @code{Pins} means pins and pads.
 
@@ -576,15 +595,16 @@ Note that @code{Pins} means pins and pads.
 @c key ClrFlag in hid 
 @cartouche
 @format
-ClrFlag(Object|Selected|SelectedObjects, flag)
+  N_("ClrFlag(Object|Selected|SelectedObjects, flag)
 ClrFlag(SelectedLines|SelectedPins|SelectedVias, flag)
 ClrFlag(SelectedPads|SelectedTexts|SelectedNames, flag)
 ClrFlag(SelectedElements, flag)
-flag = square | octagon | thermal | join at end format
+flag = square | octagon | thermal | join");
+ at end format
 @end cartouche
 
-Clears flags on objects.
- at c ./../src/action.c 5733
+ N_("Clears flags on objects.");
+ at c ./../src/action.c 5762
 
 Turns the given flag off, regardless of its previous setting.  See
 @code{ChangeFlag}.
@@ -599,11 +619,12 @@ ClrFlag(SelectedLines,join)
 @c key Connection in hid 
 @cartouche
 @format
-Connection(Find|ResetLinesAndPolygons|ResetPinsAndVias|Reset)@end format
+  N_("Connection(Find|ResetLinesAndPolygons|ResetPinsAndVias|Reset)");
+ at end format
 @end cartouche
 
-Searches connections of the object at the cursor position.
- at c ./../src/action.c 2093
+  N_("Searches connections of the object at the cursor position.");
+ at c ./../src/action.c 2089
 
 Connections found with this action will be highlighted in the
 ``connected-color'' color and will have the ``found'' flag set.
@@ -630,12 +651,13 @@ All ``found'' objects are marked ``not found''.
 @c key Delete in hid 
 @cartouche
 @format
-Delete(Object|Selected)
-Delete(AllRats|SelectedRats)@end format
+  N_("Delete(Object|Selected)
+Delete(AllRats|SelectedRats)");
+ at end format
 @end cartouche
 
-Delete stuff.
- at c ./../src/action.c 3371
+ N_("Delete stuff.");
+ at c ./../src/action.c 3372
 
 
 @node DeleteRats Action
@@ -643,11 +665,12 @@ Delete stuff.
 @c key DeleteRats in hid 
 @cartouche
 @format
-DeleteRats(AllRats|Selected|SelectedRats)@end format
+  N_("DeleteRats(AllRats|Selected|SelectedRats)");
+ at end format
 @end cartouche
 
-Delete rat lines.
- at c ./../src/action.c 3418
+ N_("Delete rat lines.");
+ at c ./../src/action.c 3419
 
 
 @node DisableVendor Action
@@ -655,11 +678,12 @@ Delete rat lines.
 @c key DisableVendor in hid 
 @cartouche
 @format
-DisableVendor()@end format
+ N_("DisableVendor()");
+ at end format
 @end cartouche
 
-Disables automatic drill size mapping.
- at c ./../src/vendor.c 161
+  N_("Disables automatic drill size mapping.");
+ at c ./../src/vendor.c 157
 
 @cindex vendor map 
 @cindex vendor drill table
@@ -675,11 +699,12 @@ specified in the currently loaded vendor drill table.
 @c key DisperseElements in hid 
 @cartouche
 @format
-DisperseElements(All|Selected)@end format
+  N_("DisperseElements(All|Selected)");
+ at end format
 @end cartouche
 
-Disperses elements.
- at c ./../src/action.c 2146
+ N_("Disperses elements.");
+ at c ./../src/action.c 2143
 
 Normally this is used when starting a board, by selecting all elements
 and then dispersing them.  This scatters the elements around the board
@@ -693,7 +718,7 @@ from.
 @c key Display in hid 
 @cartouche
 @format
-Display(NameOnPCB|Description|Value)
+  N_("Display(NameOnPCB|Description|Value)
 Display(Grid|Redraw)
 Display(CycleClip|CycleCrosshair|Toggle45Degree|ToggleStartDirection)
 Display(ToggleGrid|ToggleRubberBandMode|ToggleUniqueNames)
@@ -701,11 +726,12 @@ Display(ToggleMask|ToggleName|ToggleClearLine|ToggleFullPoly|ToggleSnapPin)
 Display(ToggleThindraw|ToggleThindrawPoly|ToggleOrthoMove|ToggleLocalRef)
 Display(ToggleCheckPlanes|ToggleShowDRC|ToggleAutoDRC)
 Display(ToggleLiveRoute|LockNames|OnlyNames)
-Display(Pinout|PinOrPadName)@end format
+Display(Pinout|PinOrPadName)");
+ at end format
 @end cartouche
 
-Several display-related actions.
- at c ./../src/action.c 2262
+ N_("Several display-related actions.");
+ at c ./../src/action.c 2259
 
 @table @code
 
@@ -831,13 +857,14 @@ are affected.
 @c key djopt in hid 
 @cartouche
 @format
-djopt(debumpify|unjaggy|simple|vianudge|viatrim|orthopull)
+djopt(debumpify|unjaggy|simple|vianudge|viatrim|orthopull|splitlines)
 djopt(auto) - all of the above
-djopt(miter)@end format
+djopt(miter)
+ at end format
 @end cartouche
 
 Perform various optimizations on the current board.
- at c ./../src/djopt.c 2853
+ at c ./../src/djopt.c 2849
 
 The different types of optimizations change your board in order to
 reduce the total trace length and via count.
@@ -891,11 +918,12 @@ RF losses and trace length.
 @c key DRC in hid 
 @cartouche
 @format
-DRC()@end format
+ N_("DRC()");
+ at end format
 @end cartouche
 
-Invoke the DRC check.
- at c ./../src/action.c 1755
+ N_("Invoke the DRC check.");
+ at c ./../src/action.c 1742
 
 Note that the design rule check uses the current board rule settings,
 not the current style settings.
@@ -906,11 +934,12 @@ not the current style settings.
 @c key DumpLibrary in hid 
 @cartouche
 @format
-DumpLibrary()@end format
+ N_("DumpLibrary()");
+ at end format
 @end cartouche
 
-Display the entire contents of the libraries.
- at c ./../src/action.c 1791
+  N_("Display the entire contents of the libraries.");
+ at c ./../src/action.c 1778
 
 
 
@@ -919,11 +948,12 @@ Display the entire contents of the libraries.
 @c key elementlist in hid 
 @cartouche
 @format
-ElementList(Start|Done|Need,<refdes>,<footprint>,<value>)@end format
+  N_("ElementList(Start|Done|Need,<refdes>,<footprint>,<value>)");
+ at end format
 @end cartouche
 
-Adds the given element if it doesn't already exist.
- at c ./../src/action.c 5983
+  N_("Adds the given element if it doesn't already exist.");
+ at c ./../src/action.c 6012
 
 @table @code
 
@@ -952,11 +982,12 @@ them.
 @c key elementsetattr in hid 
 @cartouche
 @format
-ElementSetAttr(refdes,name[,value])@end format
+  N_("ElementSetAttr(refdes,name[,value])");
+ at end format
 @end cartouche
 
-Sets or clears an element-specific attribute.
- at c ./../src/action.c 6176
+  N_("Sets or clears an element-specific attribute.");
+ at c ./../src/action.c 6205
 
 If a value is specified, the named attribute is added (if not already
 present) or changed (if it is) to the given value.  If the value is
@@ -968,11 +999,12 @@ not specified, the given attribute is removed if present.
 @c key EnableVendor in hid 
 @cartouche
 @format
-EnableVendor()@end format
+ N_("EnableVendor()");
+ at end format
 @end cartouche
 
-Enables automatic drill size mapping.
- at c ./../src/vendor.c 146
+  N_("Enables automatic drill size mapping.");
+ at c ./../src/vendor.c 142
 
 @cindex vendor map 
 @cindex vendor drill table
@@ -990,11 +1022,12 @@ loaded first.
 @c key execcommand in hid 
 @cartouche
 @format
-ExecCommand(command)@end format
+ N_("ExecCommand(command)");
+ at end format
 @end cartouche
 
-Runs a command.
- at c ./../src/action.c 6234
+ N_("Runs a command.");
+ at c ./../src/action.c 6263
 
 Runs the given command, which is a system executable.
 
@@ -1004,11 +1037,12 @@ Runs the given command, which is a system executable.
 @c key ExecuteFile in hid 
 @cartouche
 @format
-ExecuteFile(filename)@end format
+ N_("ExecuteFile(filename)");
+ at end format
 @end cartouche
 
-Run actions from the given file.
- at c ./../src/action.c 5861
+ N_("Run actions from the given file.");
+ at c ./../src/action.c 5890
 
 Lines starting with @code{#} are ignored.
 
@@ -1018,11 +1052,12 @@ Lines starting with @code{#} are ignored.
 @c key Flip in hid 
 @cartouche
 @format
-Flip(Object|Selected|SelectedElements)@end format
+ N_("Flip(Object|Selected|SelectedElements)");
+ at end format
 @end cartouche
 
-Flip an element to the opposite side of the board.
- at c ./../src/action.c 1841
+  N_("Flip an element to the opposite side of the board.");
+ at c ./../src/action.c 1828
 
 Note that the location of the element will be symmetric about the
 cursor location; i.e. if the part you are pointing at will still be at
@@ -1036,11 +1071,12 @@ other, not their absolute positions on the board.
 @c key FontEdit in hid 
 @cartouche
 @format
-FontEdit()@end format
+FontEdit()
+ at end format
 @end cartouche
 
 Convert the current font to a PCB for editing.
- at c ./../src/fontmode.c 73
+ at c ./../src/fontmode.c 69
 
 
 @node FontSave Action
@@ -1048,11 +1084,12 @@ Convert the current font to a PCB for editing.
 @c key FontSave in hid 
 @cartouche
 @format
-FontSave()@end format
+FontSave()
+ at end format
 @end cartouche
 
 Convert the current PCB back to a font.
- at c ./../src/fontmode.c 173
+ at c ./../src/fontmode.c 169
 
 
 @node FreeRotateBuffer Action
@@ -1060,14 +1097,15 @@ Convert the current PCB back to a font.
 @c key FreeRotateBuffer in hid 
 @cartouche
 @format
-FreeRotateBuffer([Angle])@end format
+  N_("FreeRotateBuffer([Angle])");
+ at end format
 @end cartouche
 
-Rotates the current paste buffer contents by the specified angle.  The
+  N_("Rotates the current paste buffer contents by the specified angle.  The
 angle is given in degrees.  If no angle is given, the user is prompted
 for one.
-
- at c ./../src/buffer.c 1370
+");
+ at c ./../src/buffer.c 1345
    
 Rotates the contents of the pastebuffer by an arbitrary angle.  If no
 angle is given, the user is prompted for one.
@@ -1078,11 +1116,12 @@ angle is given, the user is prompted for one.
 @c key GlobalPuller in hid 
 @cartouche
 @format
-GlobalPuller()@end format
+GlobalPuller()
+ at end format
 @end cartouche
 
 Pull all traces tight.
- at c ./../src/puller.c 534
+ at c ./../src/puller.c 530
 
 
 @node h Action
@@ -1090,11 +1129,12 @@ Pull all traces tight.
 @c key h in hid 
 @cartouche
 @format
-h at end format
+h
+ at end format
 @end cartouche
 
 Print a help message for commands.
- at c ./../src/command.c 72
+ at c ./../src/command.c 68
 
 @colonaction
 
@@ -1104,15 +1144,16 @@ Print a help message for commands.
 @c key Import in hid 
 @cartouche
 @format
-Import()
+  N_("Import()
 Import([gnetlist|make[,source,source,...]])
 Import(setnewpoint[,(mark|center|X,Y)])
 Import(setdisperse,D,units)
+");
 @end format
 @end cartouche
 
-Import schematics.
- at c ./../src/action.c 6464
+ N_("Import schematics.");
+ at c ./../src/action.c 6493
 
 Imports element and netlist data from the schematics (or some other
 source).  The first parameter, which is optional, is the mode.  If not
@@ -1225,11 +1266,12 @@ smallest board dimension.  Dispersion is saved in the
 @c key l in hid 
 @cartouche
 @format
-l [name]@end format
+l [name]
+ at end format
 @end cartouche
 
 Loads layout data.
- at c ./../src/command.c 99
+ at c ./../src/command.c 95
 
 Loads a new datafile (layout) and, if confirmed, overwrites any
 existing unsaved data.  The filename and the searchpath
@@ -1245,11 +1287,12 @@ will popup.
 @c key le in hid 
 @cartouche
 @format
-le [name]@end format
+le [name]
+ at end format
 @end cartouche
 
 Loads an element into the current buffer.
- at c ./../src/command.c 129
+ at c ./../src/command.c 125
 
 The filename and the searchpath (@emph{elementPath}) are passed to the
 command defined by @emph{elementCommand}.  If no filename is specified
@@ -1263,11 +1306,12 @@ a file select box will popup.
 @c key LoadFootprint in hid 
 @cartouche
 @format
-LoadFootprint(filename[,refdes,value])@end format
+  N_("LoadFootprint(filename[,refdes,value])");
+ at end format
 @end cartouche
 
-Loads a single footprint by name.
- at c ./../src/buffer.c 809
+  N_("Loads a single footprint by name.");
+ at c ./../src/buffer.c 782
 
 Loads a single footprint by name, rather than by reference or through
 the library.  If a refdes and value are specified, those are inserted
@@ -1279,11 +1323,12 @@ into the footprint as well.  The footprint remains in the paste buffer.
 @c key LoadFrom in hid 
 @cartouche
 @format
-LoadFrom(Layout|LayoutToBuffer|ElementToBuffer|Netlist|Revert,filename)@end format
+  N_("LoadFrom(Layout|LayoutToBuffer|ElementToBuffer|Netlist|Revert,filename)");
+ at end format
 @end cartouche
 
-Load layout data from a file.
- at c ./../src/action.c 5031
+ N_("Load layout data from a file.");
+ at c ./../src/action.c 5058
 
 This action assumes you know what the filename is.  The various GUIs
 should have a similar @code{Load} action where the filename is
@@ -1318,11 +1363,12 @@ you may have made.
 @c key LoadVendorFrom in hid 
 @cartouche
 @format
-LoadVendorFrom(filename)@end format
+ N_("LoadVendorFrom(filename)");
+ at end format
 @end cartouche
 
-Loads the specified vendor resource file.
- at c ./../src/vendor.c 201
+  N_("Loads the specified vendor resource file.");
+ at c ./../src/vendor.c 197
 
 @cindex vendor map 
 @cindex vendor drill table
@@ -1340,11 +1386,12 @@ be prompted to enter one.
 @c key m in hid 
 @cartouche
 @format
-m [name]@end format
+m [name]
+ at end format
 @end cartouche
 
 Loads a layout into the current buffer.
- at c ./../src/command.c 157
+ at c ./../src/command.c 153
 
 The filename and the searchpath (@emph{filePath}) are passed to the
 command defined by @emph{fileCommand}.
@@ -1358,12 +1405,13 @@ If no filename is specified a file select box will popup.
 @c key MarkCrosshair in hid 
 @cartouche
 @format
-MarkCrosshair()
-MarkCrosshair(Center)@end format
+  N_("MarkCrosshair()
+MarkCrosshair(Center)");
+ at end format
 @end cartouche
 
-Set/Reset the Crosshair mark.
- at c ./../src/action.c 3502
+ N_("Set/Reset the Crosshair mark.");
+ at c ./../src/action.c 3503
 
 The ``mark'' is a small X-shaped target on the display which is
 treated like a second origin (the normal origin is the upper let
@@ -1381,11 +1429,12 @@ cursor location.
 @c key Message in hid 
 @cartouche
 @format
-Message(message)@end format
+ N_("Message(message)");
+ at end format
 @end cartouche
 
-Writes a message to the log window.
- at c ./../src/action.c 1886
+ N_("Writes a message to the log window.");
+ at c ./../src/action.c 1873
 
 This action displays a message to the log window.  This action is primarily
 provided for use by other programs which may interface with PCB.  If
@@ -1398,12 +1447,13 @@ followed by a newline.
 @c key MinClearGap in hid 
 @cartouche
 @format
-MinClearGap(delta)
-MinClearGap(Selected, delta)@end format
+  N_("MinClearGap(delta)
+MinClearGap(Selected, delta)");
+ at end format
 @end cartouche
 
-Ensures that polygons are a minimum distance from objects.
- at c ./../src/action.c 3827
+  N_("Ensures that polygons are a minimum distance from objects.");
+ at c ./../src/action.c 3834
 
 Checks all specified objects, and increases the polygon clearance if
 needed to ensure a minimum distance between their edges and the
@@ -1415,12 +1465,13 @@ polygon edges.
 @c key MinMaskGap in hid 
 @cartouche
 @format
-MinMaskGap(delta)
-MinMaskGap(Selected, delta)@end format
+  N_("MinMaskGap(delta)
+MinMaskGap(Selected, delta)");
+ at end format
 @end cartouche
 
-Ensures the mask is a minimum distance from pins and pads.
- at c ./../src/action.c 3752
+  N_("Ensures the mask is a minimum distance from pins and pads.");
+ at c ./../src/action.c 3759
 
 Checks all specified pins and/or pads, and increases the mask if
 needed to ensure a minimum distance between the pin or pad edge and
@@ -1432,14 +1483,15 @@ the mask edge.
 @c key Mode in hid 
 @cartouche
 @format
-Mode(Arc|Arrow|Copy|InsertPoint|Line|Lock|Move|None|PasteBuffer)
+  N_("Mode(Arc|Arrow|Copy|InsertPoint|Line|Lock|Move|None|PasteBuffer)
 Mode(Polygon|Rectangle|Remove|Rotate|Text|Thermal|Via)
 Mode(Notify|Release|Cancel|Stroke)
-Mode(Save|Restore)@end format
+Mode(Save|Restore)");
+ at end format
 @end cartouche
 
-Change or use the tool mode.
- at c ./../src/action.c 2612
+ N_("Change or use the tool mode.");
+ at c ./../src/action.c 2613
 
 @table @code
 
@@ -1495,11 +1547,12 @@ Restores the tool to the last saved tool.
 @c key MorphPolygon in hid 
 @cartouche
 @format
-MorphPolygon(Object|Selected)@end format
+ N_("MorphPolygon(Object|Selected)");
+ at end format
 @end cartouche
 
-Converts dead polygon islands into separate polygons.
- at c ./../src/action.c 4087
+  N_("Converts dead polygon islands into separate polygons.");
+ at c ./../src/action.c 4094
 
 If a polygon is divided into unconnected "islands", you can use
 this command to convert the otherwise disappeared islands into
@@ -1513,11 +1566,12 @@ off are automatically deleted.
 @c key MoveLayer in hid 
 @cartouche
 @format
-MoveLayer(old,new)@end format
+MoveLayer(old,new)
+ at end format
 @end cartouche
 
 Moves/Creates/Deletes Layers.
- at c ./../src/move.c 1091
+ at c ./../src/move.c 1090
 
 Moves a layer, creates a new layer, or deletes a layer.
 
@@ -1563,11 +1617,12 @@ Creates a new layer.
 @c key MoveObject in hid 
 @cartouche
 @format
-MoveObject(X,Y,dim)@end format
+ N_("MoveObject(X,Y,dim)");
+ at end format
 @end cartouche
 
-Moves the object under the crosshair.
- at c ./../src/action.c 5567
+  N_("Moves the object under the crosshair.");
+ at c ./../src/action.c 5596
 
 The @code{X} and @code{Y} are treated like @code{delta} is for many
 other objects.  For each, if it's prefixed by @code{+} or @code{-},
@@ -1581,11 +1636,12 @@ units, currently 1/100 mil.
 @c key MoveToCurrentLayer in hid 
 @cartouche
 @format
-MoveToCurrentLayer(Object|SelectedObjects)@end format
+  N_("MoveToCurrentLayer(Object|SelectedObjects)");
+ at end format
 @end cartouche
 
-Moves objects to the current layer.
- at c ./../src/action.c 5609
+  N_("Moves objects to the current layer.");
+ at c ./../src/action.c 5638
 
 Note that moving an element from a component layer to a solder layer,
 or from solder to component, won't automatically flip it.  Use the
@@ -1599,11 +1655,12 @@ or from solder to component, won't automatically flip it.  Use the
 @format
 Net(find|select|rats|norats|clear[,net[,pin]])
 Net(freeze|thaw|forcethaw)
-Net(add,net,pin)@end format
+Net(add,net,pin)
+ at end format
 @end cartouche
 
 Perform various actions on netlists.
- at c ./../src/netlist.c 289
+ at c ./../src/netlist.c 285
 
 Each of these actions apply to a specified set of nets.  @var{net} and
 @var{pin} are patterns which match one or more nets or pins; these
@@ -1659,11 +1716,12 @@ updates the GUI.
 @c key New in hid 
 @cartouche
 @format
-New([name])@end format
+ N_("New([name])");
+ at end format
 @end cartouche
 
-Starts a new layout.
- at c ./../src/action.c 5093
+ N_("Starts a new layout.");
+ at c ./../src/action.c 5120
 
 If a name is not given, one is prompted for.
 
@@ -1673,11 +1731,12 @@ If a name is not given, one is prompted for.
 @c key OptAutoOnly in hid 
 @cartouche
 @format
-OptAutoOnly()@end format
+OptAutoOnly()
+ at end format
 @end cartouche
 
 Toggles the optimize-only-autorouted flag.
- at c ./../src/djopt.c 129
+ at c ./../src/djopt.c 125
 
 The original purpose of the trace optimizer was to clean up the traces
 created by the various autorouters that have been used with PCB.  When
@@ -1693,14 +1752,15 @@ optimize hand-routed traces also.
 @c key PasteBuffer in hid 
 @cartouche
 @format
-PasteBuffer(AddSelected|Clear|1..MAX_BUFFER)
+  N_("PasteBuffer(AddSelected|Clear|1..MAX_BUFFER)
 PasteBuffer(Rotate, 1..3)
 PasteBuffer(Convert|Save|Restore|Mirror)
-PasteBuffer(ToLayout, X, Y, units)@end format
+PasteBuffer(ToLayout, X, Y, units)");
+ at end format
 @end cartouche
 
-Various operations on the paste buffer.
- at c ./../src/action.c 5153
+  N_("Various operations on the paste buffer.");
+ at c ./../src/action.c 5181
 
 There are a number of paste buffers; the actual limit is a
 compile-time constant @code{MAX_BUFFER} in @file{globalconst.h}.  It
@@ -1755,11 +1815,12 @@ Selects the given buffer to be the current paste buffer.
 @c key Polygon in hid 
 @cartouche
 @format
-Polygon(Close|PreviousPoint)@end format
+ N_("Polygon(Close|PreviousPoint)");
+ at end format
 @end cartouche
 
-Some polygon related stuff.
- at c ./../src/action.c 5503
+ N_("Some polygon related stuff.");
+ at c ./../src/action.c 5532
 
 Polygons need a special action routine to make life easier.
 
@@ -1781,11 +1842,12 @@ will call Polygon(PreviousPoint) when appropriate to do so.
 @c key Puller in hid 
 @cartouche
 @format
-Puller()@end format
+Puller()
+ at end format
 @end cartouche
 
 Pull an arc-line junction tight.
- at c ./../src/puller.c 411
+ at c ./../src/puller.c 407
 
 The @code{Puller()} action is a special-purpose optimization.  When
 invoked while the crosshair is over the junction of an arc and a line,
@@ -1805,11 +1867,12 @@ arc-line intersection was moved to.
 @c key q in hid 
 @cartouche
 @format
-q at end format
+q
+ at end format
 @end cartouche
 
 Quits the application after confirming.
- at c ./../src/command.c 185
+ at c ./../src/command.c 181
 
 If you have unsaved changes, you will be prompted to confirm (or
 save) before quitting.
@@ -1822,11 +1885,12 @@ save) before quitting.
 @c key q! in hid 
 @cartouche
 @format
-q!@end format
+q!
+ at end format
 @end cartouche
 
 Quits the application without confirming.
- at c ./../src/command.c 199
+ at c ./../src/command.c 195
 
 Note that this command neither saves your data nor prompts for
 confirmation.
@@ -1839,11 +1903,12 @@ confirmation.
 @c key Quit in hid 
 @cartouche
 @format
-Quit()@end format
+ N_("Quit()");
+ at end format
 @end cartouche
 
-Quits the application after confirming.
- at c ./../src/action.c 2071
+ N_("Quits the application after confirming.");
+ at c ./../src/action.c 2067
 
 If you have unsaved changes, you will be prompted to confirm (or
 save) before quitting.
@@ -1854,11 +1919,12 @@ save) before quitting.
 @c key Redo in hid 
 @cartouche
 @format
-Redo()@end format
+ N_("Redo()");
+ at end format
 @end cartouche
 
-Redo recent``undo''operations.
- at c ./../src/action.c 5468
+ N_("Redo recent``undo''operations.");
+ at c ./../src/action.c 5497
 
 This routine allows you to recover from the last undo command.  You
 might want to do this if you thought that undo was going to revert
@@ -1877,11 +1943,12 @@ three "undone" lines.
 @c key RemoveSelected in hid 
 @cartouche
 @format
-RemoveSelected()@end format
+ N_("RemoveSelected()");
+ at end format
 @end cartouche
 
-Removes any selected objects.
- at c ./../src/action.c 2832
+ N_("Removes any selected objects.");
+ at c ./../src/action.c 2833
 
 
 @node Renumber Action
@@ -1889,13 +1956,14 @@ Removes any selected objects.
 @c key Renumber in hid 
 @cartouche
 @format
-Renumber()
-Renumber(filename)@end format
+ N_("Renumber()
+Renumber(filename)");
+ at end format
 @end cartouche
 
-Renumber all elements.  The changes will be recorded to filename
-for use in backannotating these changes to the schematic.
- at c ./../src/action.c 2848
+  N_("Renumber all elements.  The changes will be recorded to filename
+for use in backannotating these changes to the schematic.");
+ at c ./../src/action.c 2849
 
 
 @node Report Action
@@ -1903,11 +1971,12 @@ for use in backannotating these changes to the schematic.
 @c key Report in hid 
 @cartouche
 @format
-Report(Object|DrillReport|FoundPins|NetLength|AllNetLengths|[,name])@end format
+  N_("Report(Object|DrillReport|FoundPins|NetLength|AllNetLengths|[,name])");
+ at end format
 @end cartouche
 
-Produce various report.
- at c ./../src/report.c 942
+ N_("Produce various report.");
+ at c ./../src/report.c 943
 
 @table @code
 
@@ -1940,10 +2009,11 @@ units
 @c key ReportDialog in hid 
 @cartouche
 @format
-ReportDialog()@end format
+ N_("ReportDialog()");
+ at end format
 @end cartouche
 
-Report on the object under the crosshair
+  N_("Report on the object under the crosshair");
 @c ./../src/report.c 125
 
 This is a shortcut for @code{Report(Object)}.
@@ -1954,11 +2024,12 @@ This is a shortcut for @code{Report(Object)}.
 @c key RipUp in hid 
 @cartouche
 @format
-RipUp(All|Selected|Element)@end format
+ N_("RipUp(All|Selected|Element)");
+ at end format
 @end cartouche
 
-Ripup auto-routed tracks, or convert an element to parts.
- at c ./../src/action.c 3199
+  N_("Ripup auto-routed tracks, or convert an element to parts.");
+ at c ./../src/action.c 3200
 
 @table @code
 
@@ -1981,11 +2052,12 @@ that this uses the highest numbered paste buffer.
 @c key rn in hid 
 @cartouche
 @format
-rn [name]@end format
+rn [name]
+ at end format
 @end cartouche
 
 Reads netlist.
- at c ./../src/command.c 214
+ at c ./../src/command.c 210
 
 If no filename is given a file select box will pop up.  The file is
 read via the command defined by the @emph{RatCommand} resource. The
@@ -2003,11 +2075,12 @@ for verifying the board layout (which is also accomplished by the
 @c key RouteStyle in hid 
 @cartouche
 @format
-RouteStyle(1|2|3|4)@end format
+ N_("RouteStyle(1|2|3|4)");
+ at end format
 @end cartouche
 
-Copies the indicated routing style into the current sizes.
- at c ./../src/action.c 5535
+  N_("Copies the indicated routing style into the current sizes.");
+ at c ./../src/action.c 5564
 
 
 @node s Action
@@ -2015,11 +2088,12 @@ Copies the indicated routing style into the current sizes.
 @c key s in hid 
 @cartouche
 @format
-s [name]@end format
+s [name]
+ at end format
 @end cartouche
 
 Saves layout data.
- at c ./../src/command.c 244
+ at c ./../src/command.c 240
 
 Data and the filename are passed to the command defined by the
 resource @emph{saveCommand}. It must read the layout data from
@@ -2034,12 +2108,13 @@ again or, if it is not available, a file select box will pop up.
 @c key SaveSettings in hid 
 @cartouche
 @format
-SaveSettings()
-SaveSettings(local)@end format
+  N_("SaveSettings()
+SaveSettings(local)");
+ at end format
 @end cartouche
 
-Saves settings.
- at c ./../src/action.c 5015
+ N_("Saves settings.");
+ at c ./../src/action.c 5042
 
 If you pass no arguments, the settings are stored in
 @code{$HOME/.pcb/settings}.  If you pass the word @code{local} they're
@@ -2051,13 +2126,14 @@ saved in @code{./pcb.settings}.
 @c key SaveTo in hid 
 @cartouche
 @format
-SaveTo(Layout|LayoutAs,filename)
+  N_("SaveTo(Layout|LayoutAs,filename)
 SaveTo(AllConnections|AllUnusedPins|ElementConnections,filename)
-SaveTo(PasteBuffer,filename)@end format
+SaveTo(PasteBuffer,filename)");
+ at end format
 @end cartouche
 
-Saves data to a file.
- at c ./../src/action.c 4919
+ N_("Saves data to a file.");
+ at c ./../src/action.c 4946
 
 @table @code
 
@@ -2087,17 +2163,18 @@ Save the content of the active Buffer to a file. This is the graphical way to cr
 @c key Select in hid 
 @cartouche
 @format
-Select(Object|ToggleObject)
+  N_("Select(Object|ToggleObject)
 Select(All|Block|Connection)
 Select(ElementByName|ObjectByName|PadByName|PinByName)
 Select(ElementByName|ObjectByName|PadByName|PinByName, Name)
 Select(TextByName|ViaByName|NetByName)
 Select(TextByName|ViaByName|NetByName, Name)
-Select(Convert)@end format
+Select(Convert)");
+ at end format
 @end cartouche
 
-Toggles or sets the selection.
- at c ./../src/action.c 4651
+ N_("Toggles or sets the selection.");
+ at c ./../src/action.c 4658
 
 @table @code
 
@@ -2124,9 +2201,12 @@ Selects all objects in a rectangle indicated by the cursor.
 @item All
 Selects all objects on the board.
 
- at item Connection
+ at item Found
 Selects all connections with the ``found'' flag set.
 
+ at item Connection
+Selects all connections with the ``connected'' flag set.
+
 @item Convert
 Converts the selected objects to an element.  This uses the highest
 numbered paste buffer.
@@ -2139,15 +2219,16 @@ numbered paste buffer.
 @c key SetFlag in hid 
 @cartouche
 @format
-SetFlag(Object|Selected|SelectedObjects, flag)
+  N_("SetFlag(Object|Selected|SelectedObjects, flag)
 SetFlag(SelectedLines|SelectedPins|SelectedVias, flag)
 SetFlag(SelectedPads|SelectedTexts|SelectedNames, flag)
 SetFlag(SelectedElements, flag)
-flag = square | octagon | thermal | join at end format
+flag = square | octagon | thermal | join");
+ at end format
 @end cartouche
 
-Sets flags on objects.
- at c ./../src/action.c 5716
+ N_("Sets flags on objects.");
+ at c ./../src/action.c 5745
 
 Turns the given flag on, regardless of its previous setting.  See
 @code{ChangeFlag}.
@@ -2162,11 +2243,12 @@ SetFlag(SelectedPins,thermal)
 @c key SetOctagon in hid 
 @cartouche
 @format
-SetOctagon(Object|ToggleObject|SelectedElements|Selected)@end format
+  N_("SetOctagon(Object|ToggleObject|SelectedElements|Selected)");
+ at end format
 @end cartouche
 
-Sets the octagon-flag of objects.
- at c ./../src/action.c 4459
+ N_("Sets the octagon-flag of objects.");
+ at c ./../src/action.c 4466
 
 @pinshapes
 
@@ -2176,11 +2258,12 @@ Sets the octagon-flag of objects.
 @c key SetSame in hid 
 @cartouche
 @format
-SetSame()@end format
+ N_("SetSame()");
+ at end format
 @end cartouche
 
-Sets current layer and sizes to match indicated item.
- at c ./../src/action.c 5648
+  N_("Sets current layer and sizes to match indicated item.");
+ at c ./../src/action.c 5677
 
 When invoked over any line, arc, polygon, or via, this changes the
 current layer to be the layer that item is on, and changes the current
@@ -2192,11 +2275,12 @@ sizes (thickness, keepaway, drill, etc) according to that item.
 @c key SetSquare in hid 
 @cartouche
 @format
-SetSquare(ToggleObject|SelectedElements|SelectedPins)@end format
+  N_("SetSquare(ToggleObject|SelectedElements|SelectedPins)");
+ at end format
 @end cartouche
 
-sets the square-flag of objects.
- at c ./../src/action.c 4301
+ N_("sets the square-flag of objects.");
+ at c ./../src/action.c 4308
 
 Note that @code{Pins} means pins and pads.
 
@@ -2208,17 +2292,18 @@ Note that @code{Pins} means pins and pads.
 @c key SetThermal in hid 
 @cartouche
 @format
-SetThermal(Object|SelectedPins|SelectedVias|Selected, Style)@end format
+SetThermal(Object|SelectedPins|SelectedVias|Selected, Style)
+ at end format
 @end cartouche
 
-Set the thermal (on the current layer) of pins or vias to the given style.
+  N_("Set the thermal (on the current layer) of pins or vias to the given style.
 Style = 0 means no thermal.
 Style = 1 has diagonal fingers with sharp edges.
 Style = 2 has horizontal and vertical fingers with sharp edges.
 Style = 3 is a solid connection to the plane.Style = 4 has diagonal fingers with rounded edges.
 Style = 5 has horizontal and vertical fingers with rounded edges.
-
- at c ./../src/action.c 1912
+");
+ at c ./../src/action.c 1899
 
 This changes how/whether pins or vias connect to any rectangle or polygon
 on the current layer. The first argument can specify one object, or all
@@ -2240,11 +2325,12 @@ to connect with. However, they will have no effect without the polygon.
 @c key SetValue in hid 
 @cartouche
 @format
-SetValue(Grid|Line|LineSize|Text|TextScale|ViaDrillingHole|Via|ViaSize, delta)@end format
+  N_("SetValue(Grid|Line|LineSize|Text|TextScale|ViaDrillingHole|Via|ViaSize, delta)");
+ at end format
 @end cartouche
 
-Change various board-wide values and sizes.
- at c ./../src/action.c 1996
+  N_("Change various board-wide values and sizes.");
+ at c ./../src/action.c 1983
 
 @table @code
 
@@ -2274,11 +2360,12 @@ Changes the size of new text.
 @c key ToggleHideName in hid 
 @cartouche
 @format
-ToggleHideName(Object|SelectedElements)@end format
+  N_("ToggleHideName(Object|SelectedElements)");
+ at end format
 @end cartouche
 
-Toggles the visibility of element names.
- at c ./../src/action.c 4134
+  N_("Toggles the visibility of element names.");
+ at c ./../src/action.c 4141
 
 If names are hidden you won't see them on the screen and they will not
 appear on the silk layer when you print the layout.
@@ -2289,11 +2376,12 @@ appear on the silk layer when you print the layout.
 @c key ToggleVendor in hid 
 @cartouche
 @format
-ToggleVendor()@end format
+ N_("ToggleVendor()");
+ at end format
 @end cartouche
 
-Toggles the state of automatic drill size mapping.
- at c ./../src/vendor.c 128
+  N_("Toggles the state of automatic drill size mapping.");
+ at c ./../src/vendor.c 124
 
 @cindex vendor map 
 @cindex vendor drill table
@@ -2311,12 +2399,13 @@ loaded first.
 @c key Undo in hid 
 @cartouche
 @format
-Undo()
-Undo(ClearList)@end format
+ N_("Undo()
+Undo(ClearList)");
+ at end format
 @end cartouche
 
-Undo recent changes.
- at c ./../src/action.c 5304
+ N_("Undo recent changes.");
+ at c ./../src/action.c 5332
 
 The unlimited undo feature of @code{Pcb} allows you to recover from
 most operations that materially affect you work.  Calling
@@ -2335,11 +2424,12 @@ same serial number will be undone (or redone) as a group.  See
 @c key UnloadVendor in hid 
 @cartouche
 @format
-UnloadVendor()@end format
+ N_("UnloadVendor()");
+ at end format
 @end cartouche
 
-Unloads the current vendor drill mapping table.
- at c ./../src/vendor.c 176
+  N_("Unloads the current vendor drill mapping table.");
+ at c ./../src/vendor.c 172
 
 @cindex vendor map 
 @cindex vendor drill table
@@ -2351,16 +2441,17 @@ Unloads the current vendor drill mapping table.
 @c key Unselect in hid 
 @cartouche
 @format
-Unselect(All|Block|Connection)
+  N_("Unselect(All|Block|Connection)
 Unselect(ElementByName|ObjectByName|PadByName|PinByName)
 Unselect(ElementByName|ObjectByName|PadByName|PinByName, Name)
 Unselect(TextByName|ViaByName)
 Unselect(TextByName|ViaByName, Name)
+");
 @end format
 @end cartouche
 
-Unselects the object at the pointer location or the specified objects.
- at c ./../src/action.c 4803
+  N_("Unselects the object at the pointer location or the specified objects.");
+ at c ./../src/action.c 4820
 
 @table @code
 
@@ -2394,11 +2485,12 @@ type specified are unselected.
 @c key w in hid 
 @cartouche
 @format
-w [name]@end format
+w [name]
+ at end format
 @end cartouche
 
 Saves layout data.
- at c ./../src/command.c 250
+ at c ./../src/command.c 246
 
 This commands has been added for the convenience of @code{vi} users
 and has the same functionality as @code{s}.
@@ -2411,11 +2503,12 @@ and has the same functionality as @code{s}.
 @c key wq in hid 
 @cartouche
 @format
-wq at end format
+wq
+ at end format
 @end cartouche
 
 Saves the layout data and quits.
- at c ./../src/command.c 291
+ at c ./../src/command.c 287
 
 This command has been added for the convenience of @code{vi} users and
 has the same functionality as @code{s} combined with @code{q}.
@@ -2425,7 +2518,7 @@ has the same functionality as @code{s} combined with @code{q}.
 
 @node common actions
 @section common actions
- at c ./../src/hid/common/actions.c 425
+ at c ./../src/hid/common/actions.c 421
 
 @macro hidaction
 
@@ -2449,11 +2542,12 @@ these directly.
 @c key LayersChanged in hid common
 @cartouche
 @format
-LayersChanged()@end format
+LayersChanged()
+ at end format
 @end cartouche
 
 Tells the GUI that the layers have changed.
- at c ./../src/hid/common/actions.c 446
+ at c ./../src/hid/common/actions.c 442
 
 This includes layer names, colors, stacking order, visibility, etc.
 
@@ -2465,11 +2559,12 @@ This includes layer names, colors, stacking order, visibility, etc.
 @c key LibraryChanged in hid common
 @cartouche
 @format
-LibraryChanged()@end format
+LibraryChanged()
+ at end format
 @end cartouche
 
 Tells the GUI that the libraries have changed.
- at c ./../src/hid/common/actions.c 451
+ at c ./../src/hid/common/actions.c 447
 
 @hidaction
 
@@ -2479,11 +2574,12 @@ Tells the GUI that the libraries have changed.
 @c key NetlistChanged in hid common
 @cartouche
 @format
-NetlistChanged()@end format
+NetlistChanged()
+ at end format
 @end cartouche
 
 Tells the GUI that the netlist has changed.
- at c ./../src/hid/common/actions.c 441
+ at c ./../src/hid/common/actions.c 437
 
 @hidaction
 
@@ -2493,11 +2589,12 @@ Tells the GUI that the netlist has changed.
 @c key PCBChanged in hid common
 @cartouche
 @format
-PCBChanged([revert])@end format
+PCBChanged([revert])
+ at end format
 @end cartouche
 
 Tells the GUI that the whole PCB has changed. The optional``revert"parameter can be used as a hint to the GUI that the same design is beingreloaded, and that it might keep some viewport settings
- at c ./../src/hid/common/actions.c 431
+ at c ./../src/hid/common/actions.c 427
 
 @hidaction
 
@@ -2507,11 +2604,12 @@ Tells the GUI that the whole PCB has changed. The optional``revert"parameter can
 @c key RouteStylesChanged in hid common
 @cartouche
 @format
-RouteStylesChanged()@end format
+RouteStylesChanged()
+ at end format
 @end cartouche
 
 Tells the GUI that the routing styles have changed.
- at c ./../src/hid/common/actions.c 436
+ at c ./../src/hid/common/actions.c 432
 
 @hidaction
 
@@ -2520,11 +2618,11 @@ Tells the GUI that the routing styles have changed.
 @section gtk actions
 @menu
 * gtk About Action:: N_("Tell the user about this version of PCB.");
-* gtk AdjustStyle Action:: Open the window which allows editing of the route styles.
+* gtk AdjustStyle Action::     N_("Open the window which allows editing of the route styles.");
 * gtk Center Action:: N_("Moves the pointer to the center of the window.");
 * gtk Cursor Action:: N_("Move the cursor.");
 * gtk DoWindows Action:: N_("Open various GUI windows.");
-* gtk EditLayerGroups Action:: Open the preferences window which allows editing of the layer groups.
+* gtk EditLayerGroups Action::     N_("Open the preferences window which allows editing of the layer groups.");
 * gtk GetXY Action:: N_("Get a coordinate.");
 * gtk ImportGUI Action:: N_("Asks user which schematics to import into PCB.
 ");
@@ -2537,10 +2635,10 @@ must be specified as the optional second argument.");
 * gtk Print Action:: N_("Print the layout.");
 * gtk PrintCalibrate Action:: N_("Calibrate the printer.");
 * gtk Save Action:: N_("Save layout and/or element data to a user-selected file.");
-* gtk SelectLayer Action:: Select which layer is the current layer.
+* gtk SelectLayer Action::     N_("Select which layer is the current layer.");
 * gtk SetUnits Action:: N_("Set the default measurement units.");
 * gtk SwapSides Action:: N_("Swaps the side of the board you're looking at.");
-* gtk ToggleView Action:: Toggle the visibility of the specified layer or layer group.
+* gtk ToggleView Action::     N_("Toggle the visibility of the specified layer or layer group.");
 * gtk Zoom Action:: N_("Various zoom factor changes.");
 @end menu
 @node gtk About Action
@@ -2548,11 +2646,12 @@ must be specified as the optional second argument.");
 @c key gtk About in hid gtk
 @cartouche
 @format
-About()@end format
+About()
+ at end format
 @end cartouche
 
 N_("Tell the user about this version of PCB.");
- at c ./../src/hid/gtk/gtkhid-main.c 1059
+ at c ./../src/hid/gtk/gtkhid-main.c 1051
 
 This just pops up a dialog telling the user which version of
 @code{pcb} they're running.
@@ -2563,12 +2662,13 @@ This just pops up a dialog telling the user which version of
 @c key gtk AdjustStyle in hid gtk
 @cartouche
 @format
-AdjustStyle()
+    N_("AdjustStyle()
+");
 @end format
 @end cartouche
 
-Open the window which allows editing of the route styles.
- at c ./../src/hid/gtk/gui-top-window.c 2081
+    N_("Open the window which allows editing of the route styles.");
+ at c ./../src/hid/gtk/gui-top-window.c 2143
 
 Opens the window which allows editing of the route styles.
 
@@ -2579,11 +2679,12 @@ Opens the window which allows editing of the route styles.
 @cartouche
 @format
 Center()
+
 @end format
 @end cartouche
 
 N_("Moves the pointer to the center of the window.");
- at c ./../src/hid/gtk/gtkhid-main.c 1470
+ at c ./../src/hid/gtk/gtkhid-main.c 1462
 
 Move the pointer to the center of the window, but only if it's
 currently within the window already.
@@ -2594,11 +2695,12 @@ currently within the window already.
 @c key gtk Cursor in hid gtk
 @cartouche
 @format
-Cursor(Type,DeltaUp,DeltaRight,Units)@end format
+Cursor(Type,DeltaUp,DeltaRight,Units)
+ at end format
 @end cartouche
 
 N_("Move the cursor.");
- at c ./../src/hid/gtk/gtkhid-main.c 1515
+ at c ./../src/hid/gtk/gtkhid-main.c 1507
 
 This action moves the mouse cursor.  Unlike other actions which take
 coordinates, this action's coordinates are always relative to the
@@ -2638,11 +2740,12 @@ The values are percentages of the board size.  Thus, a move of
 @cartouche
 @format
 DoWindows(1|2|3|4|5|6)
-DoWindows(Layout|Library|Log|Netlist|Preferences|DRC)@end format
+DoWindows(Layout|Library|Log|Netlist|Preferences|DRC)
+ at end format
 @end cartouche
 
 N_("Open various GUI windows.");
- at c ./../src/hid/gtk/gtkhid-main.c 1563
+ at c ./../src/hid/gtk/gtkhid-main.c 1555
 
 @table @code
 
@@ -2679,12 +2782,13 @@ Open the DRC violations window.
 @c key gtk EditLayerGroups in hid gtk
 @cartouche
 @format
-EditLayerGroups()
+    N_("EditLayerGroups()
+");
 @end format
 @end cartouche
 
-Open the preferences window which allows editing of the layer groups.
- at c ./../src/hid/gtk/gui-top-window.c 2100
+    N_("Open the preferences window which allows editing of the layer groups.");
+ at c ./../src/hid/gtk/gui-top-window.c 2162
 
 Opens the preferences window which is where the layer groups
 are edited.  This action is primarily provides to provide menu
@@ -2696,11 +2800,12 @@ resource compatibility with the lesstif HID.
 @c key gtk GetXY in hid gtk
 @cartouche
 @format
-GetXY()@end format
+GetXY()
+ at end format
 @end cartouche
 
 N_("Get a coordinate.");
- at c ./../src/hid/gtk/gtkhid-main.c 1074
+ at c ./../src/hid/gtk/gtkhid-main.c 1066
 
 Prompts the user for a coordinate, if one is not already selected.
 
@@ -2710,12 +2815,13 @@ Prompts the user for a coordinate, if one is not already selected.
 @c key gtk ImportGUI in hid gtk
 @cartouche
 @format
-ImportGUI()@end format
+ImportGUI()
+ at end format
 @end cartouche
 
 N_("Asks user which schematics to import into PCB.
 ");
- at c ./../src/hid/gtk/gtkhid-main.c 1750
+ at c ./../src/hid/gtk/gtkhid-main.c 1742
 
 Asks user which schematics to import into PCB.
 
@@ -2725,13 +2831,14 @@ Asks user which schematics to import into PCB.
 @c key gtk Pan in hid gtk
 @cartouche
 @format
-Pan([thumb], Mode)@end format
+Pan([thumb], Mode)
+ at end format
 @end cartouche
 
 N_("Start or stop panning (Mode = 1 to start, 0 to stop)
 Optional thumb argument is ignored for now in gtk hid.
 ");
- at c ./../src/hid/gtk/gtkhid-main.c 1687
+ at c ./../src/hid/gtk/gtkhid-main.c 1679
 
 Start or stop panning.  To start call with Mode = 1, to stop call with
 Mode = 0.
@@ -2742,17 +2849,19 @@ Mode = 0.
 @c key gtk Popup in hid gtk
 @cartouche
 @format
-Popup(MenuName, [Button])@end format
+Popup(MenuName, [Button])
+ at end format
 @end cartouche
 
 N_("Bring up the popup menu specified by @code{MenuName}.
 If called by a mouse event then the mouse button number
 must be specified as the optional second argument.");
- at c ./../src/hid/gtk/gtkhid-main.c 1719
+ at c ./../src/hid/gtk/gtkhid-main.c 1711
 
 This just pops up the specified menu.  The menu must have been defined
 as a named subresource of the Popups resource in the menu resource
-file.
+file. The second, optional (and ignored) argument represents the mouse
+button number which is triggering the popup.
 
 
 @node gtk Print Action
@@ -2760,11 +2869,12 @@ file.
 @c key gtk Print in hid gtk
 @cartouche
 @format
-Print()@end format
+Print()
+ at end format
 @end cartouche
 
 N_("Print the layout.");
- at c ./../src/hid/gtk/gtkhid-main.c 1350
+ at c ./../src/hid/gtk/gtkhid-main.c 1342
 
 This will find the default printing HID, prompt the user for its
 options, and print the layout.
@@ -2775,11 +2885,12 @@ options, and print the layout.
 @c key gtk PrintCalibrate in hid gtk
 @cartouche
 @format
-PrintCalibrate()@end format
+PrintCalibrate()
+ at end format
 @end cartouche
 
 N_("Calibrate the printer.");
- at c ./../src/hid/gtk/gtkhid-main.c 1401
+ at c ./../src/hid/gtk/gtkhid-main.c 1393
 
 This will print a calibration page, which you would measure and type
 the measurements in, so that future printouts will be more precise.
@@ -2793,11 +2904,12 @@ the measurements in, so that future printouts will be more precise.
 Save()
 Save(Layout|LayoutAs)
 Save(AllConnections|AllUnusedPins|ElementConnections)
-Save(PasteBuffer)@end format
+Save(PasteBuffer)
+ at end format
 @end cartouche
 
 N_("Save layout and/or element data to a user-selected file.");
- at c ./../src/hid/gtk/gtkhid-main.c 1230
+ at c ./../src/hid/gtk/gtkhid-main.c 1222
 
 This action is a GUI front-end to the core's @code{SaveTo} action
 (@pxref{SaveTo Action}).  If you happen to pass a filename, like
@@ -2811,11 +2923,12 @@ called with that filename.
 @c key gtk SelectLayer in hid gtk
 @cartouche
 @format
-SelectLayer(1..MAXLAYER|Silk|Rats)@end format
+    N_("SelectLayer(1..MAXLAYER|Silk|Rats)");
+ at end format
 @end cartouche
 
-Select which layer is the current layer.
- at c ./../src/hid/gtk/gui-top-window.c 1851
+    N_("Select which layer is the current layer.");
+ at c ./../src/hid/gtk/gui-top-window.c 1908
 
 The specified layer becomes the currently active layer.  It is made
 visible if it is not already visible
@@ -2826,11 +2939,12 @@ visible if it is not already visible
 @c key gtk SetUnits in hid gtk
 @cartouche
 @format
-SetUnits(mm|mil)@end format
+SetUnits(mm|mil)
+ at end format
 @end cartouche
 
 N_("Set the default measurement units.");
- at c ./../src/hid/gtk/gtkhid-main.c 1606
+ at c ./../src/hid/gtk/gtkhid-main.c 1598
 
 @table @code
 
@@ -2848,11 +2962,12 @@ Sets the display units to millimeters.
 @c key gtk SwapSides in hid gtk
 @cartouche
 @format
-SwapSides(|v|h|r)@end format
+SwapSides(|v|h|r)
+ at end format
 @end cartouche
 
 N_("Swaps the side of the board you're looking at.");
- at c ./../src/hid/gtk/gtkhid-main.c 1295
+ at c ./../src/hid/gtk/gtkhid-main.c 1287
 
 This action changes the way you view the board.
 
@@ -2889,13 +3004,14 @@ side'' of the board.
 @c key gtk ToggleView in hid gtk
 @cartouche
 @format
-ToggleView(1..MAXLAYER)
+    N_("ToggleView(1..MAXLAYER)
 ToggleView(layername)
-ToggleView(Silk|Rats|Pins|Vias|Mask|BackSide)@end format
+ToggleView(Silk|Rats|Pins|Vias|Mask|BackSide)");
+ at end format
 @end cartouche
 
-Toggle the visibility of the specified layer or layer group.
- at c ./../src/hid/gtk/gui-top-window.c 1792
+    N_("Toggle the visibility of the specified layer or layer group.");
+ at c ./../src/hid/gtk/gui-top-window.c 1849
 
 If you pass an integer, that layer is specified by index (the first
 layer is @code{1}, etc).  If you pass a layer name, that layer is
@@ -2913,11 +3029,12 @@ the same as a special layer, the layer is chosen over the special layer.
 @cartouche
 @format
 Zoom()
-Zoom(factor)@end format
+Zoom(factor)
+ at end format
 @end cartouche
 
 N_("Various zoom factor changes.");
- at c ./../src/hid/gtk/gtkhid-main.c 161
+ at c ./../src/hid/gtk/gtkhid-main.c 155
 Changes the zoom (magnification) of the view of the board.  If no
 arguments are passed, the view is scaled such that the board just fits
 inside the visible window (i.e. ``view all'').  Otherwise,
@@ -2991,11 +3108,12 @@ Note that zoom factors of zero are silently ignored.
 @c key lesstif About in hid lesstif
 @cartouche
 @format
-About()@end format
+About()
+ at end format
 @end cartouche
 
 Tell the user about this version of PCB.
- at c ./../src/hid/lesstif/dialogs.c 867
+ at c ./../src/hid/lesstif/dialogs.c 863
 
 This just pops up a dialog telling the user which version of
 @code{pcb} they're running.
@@ -3006,11 +3124,12 @@ This just pops up a dialog telling the user which version of
 @c key lesstif AdjustSizes in hid lesstif
 @cartouche
 @format
-AdjustSizes()@end format
+AdjustSizes()
+ at end format
 @end cartouche
 
 Let the user change the board size, DRC parameters, etc
- at c ./../src/hid/lesstif/dialogs.c 1136
+ at c ./../src/hid/lesstif/dialogs.c 1132
 
 Displays a dialog box that lets the user change the board
 size, DRC parameters, and text scale.
@@ -3023,11 +3142,12 @@ The units are determined by the default display units.
 @c key lesstif AdjustStyle in hid lesstif
 @cartouche
 @format
-AdjustStyle()@end format
+AdjustStyle()
+ at end format
 @end cartouche
 
 Displays the route style adjustment window.
- at c ./../src/hid/lesstif/styles.c 344
+ at c ./../src/hid/lesstif/styles.c 340
 
 
 @node lesstif Benchmark Action
@@ -3035,11 +3155,12 @@ Displays the route style adjustment window.
 @c key lesstif Benchmark in hid lesstif
 @cartouche
 @format
-Benchmark()@end format
+Benchmark()
+ at end format
 @end cartouche
 
 Benchmark the GUI speed.
- at c ./../src/hid/lesstif/main.c 659
+ at c ./../src/hid/lesstif/main.c 656
 
 This action is used to speed-test the Lesstif graphics subsystem.  It
 redraws the current screen as many times as possible in ten seconds.
@@ -3051,16 +3172,17 @@ It reports the amount of time needed to draw the screen once.
 @c key lesstif Command in hid lesstif
 @cartouche
 @format
-Command()@end format
+Command()
+ at end format
 @end cartouche
 
 Displays the command line input window.
- at c ./../src/hid/lesstif/main.c 644
+ at c ./../src/hid/lesstif/main.c 641
 
 The command window allows the user to manually enter actions to be
 executed.  Action syntax can be done one of two ways:
 
- at table @code
+ at itemize @bullet
 
 @item
 Follow the action name by an open parenthesis, arguments separated by
@@ -3070,7 +3192,7 @@ commas, end with a close parenthesis.  Example: @code{Abc(1,2,3)}
 Separate the action name and arguments by spaces.  Example: @code{Abc
 1 2 3}.
 
- at end table
+ at end itemize
 
 The first option allows you to have arguments with spaces in them,
 but the second is more ``natural'' to type for most people.
@@ -3095,11 +3217,12 @@ before.
 @c key lesstif Cursor in hid lesstif
 @cartouche
 @format
-Cursor(Type,DeltaUp,DeltaRight,Units)@end format
+Cursor(Type,DeltaUp,DeltaRight,Units)
+ at end format
 @end cartouche
 
 Move the cursor.
- at c ./../src/hid/lesstif/main.c 716
+ at c ./../src/hid/lesstif/main.c 713
 
 This action moves the mouse cursor.  Unlike other actions which take
 coordinates, this action's coordinates are always relative to the
@@ -3138,11 +3261,12 @@ The values are percentages of the board size.  Thus, a move of
 @c key lesstif Debug in hid lesstif
 @cartouche
 @format
-Debug(...)@end format
+Debug(...)
+ at end format
 @end cartouche
 
 Debug action.
- at c ./../src/hid/lesstif/menu.c 66
+ at c ./../src/hid/lesstif/menu.c 62
 
 This action exists to help debug scripts; it simply prints all its
 arguments to stdout.
@@ -3153,11 +3277,12 @@ arguments to stdout.
 @c key lesstif DebugXY in hid lesstif
 @cartouche
 @format
-DebugXY(...)@end format
+DebugXY(...)
+ at end format
 @end cartouche
 
 Debug action, with coordinates
- at c ./../src/hid/lesstif/menu.c 72
+ at c ./../src/hid/lesstif/menu.c 68
 
 Like @code{Debug}, but requires a coordinate.  If the user hasn't yet
 indicated a location on the board, the user will be prompted to click
@@ -3170,11 +3295,12 @@ on one.
 @cartouche
 @format
 DoWindows(1|2|3|4)
-DoWindows(Layout|Library|Log|Netlist)@end format
+DoWindows(Layout|Library|Log|Netlist)
+ at end format
 @end cartouche
 
 Open various GUI windows.
- at c ./../src/hid/lesstif/dialogs.c 831
+ at c ./../src/hid/lesstif/dialogs.c 827
 
 @table @code
 
@@ -3203,11 +3329,12 @@ Open the netlist window.
 @c key lesstif DumpKeys in hid lesstif
 @cartouche
 @format
-DumpKeys()@end format
+DumpKeys()
+ at end format
 @end cartouche
 
 Dump Lesstif key bindings.
- at c ./../src/hid/lesstif/menu.c 101
+ at c ./../src/hid/lesstif/menu.c 97
 
 Causes the list of key bindings (from @code{pcb-menu.res}) to be
 dumped to stdout.  This is most useful when invoked from the command
@@ -3223,11 +3350,12 @@ pcb --action-string DumpKeys
 @c key lesstif EditLayerGroups in hid lesstif
 @cartouche
 @format
-EditLayerGroups()@end format
+EditLayerGroups()
+ at end format
 @end cartouche
 
 Let the user change the layer groupings
- at c ./../src/hid/lesstif/dialogs.c 1448
+ at c ./../src/hid/lesstif/dialogs.c 1444
 
 Displays a dialog that lets the user view and change the layer
 groupings.  Each layer (row) can be a member of any one layer group
@@ -3243,11 +3371,12 @@ See @ref{ChangeName Action}.
 @c key lesstif Export in hid lesstif
 @cartouche
 @format
-Export()@end format
+Export()
+ at end format
 @end cartouche
 
 Export the layout.
- at c ./../src/hid/lesstif/dialogs.c 957
+ at c ./../src/hid/lesstif/dialogs.c 953
 
 Prompts the user for an exporter to use.  Then, prompts the user for
 that exporter's options, and exports the layout.
@@ -3258,11 +3387,12 @@ that exporter's options, and exports the layout.
 @c key lesstif GetXY in hid lesstif
 @cartouche
 @format
-GetXY()@end format
+GetXY()
+ at end format
 @end cartouche
 
 Get a coordinate.
- at c ./../src/hid/lesstif/menu.c 54
+ at c ./../src/hid/lesstif/menu.c 50
 
 Prompts the user for a coordinate, if one is not already selected.
 
@@ -3272,11 +3402,12 @@ Prompts the user for a coordinate, if one is not already selected.
 @c key lesstif ImportGUI in hid lesstif
 @cartouche
 @format
-ImportGUI()@end format
+ImportGUI()
+ at end format
 @end cartouche
 
 Lets the user choose the schematics to import from
- at c ./../src/hid/lesstif/dialogs.c 1882
+ at c ./../src/hid/lesstif/dialogs.c 1878
 
 Displays a dialog that lets the user select the schematic(s) to import
 from, then saves that information in the layout's attributes for
@@ -3288,11 +3419,12 @@ future imports.
 @c key lesstif LibraryShow in hid lesstif
 @cartouche
 @format
-LibraryShow()@end format
+LibraryShow()
+ at end format
 @end cartouche
 
 Displays the library window.
- at c ./../src/hid/lesstif/library.c 151
+ at c ./../src/hid/lesstif/library.c 147
 
 
 @node lesstif Load Action
@@ -3301,11 +3433,12 @@ Displays the library window.
 @cartouche
 @format
 Load()
-Load(Layout|LayoutToBuffer|ElementToBuffer|Netlist|Revert)@end format
+Load(Layout|LayoutToBuffer|ElementToBuffer|Netlist|Revert)
+ at end format
 @end cartouche
 
 Load layout data from a user-selected file.
- at c ./../src/hid/lesstif/dialogs.c 99
+ at c ./../src/hid/lesstif/dialogs.c 95
 
 This action is a GUI front-end to the core's @code{LoadFrom} action
 (@pxref{LoadFrom Action}).  If you happen to pass a filename, like
@@ -3319,11 +3452,12 @@ called with that filename.
 @c key lesstif LoadVendor in hid lesstif
 @cartouche
 @format
-LoadVendor()@end format
+LoadVendor()
+ at end format
 @end cartouche
 
 Loads a user-selected vendor resource file.
- at c ./../src/hid/lesstif/dialogs.c 152
+ at c ./../src/hid/lesstif/dialogs.c 148
 
 The user is prompted for a file to load, and then
 @code{LoadVendorFrom} is called (@pxref{LoadVendorFrom Action}) to
@@ -3335,11 +3469,12 @@ load that vendor file.
 @c key lesstif NetlistShow in hid lesstif
 @cartouche
 @format
-NetlistShow(pinname|netname)@end format
+NetlistShow(pinname|netname)
+ at end format
 @end cartouche
 
 Selects the given pinname or netname in the netlist window.
- at c ./../src/hid/lesstif/netlist.c 415
+ at c ./../src/hid/lesstif/netlist.c 411
 
 
 @node lesstif Print Action
@@ -3347,11 +3482,12 @@ Selects the given pinname or netname in the netlist window.
 @c key lesstif Print in hid lesstif
 @cartouche
 @format
-Print()@end format
+Print()
+ at end format
 @end cartouche
 
 Print the layout.
- at c ./../src/hid/lesstif/dialogs.c 894
+ at c ./../src/hid/lesstif/dialogs.c 890
 
 This will find the default printing HID, prompt the user for its
 options, and print the layout.
@@ -3362,11 +3498,12 @@ options, and print the layout.
 @c key lesstif PrintCalibrate in hid lesstif
 @cartouche
 @format
-PrintCalibrate()@end format
+PrintCalibrate()
+ at end format
 @end cartouche
 
 Calibrate the printer.
- at c ./../src/hid/lesstif/dialogs.c 937
+ at c ./../src/hid/lesstif/dialogs.c 933
 
 This will print a calibration page, which you would measure and type
 the measurements in, so that future printouts will be more precise.
@@ -3377,11 +3514,12 @@ the measurements in, so that future printouts will be more precise.
 @c key lesstif PromptFor in hid lesstif
 @cartouche
 @format
-PromptFor([message[,default]])@end format
+PromptFor([message[,default]])
+ at end format
 @end cartouche
 
 Prompt for a response.
- at c ./../src/hid/lesstif/dialogs.c 560
+ at c ./../src/hid/lesstif/dialogs.c 556
 
 This is mostly for testing the lesstif HID interface.  The parameters
 are passed to the @code{prompt_for()} HID function, causing the user
@@ -3394,11 +3532,12 @@ user's stdout.
 @c key lesstif Return in hid lesstif
 @cartouche
 @format
-Return(0|1)@end format
+Return(0|1)
+ at end format
 @end cartouche
 
 Simulate a passing or failing action.
- at c ./../src/hid/lesstif/menu.c 89
+ at c ./../src/hid/lesstif/menu.c 85
 
 This is for testing.  If passed a 0, does nothing and succeeds.  If
 passed a 1, does nothing but pretends to fail.
@@ -3412,11 +3551,12 @@ passed a 1, does nothing but pretends to fail.
 Save()
 Save(Layout|LayoutAs)
 Save(AllConnections|AllUnusedPins|ElementConnections)
-Save(PasteBuffer)@end format
+Save(PasteBuffer)
+ at end format
 @end cartouche
 
 Save layout data to a user-selected file.
- at c ./../src/hid/lesstif/dialogs.c 197
+ at c ./../src/hid/lesstif/dialogs.c 193
 
 This action is a GUI front-end to the core's @code{SaveTo} action
 (@pxref{SaveTo Action}).  If you happen to pass a filename, like
@@ -3430,11 +3570,12 @@ called with that filename.
 @c key lesstif SelectLayer in hid lesstif
 @cartouche
 @format
-SelectLayer(1..MAXLAYER|Silk|Rats)@end format
+SelectLayer(1..MAXLAYER|Silk|Rats)
+ at end format
 @end cartouche
 
 Select which layer is the current layer.
- at c ./../src/hid/lesstif/menu.c 387
+ at c ./../src/hid/lesstif/menu.c 383
 
 The specified layer becomes the currently active layer.  It is made
 visible if it is not already visible
@@ -3445,11 +3586,12 @@ visible if it is not already visible
 @c key lesstif SetUnits in hid lesstif
 @cartouche
 @format
-SetUnits(mm|mil)@end format
+SetUnits(mm|mil)
+ at end format
 @end cartouche
 
 Set the default measurement units.
- at c ./../src/hid/lesstif/main.c 395
+ at c ./../src/hid/lesstif/main.c 392
 
 @table @code
 
@@ -3467,11 +3609,12 @@ Sets the display units to millimeters.
 @c key lesstif SwapSides in hid lesstif
 @cartouche
 @format
-SwapSides(|v|h|r)@end format
+SwapSides(|v|h|r)
+ at end format
 @end cartouche
 
 Swaps the side of the board you're looking at.
- at c ./../src/hid/lesstif/main.c 494
+ at c ./../src/hid/lesstif/main.c 491
 
 This action changes the way you view the board.
 
@@ -3510,11 +3653,12 @@ side'' of the board.
 @format
 ToggleView(1..MAXLAYER)
 ToggleView(layername)
-ToggleView(Silk|Rats|Pins|Vias|Mask|BackSide)@end format
+ToggleView(Silk|Rats|Pins|Vias|Mask|BackSide)
+ at end format
 @end cartouche
 
 Toggle the visibility of the specified layer or layer group.
- at c ./../src/hid/lesstif/menu.c 409
+ at c ./../src/hid/lesstif/menu.c 411
 
 If you pass an integer, that layer is specified by index (the first
 layer is @code{1}, etc).  If you pass a layer name, that layer is
@@ -3532,11 +3676,12 @@ the same as a special layer, the layer is chosen over the special layer.
 @cartouche
 @format
 Zoom()
-Zoom(factor)@end format
+Zoom(factor)
+ at end format
 @end cartouche
 
 Various zoom factor changes.
- at c ./../src/hid/lesstif/main.c 419
+ at c ./../src/hid/lesstif/main.c 416
 
 Changes the zoom (magnification) of the view of the board.  If no
 arguments are passed, the view is scaled such that the board just fits
diff --git a/doc/ascii2texi.awk b/doc/ascii2texi.awk
index fd0e415..b8e3a72 100755
--- a/doc/ascii2texi.awk
+++ b/doc/ascii2texi.awk
@@ -1,7 +1,4 @@
 #!/usr/bin/awk -f
-#
-# $Id$
-#
 
 BEGIN {
 	first = 1;
@@ -23,7 +20,6 @@ BEGIN {
 first == 1 {
 	first = 0;
 	printf("@c Generated file.  Do not edit directly\n");
-	printf("@c $" "Id" "$\n");
 	printf("@multitable @columnfractions ");
 	for(i = 1 ; i <= 2*ncol ; i = i + 1) {
 		printf("%.3g ", 0.5 / ncol);
diff --git a/doc/eps2png b/doc/eps2png
index c029991..893b7a3 100755
--- a/doc/eps2png
+++ b/doc/eps2png
@@ -1,7 +1,5 @@
 #!/usr/bin/perl
 
-my $RCS_Id = '$Id$ ';
-
 # Author          : Johan Vromans
 # Created On      : Tue Sep 15 15:59:04 1992
 # Last Modified By: Johan Vromans
@@ -14,13 +12,6 @@ my $RCS_Id = '$Id$ ';
 use strict;
 use Getopt::Long 2.1;
 
-my $my_package = "Sciurix";
-my ($my_name, $my_version) = $RCS_Id =~ /: (.+).pl,v ([\d.]+)/;
-$my_version .= '*' if length('$Locker$ ') > 12;
-
-use vars qw($VERSION);
-( $VERSION ) = '$Revision$ ' =~ /\$Revision:\s+([^\s]+)/;
-
 ################ Program parameters ################
 
 ### CONFIG
@@ -250,13 +241,11 @@ sub set_out_type {
 
 sub handle_options {
     my  ($help) = 0;		# handled locally
-    my ($ident) = 0;		# handled locally
 
     # Process options.
     if ( @ARGV > 0 && $ARGV[0] =~ /^[-+]/ ) {
 	usage () 
-	  unless GetOptions ('ident'	   => \$ident,
-			     'verbose'	   => \$verbose,
+	  unless GetOptions ('verbose'	   => \$verbose,
 			     'antialias|aa=i'   => \$antialias,
 			     'noantialias|noaa' => sub { $antialias = 0 },
 			     'scale=f'     => \$scale,
@@ -283,8 +272,6 @@ sub handle_options {
 			     'debug'	   => \$debug)
 	    && !$help;
     }
-    print STDERR ("This is $my_package [$my_name $my_version]\n")
-	if $ident;
     die ("Only one file argument is allowed when -output is used\n")
       if @ARGV > 1 && defined $output;
     die ("At least one input file name must be specified\n")
@@ -295,7 +282,6 @@ sub handle_options {
 
 sub usage {
     print STDERR <<EndOfUsage;
-This is $my_package [$my_name $my_version]
 Usage: $0 [options] file [...]
 
     -png -pngmono -pnggray -png16 -png256 -png16m
@@ -313,7 +299,6 @@ Usage: $0 [options] file [...]
     -[no]pbm		GIF only: [do not] convert via pbm format
     -output XXX		output to this file (only one input file)
     -help		this message
-    -ident		show identification
     -verbose		verbose information
 EndOfUsage
     exit 1;
@@ -450,10 +435,6 @@ this option is specified.
 
 Prints a help message and exits.
 
-=item B<-ident>
-
-Prints the program version before doing anything else.
-
 =item B<-verbose>
 
 Provides more verbose information.
diff --git a/doc/extract-docs b/doc/extract-docs
index a25de8e..6ef4f01 100755
--- a/doc/extract-docs
+++ b/doc/extract-docs
@@ -1,8 +1,6 @@
 #!/usr/bin/perl
 # -*- perl -*-
 #
-# $Id$
-#
 #################################################################
 # This script extracts special comments from the source. It assembles
 # them in texinfo files that are included in the manual.  
@@ -130,7 +128,7 @@ for $cat (sort keys %text) {
 		if ($synt{$key}) {
 		    $new .= "\@cartouche\n\@format\n";
 		    $new .= $synt{$key};
-		    $new .= "\@end format\n\@end cartouche\n\n";
+		    $new .= "\n\@end format\n\@end cartouche\n\n";
 		}
 		if ($desc{$key}) {
 		    $new .= $desc{$key} . "\n";
diff --git a/doc/fractional_size.tab b/doc/fractional_size.tab
index eb68f6f..2687519 100644
--- a/doc/fractional_size.tab
+++ b/doc/fractional_size.tab
@@ -1,6 +1,3 @@
-# $Id$
-#
-
 1/64		.0156
 1/32		.0313
 3/64		.0469
diff --git a/doc/fractional_size.texi b/doc/fractional_size.texi
index 4b79e77..5b90bf8 100644
--- a/doc/fractional_size.texi
+++ b/doc/fractional_size.texi
@@ -1,5 +1,4 @@
 @c Generated file.  Do not edit directly
- at c $Id$
 @multitable @columnfractions 0.167 0.167 0.167 0.167 0.167 0.167 
 @item Drill @tab Diameter @tab Drill @tab Diameter @tab Drill @tab Diameter 
 @item Size @tab (inches) @tab Size @tab (inches) @tab Size @tab (inches) 
diff --git a/doc/gcode.pdf b/doc/gcode.pdf
index b49ddcd..eeea047 100644
Binary files a/doc/gcode.pdf and b/doc/gcode.pdf differ
diff --git a/doc/gcode.png b/doc/gcode.png
index 73fcc48..3caa2bc 100644
Binary files a/doc/gcode.png and b/doc/gcode.png differ
diff --git a/doc/gcode_control_img.pdf b/doc/gcode_control_img.pdf
index 3a1476b..419d1e9 100644
Binary files a/doc/gcode_control_img.pdf and b/doc/gcode_control_img.pdf differ
diff --git a/doc/gcode_control_img.png b/doc/gcode_control_img.png
index d4bb3ee..561cedd 100644
Binary files a/doc/gcode_control_img.png and b/doc/gcode_control_img.png differ
diff --git a/doc/gcode_tool_path.pdf b/doc/gcode_tool_path.pdf
index 7f6dd2e..91c22a5 100644
Binary files a/doc/gcode_tool_path.pdf and b/doc/gcode_tool_path.pdf differ
diff --git a/doc/gcode_tool_path.png b/doc/gcode_tool_path.png
index f694f95..40fc942 100644
Binary files a/doc/gcode_tool_path.png and b/doc/gcode_tool_path.png differ
diff --git a/doc/letter_size.tab b/doc/letter_size.tab
index 9d7459c..29b633b 100644
--- a/doc/letter_size.tab
+++ b/doc/letter_size.tab
@@ -1,6 +1,3 @@
-# $Id$
-#
-
 A		.2340
 B		.2380
 C		.2420
diff --git a/doc/letter_size.texi b/doc/letter_size.texi
index bdd8f25..1f5b927 100644
--- a/doc/letter_size.texi
+++ b/doc/letter_size.texi
@@ -1,5 +1,4 @@
 @c Generated file.  Do not edit directly
- at c $Id$
 @multitable @columnfractions 0.167 0.167 0.167 0.167 0.167 0.167 
 @item Drill @tab Diameter @tab Drill @tab Diameter @tab Drill @tab Diameter 
 @item Size @tab (inches) @tab Size @tab (inches) @tab Size @tab (inches) 
diff --git a/doc/metric_size.tab b/doc/metric_size.tab
index 3db5222..cfa464e 100644
--- a/doc/metric_size.tab
+++ b/doc/metric_size.tab
@@ -1,6 +1,3 @@
-# $Id$
-#
-
 0.20_mm  	.00787
 0.25_mm 	.00984
 0.30_mm  	.0118
diff --git a/doc/metric_size.texi b/doc/metric_size.texi
index 789cfe6..36b8eaf 100644
--- a/doc/metric_size.texi
+++ b/doc/metric_size.texi
@@ -1,5 +1,4 @@
 @c Generated file.  Do not edit directly
- at c $Id$
 @multitable @columnfractions 0.167 0.167 0.167 0.167 0.167 0.167 
 @item Drill @tab Diameter @tab Drill @tab Diameter @tab Drill @tab Diameter 
 @item Size @tab (inches) @tab Size @tab (inches) @tab Size @tab (inches) 
diff --git a/doc/options.texi b/doc/options.texi
index 8602b31..20bf499 100644
--- a/doc/options.texi
+++ b/doc/options.texi
@@ -21,108 +21,156 @@
 @c options General Options
 @node General Options
 @section General Options
- at c ./../src/main.c 434
+ at c ./../src/main.c 440
 @ftable @code
 @item --help
 Show help on command line options.
 @end ftable
- at c ./../src/main.c 439
+ at c ./../src/main.c 445
 @ftable @code
 @item --version
 Show version.
 @end ftable
- at c ./../src/main.c 443
+ at c ./../src/main.c 449
 @ftable @code
 @item --verbose
 Be verbose on stdout.
 @end ftable
- at c ./../src/main.c 448
+ at c ./../src/main.c 454
 @ftable @code
 @item --copyright
 Show copyright.
 @end ftable
- at c ./../src/main.c 453
+ at c ./../src/main.c 459
 @ftable @code
 @item --show-defaults
 Show option defaults.
 @end ftable
- at c ./../src/main.c 458
+ at c ./../src/main.c 464
 @ftable @code
 @item --show-actions
 Show available actions and exit.
 @end ftable
- at c ./../src/main.c 463
+ at c ./../src/main.c 469
 @ftable @code
 @item --dump-actions
 Dump actions (for documentation).
 @end ftable
- at c ./../src/main.c 468
+ at c ./../src/main.c 474
 @ftable @code
 @item --grid-units-mm <string>
 Set default grid units. Can be mm or mil. Defaults to mil.
 @end ftable
- at c ./../src/main.c 686
+ at c ./../src/main.c 479
+ at ftable @code
+ at item --clear-increment-mm <string>
+Set default clear increment (amount to change when user presses k or K)
+when user is using a metric grid unit.
+ at end ftable
+ at c ./../src/main.c 484
+ at ftable @code
+ at item --grid-increment-mm <string>
+Set default grid increment (amount to change when user presses g or G)
+when user is using a metric grid unit.
+ at end ftable
+ at c ./../src/main.c 489
+ at ftable @code
+ at item --line-increment-mm <string>
+Set default line increment (amount to change when user presses l or L)
+when user is using a metric grid unit.
+ at end ftable
+ at c ./../src/main.c 494
+ at ftable @code
+ at item --size-increment-mm <string>
+Set default size increment (amount to change when user presses s or S)
+when user is using a metric grid unit.
+ at end ftable
+ at c ./../src/main.c 499
+ at ftable @code
+ at item --clear-increment-mil <string>
+Set default clear increment (amount to change when user presses k or K)
+when user is using an imperial grid unit.
+ at end ftable
+ at c ./../src/main.c 504
+ at ftable @code
+ at item --grid-increment-mil <string>
+Set default grid increment (amount to change when user presses g or G)
+when user is using a imperial grid unit.
+ at end ftable
+ at c ./../src/main.c 509
+ at ftable @code
+ at item --line-increment-mil <string>
+Set default line increment (amount to change when user presses l or L)
+when user is using a imperial grid unit.
+ at end ftable
+ at c ./../src/main.c 514
+ at ftable @code
+ at item --size-increment-mil <string>
+Set default size increment (amount to change when user presses s or S)
+when user is using a imperial grid unit.
+ at end ftable
+ at c ./../src/main.c 737
 @ftable @code
 @item --backup-interval
 Time between automatic backups in seconds. Set to @code{0} to disable.
 The default value is @code{60}.
 @end ftable
- at c ./../src/main.c 723
+ at c ./../src/main.c 774
 @ftable @code
 @item --groups <string>
 Layer group string. Defaults to @code{"1,c:2:3:4:5:6,s:7:8"}.
 @end ftable
- at c ./../src/main.c 788
+ at c ./../src/main.c 839
 @ftable @code
 @item --route-styles <string>
 A string that defines the route styles. Defaults to @*
 @code{"Signal,1000,3600,2000,1000:Power,2500,6000,3500,1000
 	:Fat,4000,6000,3500,1000:Skinny,600,2402,1181,600"}
 @end ftable
- at c ./../src/main.c 807
+ at c ./../src/main.c 858
 @ftable @code
 @item --element-path <string>
 A colon separated list of directories or commands (starts with '|').
 The path is passed to the program specified in @option{--element-command}.
 @end ftable
- at c ./../src/main.c 817
+ at c ./../src/main.c 868
 @ftable @code
 @item --action-script <string>
 If set, this file is executed at startup.
 @end ftable
- at c ./../src/main.c 822
+ at c ./../src/main.c 873
 @ftable @code
 @item --action-string <string>
 If set, this string of actions is executed at startup.
 @end ftable
- at c ./../src/main.c 827
+ at c ./../src/main.c 878
 @ftable @code
 @item --fab-author <string>
 Name of author to be put in the Gerber files.
 @end ftable
- at c ./../src/main.c 832
+ at c ./../src/main.c 883
 @ftable @code
 @item --layer-stack <string>
 Initial layer stackup, for setting up an export. A comma separated list of layer
 names, layer numbers and layer groups.
 @end ftable
- at c ./../src/main.c 883
+ at c ./../src/main.c 934
 @ftable @code
 @item --save-last-command
 If set, the last user command is saved.
 @end ftable
- at c ./../src/main.c 887
+ at c ./../src/main.c 938
 @ftable @code
 @item --save-in-tmp
 If set, all data which would otherwise be lost are saved in a temporary file
 @file{/tmp/PCB.%i.save} . Sequence @samp{%i} is replaced by the process ID.
 @end ftable
- at c ./../src/main.c 901
+ at c ./../src/main.c 952
 @ftable @code
 @item --reset-after-element
 If set, all found connections are reset before a new component is scanned.
 @end ftable
- at c ./../src/main.c 906
+ at c ./../src/main.c 957
 @ftable @code
 @item --ring-bell-finished
 Execute the bell command when all rats are routed.
@@ -130,59 +178,59 @@ Execute the bell command when all rats are routed.
 @c options General GUI Options
 @node General GUI Options
 @section General GUI Options
- at c ./../src/main.c 842
+ at c ./../src/main.c 893
 @ftable @code
 @item --pinout-offset-x <num>
 Horizontal offset of the pin number display. Defaults to @code{100mil}.
 @end ftable
- at c ./../src/main.c 847
+ at c ./../src/main.c 898
 @ftable @code
 @item --pinout-offset-y <num>
 Vertical offset of the pin number display. Defaults to @code{100mil}.
 @end ftable
- at c ./../src/main.c 852
+ at c ./../src/main.c 903
 @ftable @code
 @item --pinout-text-offset-x <num>
 Horizontal offset of the pin name display. Defaults to @code{800mil}.
 @end ftable
- at c ./../src/main.c 857
+ at c ./../src/main.c 908
 @ftable @code
 @item --pinout-text-offset-y <num>
 Vertical offset of the pin name display. Defaults to @code{-100mil}.
 @end ftable
- at c ./../src/main.c 862
+ at c ./../src/main.c 913
 @ftable @code
 @item --draw-grid
 If set, draw the grid at start-up.
 @end ftable
- at c ./../src/main.c 866
+ at c ./../src/main.c 917
 @ftable @code
 @item --clear-line
 If set, new lines clear polygons.
 @end ftable
- at c ./../src/main.c 870
+ at c ./../src/main.c 921
 @ftable @code
 @item --full-poly
 If set, new polygons are full ones.
 @end ftable
- at c ./../src/main.c 874
+ at c ./../src/main.c 925
 @ftable @code
 @item --unique-names
 If set, you will not be permitted to change the name of an component to match that
 of another component.
 @end ftable
- at c ./../src/main.c 878
+ at c ./../src/main.c 929
 @ftable @code
 @item --snap-pin
 If set, pin centers and pad end points are treated as additional grid points
 that the cursor can snap to.
 @end ftable
- at c ./../src/main.c 892
+ at c ./../src/main.c 943
 @ftable @code
 @item --all-direction-lines
 Allow all directions, when drawing new lines.
 @end ftable
- at c ./../src/main.c 897
+ at c ./../src/main.c 948
 @ftable @code
 @item --show-number
 Pinout shows number.
@@ -190,19 +238,19 @@ Pinout shows number.
 @c options GTK+ GUI Options
 @node GTK+ GUI Options
 @section GTK+ GUI Options
- at c ./../src/hid/gtk/gui-top-window.c 1615
+ at c ./../src/hid/gtk/gui-top-window.c 1672
 @ftable @code
 @item --listen
 Listen for actions on stdin.
 @end ftable
- at c ./../src/hid/gtk/gui-top-window.c 1621
+ at c ./../src/hid/gtk/gui-top-window.c 1678
 @ftable @code
 @item --bg-image <string>
 File name of an image to put into the background of the GUI canvas. The image must
 be a color PPM image, in binary (not ASCII) format. It can be any size, and will be
 automatically scaled to fit the canvas.
 @end ftable
- at c ./../src/hid/gtk/gui-top-window.c 1627
+ at c ./../src/hid/gtk/gui-top-window.c 1684
 @ftable @code
 @item --pcb-menu <string>
 Location of the @file{gpcb-menu.res} file which defines the menu for the GTK+ GUI.
@@ -210,19 +258,19 @@ Location of the @file{gpcb-menu.res} file which defines the menu for the GTK+ GU
 @c options lesstif GUI Options
 @node lesstif GUI Options
 @section lesstif GUI Options
- at c ./../src/hid/lesstif/main.c 201
+ at c ./../src/hid/lesstif/main.c 198
 @ftable @code
 @item --listen
 Listen for actions on stdin.
 @end ftable
- at c ./../src/hid/lesstif/main.c 207
+ at c ./../src/hid/lesstif/main.c 204
 @ftable @code
 @item --bg-image <string>
 File name of an image to put into the background of the GUI canvas. The image must
 be a color PPM image, in binary (not ASCII) format. It can be any size, and will be
 automatically scaled to fit the canvas.
 @end ftable
- at c ./../src/hid/lesstif/main.c 213
+ at c ./../src/hid/lesstif/main.c 210
 @ftable @code
 @item --pcb-menu <string>
 Location of the @file{pcb-menu.res} file which defines the menu for the lesstif GUI.
@@ -230,117 +278,122 @@ Location of the @file{pcb-menu.res} file which defines the menu for the lesstif
 @c options Colors
 @node Colors
 @section Colors
- at c ./../src/main.c 473
+ at c ./../src/main.c 519
 @ftable @code
 @item --black-color <string>
 Color value for black. Default: @samp{#000000}
 @end ftable
- at c ./../src/main.c 477
+ at c ./../src/main.c 523
 @ftable @code
 @item --black-color <string>
 Color value for white. Default: @samp{#ffffff}
 @end ftable
- at c ./../src/main.c 481
+ at c ./../src/main.c 527
 @ftable @code
 @item --background-color <string>
 Background color of the canvas. Default: @samp{#e5e5e5}
 @end ftable
- at c ./../src/main.c 486
+ at c ./../src/main.c 532
 @ftable @code
 @item --crosshair-color <string>
 Color of the crosshair. Default: @samp{#ff0000}
 @end ftable
- at c ./../src/main.c 491
+ at c ./../src/main.c 537
 @ftable @code
 @item --cross-color <string>
 Color of the cross. Default: @samp{#cdcd00}
 @end ftable
- at c ./../src/main.c 495
+ at c ./../src/main.c 541
 @ftable @code
 @item --via-color <string>
 Color of vias. Default: @samp{#7f7f7f}
 @end ftable
- at c ./../src/main.c 499
+ at c ./../src/main.c 545
 @ftable @code
 @item --via-selected-color <string>
 Color of selected vias. Default: @samp{#00ffff}
 @end ftable
- at c ./../src/main.c 504
+ at c ./../src/main.c 550
 @ftable @code
 @item --pin-color <string>
 Color of pins. Default: @samp{#4d4d4d}
 @end ftable
- at c ./../src/main.c 508
+ at c ./../src/main.c 554
 @ftable @code
 @item --pin-selected-color <string>
 Color of selected pins. Default: @samp{#00ffff}
 @end ftable
- at c ./../src/main.c 513
+ at c ./../src/main.c 559
 @ftable @code
 @item --pin-name-color <string>
 Color of pin names and pin numbers. Default: @samp{#ff0000}
 @end ftable
- at c ./../src/main.c 518
+ at c ./../src/main.c 564
 @ftable @code
 @item --element-color <string>
 Color of components. Default: @samp{#000000}
 @end ftable
- at c ./../src/main.c 522
+ at c ./../src/main.c 568
 @ftable @code
 @item --rat-color <string>
 Color of ratlines. Default: @samp{#b8860b}
 @end ftable
- at c ./../src/main.c 526
+ at c ./../src/main.c 572
 @ftable @code
 @item --invisible-objects-color <string>
 Color of invisible objects. Default: @samp{#cccccc}
 @end ftable
- at c ./../src/main.c 531
+ at c ./../src/main.c 577
 @ftable @code
 @item --invisible-mark-color <string>
 Color of invisible marks. Default: @samp{#cccccc}
 @end ftable
- at c ./../src/main.c 536
+ at c ./../src/main.c 582
 @ftable @code
 @item --element-selected-color <string>
 Color of selected components. Default: @samp{#00ffff}
 @end ftable
- at c ./../src/main.c 541
+ at c ./../src/main.c 587
 @ftable @code
 @item --rat-selected-color <string>
 Color of selected rats. Default: @samp{#00ffff}
 @end ftable
- at c ./../src/main.c 546
+ at c ./../src/main.c 592
 @ftable @code
 @item --connected-color <string>
-Color to indicate connections. Default: @samp{#00ff00}
+Color to indicate physical connections. Default: @samp{#00ff00}
 @end ftable
- at c ./../src/main.c 551
+ at c ./../src/main.c 597
+ at ftable @code
+ at item --found-color <string>
+Color to indicate logical connections. Default: @samp{#ff00ff}
+ at end ftable
+ at c ./../src/main.c 602
 @ftable @code
 @item --off-limit-color <string>
 Color of off-canvas area. Default: @samp{#cccccc}
 @end ftable
- at c ./../src/main.c 556
+ at c ./../src/main.c 607
 @ftable @code
 @item --grid-color <string>
 Color of the grid. Default: @samp{#ff0000}
 @end ftable
- at c ./../src/main.c 560
+ at c ./../src/main.c 611
 @ftable @code
 @item --layer-color-<n> <string>
 Color of layer @code{<n>}, where @code{<n>} is an integer from 1 to 16.
 @end ftable
- at c ./../src/main.c 578
+ at c ./../src/main.c 629
 @ftable @code
 @item --layer-selected-color-<n> <string>
 Color of layer @code{<n>}, when selected. @code{<n>} is an integer from 1 to 16.
 @end ftable
- at c ./../src/main.c 597
+ at c ./../src/main.c 648
 @ftable @code
 @item --warn-color <string>
 Color of offending objects during DRC. Default value is @code{"#ff8000"}
 @end ftable
- at c ./../src/main.c 601
+ at c ./../src/main.c 652
 @ftable @code
 @item --mask-color <string>
 Color of the mask layer. Default value is @code{"#ff0000"}
@@ -348,42 +401,42 @@ Color of the mask layer. Default value is @code{"#ff0000"}
 @c options Layer Names
 @node Layer Names
 @section Layer Names
- at c ./../src/main.c 691
+ at c ./../src/main.c 742
 @ftable @code
 @item --layer-name-1 <string>
 Name of the 1st Layer. Default is @code{"top"}.
 @end ftable
- at c ./../src/main.c 695
+ at c ./../src/main.c 746
 @ftable @code
 @item --layer-name-2 <string>
 Name of the 2nd Layer. Default is @code{"ground"}.
 @end ftable
- at c ./../src/main.c 699
+ at c ./../src/main.c 750
 @ftable @code
 @item --layer-name-3 <string>
 Name of the 3nd Layer. Default is @code{"signal2"}.
 @end ftable
- at c ./../src/main.c 703
+ at c ./../src/main.c 754
 @ftable @code
 @item --layer-name-4 <string>
 Name of the 4rd Layer. Default is @code{"signal3"}.
 @end ftable
- at c ./../src/main.c 707
+ at c ./../src/main.c 758
 @ftable @code
 @item --layer-name-5 <string>
 Name of the 5rd Layer. Default is @code{"power"}.
 @end ftable
- at c ./../src/main.c 711
+ at c ./../src/main.c 762
 @ftable @code
 @item --layer-name-6 <string>
 Name of the 6rd Layer. Default is @code{"bottom"}.
 @end ftable
- at c ./../src/main.c 715
+ at c ./../src/main.c 766
 @ftable @code
 @item --layer-name-7 <string>
 Name of the 7rd Layer. Default is @code{"outline"}.
 @end ftable
- at c ./../src/main.c 719
+ at c ./../src/main.c 770
 @ftable @code
 @item --layer-name-8 <string>
 Name of the 8rd Layer. Default is @code{"spare"}.
@@ -391,35 +444,35 @@ Name of the 8rd Layer. Default is @code{"spare"}.
 @c options Paths
 @node Paths
 @section Paths
- at c ./../src/main.c 769
+ at c ./../src/main.c 820
 @ftable @code
 @item --lib-newlib <string>
 Top level directory for the newlib style library.
 @end ftable
- at c ./../src/main.c 778
+ at c ./../src/main.c 829
 @ftable @code
 @item --lib-name <string>
 The default filename for the library.
 @end ftable
- at c ./../src/main.c 783
+ at c ./../src/main.c 834
 @ftable @code
 @item --default-font <string>
 The name of the default font.
 @end ftable
- at c ./../src/main.c 794
+ at c ./../src/main.c 845
 @ftable @code
 @item --file-path <string>
 A colon separated list of directories or commands (starts with '|'). The path
 is passed to the program specified in @option{--file-command} together with the selected
 filename.
 @end ftable
- at c ./../src/main.c 802
+ at c ./../src/main.c 853
 @ftable @code
 @item --font-path <string>
 A colon separated list of directories to search the default font. Defaults to
 the default library path.
 @end ftable
- at c ./../src/main.c 812
+ at c ./../src/main.c 863
 @ftable @code
 @item --lib-path <string>
 A colon separated list of directories that will be passed to the commands specified
@@ -428,7 +481,7 @@ by @option{--element-command} and @option{--element-contents-command}.
 @c options Sizes
 @node Sizes
 @section Sizes
- at c ./../src/main.c 606
+ at c ./../src/main.c 657
 All parameters should be given with an unit. If no unit is given, 1/100 mil
 (cmil) will be used. Write units without space to the
 number like @code{3mm}, not @code{3 mm}.
@@ -458,56 +511,58 @@ Valid Units are:
 @item --via-thickness <num>
 Default diameter of vias. Default value is @code{60mil}.
 @end ftable
- at c ./../src/main.c 611
+ at c ./../src/main.c 662
 @ftable @code
 @item --via-drilling-hole <num>
 Default diameter of holes. Default value is @code{28mil}.
 @end ftable
- at c ./../src/main.c 616
+ at c ./../src/main.c 667
 @ftable @code
 @item --line-thickness <num>
 Default thickness of new lines. Default value is @code{10mil}.
 @end ftable
- at c ./../src/main.c 621
+ at c ./../src/main.c 672
 @ftable @code
- at item --rat-thickness <num>
-Thickness of rats. Values from 1 to 19 are fixed width in screen pixels.
-Anything larger means PCB units (i.e. 100 means "1 mil"). Default value
-is @code{10mil}.
+ at item --rat-thickness <num><unit>
+Thickness of rats. If no unit is given, PCB units are assumed (i.e. 100 
+means "1 nm"). This option allows for a special unit @code{px} which 
+sets the rat thickness to a fixed value in terms of screen pixels.
+Maximum fixed thickness is 100px. Minimum saling rat thickness is 101nm.  
+Default value is @code{10mil}.
 @end ftable
- at c ./../src/main.c 625
+ at c ./../src/main.c 676
 @ftable @code
 @item --keepaway <num>
 Default minimum distance between a track and adjacent copper.
 Default value is @code{10mil}.
 @end ftable
- at c ./../src/main.c 629
+ at c ./../src/main.c 680
 @ftable @code
 @item --default-PCB-width <num>
 Default width of the canvas. Default value is @code{6000mil}.
 @end ftable
- at c ./../src/main.c 634
+ at c ./../src/main.c 685
 @ftable @code
 @item --default-PCB-height <num>
 Default height of the canvas. Default value is @code{5000mil}.
 @end ftable
- at c ./../src/main.c 639
+ at c ./../src/main.c 690
 @ftable @code
 @item --text-scale <num>
 Default text scale. This value is in percent. Default value is @code{100}.
 @end ftable
- at c ./../src/main.c 643
+ at c ./../src/main.c 694
 @ftable @code
 @item --alignment-distance <num>
 Specifies the distance between the board outline and alignment targets.
 Default value is @code{2mil}.
 @end ftable
- at c ./../src/main.c 677
+ at c ./../src/main.c 728
 @ftable @code
 @item --grid <num>
 Initial grid size. Default value is @code{10mil}.
 @end ftable
- at c ./../src/main.c 681
+ at c ./../src/main.c 732
 @ftable @code
 @item --minimum polygon area <num>
 Minimum polygon area.
@@ -515,57 +570,57 @@ Minimum polygon area.
 @c options Commands
 @node Commands
 @section Commands
- at c ./../src/main.c 728
+ at c ./../src/main.c 779
 pcb uses external commands for input output operations. These commands can be
 configured at start-up to meet local requirements. The command string may include
 special sequences @code{%f}, @code{%p} or @code{%a}. These are replaced when the
 command is called. The sequence @code{%f} is replaced by the file name,
 @code{%p} gets the path and @code{%a} indicates a package name.
- at c ./../src/main.c 731
+ at c ./../src/main.c 782
 @ftable @code
 @item --font-command <string>
 Command to load a font.
 @end ftable
- at c ./../src/main.c 735
+ at c ./../src/main.c 786
 @ftable @code
 @item --file-command <string>
 Command to read a file.
 @end ftable
- at c ./../src/main.c 739
+ at c ./../src/main.c 790
 @ftable @code
 @item --element-command <string>
 Command to read a footprint. @*
 Defaults to @code{"M4PATH='%p';export M4PATH;echo 'include(%f)' | m4"}
 @end ftable
- at c ./../src/main.c 745
+ at c ./../src/main.c 796
 @ftable @code
 @item --print-file <string>
 Command to print to a file.
 @end ftable
- at c ./../src/main.c 749
+ at c ./../src/main.c 800
 @ftable @code
 @item --lib-command-dir <string>
 Path to the command that queries the library.
 @end ftable
- at c ./../src/main.c 754
+ at c ./../src/main.c 805
 @ftable @code
 @item --lib-command <string>
 Command to query the library. @*
 Defaults to @code{"QueryLibrary.sh '%p' '%f' %a"}
 @end ftable
- at c ./../src/main.c 759
+ at c ./../src/main.c 810
 @ftable @code
 @item --lib-contents-command <string>
 Command to query the contents of the library. @*
 Defaults to @code{"ListLibraryContents.sh %p %f"} or,
 on Windows builds, an empty string (to disable this feature).
 @end ftable
- at c ./../src/main.c 774
+ at c ./../src/main.c 825
 @ftable @code
 @item --save-command <string>
 Command to save to a file.
 @end ftable
- at c ./../src/main.c 798
+ at c ./../src/main.c 849
 @ftable @code
 @item --rat-command <string>
 Command for reading a netlist. Sequence @code{%f} is replaced by the netlist filename.
@@ -573,36 +628,36 @@ Command for reading a netlist. Sequence @code{%f} is replaced by the netlist fil
 @c options DRC Options
 @node DRC Options
 @section DRC Options
- at c ./../src/main.c 648
+ at c ./../src/main.c 699
 All parameters should be given with an unit. If no unit is given, 1/100 mil
 (cmil) will be used for backward compability. Valid units are given in section
 @ref{Sizes}.
- at c ./../src/main.c 652
+ at c ./../src/main.c 703
 @ftable @code
 @item --bloat <num>
 Minimum spacing. Default value is @code{10mil}.
 @end ftable
- at c ./../src/main.c 656
+ at c ./../src/main.c 707
 @ftable @code
 @item --shrink <num>
 Minimum touching overlap. Default value is @code{10mil}.
 @end ftable
- at c ./../src/main.c 660
+ at c ./../src/main.c 711
 @ftable @code
 @item --min-width <num>
 Minimum width of copper. Default value is @code{10mil}.
 @end ftable
- at c ./../src/main.c 664
+ at c ./../src/main.c 715
 @ftable @code
 @item --min-silk <num>
 Minimum width of lines in silk. Default value is @code{10mil}.
 @end ftable
- at c ./../src/main.c 668
+ at c ./../src/main.c 719
 @ftable @code
 @item --min-drill <num>
 Minimum diameter of holes. Default value is @code{15mil}.
 @end ftable
- at c ./../src/main.c 672
+ at c ./../src/main.c 723
 @ftable @code
 @item --min-ring <num>
 Minimum width of annular ring. Default value is @code{10mil}.
@@ -610,17 +665,17 @@ Minimum width of annular ring. Default value is @code{10mil}.
 @c options BOM Creation
 @node BOM Creation
 @section BOM Creation
- at c ./../src/hid/bom/bom.c 30
+ at c ./../src/hid/bom/bom.c 26
 @ftable @code
 @item --bomfile <string>
 Name of the BOM output file.
 @end ftable
- at c ./../src/hid/bom/bom.c 35
+ at c ./../src/hid/bom/bom.c 31
 @ftable @code
 @item --xyfile <string>
 Name of the XY output file.
 @end ftable
- at c ./../src/hid/bom/bom.c 41
+ at c ./../src/hid/bom/bom.c 37
 @ftable @code
 @item --xy-unit <unit>
 Unit of XY dimensions. Defaults to mil.
@@ -628,79 +683,84 @@ Unit of XY dimensions. Defaults to mil.
 @c options Gerber Export
 @node Gerber Export
 @section Gerber Export
- at c ./../src/hid/gerber/gerber.c 338
+ at c ./../src/hid/gerber/gerber.c 348
 @ftable @code
 @item --gerberfile <string>
 Gerber output file prefix. Can include a path.
 @end ftable
- at c ./../src/hid/gerber/gerber.c 344
+ at c ./../src/hid/gerber/gerber.c 354
 @ftable @code
 @item --all-layers
 Output contains all layers, even empty ones.
 @end ftable
- at c ./../src/hid/gerber/gerber.c 350
+ at c ./../src/hid/gerber/gerber.c 360
 @ftable @code
 @item --verbose
 Print file names and aperture counts on stdout.
 @end ftable
+ at c ./../src/hid/gerber/gerber.c 365
+ at ftable @code
+ at item --metric
+generate metric Gerber and drill files
+ at end ftable
 @c options Postscript Export
 @node Postscript Export
 @section Postscript Export
- at c ./../src/hid/ps/ps.c 149
+ at c ./../src/hid/ps/ps.c 146
 @ftable @code
 @item --psfile <string>
 Name of the postscript output file. Can contain a path.
 @end ftable
- at c ./../src/hid/ps/ps.c 155
+ at c ./../src/hid/ps/ps.c 152
 @ftable @code
 @cindex drill-helper
 @item --drill-helper
 Print a centering target in large drill holes.
 @end ftable
- at c ./../src/hid/ps/ps.c 161
+ at c ./../src/hid/ps/ps.c 158
 @ftable @code
 @cindex align-marks
 @item --align-marks
 Print alignment marks on each sheet. This is meant to ease alignment during exposure.
 @end ftable
- at c ./../src/hid/ps/ps.c 167
+ at c ./../src/hid/ps/ps.c 164
 @ftable @code
 @item --outline
 Print the contents of the outline layer on each sheet.
 @end ftable
- at c ./../src/hid/ps/ps.c 172
+ at c ./../src/hid/ps/ps.c 169
 @ftable @code
 @item --mirror
 Print mirror image.
 @end ftable
- at c ./../src/hid/ps/ps.c 178
+ at c ./../src/hid/ps/ps.c 175
 @ftable @code
 @item --fill-page
 Scale output to make the board fit the page.
 @end ftable
- at c ./../src/hid/ps/ps.c 184
+ at c ./../src/hid/ps/ps.c 181
 @ftable @code
 @item --auto-mirror
 Print mirror image of appropriate layers.
 @end ftable
- at c ./../src/hid/ps/ps.c 190
+ at c ./../src/hid/ps/ps.c 187
 @ftable @code
 @item --ps-color
 Postscript output in color.
 @end ftable
- at c ./../src/hid/ps/ps.c 196
+ at c ./../src/hid/ps/ps.c 193
 @ftable @code
 @cindex ps-bloat
 @item --ps-bloat <num>
 Amount to add to trace/pad/pin edges.
 @end ftable
- at c ./../src/hid/ps/ps.c 202
+ at c ./../src/hid/ps/ps.c 199
 @ftable @code
 @cindex ps-invert
 @item --ps-invert
 Draw objects as white-on-black.
 @end ftable
- at c ./../src/hid/ps/ps.c 208
+ at c ./../src/hid/ps/ps.c 205
 @ftable @code
 @item --media <media-name>
 Size of the media, the postscript is fitted to. The parameter
@@ -710,18 +770,18 @@ to @samp{A10}, @samp{B0} to @samp{B10}, @samp{Letter}, @samp{11x17},
 @samp{C-Size}, @samp{D-size}, @samp{E-size}, @samp{US-Business_Card},
 @samp{Intl-Business_Card}.
 @end ftable
- at c ./../src/hid/ps/ps.c 214
+ at c ./../src/hid/ps/ps.c 211
 @ftable @code
 @cindex psfade
 @item --psfade <num>
 Fade amount for assembly drawings (0.0=missing, 1.0=solid).
 @end ftable
- at c ./../src/hid/ps/ps.c 220
+ at c ./../src/hid/ps/ps.c 218
 @ftable @code
 @item --scale <num>
 Scale value to compensate for printer sizing errors (1.0 = full scale).
 @end ftable
- at c ./../src/hid/ps/ps.c 226
+ at c ./../src/hid/ps/ps.c 225
 @ftable @code
 @cindex multi-file
 @item --multi-file
@@ -742,7 +802,7 @@ Paper height. Used for y-Axis calibration.
 @item --drill-copper
 Draw drill holes in pins / vias, instead of leaving solid copper.
 @end ftable
- at c ./../src/hid/ps/ps.c 250
+ at c ./../src/hid/ps/ps.c 251
 @ftable @code
 @cindex show-legend
 @item --show-legend
@@ -751,28 +811,28 @@ Print file name and scale on printout.
 @c options Encapsulated Postscript Export
 @node Encapsulated Postscript Export
 @section Encapsulated Postscript Export
- at c ./../src/hid/ps/eps.c 78
+ at c ./../src/hid/ps/eps.c 76
 @ftable @code
 @item --eps-file <string>
 Name of the encapsulated postscript output file. Can contain a path.
 @end ftable
- at c ./../src/hid/ps/eps.c 84
+ at c ./../src/hid/ps/eps.c 82
 @ftable @code
 @item --eps-scale <num>
 Scale EPS output by the parameter @samp{num}.
 @end ftable
- at c ./../src/hid/ps/eps.c 90
+ at c ./../src/hid/ps/eps.c 88
 @ftable @code
 @cindex as-shown (EPS)
 @item --as-shown
 Export layers as shown on screen.
 @end ftable
- at c ./../src/hid/ps/eps.c 96
+ at c ./../src/hid/ps/eps.c 94
 @ftable @code
 @item --monochrome
 Convert output to monochrome.
 @end ftable
- at c ./../src/hid/ps/eps.c 102
+ at c ./../src/hid/ps/eps.c 100
 @ftable @code
 @cindex only-visible
 @item --only-visible
@@ -781,84 +841,111 @@ Limit the bounds of the EPS file to the visible items.
 @c options PNG Options
 @node PNG Options
 @section PNG Options
- at c ./../src/hid/png/png.c 168
+ at c ./../src/hid/png/png.c 236
 @ftable @code
 @item --outfile <string>
 Name of the file to be exported to. Can contain a path.
 @end ftable
- at c ./../src/hid/png/png.c 174
+ at c ./../src/hid/png/png.c 242
 @ftable @code
 @item --dpi
 Scale factor in pixels/inch. Set to 0 to scale to size specified in the layout.
 @end ftable
- at c ./../src/hid/png/png.c 180
+ at c ./../src/hid/png/png.c 248
 @ftable @code
 @item --x-max
 Width of the png image in pixels. No constraint, when set to 0.
 @end ftable
- at c ./../src/hid/png/png.c 186
+ at c ./../src/hid/png/png.c 254
 @ftable @code
 @item --y-max
 Height of the png output in pixels. No constraint, when set to 0.
 @end ftable
- at c ./../src/hid/png/png.c 192
+ at c ./../src/hid/png/png.c 260
 @ftable @code
 @item --xy-max
 Maximum width and height of the PNG output in pixels. No constraint, when set to 0.
 @end ftable
- at c ./../src/hid/png/png.c 198
+ at c ./../src/hid/png/png.c 266
 @ftable @code
 @item --as-shown
 Export layers as shown on screen.
 @end ftable
- at c ./../src/hid/png/png.c 204
+ at c ./../src/hid/png/png.c 272
 @ftable @code
 @item --monochrome
 Convert output to monochrome.
 @end ftable
- at c ./../src/hid/png/png.c 210
+ at c ./../src/hid/png/png.c 278
 @ftable @code
- at item --only-vivible
+ at item --only-visible
 Limit the bounds of the exported PNG image to the visible items.
 @end ftable
- at c ./../src/hid/png/png.c 216
+ at c ./../src/hid/png/png.c 284
 @ftable @code
 @item --use-alpha
 Make the background and any holes transparent.
 @end ftable
- at c ./../src/hid/png/png.c 222
+ at c ./../src/hid/png/png.c 290
+ at ftable @code
+ at item --fill-holes
+Drill holes in pins/pads are filled, not hollow.
+ at end ftable
+ at c ./../src/hid/png/png.c 296
 @ftable @code
 @item --format <string>
 File format to be exported. Parameter @code{<string>} can be @samp{PNG},
 @samp{GIF}, or @samp{JPEG}.
 @end ftable
- at c ./../src/hid/png/png.c 228
+ at c ./../src/hid/png/png.c 302
 @ftable @code
 @item --png-bloat <num><dim>
 Amount of extra thickness to add to traces, pads, or pin edges. The parameter
 @samp{<num><dim>} is a number, appended by a dimension @samp{mm}, @samp{mil}, or
 @samp{pix}. If no dimension is given, the default dimension is 1/100 mil.
 @end ftable
- at c ./../src/hid/png/png.c 234
+ at c ./../src/hid/png/png.c 308
 @ftable @code
 @cindex photo-mode
 @item --photo-mode
 Export a photo realistic image of the layout.
 @end ftable
- at c ./../src/hid/png/png.c 240
+ at c ./../src/hid/png/png.c 314
 @ftable @code
 @item --photo-flip-x
 In photo-realistic mode, export the reverse side of the layout. Left-right flip.
 @end ftable
- at c ./../src/hid/png/png.c 246
+ at c ./../src/hid/png/png.c 320
 @ftable @code
 @item --photo-flip-y
 In photo-realistic mode, export the reverse side of the layout. Up-down flip.
 @end ftable
+ at c ./../src/hid/png/png.c 326
+ at ftable @code
+ at cindex photo-mask-colour
+ at item --photo-mask-colour <colour>
+In photo-realistic mode, export the solder mask as this colour. Parameter
+ at code{<colour>} can be @samp{green}, @samp{red}, @samp{blue}, or @samp{purple}.
+ at end ftable
+ at c ./../src/hid/png/png.c 332
+ at ftable @code
+ at cindex photo-plating
+ at item --photo-plating
+In photo-realistic mode, export the exposed copper as though it has this type
+of plating. Parameter @code{<colour>} can be @samp{tinned}, @samp{gold},
+ at samp{silver}, or @samp{copper}.
+ at end ftable
+ at c ./../src/hid/png/png.c 338
+ at ftable @code
+ at cindex photo-silk-colour
+ at item --photo-silk-colour
+In photo-realistic mode, export the silk screen as this colour. Parameter
+ at code{<colour>} can be @samp{white}, @samp{black}, or @samp{yellow}.
+ at end ftable
 @c options lpr Printing Options
 @node lpr Printing Options
 @section lpr Printing Options
- at c ./../src/hid/lpr/lpr.c 33
+ at c ./../src/hid/lpr/lpr.c 31
 @ftable @code
 @item --lprcommand <string>
 Command to use for printing. Defaults to @code{lpr}. This can be used to produce
@@ -869,27 +956,27 @@ PDF output with a virtual PDF printer. Example: @*
 @c options nelma Options
 @node nelma Options
 @section nelma Options
- at c ./../src/hid/nelma/nelma.c 157
+ at c ./../src/hid/nelma/nelma.c 155
 @ftable @code
 @item -- basename <string>
 File name prefix.
 @end ftable
- at c ./../src/hid/nelma/nelma.c 163
+ at c ./../src/hid/nelma/nelma.c 161
 @ftable @code
 @item --dpi <num>
 Horizontal scale factor (grid points/inch).
 @end ftable
- at c ./../src/hid/nelma/nelma.c 169
+ at c ./../src/hid/nelma/nelma.c 167
 @ftable @code
 @item --copper-height <num>
 Copper layer height (um).
 @end ftable
- at c ./../src/hid/nelma/nelma.c 175
+ at c ./../src/hid/nelma/nelma.c 173
 @ftable @code
 @item --substrate-height <num>
 Substrate layer height (um).
 @end ftable
- at c ./../src/hid/nelma/nelma.c 181
+ at c ./../src/hid/nelma/nelma.c 179
 @ftable @code
 @item --substrate-epsilon <num>
 Substrate relative epsilon.
diff --git a/doc/pad.pdf b/doc/pad.pdf
index e54740c..4626414 100644
Binary files a/doc/pad.pdf and b/doc/pad.pdf differ
diff --git a/doc/pad.png b/doc/pad.png
index 4474f12..e4dd967 100644
Binary files a/doc/pad.png and b/doc/pad.png differ
diff --git a/doc/pcb.html b/doc/pcb.html
index 5f039ce..c08ba3b 100644
--- a/doc/pcb.html
+++ b/doc/pcb.html
@@ -63,6 +63,7 @@ board layout system.
 <li><a href="#Regular-Expressions">Regular Expressions</a>:     Searching for elements with regular expressions
 <li><a href="#Standard-Drill-Sizes">Standard Drill Sizes</a>:    Tables of standard drill sizes
 <li><a href="#Centroid-File-Format">Centroid File Format</a>:    Details of the centroid (x-y) output file
+<li><a href="#Annotation-File-Format">Annotation File Format</a>:  Details of the back annotation output file
 <li><a href="#Action-Reference">Action Reference</a>:        Documentation for all available actions
 <li><a href="#Glossary">Glossary</a>:                Glossary
 <li><a href="#Index">Index</a>:                   The Index. 
@@ -138,7 +139,7 @@ a polygon.  A variety of other enhancements including a Gerber RS-274X
 driver and NC drill file generation have also been added.
 
    <p>Release 1.6 provides automatic screen updates of changed regions. 
-This should eliminate most of the need for the redraw ((<em>R</em> key). 
+This should eliminate most of the need for the redraw (<em>R</em> key). 
 Also some changes to what order items under the cursor are selected
 were made for better consistency - it is no longer possible to
 accidentally move a line or line point that is completely obscured
@@ -552,7 +553,7 @@ and a new line started where the first one ended.
 You can abandon the new starting point in favor
 of another by pressing <em>Ctrl-Btn1</em>, or
 <em>Btn3</em>, but don't use <em>Btn2</em>. 
-The undo function (<em>U</em> key or ‘<samp><span class="samp">undo last operation</span></samp>’
+The undo function (<em>U</em> key or ‘<samp><span class="samp">Undo</span></samp>’
 from the <b>Edit</b> menu) will take you back
 point by point if you use it while in the line mode.
 
@@ -583,7 +584,7 @@ polygon creating a clearance, or touch the polygon. This behavior is
 selectable in the <b>Settings</b> menu for new lines. To change the
 behavior of an existing line, hit the <em>J</em> key with the cross hair
 over the line. You can increase the size of the clearance by 2 mils on
-each edge with the with the
+each edge with the
 <em>K</em> key. <em>Shift-K</em> will decrease the clearance by 2 mils. 
 The increment may be changed from 2 mils through the application
 resource file. 
@@ -624,7 +625,7 @@ starting point is established at the end point.
 
    <p>Whenever a starting point is established
 by either the Line or Arc tools it will be retained if you switch directly between the
-tools (e.g. <em>F2</em> key for Lines, <em>F8</em> key for Arcs. Arcs can either touch or
+tools (e.g. <em>F2</em> key for Lines, <em>F8</em> key for Arcs). Arcs can either touch or
 clear polygons just like lines do. Of course connection
 searches, undo and all the other features you'd expect work with arcs too.
 
@@ -784,6 +785,7 @@ if that works, then <code>Pcb</code> hasn't been installed properly.
 <li><a accesskey="7" href="#Loading-and-Saving">Loading and Saving</a>
 <li><a accesskey="8" href="#Printing">Printing</a>:                Creating Gerber files or postscript files
 <li><a accesskey="9" href="#Exporting">Exporting</a>:               Exporting a layout. 
+<li><a href="#Connection-Lists">Connection Lists</a>:        How to get a list of all or some connections. 
 <li><a href="#Arrow-Tool">Arrow Tool</a>:              Selecting/Moving objects. 
 <li><a href="#Rats-Nest">Rats Nest</a>: 		   Helps you place and route tracks against a netlist. 
 <li><a href="#Design-Rule-Checking">Design Rule Checking</a>:    Check for manufactureability
@@ -791,7 +793,6 @@ if that works, then <code>Pcb</code> hasn't been installed properly.
 <li><a href="#Searching-for-elements">Searching for elements</a>:  Searching for elements
 <li><a href="#Measuring-distances">Measuring distances</a>:     Measuring distances
 <li><a href="#Vendor-drill-mapping">Vendor drill mapping</a>:    Mapping drills to a vendor specified list
-<li><a href="#Connection-Lists">Connection Lists</a>:        How to get a list of all or some connections. 
 </ul>
 
 <div class="node">
@@ -854,10 +855,11 @@ take any of the actions, click on one of the headers in the menu.
 connection information to a file or quitting the application. Most
 of the entries in the <b>File</b> menu are self explanatory. 
 Selecting
-‘<samp><span class="samp">print layout</span></samp>’ pops up a printer control dialog. 
-A selection of several device drivers is available from the printer control
-dialog. Presently <em>PostScript</em>, <em>encapsulated PostScript</em>,
-and <em>GerberX</em> are supported. The <em>GerberX</em> driver produces
+‘<samp><span class="samp">Print...</span></samp>’ pops up a printer control dialog. 
+Several output formats are available from the ‘<samp><span class="samp">Export...</span></samp>’ menu item. 
+Presently <em>PostScript</em>, <em>encapsulated PostScript</em>,
+and <em>GerberX</em> are some of the supported filetypes. 
+The <em>GerberX</em> driver produces
 all of the files necessary to have the board professionally manufactured. 
 The connection saving features in the <b>File</b> menu produce outputs in an
 arcane format that is not too useful. They do <em>not</em> produce netlist
@@ -872,7 +874,15 @@ can also be accomplished with the <em>U</em> key and <em>Shift-R</em>
 key.  Finally, the <b>Edit</b> menu allows you to change the names
 of: the layout, the active layer, or text objects on the layout.
 
-     <p><a name="index-Screen_002c-popup-menu-29"></a><a name="index-displaying-element-names-30"></a><a name="index-element_002c-display-names-of-31"></a><a name="index-grid_002c-display-32"></a><a name="index-grid_002c-alignment-33"></a><a name="index-zoom_002c-setting-34"></a><br><dt><b>Screen</b><dd>The <b>Screen</b> menu supports most functions related to
+     <p><a name="index-Route-Styles_002c-popup-menu-29"></a><br><dt><b>Routes Style</b><dd>The <b>Edit</b> menu allows you to select a group of line thickness, via diameter, via drill
+size, and clearance (keepaway) (collectively called a "routing style") to be copied to the "active" sizes. 
+You can also change the names given to the routing styles and adjust their values from
+this menu.  The "active" sizes are also adjustable from this menu. 
+The "active" sizes are shown in the status-line and control the initial size of new vias,
+drilling holes, lines, clearances, text-objects and also the maximum dimensions of the
+board layout.
+
+     <p><a name="index-View_002c-popup-menu-30"></a><a name="index-displaying-element-names-31"></a><a name="index-element_002c-display-names-of-32"></a><a name="index-grid_002c-display-33"></a><a name="index-grid_002c-alignment-34"></a><a name="index-zoom_002c-setting-35"></a><br><dt><b>View</b><dd>The <b>View</b> menu supports most functions related to
 the whole Layout area. There are various entries to change the grid to some popular
 values, the zoom factor, and which kind of element name is displayed. 
 You can also re-align the grid origin and turn on and off the display
@@ -881,29 +891,18 @@ Before changing the grid alignment, I recommend that you zoom in as close as
 possible so that you're sure the grid
 points appear exactly where you want them.
 
-     <p><a name="index-solder-mask_002c-viewing-and-editing-35"></a>The <b>Screen</b> menu also allows you to turn on and off the
+     <p><a name="index-solder-mask_002c-viewing-and-editing-36"></a>The <b>View</b> menu also allows you to turn on and off the
 visibility of the solder-mask layer. When the solder-mask layer
 is made visible it obscures most of the layout, so only turn
 this on when you really want to know what the solder-mask will
 look like. The solder-mask that you see belongs to the
 side of the board you are viewing, which can be changed with
-the ‘<samp><span class="samp">view solder side</span></samp>’ option, also found in the <b>Screen</b> menu. 
+the ‘<samp><span class="samp">Flip up/down</span></samp>’ option, also found in the <b>View</b> menu. 
 When the solder-mask is displayed, the pin and pad clearance adjustments
 (see <a href="#Line-Objects">Line Objects</a>) alter the size of mask cut-outs.
 
-     <p><a name="index-Sizes_002c-popup-menu-36"></a><br><dt><b>Sizes</b><dd>The <b>Sizes</b> menu allows you to select a group of line thickness, via diameter, via drill
-size, and clearance (keepaway) (collectively called a "routing style") to be copied to the "active" sizes. 
-You can also change the names given to the routing styles and adjust their values from
-this menu.  The "active" sizes are also adjustable from this menu. 
-The "active" sizes are shown in the status-line and control the initial size of new vias,
-drilling holes, lines, clearances, text-objects and also the maximum dimensions of the
-board layout.
-
      <p><a name="index-Settings_002c-popup-menu-37"></a><a name="index-unique-names-38"></a><a name="index-rubber-band-39"></a><a name="index-snap-to-pins-40"></a><a name="index-clearance_002c-for-new-lines-41"></a><br><dt><b>Settings</b><dd>The <b>Settings</b> menu controls several operating configuration
-parameters. The ‘<samp><span class="samp">edit layer groups</span></samp>’ entry brings up a dialog
-that allows you to change the way layers are grouped. Layer grouping
-is described in <a href="#Layer-Objects">Layer Objects</a>. The ‘<samp><span class="samp">all-direction lines</span></samp>’
-entry controls
+parameters. The ‘<samp><span class="samp">all-direction lines</span></samp>’ entry controls
 the clipping of lines to 45-degree angles. You can also control
 whether moving individual objects causes the attached lines to
 "rubber band" with the move or not from the <b>Settings</b> menu. Another
@@ -933,7 +932,7 @@ by name using unix <a href="#Regular-Expressions">Regular Expressions</a>.
 
      <p><a name="index-Buffer_002c-popup-menu-45"></a><a name="index-pastebuffer_002c-popup-menu-46"></a><a name="index-element_002c-editing-47"></a><br><dt><b>Buffer</b><dd>From the <b>Buffer</b> menu you may select one out of five
 buffers to use, rotate or clear its contents or save the buffer contents
-to a file. You can also use the ‘<samp><span class="samp">break buffer element to pieces</span></samp>’ entry
+to a file. You can also use the ‘<samp><span class="samp">break buffer elements to pieces</span></samp>’ entry
 to de-compose an element into pieces for editing. 
 Note: only objects with visibility turned on are pasted to the layout. If
 you have something in a buffer, then change which side of the board you
@@ -982,7 +981,7 @@ the list of connections desired.
 
    <p>Now that you're familiar with the various menus, it's time
 to try some things out. From the <b>File</b> menu choose
-‘<samp><span class="samp">load layout</span></samp>’, navigate to the tutorial folder, then
+‘<samp><span class="samp">Open...</span></samp>’, navigate to the tutorial folder, then
 load the file ‘<samp><span class="samp">tut1.pcb</span></samp>’.
 
 <div class="node">
@@ -1362,8 +1361,7 @@ can be used to select (on the layout) everything that is connected
 (or is supposed to be connected) to the net. If you click on a
 connection in the connection list, it will select/deselect
 the corresponding pin or pad in the layout and also center the layout
-window where it is located. If you "Find" (‘<samp><span class="samp">lookup connection
-to object</span></samp>’ in the <b>Connects</b> menu [also <em>F</em> key]), a pin
+window where it is located. If you "Find" (‘<samp><span class="samp">lookup connection</span></samp>’ in the <b>Connects</b> menu [also <em>F</em> key]), a pin
 or pad it will also choose the net and connection in the netlist window
 if it exists in the netlist.
 
@@ -1726,7 +1724,7 @@ the location of the other pins.  Next make a solder-side layer the active
 layer from the <em>active-layer</em> popup menu.  Now draw the outline of
 the element using lines and arcs.  When you're done, select everything that
 makes up the element with a box selection (<em><Btn3Down> drag,
-<Btn3Up></em>). Now select "cut selection to buffer" from the <em>Buffer</em>
+<Btn3Up></em>). Now select "cut to buffer" from the <em>Buffer</em>
 menu. Position the cursor over the center of pin 1 and press the left
 button to load the data into the buffer. 
 Finally select "convert buffer to element" from the <em>Buffer</em> menu. 
@@ -1853,7 +1851,7 @@ Saving also is available from the <em>File</em> menu, either with or
 without supplying a filename. <code>Pcb</code> reuses the last
 filename if you do not pass a new one to the save routine.
 
-   <p>To load an existing layout either select <em>load layout data</em> from the
+   <p>To load an existing layout either select <em>Open...</em> from the
 <em>File</em> menu or use <kbd>:l filename</kbd>. A file select box pops up if you
 don't specify a filename. Merging existing layouts into the new one is
 supported either by the <em>File</em> menu or by <kbd>:m filename</kbd>.
@@ -1866,7 +1864,7 @@ has not been saved yet, then the backup file name is <samp><span class="file">PC
 will be replaced by the process ID of the currenting running copy of <code>Pcb</code>. 
 This default backup file name may be changed at compilation time via the
 <code>BACKUP_NAME</code>
-variable in <samp><span class="file">globalconfig.h</span></samp>).  During critical
+variable in <samp><span class="file">globalconfig.h</span></samp>.  During critical
 sections of the program or when data would be lost it is saved as
 <samp><span class="file">PCB.%i.save</span></samp>.  This file name may be changed at compile time
 with the <code>SAVE_NAME</code> variable in <samp><span class="file">globalconfig.h</span></samp>.
@@ -1901,7 +1899,7 @@ See the page about
 the <em>Print()</em> action for additional information about the filenames. 
 The control panel offers a number of options. Most of them are not available
 for Gerber output because it wouldn't make sense, for example,  to scale the gerber output
-(you'd get an incorrectly made board!)  The options are:
+(you'd get an incorrectly made board!). The options are:
 
      
 <a name="index-device_002c-selecting-an-output-126"></a>
@@ -1983,7 +1981,7 @@ Note, the normal <code>PostScript</code> units are 1/72 inch.
 <div class="node">
 <a name="Exporting"></a>
 <p><hr>
-Next: <a rel="next" accesskey="n" href="#Arrow-Tool">Arrow Tool</a>,
+Next: <a rel="next" accesskey="n" href="#Connection-Lists">Connection Lists</a>,
 Previous: <a rel="previous" accesskey="p" href="#Printing">Printing</a>,
 Up: <a rel="up" accesskey="u" href="#Getting-Started">Getting Started</a>
 
@@ -2168,7 +2166,8 @@ Can be later converted to pdf.
 <div class="node">
 <a name="Connection-Lists"></a>
 <p><hr>
-Previous: <a rel="previous" accesskey="p" href="#Vendor-drill-mapping">Vendor drill mapping</a>,
+Next: <a rel="next" accesskey="n" href="#Arrow-Tool">Arrow Tool</a>,
+Previous: <a rel="previous" accesskey="p" href="#Exporting">Exporting</a>,
 Up: <a rel="up" accesskey="u" href="#Getting-Started">Getting Started</a>
 
 </div>
@@ -2214,7 +2213,7 @@ menu.
 <a name="Arrow-Tool"></a>
 <p><hr>
 Next: <a rel="next" accesskey="n" href="#Rats-Nest">Rats Nest</a>,
-Previous: <a rel="previous" accesskey="p" href="#Exporting">Exporting</a>,
+Previous: <a rel="previous" accesskey="p" href="#Connection-Lists">Connection Lists</a>,
 Up: <a rel="up" accesskey="u" href="#Getting-Started">Getting Started</a>
 
 </div>
@@ -2481,7 +2480,6 @@ cursor coordinates.
 <div class="node">
 <a name="Vendor-drill-mapping"></a>
 <p><hr>
-Next: <a rel="next" accesskey="n" href="#Connection-Lists">Connection Lists</a>,
 Previous: <a rel="previous" accesskey="p" href="#Measuring-distances">Measuring distances</a>,
 Up: <a rel="up" accesskey="u" href="#Getting-Started">Getting Started</a>
 
@@ -2606,7 +2604,7 @@ steps will autoroute your design.
 <li>Turn off visibility of any layers that you don't want the router
 to use.
 
-     <li>Turn of via visibility if you don't want the router to use any
+     <li>Turn off via visibility if you don't want the router to use any
 new vias.
 
      <li>Use only plain rectangles for power/ground planes that you want
@@ -2629,7 +2627,7 @@ new vias.
    use for any nets not having a defined route style in the netlist.
 
      <li>Disable any nets that you don't want the autorouter to route
-   (double-click them in the  netlist window to add/remove the *)
+   (double-click them in the  netlist window to add/remove the *).
 
      <p>NOTE: If you will be manually routing these later not using
    planes, it is usually better to let the autorouter route them then rip
@@ -2637,10 +2635,10 @@ new vias.
    manually, consider making it from one or more pure rectangles and
    letting the autorouter have a go at it.
 
-     <li>Create a fresh rat's nest. ('E' the 'W')
+     <li>Create a fresh rat's nest. (<em>E</em> then <em>W</em>)
 
      <li>Select “show autorouter trials” in the settings menu if you want
-   to watch what's happening
+   to watch what's happening.
 
      <li>Choose “autoroute all rats” in the connection menu.
 
@@ -2830,91 +2828,131 @@ Up: <a rel="up" accesskey="u" href="#Command_002dLine-Options">Command-Line
 
 <h3 class="section">6.1 General Options</h3>
 
-<!-- ./../src/main.c 434 -->
+<!-- ./../src/main.c 440 -->
      <dl>
 <dt><code>--help</code><a name="index-g_t_002d_002dhelp-209"></a><dd>Show help on command line options. 
 </dl>
-<!-- ./../src/main.c 439 -->
+<!-- ./../src/main.c 445 -->
      <dl>
 <dt><code>--version</code><a name="index-g_t_002d_002dversion-210"></a><dd>Show version. 
 </dl>
-   <!-- ./../src/main.c 443 -->
+   <!-- ./../src/main.c 449 -->
      <dl>
 <dt><code>--verbose</code><a name="index-g_t_002d_002dverbose-211"></a><dd>Be verbose on stdout. 
 </dl>
-   <!-- ./../src/main.c 448 -->
+   <!-- ./../src/main.c 454 -->
      <dl>
 <dt><code>--copyright</code><a name="index-g_t_002d_002dcopyright-212"></a><dd>Show copyright. 
 </dl>
-   <!-- ./../src/main.c 453 -->
+   <!-- ./../src/main.c 459 -->
      <dl>
 <dt><code>--show-defaults</code><a name="index-g_t_002d_002dshow_002ddefaults-213"></a><dd>Show option defaults. 
 </dl>
-   <!-- ./../src/main.c 458 -->
+   <!-- ./../src/main.c 464 -->
      <dl>
 <dt><code>--show-actions</code><a name="index-g_t_002d_002dshow_002dactions-214"></a><dd>Show available actions and exit. 
 </dl>
-   <!-- ./../src/main.c 463 -->
+   <!-- ./../src/main.c 469 -->
      <dl>
 <dt><code>--dump-actions</code><a name="index-g_t_002d_002ddump_002dactions-215"></a><dd>Dump actions (for documentation). 
 </dl>
-   <!-- ./../src/main.c 468 -->
+   <!-- ./../src/main.c 474 -->
      <dl>
 <dt><code>--grid-units-mm <string></code><a name="index-g_t_002d_002dgrid_002dunits_002dmm-_003cstring_003e-216"></a><dd>Set default grid units. Can be mm or mil. Defaults to mil. 
 </dl>
-   <!-- ./../src/main.c 686 -->
+   <!-- ./../src/main.c 479 -->
+     <dl>
+<dt><code>--clear-increment-mm <string></code><a name="index-g_t_002d_002dclear_002dincrement_002dmm-_003cstring_003e-217"></a><dd>Set default clear increment (amount to change when user presses k or K)
+when user is using a metric grid unit. 
+</dl>
+   <!-- ./../src/main.c 484 -->
+     <dl>
+<dt><code>--grid-increment-mm <string></code><a name="index-g_t_002d_002dgrid_002dincrement_002dmm-_003cstring_003e-218"></a><dd>Set default grid increment (amount to change when user presses g or G)
+when user is using a metric grid unit. 
+</dl>
+   <!-- ./../src/main.c 489 -->
+     <dl>
+<dt><code>--line-increment-mm <string></code><a name="index-g_t_002d_002dline_002dincrement_002dmm-_003cstring_003e-219"></a><dd>Set default line increment (amount to change when user presses l or L)
+when user is using a metric grid unit. 
+</dl>
+   <!-- ./../src/main.c 494 -->
+     <dl>
+<dt><code>--size-increment-mm <string></code><a name="index-g_t_002d_002dsize_002dincrement_002dmm-_003cstring_003e-220"></a><dd>Set default size increment (amount to change when user presses s or S)
+when user is using a metric grid unit. 
+</dl>
+   <!-- ./../src/main.c 499 -->
+     <dl>
+<dt><code>--clear-increment-mil <string></code><a name="index-g_t_002d_002dclear_002dincrement_002dmil-_003cstring_003e-221"></a><dd>Set default clear increment (amount to change when user presses k or K)
+when user is using an imperial grid unit. 
+</dl>
+   <!-- ./../src/main.c 504 -->
+     <dl>
+<dt><code>--grid-increment-mil <string></code><a name="index-g_t_002d_002dgrid_002dincrement_002dmil-_003cstring_003e-222"></a><dd>Set default grid increment (amount to change when user presses g or G)
+when user is using a imperial grid unit. 
+</dl>
+   <!-- ./../src/main.c 509 -->
      <dl>
-<dt><code>--backup-interval</code><a name="index-g_t_002d_002dbackup_002dinterval-217"></a><dd>Time between automatic backups in seconds. Set to <code>0</code> to disable. 
+<dt><code>--line-increment-mil <string></code><a name="index-g_t_002d_002dline_002dincrement_002dmil-_003cstring_003e-223"></a><dd>Set default line increment (amount to change when user presses l or L)
+when user is using a imperial grid unit. 
+</dl>
+   <!-- ./../src/main.c 514 -->
+     <dl>
+<dt><code>--size-increment-mil <string></code><a name="index-g_t_002d_002dsize_002dincrement_002dmil-_003cstring_003e-224"></a><dd>Set default size increment (amount to change when user presses s or S)
+when user is using a imperial grid unit. 
+</dl>
+   <!-- ./../src/main.c 737 -->
+     <dl>
+<dt><code>--backup-interval</code><a name="index-g_t_002d_002dbackup_002dinterval-225"></a><dd>Time between automatic backups in seconds. Set to <code>0</code> to disable. 
 The default value is <code>60</code>. 
 </dl>
-   <!-- ./../src/main.c 723 -->
+   <!-- ./../src/main.c 774 -->
      <dl>
-<dt><code>--groups <string></code><a name="index-g_t_002d_002dgroups-_003cstring_003e-218"></a><dd>Layer group string. Defaults to <code>"1,c:2:3:4:5:6,s:7:8"</code>. 
+<dt><code>--groups <string></code><a name="index-g_t_002d_002dgroups-_003cstring_003e-226"></a><dd>Layer group string. Defaults to <code>"1,c:2:3:4:5:6,s:7:8"</code>. 
 </dl>
-   <!-- ./../src/main.c 788 -->
+   <!-- ./../src/main.c 839 -->
      <dl>
-<dt><code>--route-styles <string></code><a name="index-g_t_002d_002droute_002dstyles-_003cstring_003e-219"></a><dd>A string that defines the route styles. Defaults to <br>
+<dt><code>--route-styles <string></code><a name="index-g_t_002d_002droute_002dstyles-_003cstring_003e-227"></a><dd>A string that defines the route styles. Defaults to <br>
 <code>"Signal,1000,3600,2000,1000:Power,2500,6000,3500,1000
 	:Fat,4000,6000,3500,1000:Skinny,600,2402,1181,600"</code>
 </dl>
-   <!-- ./../src/main.c 807 -->
+   <!-- ./../src/main.c 858 -->
      <dl>
-<dt><code>--element-path <string></code><a name="index-g_t_002d_002delement_002dpath-_003cstring_003e-220"></a><dd>A colon separated list of directories or commands (starts with '|'). 
+<dt><code>--element-path <string></code><a name="index-g_t_002d_002delement_002dpath-_003cstring_003e-228"></a><dd>A colon separated list of directories or commands (starts with '|'). 
 The path is passed to the program specified in <samp><span class="option">--element-command</span></samp>. 
 </dl>
-   <!-- ./../src/main.c 817 -->
+   <!-- ./../src/main.c 868 -->
      <dl>
-<dt><code>--action-script <string></code><a name="index-g_t_002d_002daction_002dscript-_003cstring_003e-221"></a><dd>If set, this file is executed at startup. 
+<dt><code>--action-script <string></code><a name="index-g_t_002d_002daction_002dscript-_003cstring_003e-229"></a><dd>If set, this file is executed at startup. 
 </dl>
-   <!-- ./../src/main.c 822 -->
+   <!-- ./../src/main.c 873 -->
      <dl>
-<dt><code>--action-string <string></code><a name="index-g_t_002d_002daction_002dstring-_003cstring_003e-222"></a><dd>If set, this string of actions is executed at startup. 
+<dt><code>--action-string <string></code><a name="index-g_t_002d_002daction_002dstring-_003cstring_003e-230"></a><dd>If set, this string of actions is executed at startup. 
 </dl>
-   <!-- ./../src/main.c 827 -->
+   <!-- ./../src/main.c 878 -->
      <dl>
-<dt><code>--fab-author <string></code><a name="index-g_t_002d_002dfab_002dauthor-_003cstring_003e-223"></a><dd>Name of author to be put in the Gerber files. 
+<dt><code>--fab-author <string></code><a name="index-g_t_002d_002dfab_002dauthor-_003cstring_003e-231"></a><dd>Name of author to be put in the Gerber files. 
 </dl>
-   <!-- ./../src/main.c 832 -->
+   <!-- ./../src/main.c 883 -->
      <dl>
-<dt><code>--layer-stack <string></code><a name="index-g_t_002d_002dlayer_002dstack-_003cstring_003e-224"></a><dd>Initial layer stackup, for setting up an export. A comma separated list of layer
+<dt><code>--layer-stack <string></code><a name="index-g_t_002d_002dlayer_002dstack-_003cstring_003e-232"></a><dd>Initial layer stackup, for setting up an export. A comma separated list of layer
 names, layer numbers and layer groups. 
 </dl>
-   <!-- ./../src/main.c 883 -->
+   <!-- ./../src/main.c 934 -->
      <dl>
-<dt><code>--save-last-command</code><a name="index-g_t_002d_002dsave_002dlast_002dcommand-225"></a><dd>If set, the last user command is saved. 
+<dt><code>--save-last-command</code><a name="index-g_t_002d_002dsave_002dlast_002dcommand-233"></a><dd>If set, the last user command is saved. 
 </dl>
-   <!-- ./../src/main.c 887 -->
+   <!-- ./../src/main.c 938 -->
      <dl>
-<dt><code>--save-in-tmp</code><a name="index-g_t_002d_002dsave_002din_002dtmp-226"></a><dd>If set, all data which would otherwise be lost are saved in a temporary file
+<dt><code>--save-in-tmp</code><a name="index-g_t_002d_002dsave_002din_002dtmp-234"></a><dd>If set, all data which would otherwise be lost are saved in a temporary file
 <samp><span class="file">/tmp/PCB.%i.save</span></samp> . Sequence ‘<samp><span class="samp">%i</span></samp>’ is replaced by the process ID. 
 </dl>
-   <!-- ./../src/main.c 901 -->
+   <!-- ./../src/main.c 952 -->
      <dl>
-<dt><code>--reset-after-element</code><a name="index-g_t_002d_002dreset_002dafter_002delement-227"></a><dd>If set, all found connections are reset before a new component is scanned. 
+<dt><code>--reset-after-element</code><a name="index-g_t_002d_002dreset_002dafter_002delement-235"></a><dd>If set, all found connections are reset before a new component is scanned. 
 </dl>
-   <!-- ./../src/main.c 906 -->
+   <!-- ./../src/main.c 957 -->
      <dl>
-<dt><code>--ring-bell-finished</code><a name="index-g_t_002d_002dring_002dbell_002dfinished-228"></a><dd>Execute the bell command when all rats are routed. 
+<dt><code>--ring-bell-finished</code><a name="index-g_t_002d_002dring_002dbell_002dfinished-236"></a><dd>Execute the bell command when all rats are routed. 
 </dl>
    <!-- options General GUI Options -->
 <div class="node">
@@ -2928,51 +2966,51 @@ Up: <a rel="up" accesskey="u" href="#Command_002dLine-Options">Command-Line
 
 <h3 class="section">6.2 General GUI Options</h3>
 
-<!-- ./../src/main.c 842 -->
+<!-- ./../src/main.c 893 -->
      <dl>
-<dt><code>--pinout-offset-x <num></code><a name="index-g_t_002d_002dpinout_002doffset_002dx-_003cnum_003e-229"></a><dd>Horizontal offset of the pin number display. Defaults to <code>100mil</code>. 
+<dt><code>--pinout-offset-x <num></code><a name="index-g_t_002d_002dpinout_002doffset_002dx-_003cnum_003e-237"></a><dd>Horizontal offset of the pin number display. Defaults to <code>100mil</code>. 
 </dl>
-<!-- ./../src/main.c 847 -->
+<!-- ./../src/main.c 898 -->
      <dl>
-<dt><code>--pinout-offset-y <num></code><a name="index-g_t_002d_002dpinout_002doffset_002dy-_003cnum_003e-230"></a><dd>Vertical offset of the pin number display. Defaults to <code>100mil</code>. 
+<dt><code>--pinout-offset-y <num></code><a name="index-g_t_002d_002dpinout_002doffset_002dy-_003cnum_003e-238"></a><dd>Vertical offset of the pin number display. Defaults to <code>100mil</code>. 
 </dl>
-   <!-- ./../src/main.c 852 -->
+   <!-- ./../src/main.c 903 -->
      <dl>
-<dt><code>--pinout-text-offset-x <num></code><a name="index-g_t_002d_002dpinout_002dtext_002doffset_002dx-_003cnum_003e-231"></a><dd>Horizontal offset of the pin name display. Defaults to <code>800mil</code>. 
+<dt><code>--pinout-text-offset-x <num></code><a name="index-g_t_002d_002dpinout_002dtext_002doffset_002dx-_003cnum_003e-239"></a><dd>Horizontal offset of the pin name display. Defaults to <code>800mil</code>. 
 </dl>
-   <!-- ./../src/main.c 857 -->
+   <!-- ./../src/main.c 908 -->
      <dl>
-<dt><code>--pinout-text-offset-y <num></code><a name="index-g_t_002d_002dpinout_002dtext_002doffset_002dy-_003cnum_003e-232"></a><dd>Vertical offset of the pin name display. Defaults to <code>-100mil</code>. 
+<dt><code>--pinout-text-offset-y <num></code><a name="index-g_t_002d_002dpinout_002dtext_002doffset_002dy-_003cnum_003e-240"></a><dd>Vertical offset of the pin name display. Defaults to <code>-100mil</code>. 
 </dl>
-   <!-- ./../src/main.c 862 -->
+   <!-- ./../src/main.c 913 -->
      <dl>
-<dt><code>--draw-grid</code><a name="index-g_t_002d_002ddraw_002dgrid-233"></a><dd>If set, draw the grid at start-up. 
+<dt><code>--draw-grid</code><a name="index-g_t_002d_002ddraw_002dgrid-241"></a><dd>If set, draw the grid at start-up. 
 </dl>
-   <!-- ./../src/main.c 866 -->
+   <!-- ./../src/main.c 917 -->
      <dl>
-<dt><code>--clear-line</code><a name="index-g_t_002d_002dclear_002dline-234"></a><dd>If set, new lines clear polygons. 
+<dt><code>--clear-line</code><a name="index-g_t_002d_002dclear_002dline-242"></a><dd>If set, new lines clear polygons. 
 </dl>
-   <!-- ./../src/main.c 870 -->
+   <!-- ./../src/main.c 921 -->
      <dl>
-<dt><code>--full-poly</code><a name="index-g_t_002d_002dfull_002dpoly-235"></a><dd>If set, new polygons are full ones. 
+<dt><code>--full-poly</code><a name="index-g_t_002d_002dfull_002dpoly-243"></a><dd>If set, new polygons are full ones. 
 </dl>
-   <!-- ./../src/main.c 874 -->
+   <!-- ./../src/main.c 925 -->
      <dl>
-<dt><code>--unique-names</code><a name="index-g_t_002d_002dunique_002dnames-236"></a><dd>If set, you will not be permitted to change the name of an component to match that
+<dt><code>--unique-names</code><a name="index-g_t_002d_002dunique_002dnames-244"></a><dd>If set, you will not be permitted to change the name of an component to match that
 of another component. 
 </dl>
-   <!-- ./../src/main.c 878 -->
+   <!-- ./../src/main.c 929 -->
      <dl>
-<dt><code>--snap-pin</code><a name="index-g_t_002d_002dsnap_002dpin-237"></a><dd>If set, pin centers and pad end points are treated as additional grid points
+<dt><code>--snap-pin</code><a name="index-g_t_002d_002dsnap_002dpin-245"></a><dd>If set, pin centers and pad end points are treated as additional grid points
 that the cursor can snap to. 
 </dl>
-   <!-- ./../src/main.c 892 -->
+   <!-- ./../src/main.c 943 -->
      <dl>
-<dt><code>--all-direction-lines</code><a name="index-g_t_002d_002dall_002ddirection_002dlines-238"></a><dd>Allow all directions, when drawing new lines. 
+<dt><code>--all-direction-lines</code><a name="index-g_t_002d_002dall_002ddirection_002dlines-246"></a><dd>Allow all directions, when drawing new lines. 
 </dl>
-   <!-- ./../src/main.c 897 -->
+   <!-- ./../src/main.c 948 -->
      <dl>
-<dt><code>--show-number</code><a name="index-g_t_002d_002dshow_002dnumber-239"></a><dd>Pinout shows number. 
+<dt><code>--show-number</code><a name="index-g_t_002d_002dshow_002dnumber-247"></a><dd>Pinout shows number. 
 </dl>
    <!-- options GTK+ GUI Options -->
 <div class="node">
@@ -2987,19 +3025,19 @@ Up: <a rel="up" accesskey="u" href="#Command_002dLine-Options">Command-Line
 
 <h3 class="section">6.3 GTK+ GUI Options</h3>
 
-<!-- ./../src/hid/gtk/gui-top-window.c 1615 -->
+<!-- ./../src/hid/gtk/gui-top-window.c 1672 -->
      <dl>
-<dt><code>--listen</code><a name="index-g_t_002d_002dlisten-240"></a><dd>Listen for actions on stdin. 
+<dt><code>--listen</code><a name="index-g_t_002d_002dlisten-248"></a><dd>Listen for actions on stdin. 
 </dl>
-<!-- ./../src/hid/gtk/gui-top-window.c 1621 -->
+<!-- ./../src/hid/gtk/gui-top-window.c 1678 -->
      <dl>
-<dt><code>--bg-image <string></code><a name="index-g_t_002d_002dbg_002dimage-_003cstring_003e-241"></a><dd>File name of an image to put into the background of the GUI canvas. The image must
+<dt><code>--bg-image <string></code><a name="index-g_t_002d_002dbg_002dimage-_003cstring_003e-249"></a><dd>File name of an image to put into the background of the GUI canvas. The image must
 be a color PPM image, in binary (not ASCII) format. It can be any size, and will be
 automatically scaled to fit the canvas. 
 </dl>
-   <!-- ./../src/hid/gtk/gui-top-window.c 1627 -->
+   <!-- ./../src/hid/gtk/gui-top-window.c 1684 -->
      <dl>
-<dt><code>--pcb-menu <string></code><a name="index-g_t_002d_002dpcb_002dmenu-_003cstring_003e-242"></a><dd>Location of the <samp><span class="file">gpcb-menu.res</span></samp> file which defines the menu for the GTK+ GUI. 
+<dt><code>--pcb-menu <string></code><a name="index-g_t_002d_002dpcb_002dmenu-_003cstring_003e-250"></a><dd>Location of the <samp><span class="file">gpcb-menu.res</span></samp> file which defines the menu for the GTK+ GUI. 
 </dl>
    <!-- options lesstif GUI Options -->
 <div class="node">
@@ -3013,19 +3051,19 @@ Up: <a rel="up" accesskey="u" href="#Command_002dLine-Options">Command-Line
 
 <h3 class="section">6.4 lesstif GUI Options</h3>
 
-<!-- ./../src/hid/lesstif/main.c 201 -->
+<!-- ./../src/hid/lesstif/main.c 198 -->
      <dl>
-<dt><code>--listen</code><a name="index-g_t_002d_002dlisten-243"></a><dd>Listen for actions on stdin. 
+<dt><code>--listen</code><a name="index-g_t_002d_002dlisten-251"></a><dd>Listen for actions on stdin. 
 </dl>
-<!-- ./../src/hid/lesstif/main.c 207 -->
+<!-- ./../src/hid/lesstif/main.c 204 -->
      <dl>
-<dt><code>--bg-image <string></code><a name="index-g_t_002d_002dbg_002dimage-_003cstring_003e-244"></a><dd>File name of an image to put into the background of the GUI canvas. The image must
+<dt><code>--bg-image <string></code><a name="index-g_t_002d_002dbg_002dimage-_003cstring_003e-252"></a><dd>File name of an image to put into the background of the GUI canvas. The image must
 be a color PPM image, in binary (not ASCII) format. It can be any size, and will be
 automatically scaled to fit the canvas. 
 </dl>
-   <!-- ./../src/hid/lesstif/main.c 213 -->
+   <!-- ./../src/hid/lesstif/main.c 210 -->
      <dl>
-<dt><code>--pcb-menu <string></code><a name="index-g_t_002d_002dpcb_002dmenu-_003cstring_003e-245"></a><dd>Location of the <samp><span class="file">pcb-menu.res</span></samp> file which defines the menu for the lesstif GUI. 
+<dt><code>--pcb-menu <string></code><a name="index-g_t_002d_002dpcb_002dmenu-_003cstring_003e-253"></a><dd>Location of the <samp><span class="file">pcb-menu.res</span></samp> file which defines the menu for the lesstif GUI. 
 </dl>
    <!-- options Colors -->
 <div class="node">
@@ -3039,97 +3077,101 @@ Up: <a rel="up" accesskey="u" href="#Command_002dLine-Options">Command-Line
 
 <h3 class="section">6.5 Colors</h3>
 
-<!-- ./../src/main.c 473 -->
+<!-- ./../src/main.c 519 -->
      <dl>
-<dt><code>--black-color <string></code><a name="index-g_t_002d_002dblack_002dcolor-_003cstring_003e-246"></a><dd>Color value for black. Default: ‘<samp><span class="samp">#000000</span></samp>’
+<dt><code>--black-color <string></code><a name="index-g_t_002d_002dblack_002dcolor-_003cstring_003e-254"></a><dd>Color value for black. Default: ‘<samp><span class="samp">#000000</span></samp>’
 </dl>
-<!-- ./../src/main.c 477 -->
+<!-- ./../src/main.c 523 -->
      <dl>
-<dt><code>--black-color <string></code><a name="index-g_t_002d_002dblack_002dcolor-_003cstring_003e-247"></a><dd>Color value for white. Default: ‘<samp><span class="samp">#ffffff</span></samp>’
+<dt><code>--black-color <string></code><a name="index-g_t_002d_002dblack_002dcolor-_003cstring_003e-255"></a><dd>Color value for white. Default: ‘<samp><span class="samp">#ffffff</span></samp>’
 </dl>
-   <!-- ./../src/main.c 481 -->
+   <!-- ./../src/main.c 527 -->
      <dl>
-<dt><code>--background-color <string></code><a name="index-g_t_002d_002dbackground_002dcolor-_003cstring_003e-248"></a><dd>Background color of the canvas. Default: ‘<samp><span class="samp">#e5e5e5</span></samp>’
+<dt><code>--background-color <string></code><a name="index-g_t_002d_002dbackground_002dcolor-_003cstring_003e-256"></a><dd>Background color of the canvas. Default: ‘<samp><span class="samp">#e5e5e5</span></samp>’
 </dl>
-   <!-- ./../src/main.c 486 -->
+   <!-- ./../src/main.c 532 -->
      <dl>
-<dt><code>--crosshair-color <string></code><a name="index-g_t_002d_002dcrosshair_002dcolor-_003cstring_003e-249"></a><dd>Color of the crosshair. Default: ‘<samp><span class="samp">#ff0000</span></samp>’
+<dt><code>--crosshair-color <string></code><a name="index-g_t_002d_002dcrosshair_002dcolor-_003cstring_003e-257"></a><dd>Color of the crosshair. Default: ‘<samp><span class="samp">#ff0000</span></samp>’
 </dl>
-   <!-- ./../src/main.c 491 -->
+   <!-- ./../src/main.c 537 -->
      <dl>
-<dt><code>--cross-color <string></code><a name="index-g_t_002d_002dcross_002dcolor-_003cstring_003e-250"></a><dd>Color of the cross. Default: ‘<samp><span class="samp">#cdcd00</span></samp>’
+<dt><code>--cross-color <string></code><a name="index-g_t_002d_002dcross_002dcolor-_003cstring_003e-258"></a><dd>Color of the cross. Default: ‘<samp><span class="samp">#cdcd00</span></samp>’
 </dl>
-   <!-- ./../src/main.c 495 -->
+   <!-- ./../src/main.c 541 -->
      <dl>
-<dt><code>--via-color <string></code><a name="index-g_t_002d_002dvia_002dcolor-_003cstring_003e-251"></a><dd>Color of vias. Default: ‘<samp><span class="samp">#7f7f7f</span></samp>’
+<dt><code>--via-color <string></code><a name="index-g_t_002d_002dvia_002dcolor-_003cstring_003e-259"></a><dd>Color of vias. Default: ‘<samp><span class="samp">#7f7f7f</span></samp>’
 </dl>
-   <!-- ./../src/main.c 499 -->
+   <!-- ./../src/main.c 545 -->
      <dl>
-<dt><code>--via-selected-color <string></code><a name="index-g_t_002d_002dvia_002dselected_002dcolor-_003cstring_003e-252"></a><dd>Color of selected vias. Default: ‘<samp><span class="samp">#00ffff</span></samp>’
+<dt><code>--via-selected-color <string></code><a name="index-g_t_002d_002dvia_002dselected_002dcolor-_003cstring_003e-260"></a><dd>Color of selected vias. Default: ‘<samp><span class="samp">#00ffff</span></samp>’
 </dl>
-   <!-- ./../src/main.c 504 -->
+   <!-- ./../src/main.c 550 -->
      <dl>
-<dt><code>--pin-color <string></code><a name="index-g_t_002d_002dpin_002dcolor-_003cstring_003e-253"></a><dd>Color of pins. Default: ‘<samp><span class="samp">#4d4d4d</span></samp>’
+<dt><code>--pin-color <string></code><a name="index-g_t_002d_002dpin_002dcolor-_003cstring_003e-261"></a><dd>Color of pins. Default: ‘<samp><span class="samp">#4d4d4d</span></samp>’
 </dl>
-   <!-- ./../src/main.c 508 -->
+   <!-- ./../src/main.c 554 -->
      <dl>
-<dt><code>--pin-selected-color <string></code><a name="index-g_t_002d_002dpin_002dselected_002dcolor-_003cstring_003e-254"></a><dd>Color of selected pins. Default: ‘<samp><span class="samp">#00ffff</span></samp>’
+<dt><code>--pin-selected-color <string></code><a name="index-g_t_002d_002dpin_002dselected_002dcolor-_003cstring_003e-262"></a><dd>Color of selected pins. Default: ‘<samp><span class="samp">#00ffff</span></samp>’
 </dl>
-   <!-- ./../src/main.c 513 -->
+   <!-- ./../src/main.c 559 -->
      <dl>
-<dt><code>--pin-name-color <string></code><a name="index-g_t_002d_002dpin_002dname_002dcolor-_003cstring_003e-255"></a><dd>Color of pin names and pin numbers. Default: ‘<samp><span class="samp">#ff0000</span></samp>’
+<dt><code>--pin-name-color <string></code><a name="index-g_t_002d_002dpin_002dname_002dcolor-_003cstring_003e-263"></a><dd>Color of pin names and pin numbers. Default: ‘<samp><span class="samp">#ff0000</span></samp>’
 </dl>
-   <!-- ./../src/main.c 518 -->
+   <!-- ./../src/main.c 564 -->
      <dl>
-<dt><code>--element-color <string></code><a name="index-g_t_002d_002delement_002dcolor-_003cstring_003e-256"></a><dd>Color of components. Default: ‘<samp><span class="samp">#000000</span></samp>’
+<dt><code>--element-color <string></code><a name="index-g_t_002d_002delement_002dcolor-_003cstring_003e-264"></a><dd>Color of components. Default: ‘<samp><span class="samp">#000000</span></samp>’
 </dl>
-   <!-- ./../src/main.c 522 -->
+   <!-- ./../src/main.c 568 -->
      <dl>
-<dt><code>--rat-color <string></code><a name="index-g_t_002d_002drat_002dcolor-_003cstring_003e-257"></a><dd>Color of ratlines. Default: ‘<samp><span class="samp">#b8860b</span></samp>’
+<dt><code>--rat-color <string></code><a name="index-g_t_002d_002drat_002dcolor-_003cstring_003e-265"></a><dd>Color of ratlines. Default: ‘<samp><span class="samp">#b8860b</span></samp>’
 </dl>
-   <!-- ./../src/main.c 526 -->
+   <!-- ./../src/main.c 572 -->
      <dl>
-<dt><code>--invisible-objects-color <string></code><a name="index-g_t_002d_002dinvisible_002dobjects_002dcolor-_003cstring_003e-258"></a><dd>Color of invisible objects. Default: ‘<samp><span class="samp">#cccccc</span></samp>’
+<dt><code>--invisible-objects-color <string></code><a name="index-g_t_002d_002dinvisible_002dobjects_002dcolor-_003cstring_003e-266"></a><dd>Color of invisible objects. Default: ‘<samp><span class="samp">#cccccc</span></samp>’
 </dl>
-   <!-- ./../src/main.c 531 -->
+   <!-- ./../src/main.c 577 -->
      <dl>
-<dt><code>--invisible-mark-color <string></code><a name="index-g_t_002d_002dinvisible_002dmark_002dcolor-_003cstring_003e-259"></a><dd>Color of invisible marks. Default: ‘<samp><span class="samp">#cccccc</span></samp>’
+<dt><code>--invisible-mark-color <string></code><a name="index-g_t_002d_002dinvisible_002dmark_002dcolor-_003cstring_003e-267"></a><dd>Color of invisible marks. Default: ‘<samp><span class="samp">#cccccc</span></samp>’
 </dl>
-   <!-- ./../src/main.c 536 -->
+   <!-- ./../src/main.c 582 -->
      <dl>
-<dt><code>--element-selected-color <string></code><a name="index-g_t_002d_002delement_002dselected_002dcolor-_003cstring_003e-260"></a><dd>Color of selected components. Default: ‘<samp><span class="samp">#00ffff</span></samp>’
+<dt><code>--element-selected-color <string></code><a name="index-g_t_002d_002delement_002dselected_002dcolor-_003cstring_003e-268"></a><dd>Color of selected components. Default: ‘<samp><span class="samp">#00ffff</span></samp>’
 </dl>
-   <!-- ./../src/main.c 541 -->
+   <!-- ./../src/main.c 587 -->
      <dl>
-<dt><code>--rat-selected-color <string></code><a name="index-g_t_002d_002drat_002dselected_002dcolor-_003cstring_003e-261"></a><dd>Color of selected rats. Default: ‘<samp><span class="samp">#00ffff</span></samp>’
+<dt><code>--rat-selected-color <string></code><a name="index-g_t_002d_002drat_002dselected_002dcolor-_003cstring_003e-269"></a><dd>Color of selected rats. Default: ‘<samp><span class="samp">#00ffff</span></samp>’
 </dl>
-   <!-- ./../src/main.c 546 -->
+   <!-- ./../src/main.c 592 -->
      <dl>
-<dt><code>--connected-color <string></code><a name="index-g_t_002d_002dconnected_002dcolor-_003cstring_003e-262"></a><dd>Color to indicate connections. Default: ‘<samp><span class="samp">#00ff00</span></samp>’
+<dt><code>--connected-color <string></code><a name="index-g_t_002d_002dconnected_002dcolor-_003cstring_003e-270"></a><dd>Color to indicate physical connections. Default: ‘<samp><span class="samp">#00ff00</span></samp>’
 </dl>
-   <!-- ./../src/main.c 551 -->
+   <!-- ./../src/main.c 597 -->
      <dl>
-<dt><code>--off-limit-color <string></code><a name="index-g_t_002d_002doff_002dlimit_002dcolor-_003cstring_003e-263"></a><dd>Color of off-canvas area. Default: ‘<samp><span class="samp">#cccccc</span></samp>’
+<dt><code>--found-color <string></code><a name="index-g_t_002d_002dfound_002dcolor-_003cstring_003e-271"></a><dd>Color to indicate logical connections. Default: ‘<samp><span class="samp">#ff00ff</span></samp>’
 </dl>
-   <!-- ./../src/main.c 556 -->
+   <!-- ./../src/main.c 602 -->
      <dl>
-<dt><code>--grid-color <string></code><a name="index-g_t_002d_002dgrid_002dcolor-_003cstring_003e-264"></a><dd>Color of the grid. Default: ‘<samp><span class="samp">#ff0000</span></samp>’
+<dt><code>--off-limit-color <string></code><a name="index-g_t_002d_002doff_002dlimit_002dcolor-_003cstring_003e-272"></a><dd>Color of off-canvas area. Default: ‘<samp><span class="samp">#cccccc</span></samp>’
 </dl>
-   <!-- ./../src/main.c 560 -->
+   <!-- ./../src/main.c 607 -->
      <dl>
-<dt><code>--layer-color-<n> <string></code><a name="index-g_t_002d_002dlayer_002dcolor_002d_003cn_003e-_003cstring_003e-265"></a><dd>Color of layer <code><n></code>, where <code><n></code> is an integer from 1 to 16. 
+<dt><code>--grid-color <string></code><a name="index-g_t_002d_002dgrid_002dcolor-_003cstring_003e-273"></a><dd>Color of the grid. Default: ‘<samp><span class="samp">#ff0000</span></samp>’
 </dl>
-   <!-- ./../src/main.c 578 -->
+   <!-- ./../src/main.c 611 -->
      <dl>
-<dt><code>--layer-selected-color-<n> <string></code><a name="index-g_t_002d_002dlayer_002dselected_002dcolor_002d_003cn_003e-_003cstring_003e-266"></a><dd>Color of layer <code><n></code>, when selected. <code><n></code> is an integer from 1 to 16. 
+<dt><code>--layer-color-<n> <string></code><a name="index-g_t_002d_002dlayer_002dcolor_002d_003cn_003e-_003cstring_003e-274"></a><dd>Color of layer <code><n></code>, where <code><n></code> is an integer from 1 to 16. 
 </dl>
-   <!-- ./../src/main.c 597 -->
+   <!-- ./../src/main.c 629 -->
      <dl>
-<dt><code>--warn-color <string></code><a name="index-g_t_002d_002dwarn_002dcolor-_003cstring_003e-267"></a><dd>Color of offending objects during DRC. Default value is <code>"#ff8000"</code>
+<dt><code>--layer-selected-color-<n> <string></code><a name="index-g_t_002d_002dlayer_002dselected_002dcolor_002d_003cn_003e-_003cstring_003e-275"></a><dd>Color of layer <code><n></code>, when selected. <code><n></code> is an integer from 1 to 16. 
 </dl>
-   <!-- ./../src/main.c 601 -->
+   <!-- ./../src/main.c 648 -->
      <dl>
-<dt><code>--mask-color <string></code><a name="index-g_t_002d_002dmask_002dcolor-_003cstring_003e-268"></a><dd>Color of the mask layer. Default value is <code>"#ff0000"</code>
+<dt><code>--warn-color <string></code><a name="index-g_t_002d_002dwarn_002dcolor-_003cstring_003e-276"></a><dd>Color of offending objects during DRC. Default value is <code>"#ff8000"</code>
+</dl>
+   <!-- ./../src/main.c 652 -->
+     <dl>
+<dt><code>--mask-color <string></code><a name="index-g_t_002d_002dmask_002dcolor-_003cstring_003e-277"></a><dd>Color of the mask layer. Default value is <code>"#ff0000"</code>
 </dl>
    <!-- options Layer Names -->
 <div class="node">
@@ -3143,37 +3185,37 @@ Up: <a rel="up" accesskey="u" href="#Command_002dLine-Options">Command-Line
 
 <h3 class="section">6.6 Layer Names</h3>
 
-<!-- ./../src/main.c 691 -->
+<!-- ./../src/main.c 742 -->
      <dl>
-<dt><code>--layer-name-1 <string></code><a name="index-g_t_002d_002dlayer_002dname_002d1-_003cstring_003e-269"></a><dd>Name of the 1st Layer. Default is <code>"top"</code>. 
+<dt><code>--layer-name-1 <string></code><a name="index-g_t_002d_002dlayer_002dname_002d1-_003cstring_003e-278"></a><dd>Name of the 1st Layer. Default is <code>"top"</code>. 
 </dl>
-<!-- ./../src/main.c 695 -->
+<!-- ./../src/main.c 746 -->
      <dl>
-<dt><code>--layer-name-2 <string></code><a name="index-g_t_002d_002dlayer_002dname_002d2-_003cstring_003e-270"></a><dd>Name of the 2nd Layer. Default is <code>"ground"</code>. 
+<dt><code>--layer-name-2 <string></code><a name="index-g_t_002d_002dlayer_002dname_002d2-_003cstring_003e-279"></a><dd>Name of the 2nd Layer. Default is <code>"ground"</code>. 
 </dl>
-   <!-- ./../src/main.c 699 -->
+   <!-- ./../src/main.c 750 -->
      <dl>
-<dt><code>--layer-name-3 <string></code><a name="index-g_t_002d_002dlayer_002dname_002d3-_003cstring_003e-271"></a><dd>Name of the 3nd Layer. Default is <code>"signal2"</code>. 
+<dt><code>--layer-name-3 <string></code><a name="index-g_t_002d_002dlayer_002dname_002d3-_003cstring_003e-280"></a><dd>Name of the 3nd Layer. Default is <code>"signal2"</code>. 
 </dl>
-   <!-- ./../src/main.c 703 -->
+   <!-- ./../src/main.c 754 -->
      <dl>
-<dt><code>--layer-name-4 <string></code><a name="index-g_t_002d_002dlayer_002dname_002d4-_003cstring_003e-272"></a><dd>Name of the 4rd Layer. Default is <code>"signal3"</code>. 
+<dt><code>--layer-name-4 <string></code><a name="index-g_t_002d_002dlayer_002dname_002d4-_003cstring_003e-281"></a><dd>Name of the 4rd Layer. Default is <code>"signal3"</code>. 
 </dl>
-   <!-- ./../src/main.c 707 -->
+   <!-- ./../src/main.c 758 -->
      <dl>
-<dt><code>--layer-name-5 <string></code><a name="index-g_t_002d_002dlayer_002dname_002d5-_003cstring_003e-273"></a><dd>Name of the 5rd Layer. Default is <code>"power"</code>. 
+<dt><code>--layer-name-5 <string></code><a name="index-g_t_002d_002dlayer_002dname_002d5-_003cstring_003e-282"></a><dd>Name of the 5rd Layer. Default is <code>"power"</code>. 
 </dl>
-   <!-- ./../src/main.c 711 -->
+   <!-- ./../src/main.c 762 -->
      <dl>
-<dt><code>--layer-name-6 <string></code><a name="index-g_t_002d_002dlayer_002dname_002d6-_003cstring_003e-274"></a><dd>Name of the 6rd Layer. Default is <code>"bottom"</code>. 
+<dt><code>--layer-name-6 <string></code><a name="index-g_t_002d_002dlayer_002dname_002d6-_003cstring_003e-283"></a><dd>Name of the 6rd Layer. Default is <code>"bottom"</code>. 
 </dl>
-   <!-- ./../src/main.c 715 -->
+   <!-- ./../src/main.c 766 -->
      <dl>
-<dt><code>--layer-name-7 <string></code><a name="index-g_t_002d_002dlayer_002dname_002d7-_003cstring_003e-275"></a><dd>Name of the 7rd Layer. Default is <code>"outline"</code>. 
+<dt><code>--layer-name-7 <string></code><a name="index-g_t_002d_002dlayer_002dname_002d7-_003cstring_003e-284"></a><dd>Name of the 7rd Layer. Default is <code>"outline"</code>. 
 </dl>
-   <!-- ./../src/main.c 719 -->
+   <!-- ./../src/main.c 770 -->
      <dl>
-<dt><code>--layer-name-8 <string></code><a name="index-g_t_002d_002dlayer_002dname_002d8-_003cstring_003e-276"></a><dd>Name of the 8rd Layer. Default is <code>"spare"</code>. 
+<dt><code>--layer-name-8 <string></code><a name="index-g_t_002d_002dlayer_002dname_002d8-_003cstring_003e-285"></a><dd>Name of the 8rd Layer. Default is <code>"spare"</code>. 
 </dl>
    <!-- options Paths -->
 <div class="node">
@@ -3187,32 +3229,32 @@ Up: <a rel="up" accesskey="u" href="#Command_002dLine-Options">Command-Line
 
 <h3 class="section">6.7 Paths</h3>
 
-<!-- ./../src/main.c 769 -->
+<!-- ./../src/main.c 820 -->
      <dl>
-<dt><code>--lib-newlib <string></code><a name="index-g_t_002d_002dlib_002dnewlib-_003cstring_003e-277"></a><dd>Top level directory for the newlib style library. 
+<dt><code>--lib-newlib <string></code><a name="index-g_t_002d_002dlib_002dnewlib-_003cstring_003e-286"></a><dd>Top level directory for the newlib style library. 
 </dl>
-<!-- ./../src/main.c 778 -->
+<!-- ./../src/main.c 829 -->
      <dl>
-<dt><code>--lib-name <string></code><a name="index-g_t_002d_002dlib_002dname-_003cstring_003e-278"></a><dd>The default filename for the library. 
+<dt><code>--lib-name <string></code><a name="index-g_t_002d_002dlib_002dname-_003cstring_003e-287"></a><dd>The default filename for the library. 
 </dl>
-   <!-- ./../src/main.c 783 -->
+   <!-- ./../src/main.c 834 -->
      <dl>
-<dt><code>--default-font <string></code><a name="index-g_t_002d_002ddefault_002dfont-_003cstring_003e-279"></a><dd>The name of the default font. 
+<dt><code>--default-font <string></code><a name="index-g_t_002d_002ddefault_002dfont-_003cstring_003e-288"></a><dd>The name of the default font. 
 </dl>
-   <!-- ./../src/main.c 794 -->
+   <!-- ./../src/main.c 845 -->
      <dl>
-<dt><code>--file-path <string></code><a name="index-g_t_002d_002dfile_002dpath-_003cstring_003e-280"></a><dd>A colon separated list of directories or commands (starts with '|'). The path
+<dt><code>--file-path <string></code><a name="index-g_t_002d_002dfile_002dpath-_003cstring_003e-289"></a><dd>A colon separated list of directories or commands (starts with '|'). The path
 is passed to the program specified in <samp><span class="option">--file-command</span></samp> together with the selected
 filename. 
 </dl>
-   <!-- ./../src/main.c 802 -->
+   <!-- ./../src/main.c 853 -->
      <dl>
-<dt><code>--font-path <string></code><a name="index-g_t_002d_002dfont_002dpath-_003cstring_003e-281"></a><dd>A colon separated list of directories to search the default font. Defaults to
+<dt><code>--font-path <string></code><a name="index-g_t_002d_002dfont_002dpath-_003cstring_003e-290"></a><dd>A colon separated list of directories to search the default font. Defaults to
 the default library path. 
 </dl>
-   <!-- ./../src/main.c 812 -->
+   <!-- ./../src/main.c 863 -->
      <dl>
-<dt><code>--lib-path <string></code><a name="index-g_t_002d_002dlib_002dpath-_003cstring_003e-282"></a><dd>A colon separated list of directories that will be passed to the commands specified
+<dt><code>--lib-path <string></code><a name="index-g_t_002d_002dlib_002dpath-_003cstring_003e-291"></a><dd>A colon separated list of directories that will be passed to the commands specified
 by <samp><span class="option">--element-command</span></samp> and <samp><span class="option">--element-contents-command</span></samp>. 
 </dl>
    <!-- options Sizes -->
@@ -3227,7 +3269,7 @@ Up: <a rel="up" accesskey="u" href="#Command_002dLine-Options">Command-Line
 
 <h3 class="section">6.8 Sizes</h3>
 
-<!-- ./../src/main.c 606 -->
+<!-- ./../src/main.c 657 -->
 <p>All parameters should be given with an unit. If no unit is given, 1/100 mil
 (cmil) will be used. Write units without space to the
 number like <code>3mm</code>, not <code>3 mm</code>. 
@@ -3245,51 +3287,53 @@ Valid Units are:
 </dl>
 
      <dl>
-<dt><code>--via-thickness <num></code><a name="index-g_t_002d_002dvia_002dthickness-_003cnum_003e-283"></a><dd>Default diameter of vias. Default value is <code>60mil</code>. 
+<dt><code>--via-thickness <num></code><a name="index-g_t_002d_002dvia_002dthickness-_003cnum_003e-292"></a><dd>Default diameter of vias. Default value is <code>60mil</code>. 
 </dl>
-   <!-- ./../src/main.c 611 -->
+   <!-- ./../src/main.c 662 -->
      <dl>
-<dt><code>--via-drilling-hole <num></code><a name="index-g_t_002d_002dvia_002ddrilling_002dhole-_003cnum_003e-284"></a><dd>Default diameter of holes. Default value is <code>28mil</code>. 
+<dt><code>--via-drilling-hole <num></code><a name="index-g_t_002d_002dvia_002ddrilling_002dhole-_003cnum_003e-293"></a><dd>Default diameter of holes. Default value is <code>28mil</code>. 
 </dl>
-   <!-- ./../src/main.c 616 -->
+   <!-- ./../src/main.c 667 -->
      <dl>
-<dt><code>--line-thickness <num></code><a name="index-g_t_002d_002dline_002dthickness-_003cnum_003e-285"></a><dd>Default thickness of new lines. Default value is <code>10mil</code>. 
+<dt><code>--line-thickness <num></code><a name="index-g_t_002d_002dline_002dthickness-_003cnum_003e-294"></a><dd>Default thickness of new lines. Default value is <code>10mil</code>. 
 </dl>
-   <!-- ./../src/main.c 621 -->
+   <!-- ./../src/main.c 672 -->
      <dl>
-<dt><code>--rat-thickness <num></code><a name="index-g_t_002d_002drat_002dthickness-_003cnum_003e-286"></a><dd>Thickness of rats. Values from 1 to 19 are fixed width in screen pixels. 
-Anything larger means PCB units (i.e. 100 means "1 mil"). Default value
-is <code>10mil</code>. 
+<dt><code>--rat-thickness <num><unit></code><a name="index-g_t_002d_002drat_002dthickness-_003cnum_003e_003cunit_003e-295"></a><dd>Thickness of rats. If no unit is given, PCB units are assumed (i.e. 100
+means "1 nm"). This option allows for a special unit <code>px</code> which
+sets the rat thickness to a fixed value in terms of screen pixels. 
+Maximum fixed thickness is 100px. Minimum saling rat thickness is 101nm. 
+Default value is <code>10mil</code>. 
 </dl>
-   <!-- ./../src/main.c 625 -->
+   <!-- ./../src/main.c 676 -->
      <dl>
-<dt><code>--keepaway <num></code><a name="index-g_t_002d_002dkeepaway-_003cnum_003e-287"></a><dd>Default minimum distance between a track and adjacent copper. 
+<dt><code>--keepaway <num></code><a name="index-g_t_002d_002dkeepaway-_003cnum_003e-296"></a><dd>Default minimum distance between a track and adjacent copper. 
 Default value is <code>10mil</code>. 
 </dl>
-   <!-- ./../src/main.c 629 -->
+   <!-- ./../src/main.c 680 -->
      <dl>
-<dt><code>--default-PCB-width <num></code><a name="index-g_t_002d_002ddefault_002dPCB_002dwidth-_003cnum_003e-288"></a><dd>Default width of the canvas. Default value is <code>6000mil</code>. 
+<dt><code>--default-PCB-width <num></code><a name="index-g_t_002d_002ddefault_002dPCB_002dwidth-_003cnum_003e-297"></a><dd>Default width of the canvas. Default value is <code>6000mil</code>. 
 </dl>
-   <!-- ./../src/main.c 634 -->
+   <!-- ./../src/main.c 685 -->
      <dl>
-<dt><code>--default-PCB-height <num></code><a name="index-g_t_002d_002ddefault_002dPCB_002dheight-_003cnum_003e-289"></a><dd>Default height of the canvas. Default value is <code>5000mil</code>. 
+<dt><code>--default-PCB-height <num></code><a name="index-g_t_002d_002ddefault_002dPCB_002dheight-_003cnum_003e-298"></a><dd>Default height of the canvas. Default value is <code>5000mil</code>. 
 </dl>
-   <!-- ./../src/main.c 639 -->
+   <!-- ./../src/main.c 690 -->
      <dl>
-<dt><code>--text-scale <num></code><a name="index-g_t_002d_002dtext_002dscale-_003cnum_003e-290"></a><dd>Default text scale. This value is in percent. Default value is <code>100</code>. 
+<dt><code>--text-scale <num></code><a name="index-g_t_002d_002dtext_002dscale-_003cnum_003e-299"></a><dd>Default text scale. This value is in percent. Default value is <code>100</code>. 
 </dl>
-   <!-- ./../src/main.c 643 -->
+   <!-- ./../src/main.c 694 -->
      <dl>
-<dt><code>--alignment-distance <num></code><a name="index-g_t_002d_002dalignment_002ddistance-_003cnum_003e-291"></a><dd>Specifies the distance between the board outline and alignment targets. 
+<dt><code>--alignment-distance <num></code><a name="index-g_t_002d_002dalignment_002ddistance-_003cnum_003e-300"></a><dd>Specifies the distance between the board outline and alignment targets. 
 Default value is <code>2mil</code>. 
 </dl>
-   <!-- ./../src/main.c 677 -->
+   <!-- ./../src/main.c 728 -->
      <dl>
-<dt><code>--grid <num></code><a name="index-g_t_002d_002dgrid-_003cnum_003e-292"></a><dd>Initial grid size. Default value is <code>10mil</code>. 
+<dt><code>--grid <num></code><a name="index-g_t_002d_002dgrid-_003cnum_003e-301"></a><dd>Initial grid size. Default value is <code>10mil</code>. 
 </dl>
-   <!-- ./../src/main.c 681 -->
+   <!-- ./../src/main.c 732 -->
      <dl>
-<dt><code>--minimum polygon area <num></code><a name="index-g_t_002d_002dminimum-polygon-area-_003cnum_003e-293"></a><dd>Minimum polygon area. 
+<dt><code>--minimum polygon area <num></code><a name="index-g_t_002d_002dminimum-polygon-area-_003cnum_003e-302"></a><dd>Minimum polygon area. 
 </dl>
    <!-- options Commands -->
 <div class="node">
@@ -3303,51 +3347,51 @@ Up: <a rel="up" accesskey="u" href="#Command_002dLine-Options">Command-Line
 
 <h3 class="section">6.9 Commands</h3>
 
-<!-- ./../src/main.c 728 -->
+<!-- ./../src/main.c 779 -->
 <p>pcb uses external commands for input output operations. These commands can be
 configured at start-up to meet local requirements. The command string may include
 special sequences <code>%f</code>, <code>%p</code> or <code>%a</code>. These are replaced when the
 command is called. The sequence <code>%f</code> is replaced by the file name,
 <code>%p</code> gets the path and <code>%a</code> indicates a package name. 
-<!-- ./../src/main.c 731 -->
+<!-- ./../src/main.c 782 -->
      <dl>
-<dt><code>--font-command <string></code><a name="index-g_t_002d_002dfont_002dcommand-_003cstring_003e-294"></a><dd>Command to load a font. 
+<dt><code>--font-command <string></code><a name="index-g_t_002d_002dfont_002dcommand-_003cstring_003e-303"></a><dd>Command to load a font. 
 </dl>
-   <!-- ./../src/main.c 735 -->
+   <!-- ./../src/main.c 786 -->
      <dl>
-<dt><code>--file-command <string></code><a name="index-g_t_002d_002dfile_002dcommand-_003cstring_003e-295"></a><dd>Command to read a file. 
+<dt><code>--file-command <string></code><a name="index-g_t_002d_002dfile_002dcommand-_003cstring_003e-304"></a><dd>Command to read a file. 
 </dl>
-   <!-- ./../src/main.c 739 -->
+   <!-- ./../src/main.c 790 -->
      <dl>
-<dt><code>--element-command <string></code><a name="index-g_t_002d_002delement_002dcommand-_003cstring_003e-296"></a><dd>Command to read a footprint. <br>
+<dt><code>--element-command <string></code><a name="index-g_t_002d_002delement_002dcommand-_003cstring_003e-305"></a><dd>Command to read a footprint. <br>
 Defaults to <code>"M4PATH='%p';export M4PATH;echo 'include(%f)' | m4"</code>
 </dl>
-   <!-- ./../src/main.c 745 -->
+   <!-- ./../src/main.c 796 -->
      <dl>
-<dt><code>--print-file <string></code><a name="index-g_t_002d_002dprint_002dfile-_003cstring_003e-297"></a><dd>Command to print to a file. 
+<dt><code>--print-file <string></code><a name="index-g_t_002d_002dprint_002dfile-_003cstring_003e-306"></a><dd>Command to print to a file. 
 </dl>
-   <!-- ./../src/main.c 749 -->
+   <!-- ./../src/main.c 800 -->
      <dl>
-<dt><code>--lib-command-dir <string></code><a name="index-g_t_002d_002dlib_002dcommand_002ddir-_003cstring_003e-298"></a><dd>Path to the command that queries the library. 
+<dt><code>--lib-command-dir <string></code><a name="index-g_t_002d_002dlib_002dcommand_002ddir-_003cstring_003e-307"></a><dd>Path to the command that queries the library. 
 </dl>
-   <!-- ./../src/main.c 754 -->
+   <!-- ./../src/main.c 805 -->
      <dl>
-<dt><code>--lib-command <string></code><a name="index-g_t_002d_002dlib_002dcommand-_003cstring_003e-299"></a><dd>Command to query the library. <br>
+<dt><code>--lib-command <string></code><a name="index-g_t_002d_002dlib_002dcommand-_003cstring_003e-308"></a><dd>Command to query the library. <br>
 Defaults to <code>"QueryLibrary.sh '%p' '%f' %a"</code>
 </dl>
-   <!-- ./../src/main.c 759 -->
+   <!-- ./../src/main.c 810 -->
      <dl>
-<dt><code>--lib-contents-command <string></code><a name="index-g_t_002d_002dlib_002dcontents_002dcommand-_003cstring_003e-300"></a><dd>Command to query the contents of the library. <br>
+<dt><code>--lib-contents-command <string></code><a name="index-g_t_002d_002dlib_002dcontents_002dcommand-_003cstring_003e-309"></a><dd>Command to query the contents of the library. <br>
 Defaults to <code>"ListLibraryContents.sh %p %f"</code> or,
 on Windows builds, an empty string (to disable this feature). 
 </dl>
-   <!-- ./../src/main.c 774 -->
+   <!-- ./../src/main.c 825 -->
      <dl>
-<dt><code>--save-command <string></code><a name="index-g_t_002d_002dsave_002dcommand-_003cstring_003e-301"></a><dd>Command to save to a file. 
+<dt><code>--save-command <string></code><a name="index-g_t_002d_002dsave_002dcommand-_003cstring_003e-310"></a><dd>Command to save to a file. 
 </dl>
-   <!-- ./../src/main.c 798 -->
+   <!-- ./../src/main.c 849 -->
      <dl>
-<dt><code>--rat-command <string></code><a name="index-g_t_002d_002drat_002dcommand-_003cstring_003e-302"></a><dd>Command for reading a netlist. Sequence <code>%f</code> is replaced by the netlist filename. 
+<dt><code>--rat-command <string></code><a name="index-g_t_002d_002drat_002dcommand-_003cstring_003e-311"></a><dd>Command for reading a netlist. Sequence <code>%f</code> is replaced by the netlist filename. 
 </dl>
    <!-- options DRC Options -->
 <div class="node">
@@ -3361,33 +3405,33 @@ Up: <a rel="up" accesskey="u" href="#Command_002dLine-Options">Command-Line
 
 <h3 class="section">6.10 DRC Options</h3>
 
-<!-- ./../src/main.c 648 -->
+<!-- ./../src/main.c 699 -->
 <p>All parameters should be given with an unit. If no unit is given, 1/100 mil
 (cmil) will be used for backward compability. Valid units are given in section
 <a href="#Sizes">Sizes</a>. 
-<!-- ./../src/main.c 652 -->
+<!-- ./../src/main.c 703 -->
      <dl>
-<dt><code>--bloat <num></code><a name="index-g_t_002d_002dbloat-_003cnum_003e-303"></a><dd>Minimum spacing. Default value is <code>10mil</code>. 
+<dt><code>--bloat <num></code><a name="index-g_t_002d_002dbloat-_003cnum_003e-312"></a><dd>Minimum spacing. Default value is <code>10mil</code>. 
 </dl>
-   <!-- ./../src/main.c 656 -->
+   <!-- ./../src/main.c 707 -->
      <dl>
-<dt><code>--shrink <num></code><a name="index-g_t_002d_002dshrink-_003cnum_003e-304"></a><dd>Minimum touching overlap. Default value is <code>10mil</code>. 
+<dt><code>--shrink <num></code><a name="index-g_t_002d_002dshrink-_003cnum_003e-313"></a><dd>Minimum touching overlap. Default value is <code>10mil</code>. 
 </dl>
-   <!-- ./../src/main.c 660 -->
+   <!-- ./../src/main.c 711 -->
      <dl>
-<dt><code>--min-width <num></code><a name="index-g_t_002d_002dmin_002dwidth-_003cnum_003e-305"></a><dd>Minimum width of copper. Default value is <code>10mil</code>. 
+<dt><code>--min-width <num></code><a name="index-g_t_002d_002dmin_002dwidth-_003cnum_003e-314"></a><dd>Minimum width of copper. Default value is <code>10mil</code>. 
 </dl>
-   <!-- ./../src/main.c 664 -->
+   <!-- ./../src/main.c 715 -->
      <dl>
-<dt><code>--min-silk <num></code><a name="index-g_t_002d_002dmin_002dsilk-_003cnum_003e-306"></a><dd>Minimum width of lines in silk. Default value is <code>10mil</code>. 
+<dt><code>--min-silk <num></code><a name="index-g_t_002d_002dmin_002dsilk-_003cnum_003e-315"></a><dd>Minimum width of lines in silk. Default value is <code>10mil</code>. 
 </dl>
-   <!-- ./../src/main.c 668 -->
+   <!-- ./../src/main.c 719 -->
      <dl>
-<dt><code>--min-drill <num></code><a name="index-g_t_002d_002dmin_002ddrill-_003cnum_003e-307"></a><dd>Minimum diameter of holes. Default value is <code>15mil</code>. 
+<dt><code>--min-drill <num></code><a name="index-g_t_002d_002dmin_002ddrill-_003cnum_003e-316"></a><dd>Minimum diameter of holes. Default value is <code>15mil</code>. 
 </dl>
-   <!-- ./../src/main.c 672 -->
+   <!-- ./../src/main.c 723 -->
      <dl>
-<dt><code>--min-ring <num></code><a name="index-g_t_002d_002dmin_002dring-_003cnum_003e-308"></a><dd>Minimum width of annular ring. Default value is <code>10mil</code>. 
+<dt><code>--min-ring <num></code><a name="index-g_t_002d_002dmin_002dring-_003cnum_003e-317"></a><dd>Minimum width of annular ring. Default value is <code>10mil</code>. 
 </dl>
    <!-- options BOM Creation -->
 <div class="node">
@@ -3401,17 +3445,17 @@ Up: <a rel="up" accesskey="u" href="#Command_002dLine-Options">Command-Line
 
 <h3 class="section">6.11 BOM Creation</h3>
 
-<!-- ./../src/hid/bom/bom.c 30 -->
+<!-- ./../src/hid/bom/bom.c 26 -->
      <dl>
-<dt><code>--bomfile <string></code><a name="index-g_t_002d_002dbomfile-_003cstring_003e-309"></a><dd>Name of the BOM output file. 
+<dt><code>--bomfile <string></code><a name="index-g_t_002d_002dbomfile-_003cstring_003e-318"></a><dd>Name of the BOM output file. 
 </dl>
-<!-- ./../src/hid/bom/bom.c 35 -->
+<!-- ./../src/hid/bom/bom.c 31 -->
      <dl>
-<dt><code>--xyfile <string></code><a name="index-g_t_002d_002dxyfile-_003cstring_003e-310"></a><dd>Name of the XY output file. 
+<dt><code>--xyfile <string></code><a name="index-g_t_002d_002dxyfile-_003cstring_003e-319"></a><dd>Name of the XY output file. 
 </dl>
-   <!-- ./../src/hid/bom/bom.c 41 -->
+   <!-- ./../src/hid/bom/bom.c 37 -->
      <dl>
-<dt><code>--xy-unit <unit></code><a name="index-g_t_002d_002dxy_002dunit-_003cunit_003e-311"></a><dd>Unit of XY dimensions. Defaults to mil. 
+<dt><code>--xy-unit <unit></code><a name="index-g_t_002d_002dxy_002dunit-_003cunit_003e-320"></a><dd>Unit of XY dimensions. Defaults to mil. 
 </dl>
    <!-- options Gerber Export -->
 <div class="node">
@@ -3425,17 +3469,21 @@ Up: <a rel="up" accesskey="u" href="#Command_002dLine-Options">Command-Line
 
 <h3 class="section">6.12 Gerber Export</h3>
 
-<!-- ./../src/hid/gerber/gerber.c 338 -->
+<!-- ./../src/hid/gerber/gerber.c 348 -->
      <dl>
-<dt><code>--gerberfile <string></code><a name="index-g_t_002d_002dgerberfile-_003cstring_003e-312"></a><dd>Gerber output file prefix. Can include a path. 
+<dt><code>--gerberfile <string></code><a name="index-g_t_002d_002dgerberfile-_003cstring_003e-321"></a><dd>Gerber output file prefix. Can include a path. 
 </dl>
-<!-- ./../src/hid/gerber/gerber.c 344 -->
+<!-- ./../src/hid/gerber/gerber.c 354 -->
      <dl>
-<dt><code>--all-layers</code><a name="index-g_t_002d_002dall_002dlayers-313"></a><dd>Output contains all layers, even empty ones. 
+<dt><code>--all-layers</code><a name="index-g_t_002d_002dall_002dlayers-322"></a><dd>Output contains all layers, even empty ones. 
 </dl>
-   <!-- ./../src/hid/gerber/gerber.c 350 -->
+   <!-- ./../src/hid/gerber/gerber.c 360 -->
      <dl>
-<dt><code>--verbose</code><a name="index-g_t_002d_002dverbose-314"></a><dd>Print file names and aperture counts on stdout. 
+<dt><code>--verbose</code><a name="index-g_t_002d_002dverbose-323"></a><dd>Print file names and aperture counts on stdout. 
+</dl>
+   <!-- ./../src/hid/gerber/gerber.c 365 -->
+     <dl>
+<dt><code>--metric</code><a name="index-g_t_002d_002dmetric-324"></a><dd>generate metric Gerber and drill files
 </dl>
    <!-- options Postscript Export -->
 <div class="node">
@@ -3449,89 +3497,89 @@ Up: <a rel="up" accesskey="u" href="#Command_002dLine-Options">Command-Line
 
 <h3 class="section">6.13 Postscript Export</h3>
 
-<!-- ./../src/hid/ps/ps.c 149 -->
+<!-- ./../src/hid/ps/ps.c 146 -->
      <dl>
-<dt><code>--psfile <string></code><a name="index-g_t_002d_002dpsfile-_003cstring_003e-315"></a><dd>Name of the postscript output file. Can contain a path. 
+<dt><code>--psfile <string></code><a name="index-g_t_002d_002dpsfile-_003cstring_003e-325"></a><dd>Name of the postscript output file. Can contain a path. 
 </dl>
-<!-- ./../src/hid/ps/ps.c 155 -->
+<!-- ./../src/hid/ps/ps.c 152 -->
      
-<a name="index-drill_002dhelper-316"></a>
-<dl><dt><code>--drill-helper</code><a name="index-g_t_002d_002ddrill_002dhelper-317"></a><dd>Print a centering target in large drill holes. 
+<a name="index-drill_002dhelper-326"></a>
+<dl><dt><code>--drill-helper</code><a name="index-g_t_002d_002ddrill_002dhelper-327"></a><dd>Print a centering target in large drill holes. 
 </dl>
-   <!-- ./../src/hid/ps/ps.c 161 -->
+   <!-- ./../src/hid/ps/ps.c 158 -->
      
-<a name="index-align_002dmarks-318"></a>
-<dl><dt><code>--align-marks</code><a name="index-g_t_002d_002dalign_002dmarks-319"></a><dd>Print alignment marks on each sheet. This is meant to ease alignment during exposure. 
+<a name="index-align_002dmarks-328"></a>
+<dl><dt><code>--align-marks</code><a name="index-g_t_002d_002dalign_002dmarks-329"></a><dd>Print alignment marks on each sheet. This is meant to ease alignment during exposure. 
 </dl>
-   <!-- ./../src/hid/ps/ps.c 167 -->
+   <!-- ./../src/hid/ps/ps.c 164 -->
      <dl>
-<dt><code>--outline</code><a name="index-g_t_002d_002doutline-320"></a><dd>Print the contents of the outline layer on each sheet. 
+<dt><code>--outline</code><a name="index-g_t_002d_002doutline-330"></a><dd>Print the contents of the outline layer on each sheet. 
 </dl>
-   <!-- ./../src/hid/ps/ps.c 172 -->
+   <!-- ./../src/hid/ps/ps.c 169 -->
      <dl>
-<dt><code>--mirror</code><a name="index-g_t_002d_002dmirror-321"></a><dd>Print mirror image. 
+<dt><code>--mirror</code><a name="index-g_t_002d_002dmirror-331"></a><dd>Print mirror image. 
 </dl>
-   <!-- ./../src/hid/ps/ps.c 178 -->
+   <!-- ./../src/hid/ps/ps.c 175 -->
      <dl>
-<dt><code>--fill-page</code><a name="index-g_t_002d_002dfill_002dpage-322"></a><dd>Scale output to make the board fit the page. 
+<dt><code>--fill-page</code><a name="index-g_t_002d_002dfill_002dpage-332"></a><dd>Scale output to make the board fit the page. 
 </dl>
-   <!-- ./../src/hid/ps/ps.c 184 -->
+   <!-- ./../src/hid/ps/ps.c 181 -->
      <dl>
-<dt><code>--auto-mirror</code><a name="index-g_t_002d_002dauto_002dmirror-323"></a><dd>Print mirror image of appropriate layers. 
+<dt><code>--auto-mirror</code><a name="index-g_t_002d_002dauto_002dmirror-333"></a><dd>Print mirror image of appropriate layers. 
 </dl>
-   <!-- ./../src/hid/ps/ps.c 190 -->
+   <!-- ./../src/hid/ps/ps.c 187 -->
      <dl>
-<dt><code>--ps-color</code><a name="index-g_t_002d_002dps_002dcolor-324"></a><dd>Postscript output in color. 
+<dt><code>--ps-color</code><a name="index-g_t_002d_002dps_002dcolor-334"></a><dd>Postscript output in color. 
 </dl>
-   <!-- ./../src/hid/ps/ps.c 196 -->
+   <!-- ./../src/hid/ps/ps.c 193 -->
      
-<a name="index-ps_002dbloat-325"></a>
-<dl><dt><code>--ps-bloat <num></code><a name="index-g_t_002d_002dps_002dbloat-_003cnum_003e-326"></a><dd>Amount to add to trace/pad/pin edges. 
+<a name="index-ps_002dbloat-335"></a>
+<dl><dt><code>--ps-bloat <num></code><a name="index-g_t_002d_002dps_002dbloat-_003cnum_003e-336"></a><dd>Amount to add to trace/pad/pin edges. 
 </dl>
-   <!-- ./../src/hid/ps/ps.c 202 -->
+   <!-- ./../src/hid/ps/ps.c 199 -->
      
-<a name="index-ps_002dinvert-327"></a>
-<dl><dt><code>--ps-invert</code><a name="index-g_t_002d_002dps_002dinvert-328"></a><dd>Draw objects as white-on-black. 
+<a name="index-ps_002dinvert-337"></a>
+<dl><dt><code>--ps-invert</code><a name="index-g_t_002d_002dps_002dinvert-338"></a><dd>Draw objects as white-on-black. 
 </dl>
-   <!-- ./../src/hid/ps/ps.c 208 -->
+   <!-- ./../src/hid/ps/ps.c 205 -->
      <dl>
-<dt><code>--media <media-name></code><a name="index-g_t_002d_002dmedia-_003cmedia_002dname_003e-329"></a><dd>Size of the media, the postscript is fitted to. The parameter
+<dt><code>--media <media-name></code><a name="index-g_t_002d_002dmedia-_003cmedia_002dname_003e-339"></a><dd>Size of the media, the postscript is fitted to. The parameter
 <code><media-name></code> can be any of the standard names for paper size: ‘<samp><span class="samp">A0</span></samp>’
 to ‘<samp><span class="samp">A10</span></samp>’, ‘<samp><span class="samp">B0</span></samp>’ to ‘<samp><span class="samp">B10</span></samp>’, ‘<samp><span class="samp">Letter</span></samp>’, ‘<samp><span class="samp">11x17</span></samp>’,
 ‘<samp><span class="samp">Ledger</span></samp>’, ‘<samp><span class="samp">Legal</span></samp>’, ‘<samp><span class="samp">Executive</span></samp>’, ‘<samp><span class="samp">A-Size</span></samp>’, ‘<samp><span class="samp">B-size</span></samp>’,
 ‘<samp><span class="samp">C-Size</span></samp>’, ‘<samp><span class="samp">D-size</span></samp>’, ‘<samp><span class="samp">E-size</span></samp>’, ‘<samp><span class="samp">US-Business_Card</span></samp>’,
 ‘<samp><span class="samp">Intl-Business_Card</span></samp>’. 
 </dl>
-   <!-- ./../src/hid/ps/ps.c 214 -->
+   <!-- ./../src/hid/ps/ps.c 211 -->
      
-<a name="index-psfade-330"></a>
-<dl><dt><code>--psfade <num></code><a name="index-g_t_002d_002dpsfade-_003cnum_003e-331"></a><dd>Fade amount for assembly drawings (0.0=missing, 1.0=solid). 
+<a name="index-psfade-340"></a>
+<dl><dt><code>--psfade <num></code><a name="index-g_t_002d_002dpsfade-_003cnum_003e-341"></a><dd>Fade amount for assembly drawings (0.0=missing, 1.0=solid). 
 </dl>
-   <!-- ./../src/hid/ps/ps.c 220 -->
+   <!-- ./../src/hid/ps/ps.c 218 -->
      <dl>
-<dt><code>--scale <num></code><a name="index-g_t_002d_002dscale-_003cnum_003e-332"></a><dd>Scale value to compensate for printer sizing errors (1.0 = full scale). 
+<dt><code>--scale <num></code><a name="index-g_t_002d_002dscale-_003cnum_003e-342"></a><dd>Scale value to compensate for printer sizing errors (1.0 = full scale). 
 </dl>
-   <!-- ./../src/hid/ps/ps.c 226 -->
+   <!-- ./../src/hid/ps/ps.c 225 -->
      
-<a name="index-multi_002dfile-333"></a>
-<dl><dt><code>--multi-file</code><a name="index-g_t_002d_002dmulti_002dfile-334"></a><dd>Produce multiple files, one per page, instead of a single multi page file. 
+<a name="index-multi_002dfile-343"></a>
+<dl><dt><code>--multi-file</code><a name="index-g_t_002d_002dmulti_002dfile-344"></a><dd>Produce multiple files, one per page, instead of a single multi page file. 
 </dl>
    <!-- ./../src/hid/ps/ps.c 232 -->
      <dl>
-<dt><code>--xcalib <num></code><a name="index-g_t_002d_002dxcalib-_003cnum_003e-335"></a><dd>Paper width. Used for x-Axis calibration. 
+<dt><code>--xcalib <num></code><a name="index-g_t_002d_002dxcalib-_003cnum_003e-345"></a><dd>Paper width. Used for x-Axis calibration. 
 </dl>
    <!-- ./../src/hid/ps/ps.c 238 -->
      <dl>
-<dt><code>--ycalib <num></code><a name="index-g_t_002d_002dycalib-_003cnum_003e-336"></a><dd>Paper height. Used for y-Axis calibration. 
+<dt><code>--ycalib <num></code><a name="index-g_t_002d_002dycalib-_003cnum_003e-346"></a><dd>Paper height. Used for y-Axis calibration. 
 </dl>
    <!-- ./../src/hid/ps/ps.c 244 -->
      <dl>
-<dt><code>--drill-copper</code><a name="index-g_t_002d_002ddrill_002dcopper-337"></a><dd>Draw drill holes in pins / vias, instead of leaving solid copper. 
+<dt><code>--drill-copper</code><a name="index-g_t_002d_002ddrill_002dcopper-347"></a><dd>Draw drill holes in pins / vias, instead of leaving solid copper. 
 </dl>
-   <!-- ./../src/hid/ps/ps.c 250 -->
+   <!-- ./../src/hid/ps/ps.c 251 -->
      
-<a name="index-show_002dlegend-338"></a>
-<dl><dt><code>--show-legend</code><a name="index-g_t_002d_002dshow_002dlegend-339"></a><dd>Print file name and scale on printout. 
+<a name="index-show_002dlegend-348"></a>
+<dl><dt><code>--show-legend</code><a name="index-g_t_002d_002dshow_002dlegend-349"></a><dd>Print file name and scale on printout. 
 </dl>
    <!-- options Encapsulated Postscript Export -->
 <div class="node">
@@ -3545,27 +3593,27 @@ Up: <a rel="up" accesskey="u" href="#Command_002dLine-Options">Command-Line
 
 <h3 class="section">6.14 Encapsulated Postscript Export</h3>
 
-<!-- ./../src/hid/ps/eps.c 78 -->
+<!-- ./../src/hid/ps/eps.c 76 -->
      <dl>
-<dt><code>--eps-file <string></code><a name="index-g_t_002d_002deps_002dfile-_003cstring_003e-340"></a><dd>Name of the encapsulated postscript output file. Can contain a path. 
+<dt><code>--eps-file <string></code><a name="index-g_t_002d_002deps_002dfile-_003cstring_003e-350"></a><dd>Name of the encapsulated postscript output file. Can contain a path. 
 </dl>
-<!-- ./../src/hid/ps/eps.c 84 -->
+<!-- ./../src/hid/ps/eps.c 82 -->
      <dl>
-<dt><code>--eps-scale <num></code><a name="index-g_t_002d_002deps_002dscale-_003cnum_003e-341"></a><dd>Scale EPS output by the parameter ‘<samp><span class="samp">num</span></samp>’. 
+<dt><code>--eps-scale <num></code><a name="index-g_t_002d_002deps_002dscale-_003cnum_003e-351"></a><dd>Scale EPS output by the parameter ‘<samp><span class="samp">num</span></samp>’. 
 </dl>
-   <!-- ./../src/hid/ps/eps.c 90 -->
+   <!-- ./../src/hid/ps/eps.c 88 -->
      
-<a name="index-as_002dshown-_0028EPS_0029-342"></a>
-<dl><dt><code>--as-shown</code><a name="index-g_t_002d_002das_002dshown-343"></a><dd>Export layers as shown on screen. 
+<a name="index-as_002dshown-_0028EPS_0029-352"></a>
+<dl><dt><code>--as-shown</code><a name="index-g_t_002d_002das_002dshown-353"></a><dd>Export layers as shown on screen. 
 </dl>
-   <!-- ./../src/hid/ps/eps.c 96 -->
+   <!-- ./../src/hid/ps/eps.c 94 -->
      <dl>
-<dt><code>--monochrome</code><a name="index-g_t_002d_002dmonochrome-344"></a><dd>Convert output to monochrome. 
+<dt><code>--monochrome</code><a name="index-g_t_002d_002dmonochrome-354"></a><dd>Convert output to monochrome. 
 </dl>
-   <!-- ./../src/hid/ps/eps.c 102 -->
+   <!-- ./../src/hid/ps/eps.c 100 -->
      
-<a name="index-only_002dvisible-345"></a>
-<dl><dt><code>--only-visible</code><a name="index-g_t_002d_002donly_002dvisible-346"></a><dd>Limit the bounds of the EPS file to the visible items. 
+<a name="index-only_002dvisible-355"></a>
+<dl><dt><code>--only-visible</code><a name="index-g_t_002d_002donly_002dvisible-356"></a><dd>Limit the bounds of the EPS file to the visible items. 
 </dl>
    <!-- options PNG Options -->
 <div class="node">
@@ -3579,65 +3627,88 @@ Up: <a rel="up" accesskey="u" href="#Command_002dLine-Options">Command-Line
 
 <h3 class="section">6.15 PNG Options</h3>
 
-<!-- ./../src/hid/png/png.c 168 -->
+<!-- ./../src/hid/png/png.c 236 -->
      <dl>
-<dt><code>--outfile <string></code><a name="index-g_t_002d_002doutfile-_003cstring_003e-347"></a><dd>Name of the file to be exported to. Can contain a path. 
+<dt><code>--outfile <string></code><a name="index-g_t_002d_002doutfile-_003cstring_003e-357"></a><dd>Name of the file to be exported to. Can contain a path. 
 </dl>
-<!-- ./../src/hid/png/png.c 174 -->
+<!-- ./../src/hid/png/png.c 242 -->
      <dl>
-<dt><code>--dpi</code><a name="index-g_t_002d_002ddpi-348"></a><dd>Scale factor in pixels/inch. Set to 0 to scale to size specified in the layout. 
+<dt><code>--dpi</code><a name="index-g_t_002d_002ddpi-358"></a><dd>Scale factor in pixels/inch. Set to 0 to scale to size specified in the layout. 
 </dl>
-   <!-- ./../src/hid/png/png.c 180 -->
+   <!-- ./../src/hid/png/png.c 248 -->
      <dl>
-<dt><code>--x-max</code><a name="index-g_t_002d_002dx_002dmax-349"></a><dd>Width of the png image in pixels. No constraint, when set to 0. 
+<dt><code>--x-max</code><a name="index-g_t_002d_002dx_002dmax-359"></a><dd>Width of the png image in pixels. No constraint, when set to 0. 
 </dl>
-   <!-- ./../src/hid/png/png.c 186 -->
+   <!-- ./../src/hid/png/png.c 254 -->
      <dl>
-<dt><code>--y-max</code><a name="index-g_t_002d_002dy_002dmax-350"></a><dd>Height of the png output in pixels. No constraint, when set to 0. 
+<dt><code>--y-max</code><a name="index-g_t_002d_002dy_002dmax-360"></a><dd>Height of the png output in pixels. No constraint, when set to 0. 
 </dl>
-   <!-- ./../src/hid/png/png.c 192 -->
+   <!-- ./../src/hid/png/png.c 260 -->
      <dl>
-<dt><code>--xy-max</code><a name="index-g_t_002d_002dxy_002dmax-351"></a><dd>Maximum width and height of the PNG output in pixels. No constraint, when set to 0. 
+<dt><code>--xy-max</code><a name="index-g_t_002d_002dxy_002dmax-361"></a><dd>Maximum width and height of the PNG output in pixels. No constraint, when set to 0. 
 </dl>
-   <!-- ./../src/hid/png/png.c 198 -->
+   <!-- ./../src/hid/png/png.c 266 -->
      <dl>
-<dt><code>--as-shown</code><a name="index-g_t_002d_002das_002dshown-352"></a><dd>Export layers as shown on screen. 
+<dt><code>--as-shown</code><a name="index-g_t_002d_002das_002dshown-362"></a><dd>Export layers as shown on screen. 
 </dl>
-   <!-- ./../src/hid/png/png.c 204 -->
+   <!-- ./../src/hid/png/png.c 272 -->
      <dl>
-<dt><code>--monochrome</code><a name="index-g_t_002d_002dmonochrome-353"></a><dd>Convert output to monochrome. 
+<dt><code>--monochrome</code><a name="index-g_t_002d_002dmonochrome-363"></a><dd>Convert output to monochrome. 
 </dl>
-   <!-- ./../src/hid/png/png.c 210 -->
+   <!-- ./../src/hid/png/png.c 278 -->
      <dl>
-<dt><code>--only-vivible</code><a name="index-g_t_002d_002donly_002dvivible-354"></a><dd>Limit the bounds of the exported PNG image to the visible items. 
+<dt><code>--only-visible</code><a name="index-g_t_002d_002donly_002dvisible-364"></a><dd>Limit the bounds of the exported PNG image to the visible items. 
 </dl>
-   <!-- ./../src/hid/png/png.c 216 -->
+   <!-- ./../src/hid/png/png.c 284 -->
      <dl>
-<dt><code>--use-alpha</code><a name="index-g_t_002d_002duse_002dalpha-355"></a><dd>Make the background and any holes transparent. 
+<dt><code>--use-alpha</code><a name="index-g_t_002d_002duse_002dalpha-365"></a><dd>Make the background and any holes transparent. 
 </dl>
-   <!-- ./../src/hid/png/png.c 222 -->
+   <!-- ./../src/hid/png/png.c 290 -->
      <dl>
-<dt><code>--format <string></code><a name="index-g_t_002d_002dformat-_003cstring_003e-356"></a><dd>File format to be exported. Parameter <code><string></code> can be ‘<samp><span class="samp">PNG</span></samp>’,
+<dt><code>--fill-holes</code><a name="index-g_t_002d_002dfill_002dholes-366"></a><dd>Drill holes in pins/pads are filled, not hollow. 
+</dl>
+   <!-- ./../src/hid/png/png.c 296 -->
+     <dl>
+<dt><code>--format <string></code><a name="index-g_t_002d_002dformat-_003cstring_003e-367"></a><dd>File format to be exported. Parameter <code><string></code> can be ‘<samp><span class="samp">PNG</span></samp>’,
 ‘<samp><span class="samp">GIF</span></samp>’, or ‘<samp><span class="samp">JPEG</span></samp>’. 
 </dl>
-   <!-- ./../src/hid/png/png.c 228 -->
+   <!-- ./../src/hid/png/png.c 302 -->
      <dl>
-<dt><code>--png-bloat <num><dim></code><a name="index-g_t_002d_002dpng_002dbloat-_003cnum_003e_003cdim_003e-357"></a><dd>Amount of extra thickness to add to traces, pads, or pin edges. The parameter
+<dt><code>--png-bloat <num><dim></code><a name="index-g_t_002d_002dpng_002dbloat-_003cnum_003e_003cdim_003e-368"></a><dd>Amount of extra thickness to add to traces, pads, or pin edges. The parameter
 ‘<samp><span class="samp"><num><dim></span></samp>’ is a number, appended by a dimension ‘<samp><span class="samp">mm</span></samp>’, ‘<samp><span class="samp">mil</span></samp>’, or
 ‘<samp><span class="samp">pix</span></samp>’. If no dimension is given, the default dimension is 1/100 mil. 
 </dl>
-   <!-- ./../src/hid/png/png.c 234 -->
+   <!-- ./../src/hid/png/png.c 308 -->
      
-<a name="index-photo_002dmode-358"></a>
-<dl><dt><code>--photo-mode</code><a name="index-g_t_002d_002dphoto_002dmode-359"></a><dd>Export a photo realistic image of the layout. 
+<a name="index-photo_002dmode-369"></a>
+<dl><dt><code>--photo-mode</code><a name="index-g_t_002d_002dphoto_002dmode-370"></a><dd>Export a photo realistic image of the layout. 
 </dl>
-   <!-- ./../src/hid/png/png.c 240 -->
+   <!-- ./../src/hid/png/png.c 314 -->
      <dl>
-<dt><code>--photo-flip-x</code><a name="index-g_t_002d_002dphoto_002dflip_002dx-360"></a><dd>In photo-realistic mode, export the reverse side of the layout. Left-right flip. 
+<dt><code>--photo-flip-x</code><a name="index-g_t_002d_002dphoto_002dflip_002dx-371"></a><dd>In photo-realistic mode, export the reverse side of the layout. Left-right flip. 
 </dl>
-   <!-- ./../src/hid/png/png.c 246 -->
+   <!-- ./../src/hid/png/png.c 320 -->
      <dl>
-<dt><code>--photo-flip-y</code><a name="index-g_t_002d_002dphoto_002dflip_002dy-361"></a><dd>In photo-realistic mode, export the reverse side of the layout. Up-down flip. 
+<dt><code>--photo-flip-y</code><a name="index-g_t_002d_002dphoto_002dflip_002dy-372"></a><dd>In photo-realistic mode, export the reverse side of the layout. Up-down flip. 
+</dl>
+   <!-- ./../src/hid/png/png.c 326 -->
+     
+<a name="index-photo_002dmask_002dcolour-373"></a>
+<dl><dt><code>--photo-mask-colour <colour></code><a name="index-g_t_002d_002dphoto_002dmask_002dcolour-_003ccolour_003e-374"></a><dd>In photo-realistic mode, export the solder mask as this colour. Parameter
+<code><colour></code> can be ‘<samp><span class="samp">green</span></samp>’, ‘<samp><span class="samp">red</span></samp>’, ‘<samp><span class="samp">blue</span></samp>’, or ‘<samp><span class="samp">purple</span></samp>’. 
+</dl>
+   <!-- ./../src/hid/png/png.c 332 -->
+     
+<a name="index-photo_002dplating-375"></a>
+<dl><dt><code>--photo-plating</code><a name="index-g_t_002d_002dphoto_002dplating-376"></a><dd>In photo-realistic mode, export the exposed copper as though it has this type
+of plating. Parameter <code><colour></code> can be ‘<samp><span class="samp">tinned</span></samp>’, ‘<samp><span class="samp">gold</span></samp>’,
+‘<samp><span class="samp">silver</span></samp>’, or ‘<samp><span class="samp">copper</span></samp>’. 
+</dl>
+   <!-- ./../src/hid/png/png.c 338 -->
+     
+<a name="index-photo_002dsilk_002dcolour-377"></a>
+<dl><dt><code>--photo-silk-colour</code><a name="index-g_t_002d_002dphoto_002dsilk_002dcolour-378"></a><dd>In photo-realistic mode, export the silk screen as this colour. Parameter
+<code><colour></code> can be ‘<samp><span class="samp">white</span></samp>’, ‘<samp><span class="samp">black</span></samp>’, or ‘<samp><span class="samp">yellow</span></samp>’. 
 </dl>
    <!-- options lpr Printing Options -->
 <div class="node">
@@ -3651,9 +3722,9 @@ Up: <a rel="up" accesskey="u" href="#Command_002dLine-Options">Command-Line
 
 <h3 class="section">6.16 lpr Printing Options</h3>
 
-<!-- ./../src/hid/lpr/lpr.c 33 -->
+<!-- ./../src/hid/lpr/lpr.c 31 -->
      <dl>
-<dt><code>--lprcommand <string></code><a name="index-g_t_002d_002dlprcommand-_003cstring_003e-362"></a><dd>Command to use for printing. Defaults to <code>lpr</code>. This can be used to produce
+<dt><code>--lprcommand <string></code><a name="index-g_t_002d_002dlprcommand-_003cstring_003e-379"></a><dd>Command to use for printing. Defaults to <code>lpr</code>. This can be used to produce
 PDF output with a virtual PDF printer. Example: <br>
 <code>--lprcommand "lp -d CUPS-PDF-Printer"</code>. 
 </dl>
@@ -3669,25 +3740,25 @@ Up: <a rel="up" accesskey="u" href="#Command_002dLine-Options">Command-Line
 
 <h3 class="section">6.17 nelma Options</h3>
 
-<!-- ./../src/hid/nelma/nelma.c 157 -->
+<!-- ./../src/hid/nelma/nelma.c 155 -->
      <dl>
-<dt><code>-- basename <string></code><a name="index-g_t_002d_002d-basename-_003cstring_003e-363"></a><dd>File name prefix. 
+<dt><code>-- basename <string></code><a name="index-g_t_002d_002d-basename-_003cstring_003e-380"></a><dd>File name prefix. 
 </dl>
-<!-- ./../src/hid/nelma/nelma.c 163 -->
+<!-- ./../src/hid/nelma/nelma.c 161 -->
      <dl>
-<dt><code>--dpi <num></code><a name="index-g_t_002d_002ddpi-_003cnum_003e-364"></a><dd>Horizontal scale factor (grid points/inch). 
+<dt><code>--dpi <num></code><a name="index-g_t_002d_002ddpi-_003cnum_003e-381"></a><dd>Horizontal scale factor (grid points/inch). 
 </dl>
-   <!-- ./../src/hid/nelma/nelma.c 169 -->
+   <!-- ./../src/hid/nelma/nelma.c 167 -->
      <dl>
-<dt><code>--copper-height <num></code><a name="index-g_t_002d_002dcopper_002dheight-_003cnum_003e-365"></a><dd>Copper layer height (um). 
+<dt><code>--copper-height <num></code><a name="index-g_t_002d_002dcopper_002dheight-_003cnum_003e-382"></a><dd>Copper layer height (um). 
 </dl>
-   <!-- ./../src/hid/nelma/nelma.c 175 -->
+   <!-- ./../src/hid/nelma/nelma.c 173 -->
      <dl>
-<dt><code>--substrate-height <num></code><a name="index-g_t_002d_002dsubstrate_002dheight-_003cnum_003e-366"></a><dd>Substrate layer height (um). 
+<dt><code>--substrate-height <num></code><a name="index-g_t_002d_002dsubstrate_002dheight-_003cnum_003e-383"></a><dd>Substrate layer height (um). 
 </dl>
-   <!-- ./../src/hid/nelma/nelma.c 181 -->
+   <!-- ./../src/hid/nelma/nelma.c 179 -->
      <dl>
-<dt><code>--substrate-epsilon <num></code><a name="index-g_t_002d_002dsubstrate_002depsilon-_003cnum_003e-367"></a><dd>Substrate relative epsilon. 
+<dt><code>--substrate-epsilon <num></code><a name="index-g_t_002d_002dsubstrate_002depsilon-_003cnum_003e-384"></a><dd>Substrate relative epsilon. 
 </dl>
 
 <!--  chapter 5 - -->
@@ -3702,7 +3773,7 @@ Up: <a rel="up" accesskey="u" href="#Top">Top</a>
 
 <h2 class="chapter">7 X11 Interface</h2>
 
-<p><a name="index-X11-368"></a>
+<p><a name="index-X11-385"></a>
 This chapter gives an overview about the additional <code>X11</code> resources which
 are defined by <code>Pcb</code> as well as the defined action routines.
 
@@ -3722,21 +3793,21 @@ Up: <a rel="up" accesskey="u" href="#X11-Interface">X11 Interface</a>
 
 <h3 class="section">7.1 Non-Standard X11 Application Resources</h3>
 
-<p><a name="index-resources-369"></a><a name="index-X11-resources-370"></a>
+<p><a name="index-resources-386"></a><a name="index-X11-resources-387"></a>
 In addition to the toolkit resources, <code>Pcb</code> defines the
 following resources:
 
      
-<a name="index-absoluteGrid-371"></a>
-<a name="index-grid-372"></a>
+<a name="index-absoluteGrid-388"></a>
+<a name="index-grid-389"></a>
 <dl><dt>‘<samp><span class="samp">absoluteGrid (boolean)</span></samp>’<dd>Selects if either the grid is relative to the position where it has changed
 last or absolute, the default, to the origin (0,0).
 
-     <p><a name="index-alignmentDistance-373"></a><a name="index-alignment-374"></a><br><dt>‘<samp><span class="samp">alignmentDistance (dimension)</span></samp>’<dd>Specifies the distance between the boards outline to the alignment targets.
+     <p><a name="index-alignmentDistance-390"></a><a name="index-alignment-391"></a><br><dt>‘<samp><span class="samp">alignmentDistance (dimension)</span></samp>’<dd>Specifies the distance between the boards outline to the alignment targets.
 
-     <p><a name="index-allDirectionLines-375"></a><a name="index-lines_002c-clipping-to-45-degree-376"></a><a name="index-clipping-lines-to-45-degree-377"></a><br><dt>‘<samp><span class="samp">allDirectionLines (boolean)</span></samp>’<dd>Enables (default) or disables clipping of new lines to 45 degree angles.
+     <p><a name="index-allDirectionLines-392"></a><a name="index-lines_002c-clipping-to-45-degree-393"></a><a name="index-clipping-lines-to-45-degree-394"></a><br><dt>‘<samp><span class="samp">allDirectionLines (boolean)</span></samp>’<dd>Enables (default) or disables clipping of new lines to 45 degree angles.
 
-     <p><a name="index-backgroundImage-378"></a><a name="index-background-379"></a><br><dt>‘<samp><span class="samp">backgroundImage (string)</span></samp>’<dd>If specified, this image will be drawn as the background for the
+     <p><a name="index-backgroundImage-395"></a><a name="index-background-396"></a><br><dt>‘<samp><span class="samp">backgroundImage (string)</span></samp>’<dd>If specified, this image will be drawn as the background for the
 board.  The purpose of this option is to allow you to use a scan of an
 existing layout as a prototype for your new layout.  To do this, there
 are some limitations as to what this image must be.  The image must be
@@ -3756,7 +3827,7 @@ you'll be adding.  Image->Mode->Indexed and select, say, 32 colors
 with Normal F-S dithering.  File->Save As, file type by extension,
 use <samp><span class="file">.ppm</span></samp> as the extension.  Select Raw formatting.
 
-     <p><a name="index-backupInterval-380"></a><a name="index-backup-381"></a><br><dt>‘<samp><span class="samp">backupInterval (int)</span></samp>’<dd><code>Pcb</code> has an automatic backup feature which saves the current data
+     <p><a name="index-backupInterval-397"></a><a name="index-backup-398"></a><br><dt>‘<samp><span class="samp">backupInterval (int)</span></samp>’<dd><code>Pcb</code> has an automatic backup feature which saves the current data
 every n seconds. The default is <em>300</em> seconds. A value of zero disables
 the feature. The backup file is named <samp><span class="file">/tmp/PCB.%i.backup</span></samp> by
 default (this may have been changed at compilation time via the
@@ -3765,22 +3836,22 @@ variable in <samp><span class="file">globalconfig.h</span></samp>).
 <em>%i</em> is replaced by the process ID. 
 See also, the command-line option <em>–backup-interval</em>.
 
-     <p><a name="index-bloat-382"></a><a name="index-bloat-383"></a><a name="index-drc-384"></a><br><dt>‘<samp><span class="samp">Bloat (dimension)</span></samp>’<dd>Specifies the minimum spacing design rule in mils.
+     <p><a name="index-bloat-399"></a><a name="index-bloat-400"></a><a name="index-drc-401"></a><br><dt>‘<samp><span class="samp">Bloat (dimension)</span></samp>’<dd>Specifies the minimum spacing design rule in mils.
 
-     <p><a name="index-connectedColor-385"></a><a name="index-colors-386"></a><a name="index-connections_002c-colors-387"></a><br><dt>‘<samp><span class="samp">connectedColor (color)</span></samp>’<dd>All pins, vias, lines and rectangles which are selected during a connection
+     <p><a name="index-connectedColor-402"></a><a name="index-colors-403"></a><a name="index-connections_002c-colors-404"></a><br><dt>‘<samp><span class="samp">connectedColor (color)</span></samp>’<dd>All pins, vias, lines and rectangles which are selected during a connection
 search are drawn with this color. The default value is determined by
 <em>XtDefaultForeground</em>.
 
-     <p><a name="index-cross-hairColor-388"></a><a name="index-colors-389"></a><a name="index-cursor-color-390"></a><br><dt>‘<samp><span class="samp">cross hairColor (color)</span></samp>’<dd>This color is used to draw the cross hair cursor. The color is a result of
+     <p><a name="index-cross-hairColor-405"></a><a name="index-colors-406"></a><a name="index-cursor-color-407"></a><br><dt>‘<samp><span class="samp">cross hairColor (color)</span></samp>’<dd>This color is used to draw the cross hair cursor. The color is a result of
 a <em>XOR</em> operation with the contents of the Layout area. The result
 also depends on the default colormap of the <code>X11</code> server because only
 the colormap index is used in the boolean operation and <code>Pcb</code> doesn't
 create its own colormap. The default setting is <em>XtDefaultForeground</em>.
 
-     <p><a name="index-elementColor-391"></a><a name="index-elementSelectedColor-392"></a><a name="index-colors-393"></a><a name="index-element_002c-color-394"></a><br><dt>‘<samp><span class="samp">elementColor (color)</span></samp>’<dt>‘<samp><span class="samp">elementSelectedColor (color)</span></samp>’<dd>The elements package part is drawn in these colors, for normal and selected
+     <p><a name="index-elementColor-408"></a><a name="index-elementSelectedColor-409"></a><a name="index-colors-410"></a><a name="index-element_002c-color-411"></a><br><dt>‘<samp><span class="samp">elementColor (color)</span></samp>’<dt>‘<samp><span class="samp">elementSelectedColor (color)</span></samp>’<dd>The elements package part is drawn in these colors, for normal and selected
 mode, respectively, which both default to <em>XtDefaultForeground</em>.
 
-     <p><a name="index-elementCommand-395"></a><a name="index-element_002c-command-396"></a><a name="index-element_002c-files-397"></a><a name="index-loading-elements-398"></a><a name="index-preprocessing-element-data-399"></a><a name="index-unix-command-400"></a><a name="index-m4-401"></a><br><dt>‘<samp><span class="samp">elementCommand (string)</span></samp>’<dd><code>Pcb</code> uses a user defined command to read element files. This resources
+     <p><a name="index-elementCommand-412"></a><a name="index-element_002c-command-413"></a><a name="index-element_002c-files-414"></a><a name="index-loading-elements-415"></a><a name="index-preprocessing-element-data-416"></a><a name="index-unix-command-417"></a><a name="index-m4-418"></a><br><dt>‘<samp><span class="samp">elementCommand (string)</span></samp>’<dd><code>Pcb</code> uses a user defined command to read element files. This resource
 is used to set the command which is executed by the users default shell. 
 Two escape sequences are defined to pass the selected filename (%f) and the
 current search path (%p). The command must write the element data
@@ -3790,14 +3861,14 @@ to its standard output. The default value is
      <p>Using the GNU version of <code>m4</code> is highly recommended. 
 See also, the command-line option <em>–element-command</em>.
 
-     <p><a name="index-elementPath-402"></a><a name="index-searchpath-for-element-files-403"></a><a name="index-path-for-element-files-404"></a><a name="index-element_002c-files-405"></a><a name="index-loading-elements-406"></a><br><dt>‘<samp><span class="samp">elementPath (string)</span></samp>’<dd>A colon separated list of directories or commands (starts with '|'). 
+     <p><a name="index-elementPath-419"></a><a name="index-searchpath-for-element-files-420"></a><a name="index-path-for-element-files-421"></a><a name="index-element_002c-files-422"></a><a name="index-loading-elements-423"></a><br><dt>‘<samp><span class="samp">elementPath (string)</span></samp>’<dd>A colon separated list of directories or commands (starts with '|'). 
 The path is passed to the program specified in <em>elementCommand</em> together
 with the selected element name. A specified command will be executed in order
 to create entries for the fileselect box. It must write its results to
 <em>stdout</em> one entry per line. 
 See also, the user-command <em>le[!]</em>.
 
-     <p><a name="index-fileCommand-407"></a><a name="index-file-load-command-408"></a><a name="index-layout-files-409"></a><a name="index-loading-layouts-410"></a><a name="index-preprocessing-layout-data-411"></a><a name="index-unix-command-412"></a><a name="index-cat-413"></a><br><dt>‘<samp><span class="samp">fileCommand (string)</span></samp>’<dd>The command is executed by the user's default shell whenever existing layout
+     <p><a name="index-fileCommand-424"></a><a name="index-file-load-command-425"></a><a name="index-layout-files-426"></a><a name="index-loading-layouts-427"></a><a name="index-preprocessing-layout-data-428"></a><a name="index-unix-command-429"></a><a name="index-cat-430"></a><br><dt>‘<samp><span class="samp">fileCommand (string)</span></samp>’<dd>The command is executed by the user's default shell whenever existing layout
 files are loaded. Data is read from the command's standard output. 
 Two escape sequences may be specified to pass the selected filename (%f)
 and the current search path (%p). The default value is:
@@ -3805,14 +3876,14 @@ and the current search path (%p). The default value is:
 </pre>
      <p>See also, the command-line option <em>–file-command</em>.
 
-     <p><a name="index-filePath-414"></a><a name="index-searchpath-for-layout-files-415"></a><a name="index-path-for-layout-files-416"></a><a name="index-layout-files-417"></a><a name="index-loading-layouts-418"></a><br><dt>‘<samp><span class="samp">filePath (string)</span></samp>’<dd>A colon separated list of directories or commands (starts with '|'). 
+     <p><a name="index-filePath-431"></a><a name="index-searchpath-for-layout-files-432"></a><a name="index-path-for-layout-files-433"></a><a name="index-layout-files-434"></a><a name="index-loading-layouts-435"></a><br><dt>‘<samp><span class="samp">filePath (string)</span></samp>’<dd>A colon separated list of directories or commands (starts with '|'). 
 The path is passed to the program specified in <em>fileCommand</em> together
 with the selected filename. A specified command will be executed in order
 to create entries for the fileselect box. It must write its results to
 <em>stdout</em> one entry per line. 
 See also, the user-command <em>l[!]</em>.
 
-     <p><a name="index-fontCommand-419"></a><a name="index-font-command-420"></a><a name="index-font-files-421"></a><a name="index-loading-fonts-422"></a><a name="index-loading-symbols-423"></a><a name="index-preprocessing-font-data-424"></a><a name="index-unix-command-425"></a><a name="index-cat-426"></a><br><dt>‘<samp><span class="samp">fontCommand (string)</span></samp>’<dd>Loading new symbol sets also is handled by an external command. You again
+     <p><a name="index-fontCommand-436"></a><a name="index-font-command-437"></a><a name="index-font-files-438"></a><a name="index-loading-fonts-439"></a><a name="index-loading-symbols-440"></a><a name="index-preprocessing-font-data-441"></a><a name="index-unix-command-442"></a><a name="index-cat-443"></a><br><dt>‘<samp><span class="samp">fontCommand (string)</span></samp>’<dd>Loading new symbol sets also is handled by an external command. You again
 may pass the selected filename and the current search path by passing
 %f and %p in the command string. Data is read from the commands standard
 output. This command defaults to
@@ -3820,135 +3891,135 @@ output. This command defaults to
 </pre>
      <p>See also, the command-line option <em>–font-command</em>.
 
-     <p><a name="index-fontFile-427"></a><a name="index-default-font-428"></a><a name="index-symbols-429"></a><br><dt>‘<samp><span class="samp">fontFile (string)</span></samp>’<dd>The default font for new layouts is read from this file which is searched
+     <p><a name="index-fontFile-444"></a><a name="index-default-font-445"></a><a name="index-symbols-446"></a><br><dt>‘<samp><span class="samp">fontFile (string)</span></samp>’<dd>The default font for new layouts is read from this file which is searched
 in the directories as defined by the resource <em>fontPath</em>. 
 Searching is only performed if the filename does not contain a directory
 component. 
 The default filename is <samp><span class="file">default_font</span></samp>.
 
-     <p><a name="index-fontPath-430"></a><a name="index-searchpath-for-font-files-431"></a><a name="index-path-for-font-files-432"></a><a name="index-font-files-433"></a><a name="index-loading-fonts-434"></a><a name="index-loading-symbols-435"></a><br><dt>‘<samp><span class="samp">fontPath (string)</span></samp>’<dd>This resource, a colon separated list of directories, defines the searchpath
+     <p><a name="index-fontPath-447"></a><a name="index-searchpath-for-font-files-448"></a><a name="index-path-for-font-files-449"></a><a name="index-font-files-450"></a><a name="index-loading-fonts-451"></a><a name="index-loading-symbols-452"></a><br><dt>‘<samp><span class="samp">fontPath (string)</span></samp>’<dd>This resource, a colon separated list of directories, defines the searchpath
 for font files. See also, the resource <em>fontFile</em>.
 
-     <p><a name="index-grid-436"></a><a name="index-grid-437"></a><a name="index-cursor-steps-438"></a><br><dt>‘<samp><span class="samp">grid (int)</span></samp>’<dd>This resources defines the initial value of one cursor step. It defaults
+     <p><a name="index-grid-453"></a><a name="index-grid-454"></a><a name="index-cursor-steps-455"></a><br><dt>‘<samp><span class="samp">grid (int)</span></samp>’<dd>This resource defines the initial value of one cursor step. It defaults
 to <em>100 mil</em> and any changes are saved together with the layout data.
 
-     <p><a name="index-gridColor-439"></a><a name="index-colors-440"></a><a name="index-grid-color-441"></a><br><dt>‘<samp><span class="samp">gridColor (color)</span></samp>’<dd>This color is used to draw the grid. The color is a result of
+     <p><a name="index-gridColor-456"></a><a name="index-colors-457"></a><a name="index-grid-color-458"></a><br><dt>‘<samp><span class="samp">gridColor (color)</span></samp>’<dd>This color is used to draw the grid. The color is a result of
 a <em>INVERT</em> operation with the contents of the Layout area. The result
 also depends on the default colormap of the <code>X11</code> server because only
 the colormap index is used in the boolean operation and <code>Pcb</code> doesn't
 create its own colormap. The default setting is <em>XtDefaultForeground</em>.
 
-     <p><a name="index-invisibleObjectsColor-442"></a><a name="index-colors-443"></a><a name="index-element_002c-color-444"></a><br><dt>‘<samp><span class="samp">invisibleObjectsColor (color)</span></samp>’<dd>Elements located on the opposite side of the board are drawn in this color. 
+     <p><a name="index-invisibleObjectsColor-459"></a><a name="index-colors-460"></a><a name="index-element_002c-color-461"></a><br><dt>‘<samp><span class="samp">invisibleObjectsColor (color)</span></samp>’<dd>Elements located on the opposite side of the board are drawn in this color. 
 The default is <em>XtDefaultForeground</em>.
 
-     <p><a name="index-layerColor-445"></a><a name="index-layerSelectedColor-446"></a><a name="index-colors-447"></a><a name="index-layers_002c-colors-448"></a><br><dt>‘<samp><span class="samp">layerColor1..MAX_LAYER (color)</span></samp>’<dt>‘<samp><span class="samp">layerSelectedColor1..MAX_LAYER (color)</span></samp>’<dd>These resources define the drawing colors of the different layers in
+     <p><a name="index-layerColor-462"></a><a name="index-layerSelectedColor-463"></a><a name="index-colors-464"></a><a name="index-layers_002c-colors-465"></a><br><dt>‘<samp><span class="samp">layerColor1..MAX_LAYER (color)</span></samp>’<dt>‘<samp><span class="samp">layerSelectedColor1..MAX_LAYER (color)</span></samp>’<dd>These resources define the drawing colors of the different layers in
 normal and selected state. All values are preset to <em>XtDefaultForeground</em>.
 
-     <p><a name="index-layerGroups-449"></a><a name="index-layers_002c-groups-450"></a><a name="index-groups-451"></a><br><dt>‘<samp><span class="samp">layerGroups (string)</span></samp>’<dd>The argument to this resource is a colon separated list of comma separated
+     <p><a name="index-layerGroups-466"></a><a name="index-layers_002c-groups-467"></a><a name="index-groups-468"></a><br><dt>‘<samp><span class="samp">layerGroups (string)</span></samp>’<dd>The argument to this resource is a colon separated list of comma separated
 layer numbers (1..MAX_LAYER). All layers within one group are switched on/off
 together. The default setting is <em>1:2:3:...:MAX_LAYER</em> which means
 all layers are handled separately. Grouping layers one to three looks like
 <em>1,2,3:4:...:MAX_LAYER</em>
 
-     <p><a name="index-layerName-452"></a><a name="index-layer_002c-name-of-453"></a><br><dt>‘<samp><span class="samp">layerName1..MAX_LAYER (string)</span></samp>’<dd>The default name of the layers in a new layout are determined by these
+     <p><a name="index-layerName-469"></a><a name="index-layer_002c-name-of-470"></a><br><dt>‘<samp><span class="samp">layerName1..MAX_LAYER (string)</span></samp>’<dd>The default name of the layers in a new layout are determined by these
 resources. The defaults are empty strings.
 
-     <p><a name="index-libraryCommand-454"></a><a name="index-library-command-455"></a><a name="index-loading-elements-456"></a><a name="index-unix-command-457"></a><br><dt>‘<samp><span class="samp">libraryCommand (string)</span></samp>’<dd><code>Pcb</code> uses a command to read element data from libraries. 
-The resources is used to set the command which is executed by the users
+     <p><a name="index-libraryCommand-471"></a><a name="index-library-command-472"></a><a name="index-loading-elements-473"></a><a name="index-unix-command-474"></a><br><dt>‘<samp><span class="samp">libraryCommand (string)</span></samp>’<dd><code>Pcb</code> uses a command to read element data from libraries. 
+The resource is used to set the command which is executed by the users
 default shell.  Three escape sequences are defined to pass the selected
 filename (%f), the current search path (%p) as well (%a) as the three
 parameters <em>template</em>, <em>value</em> and <em>package</em> to the command. 
 It must write the element data to its standard output. The default value is
      <pre class="example">              NONE/share/pcb/oldlib/QueryLibrary.sh %p %f %a
 </pre>
-     <p><a name="index-elementContentsCommand-458"></a><a name="index-library-contents-command-459"></a><a name="index-listing-library-contents-460"></a><a name="index-unix-command-461"></a><br><dt>‘<samp><span class="samp">libraryContentsCommand (string)</span></samp>’<dd>Similar to <em>libraryCommand</em>, <code>Pcb</code> uses the command specified
+     <p><a name="index-elementContentsCommand-475"></a><a name="index-library-contents-command-476"></a><a name="index-listing-library-contents-477"></a><a name="index-unix-command-478"></a><br><dt>‘<samp><span class="samp">libraryContentsCommand (string)</span></samp>’<dd>Similar to <em>libraryCommand</em>, <code>Pcb</code> uses the command specified
 by this resource to list the contents of a library.
      <pre class="example">          	NONE/share/pcb/oldlib/ListLibraryContents.sh %p %f
 </pre>
      <p>is the default.
 
-     <p><a name="index-libraryFilename-462"></a><a name="index-default-library-463"></a><a name="index-library-name-464"></a><br><dt>‘<samp><span class="samp">libraryFilename (string)</span></samp>’<dd>The resource specifies the name of the library. The default value is
+     <p><a name="index-libraryFilename-479"></a><a name="index-default-library-480"></a><a name="index-library-name-481"></a><br><dt>‘<samp><span class="samp">libraryFilename (string)</span></samp>’<dd>The resource specifies the name of the library. The default value is
 <em>pcblib</em> unless changed at compile time
 with the <code>LIBRARYFILENAME</code> variable in <samp><span class="file">globalconfig.h</span></samp>.
 
-     <p><a name="index-libraryPath-465"></a><a name="index-searchpath-for-libraries-466"></a><a name="index-path-for-libraries-467"></a><a name="index-library-searchpath-468"></a><br><dt>‘<samp><span class="samp">libraryPath (string)</span></samp>’<dd>A colon separated list of directories that will be passed to the commands
+     <p><a name="index-libraryPath-482"></a><a name="index-searchpath-for-libraries-483"></a><a name="index-path-for-libraries-484"></a><a name="index-library-searchpath-485"></a><br><dt>‘<samp><span class="samp">libraryPath (string)</span></samp>’<dd>A colon separated list of directories that will be passed to the commands
 specified by <em>elementCommand</em> and <em>elementContentsCommand</em>.
 
-     <p><a name="index-lineThickness-469"></a><a name="index-lines_002c-size-470"></a><a name="index-size-of-lines-471"></a><a name="index-thickness-of-lines-472"></a><br><dt>‘<samp><span class="samp">lineThickness (dimension)</span></samp>’<dd>The value, in the range [1..250] (the range may be changed at compile
+     <p><a name="index-lineThickness-486"></a><a name="index-lines_002c-size-487"></a><a name="index-size-of-lines-488"></a><a name="index-thickness-of-lines-489"></a><br><dt>‘<samp><span class="samp">lineThickness (dimension)</span></samp>’<dd>The value, in the range [1..250] (the range may be changed at compile
 time with the <code>MIN_LINESIZE</code> and <code>MAX_LINESIZE</code> variables in
 <samp><span class="file">globalconfig.h</span></samp>), defines the
 initial thickness of new lines. The value is preset to <em>ten mil</em>.
 
-     <p><a name="index-media-473"></a><a name="index-media-474"></a><a name="index-media-margin-475"></a><a name="index-print-media-476"></a><br><dt>‘<samp><span class="samp">media (<predefined> | <width>x<height>+-<left_margin>+-<top_margin>)</span></samp>’<dd>The default (user defined) media of the <code>PostScript</code> device. Predefined
+     <p><a name="index-media-490"></a><a name="index-media-491"></a><a name="index-media-margin-492"></a><a name="index-print-media-493"></a><br><dt>‘<samp><span class="samp">media (<predefined> | <width>x<height>+-<left_margin>+-<top_margin>)</span></samp>’<dd>The default (user defined) media of the <code>PostScript</code> device. Predefined
 values are <em>a3</em>, <em>a4</em>, <em>a5</em>, <em>letter</em>, <em>tabloit</em>,
 <em>ledger</em>, <em>legal</em>, and <em>executive</em>. 
 The second way is to specify the medias width, height and margins in mil. 
 The resource defaults to <em>a4</em> size unless changed at compile time
 with the <code>DEFAULT_MEDIASIZE</code> variable in <samp><span class="file">globalconfig.h</span></samp>.
 
-     <p><a name="index-offLimitColor-477"></a><a name="index-colors-478"></a><a name="index-off-limit-color-479"></a><br><dt>‘<samp><span class="samp">offLimitColor (color)</span></samp>’<dd>The area outside the current maximum settings for width and height is drawn
+     <p><a name="index-offLimitColor-494"></a><a name="index-colors-495"></a><a name="index-off-limit-color-496"></a><br><dt>‘<samp><span class="samp">offLimitColor (color)</span></samp>’<dd>The area outside the current maximum settings for width and height is drawn
 with this color. The default value is determined by <em>XtDefaultBackground</em>.
 
-     <p><a name="index-pinColor-480"></a><a name="index-pinSelectedColor-481"></a><a name="index-colors-482"></a><a name="index-pin-color-483"></a><br><dt>‘<samp><span class="samp">pinColor (color)</span></samp>’<dt>‘<samp><span class="samp">pinSelectedColor(color)</span></samp>’<dd>This resource defines the drawing color of pins and pads in both states. 
+     <p><a name="index-pinColor-497"></a><a name="index-pinSelectedColor-498"></a><a name="index-colors-499"></a><a name="index-pin-color-500"></a><br><dt>‘<samp><span class="samp">pinColor (color)</span></samp>’<dt>‘<samp><span class="samp">pinSelectedColor(color)</span></samp>’<dd>This resource defines the drawing color of pins and pads in both states. 
 The values are preset to <em>XtDefaultForeground</em>.
 
-     <p><a name="index-pinoutFont0_002e_002e6-484"></a><a name="index-font_002c-used-for-pin-names-485"></a><a name="index-pinout_002c-font-to-display-pin-names-486"></a><br><dt>‘<samp><span class="samp">pinoutFont (string)</span></samp>’<dd>This fonts are used to display pin names. There is one font for each zoom
+     <p><a name="index-pinoutFont0_002e_002e6-501"></a><a name="index-font_002c-used-for-pin-names-502"></a><a name="index-pinout_002c-font-to-display-pin-names-503"></a><br><dt>‘<samp><span class="samp">pinoutFont (string)</span></samp>’<dd>This fonts are used to display pin names. There is one font for each zoom
 value. The values are preset to <em>XtdefaultFont</em>.
 
-     <p><a name="index-pinoutNameLength-487"></a><a name="index-namelength-of-pins-488"></a><a name="index-pin_002c-name-of-489"></a><a name="index-length-of-a-pin-name-490"></a><br><dt>‘<samp><span class="samp">pinoutNameLength (int)</span></samp>’<dd>This resource limits the number of characters which are displayed for
+     <p><a name="index-pinoutNameLength-504"></a><a name="index-namelength-of-pins-505"></a><a name="index-pin_002c-name-of-506"></a><a name="index-length-of-a-pin-name-507"></a><br><dt>‘<samp><span class="samp">pinoutNameLength (int)</span></samp>’<dd>This resource limits the number of characters which are displayed for
 pin names in the pinout window. By default the string length is limited
 to <em>eight</em> characters per name.
 
-     <p><a name="index-pinoutOffsetX-491"></a><a name="index-pinoutOffsetY-492"></a><a name="index-offset-of-pinout-493"></a><br><dt>‘<samp><span class="samp">pinoutOffsetX (int)</span></samp>’<dt>‘<samp><span class="samp">pinoutOffsetY (int)</span></samp>’<dd>These resources determine the offset in <em>mil</em> of the circuit from the
+     <p><a name="index-pinoutOffsetX-508"></a><a name="index-pinoutOffsetY-509"></a><a name="index-offset-of-pinout-510"></a><br><dt>‘<samp><span class="samp">pinoutOffsetX (int)</span></samp>’<dt>‘<samp><span class="samp">pinoutOffsetY (int)</span></samp>’<dd>These resources determine the offset in <em>mil</em> of the circuit from the
 upper left corner of the window when displaying pinout information. 
 Both default to <em>100 mil</em>.
 
-     <p><a name="index-pinoutTextOffsetX-494"></a><a name="index-pinoutTextOffsetY-495"></a><a name="index-offset-of-pinnames-496"></a><br><dt>‘<samp><span class="samp">pinoutTextOffsetX (int)</span></samp>’<dt>‘<samp><span class="samp">pinoutTextOffsetY (int)</span></samp>’<dd>The resources determine the distance in mil between the drilling hole of a pin
+     <p><a name="index-pinoutTextOffsetX-511"></a><a name="index-pinoutTextOffsetY-512"></a><a name="index-offset-of-pinnames-513"></a><br><dt>‘<samp><span class="samp">pinoutTextOffsetX (int)</span></samp>’<dt>‘<samp><span class="samp">pinoutTextOffsetY (int)</span></samp>’<dd>The resources determine the distance in mil between the drilling hole of a pin
 to the location where its name is displayed in the pinout window. 
 They default to <em>X:50</em> and <em>Y:0</em>.
 
-     <p><a name="index-pinoutZoom-497"></a><a name="index-pinout_002c-zoomfactor-of-display-498"></a><a name="index-zoom-of-pinout-window-499"></a><br><dt>‘<samp><span class="samp">pinoutZoom (int)</span></samp>’<dd>Sets the zoom factor for the pinout window according to the formula:
+     <p><a name="index-pinoutZoom-514"></a><a name="index-pinout_002c-zoomfactor-of-display-515"></a><a name="index-zoom-of-pinout-window-516"></a><br><dt>‘<samp><span class="samp">pinoutZoom (int)</span></samp>’<dd>Sets the zoom factor for the pinout window according to the formula:
 scale = 1:(2 power value). Its default value is <em>two</em> which results in
 a <em>1:4</em> scale.
 
-     <p><a name="index-printCommand-500"></a><a name="index-printing-501"></a><br><dt>‘<samp><span class="samp">printCommand (string)</span></samp>’<dd>Default file for printouts. If the name starts with a '|' the output
+     <p><a name="index-printCommand-517"></a><a name="index-printing-518"></a><br><dt>‘<samp><span class="samp">printCommand (string)</span></samp>’<dd>Default file for printouts. If the name starts with a '|' the output
 is piped through the command. A %f is replaced by the current filename. 
 There is no default file or command.
 
-     <p><a name="index-raiseLogWindow-502"></a><a name="index-log-window-503"></a><a name="index-messages-504"></a><br><dt>‘<samp><span class="samp">raiseLogWindow (boolean)</span></samp>’<dd>The log window will be raised when new messages arrive if this resource
+     <p><a name="index-raiseLogWindow-519"></a><a name="index-log-window-520"></a><a name="index-messages-521"></a><br><dt>‘<samp><span class="samp">raiseLogWindow (boolean)</span></samp>’<dd>The log window will be raised when new messages arrive if this resource
 is set <em>true</em>, the default.
 
-     <p><a name="index-ratCommand-505"></a><a name="index-rats-nest-506"></a><a name="index-netlist-507"></a><br><dt>‘<samp><span class="samp">ratCommand (string)</span></samp>’<dd>Default command for reading a netlist. A %f is replaced by the netlist
+     <p><a name="index-ratCommand-522"></a><a name="index-rats-nest-523"></a><a name="index-netlist-524"></a><br><dt>‘<samp><span class="samp">ratCommand (string)</span></samp>’<dd>Default command for reading a netlist. A %f is replaced by the netlist
 filename. Its default value is "<em>cat %f</em>".
 
-     <p><a name="index-ratPath-508"></a><a name="index-rats-nest-509"></a><a name="index-netlist-510"></a><br><dt>‘<samp><span class="samp">ratPath (string)</span></samp>’<dd>Default path to look for netlist files. It's default value is "."
+     <p><a name="index-ratPath-525"></a><a name="index-rats-nest-526"></a><a name="index-netlist-527"></a><br><dt>‘<samp><span class="samp">ratPath (string)</span></samp>’<dd>Default path to look for netlist files. It's default value is "."
 
-     <p><a name="index-resetAfterElement-511"></a><a name="index-connections_002c-reseting-after-element-512"></a><a name="index-reseting-found-connections-513"></a><br><dt>‘<samp><span class="samp">resetAfterElement (boolean)</span></samp>’<dd>If set to <em>true</em>, all found connections will be reset before a new
+     <p><a name="index-resetAfterElement-528"></a><a name="index-connections_002c-reseting-after-element-529"></a><a name="index-reseting-found-connections-530"></a><br><dt>‘<samp><span class="samp">resetAfterElement (boolean)</span></samp>’<dd>If set to <em>true</em>, all found connections will be reset before a new
 element is scanned. This will produce long lists when scanning the whole
 layout for connections. The resource is set to <em>false</em> by default. 
 The feature is only used while looking up connections of all elements.
 
-     <p><a name="index-ringBellWhenFinished-514"></a><a name="index-keyboard-bell-515"></a><br><dt>‘<samp><span class="samp">ringBellWhenFinished (boolean)</span></samp>’<dd>Whether to ring the bell (the default) when a possibly lengthy operation
+     <p><a name="index-ringBellWhenFinished-531"></a><a name="index-keyboard-bell-532"></a><br><dt>‘<samp><span class="samp">ringBellWhenFinished (boolean)</span></samp>’<dd>Whether to ring the bell (the default) when a possibly lengthy operation
 has finished or not. 
 See also, the command-line option <em>–ring-bell-finished</em>.
 
-     <p><a name="index-routeStyle-516"></a><a name="index-routing-style-517"></a><br><dt>‘<samp><span class="samp">routeStyle (string)</span></samp>’<dd>Default values for the menu of routing styles (seen in the sizes menu). 
+     <p><a name="index-routeStyle-533"></a><a name="index-routing-style-534"></a><br><dt>‘<samp><span class="samp">routeStyle (string)</span></samp>’<dd>Default values for the menu of routing styles (seen in the sizes menu). 
 The string is a comma separated list of name, line thickness,
 via diameter, and via drill size. 
 e.g. "Fat,50,100,40:Skinny,8,35,20:75Ohm,110,110,20"
 See also, the command-line option <em>–route-styles</em> and <em>Sizes Menu</em>
 
-     <p><a name="index-rubberBandMode-518"></a><a name="index-move-519"></a><a name="index-rubberband-520"></a><a name="index-rotate-521"></a><br><dt>‘<samp><span class="samp">rubberBandMode (boolean)</span></samp>’<dd>Whether rubberband move and rotate (attached lines stretch like
+     <p><a name="index-rubberBandMode-535"></a><a name="index-move-536"></a><a name="index-rubberband-537"></a><a name="index-rotate-538"></a><br><dt>‘<samp><span class="samp">rubberBandMode (boolean)</span></samp>’<dd>Whether rubberband move and rotate (attached lines stretch like
 rubberbands) is enabled (the default).
 
-     <p><a name="index-saveCommand-522"></a><a name="index-file-save-command-523"></a><a name="index-layout-files-524"></a><a name="index-saving-layouts-525"></a><a name="index-postprocessing-layout-data-526"></a><a name="index-unix-command-527"></a><a name="index-cat-528"></a><br><dt>‘<samp><span class="samp">saveCommand (string)</span></samp>’<dd>This command is used to save data to a layout file. The filename may be
+     <p><a name="index-saveCommand-539"></a><a name="index-file-save-command-540"></a><a name="index-layout-files-541"></a><a name="index-saving-layouts-542"></a><a name="index-postprocessing-layout-data-543"></a><a name="index-unix-command-544"></a><a name="index-cat-545"></a><br><dt>‘<samp><span class="samp">saveCommand (string)</span></samp>’<dd>This command is used to save data to a layout file. The filename may be
 indicated by placing <code>%f</code> in the string. It must read the data from
 its standard input.  The default command is:
      <pre class="example">              cat - > %f
 </pre>
      <p>See also, the command-line option <em>–save-command</em>.
 
-     <p><a name="index-saveInTMP-529"></a><a name="index-backup-530"></a><a name="index-saving-layouts-531"></a><a name="index-preventing-loss-of-data-532"></a><a name="index-temporary-files-533"></a><a name="index-g_t_002ftmp-534"></a><a name="index-directory-_002ftmp-535"></a><br><dt>‘<samp><span class="samp">saveInTMP (boolean)</span></samp>’<dd>Enabling this resource will save all data which would otherwise be lost
+     <p><a name="index-saveInTMP-546"></a><a name="index-backup-547"></a><a name="index-saving-layouts-548"></a><a name="index-preventing-loss-of-data-549"></a><a name="index-temporary-files-550"></a><a name="index-g_t_002ftmp-551"></a><a name="index-directory-_002ftmp-552"></a><br><dt>‘<samp><span class="samp">saveInTMP (boolean)</span></samp>’<dd>Enabling this resource will save all data which would otherwise be lost
 in a temporary file <samp><span class="file">/tmp/PCB.%i.save</span></samp>.  The file name may
 be changed at compile time
 with the <code>EMERGENCY_NAME</code> variable in <samp><span class="file">globalconfig.h</span></samp>. 
@@ -3958,34 +4029,34 @@ As an example, loading a new layout when the old one hasn't been saved would
 use this resource. 
 See also, the command-line option <em>–save-in-tmp</em>.
 
-     <p><a name="index-saveLastCommand-536"></a><a name="index-saving-last-entered-user-command-537"></a><a name="index-inputfield_002c-saving-entered-command_002dline-538"></a><br><dt>‘<samp><span class="samp">saveLastCommand (boolean)</span></samp>’<dd>Enables the saving of the last entered user command. The option is
+     <p><a name="index-saveLastCommand-553"></a><a name="index-saving-last-entered-user-command-554"></a><a name="index-inputfield_002c-saving-entered-command_002dline-555"></a><br><dt>‘<samp><span class="samp">saveLastCommand (boolean)</span></samp>’<dd>Enables the saving of the last entered user command. The option is
 <em>disabled</em> by default. 
 See also, the command-line option <em>–save-last-command</em>.
 
-     <p><a name="index-shrink-539"></a><a name="index-shrink-540"></a><a name="index-drc-541"></a><br><dt>‘<samp><span class="samp">Shrink (dimension)</span></samp>’<dd>Specifies the minimum overlap (touching) design rule in mils.
+     <p><a name="index-shrink-556"></a><a name="index-shrink-557"></a><a name="index-drc-558"></a><br><dt>‘<samp><span class="samp">Shrink (dimension)</span></samp>’<dd>Specifies the minimum overlap (touching) design rule in mils.
 
-     <p><a name="index-size-542"></a><a name="index-default-layout-size-543"></a><a name="index-layout_002c-default-size-of-544"></a><br><dt>‘<samp><span class="samp">size (<width>x<height>)</span></samp>’<dd>Defines the width and height of a new layout. The default is
+     <p><a name="index-size-559"></a><a name="index-default-layout-size-560"></a><a name="index-layout_002c-default-size-of-561"></a><br><dt>‘<samp><span class="samp">size (<width>x<height>)</span></samp>’<dd>Defines the width and height of a new layout. The default is
 <em>7000x5000</em> unless changed at compile time
 with the <code>DEFAULT_SIZE</code> variable in <samp><span class="file">globalconfig.h</span></samp>.
 
-     <p><a name="index-stipplePolygons-545"></a><a name="index-polygon-546"></a><a name="index-display-547"></a><br><dt>‘<samp><span class="samp">stipllePolygons (boolean)</span></samp>’<dd>Determines whether to display polygons on the screen with a stippled
+     <p><a name="index-stipplePolygons-562"></a><a name="index-polygon-563"></a><a name="index-display-564"></a><br><dt>‘<samp><span class="samp">stipllePolygons (boolean)</span></samp>’<dd>Determines whether to display polygons on the screen with a stippled
 pattern.  Stippling can create some amount of transparency so that
 you can still (to some extent) see layers beneath polygons. 
 It defaults to False.
 
-     <p><a name="index-textScale-548"></a><a name="index-text_002c-default-scaling-549"></a><a name="index-default-text-scaling-550"></a><br><dt>‘<samp><span class="samp">textScale (dimension)</span></samp>’<dd>The font scaling in percent is defined by this resource. The default is
+     <p><a name="index-textScale-565"></a><a name="index-text_002c-default-scaling-566"></a><a name="index-default-text-scaling-567"></a><br><dt>‘<samp><span class="samp">textScale (dimension)</span></samp>’<dd>The font scaling in percent is defined by this resource. The default is
 <em>100</em> percent.
 
-     <p><a name="index-useLogWindow-551"></a><a name="index-log-window-552"></a><a name="index-messages-553"></a><br><dt>‘<samp><span class="samp">useLogWindow (boolean)</span></samp>’<dd>Several subroutines send messages to the user if an error occurs. 
+     <p><a name="index-useLogWindow-568"></a><a name="index-log-window-569"></a><a name="index-messages-570"></a><br><dt>‘<samp><span class="samp">useLogWindow (boolean)</span></samp>’<dd>Several subroutines send messages to the user if an error occurs. 
 This resource determines if they appear inside the log window or as a separate
 dialog box. See also, the resource <em>raiseLogWindow</em> and the command line
 option <em>-loggeometry</em>. 
 The default value is <em>true</em>.
 
-     <p><a name="index-viaColor-554"></a><a name="index-viaSelectedColor-555"></a><a name="index-colors-556"></a><a name="index-vias_002c-color-557"></a><br><dt>‘<samp><span class="samp">viaColor (color)</span></samp>’<br><dt>‘<samp><span class="samp">viaSelectedColor (color)</span></samp>’<dd>This resource defines the drawing color of vias in both states. 
+     <p><a name="index-viaColor-571"></a><a name="index-viaSelectedColor-572"></a><a name="index-colors-573"></a><a name="index-vias_002c-color-574"></a><br><dt>‘<samp><span class="samp">viaColor (color)</span></samp>’<br><dt>‘<samp><span class="samp">viaSelectedColor (color)</span></samp>’<dd>This resource defines the drawing color of vias in both states. 
 The values are preset to <em>XtDefaultForeground</em>.
 
-     <p><a name="index-viaThickness-558"></a><a name="index-viaDrillingHole-559"></a><a name="index-vias_002c-size-560"></a><a name="index-size-of-vias-561"></a><a name="index-thickness-of-vias-562"></a><br><dt>‘<samp><span class="samp">viaThickness (dimension)</span></samp>’<dt>‘<samp><span class="samp">viaDrillingHole (dimension)</span></samp>’<dd>The initial thickness and drilling hole of new vias. The values must be in the
+     <p><a name="index-viaThickness-575"></a><a name="index-viaDrillingHole-576"></a><a name="index-vias_002c-size-577"></a><a name="index-size-of-vias-578"></a><a name="index-thickness-of-vias-579"></a><br><dt>‘<samp><span class="samp">viaThickness (dimension)</span></samp>’<dt>‘<samp><span class="samp">viaDrillingHole (dimension)</span></samp>’<dd>The initial thickness and drilling hole of new vias. The values must be in the
 range [30..400] (the range may be changed at compile
 time with the <code>MIN_PINORVIASIZE</code> and <code>MAX_PINEORVIASIZE</code> variables in
 <samp><span class="file">globalconfig.h</span></samp>), with at least 20
@@ -3993,15 +4064,15 @@ mil of copper.
 The default thickness is <em>40 mil</em> and the default drilling hole is
 <em>20 mil</em>.
 
-     <p><a name="index-volume-563"></a><a name="index-speaker-volume-564"></a><a name="index-volume-of-speaker-565"></a><br><dt>‘<samp><span class="samp">volume (int)</span></samp>’<dd>The value is passed to <code>XBell()</code> which sets the volume of the <code>X</code>
+     <p><a name="index-volume-580"></a><a name="index-speaker-volume-581"></a><a name="index-volume-of-speaker-582"></a><br><dt>‘<samp><span class="samp">volume (int)</span></samp>’<dd>The value is passed to <code>XBell()</code> which sets the volume of the <code>X</code>
 speaker. 
 The value lies in the range -100..100 and it defaults to the maximum volume of
 <em>100</em>.
 
-     <p><a name="index-warnColor-566"></a><a name="index-colors-567"></a><a name="index-color_002c-warning-568"></a><br><dt>‘<samp><span class="samp">warnColor (color)</span></samp>’<dd>This resources defines the color to be used for drawing pins and pads when
+     <p><a name="index-warnColor-583"></a><a name="index-colors-584"></a><a name="index-color_002c-warning-585"></a><br><dt>‘<samp><span class="samp">warnColor (color)</span></samp>’<dd>This resource defines the color to be used for drawing pins and pads when
 a warning has been issued about them.
 
-     <p><a name="index-zoom-569"></a><a name="index-zoom-of-Layout-area-570"></a><br><dt>‘<samp><span class="samp">zoom (int)</span></samp>’<dd>The initial value for output scaling is set according to the following
+     <p><a name="index-zoom-586"></a><a name="index-zoom-of-Layout-area-587"></a><br><dt>‘<samp><span class="samp">zoom (int)</span></samp>’<dd>The initial value for output scaling is set according to the following
 formula: scale = 1:(2 power value). It defaults to <em>three</em> which results
 in an output scale of <em>1:8</em>.
 
@@ -4020,7 +4091,7 @@ Up: <a rel="up" accesskey="u" href="#X11-Interface">X11 Interface</a>
 
 <h3 class="section">7.2 Actions</h3>
 
-<p><a name="index-actions-571"></a><a name="index-translations-572"></a><a name="index-key-translations-573"></a><a name="index-button-translations-574"></a><a name="index-X11-translations-575"></a>
+<p><a name="index-actions-588"></a><a name="index-translations-589"></a><a name="index-key-translations-590"></a><a name="index-button-translations-591"></a><a name="index-X11-translations-592"></a>
 All user accessible commands may be bound to almost any <code>X</code> event. Almost
 no default binding for commands is done in the binaries, so it is vital for the
 application that at least a system-wide application resource file exists. 
@@ -4033,7 +4104,7 @@ an X11 event, you can also execute any action command using a ":" command
    <p>Take special care about translations related to the functions keys and the
 pointer buttons because most of the window managers use them too. 
 Change the file according to your hardware/software environment. 
-You may have to replace all occurances of <em>baseTranslations</em> to
+You may have to replace all occurrences of <em>baseTranslations</em> to
 <em>translations</em> if you use a <code>X11R4</code> server.
 
    <p>Passing <em>Object</em> as an argument to an action routine causes the object
@@ -4043,10 +4114,10 @@ If there are two of the same type the newer one is taken.
 <em>SelectedObjects</em> will handle all selected and visible objects.
 
      
-<a name="index-AddRats_0028_0029-576"></a>
-<a name="index-rats-nest-577"></a>
-<a name="index-netlist-578"></a>
-<a name="index-rat_002dline-579"></a>
+<a name="index-AddRats_0028_0029-593"></a>
+<a name="index-rats-nest-594"></a>
+<a name="index-netlist-595"></a>
+<a name="index-rat_002dline-596"></a>
 <dl><dt>‘<samp><span class="samp">AddRats(AllRats|SelectedRats)</span></samp>’<dd>Adds rat-lines to the layout using the loaded netlist file (see the <em>:rn</em>,
 <a href="#User-Commands">User Commands</a>.). Rat lines are added on the active layer using the current
 line thickness shown in the status line. 
@@ -4072,10 +4143,10 @@ Default:
           None<Key>o:	DeleteRats(AllRats) AddRats(AllRats)
           !Shift<Key>o:	DeleteRats(SelectedRats) AddRats(SelectedRats)
 </pre>
-     <p><a name="index-ApplyVendor_0028_0029-580"></a><a name="index-vendor-map-581"></a><a name="index-vendor-drill-table-582"></a><br><dt>‘<samp><span class="samp">ApplyVendor()</span></samp>’<dd>Applies an already loaded vendor drill map to the design.
+     <p><a name="index-ApplyVendor_0028_0029-597"></a><a name="index-vendor-map-598"></a><a name="index-vendor-drill-table-599"></a><br><dt>‘<samp><span class="samp">ApplyVendor()</span></samp>’<dd>Applies an already loaded vendor drill map to the design.
      <pre class="example">          ApplyVendor()
 </pre>
-     <p><a name="index-Atomic_0028_0029-583"></a><a name="index-undo_002c-multi_002daction-resources-584"></a><a name="index-atomic-585"></a><br><dt>‘<samp><span class="samp">Atomic(Save|Restore|Block|Close)</span></samp>’<dd>Controls the undo grouping of sequences of actions. Before the first action
+     <p><a name="index-Atomic_0028_0029-600"></a><a name="index-undo_002c-multi_002daction-resources-601"></a><a name="index-atomic-602"></a><br><dt>‘<samp><span class="samp">Atomic(Save|Restore|Block|Close)</span></samp>’<dd>Controls the undo grouping of sequences of actions. Before the first action
 in a group, Atomic(Save) should be issued.  After each action that might
 be undoable, Atomic(Restore) should be issued.  Atomic(Block) concludes
 and save the undo grouping if there was anything in the group to undo. 
@@ -4083,10 +4154,10 @@ Atomic(Close) concludes and save the undo grouping even if nothing was
 actually done.  Thus it might produce an "empty" undo.  This can be useful
 when you want to use undo in a group of actions.
 
-     <p><a name="index-Bell_0028_0029-586"></a><a name="index-signal-587"></a><a name="index-bell-588"></a><br><dt>‘<samp><span class="samp">Bell([-100..100])</span></samp>’<dd>Rings the bell of your display. If no value is passed the setting
+     <p><a name="index-Bell_0028_0029-603"></a><a name="index-signal-604"></a><a name="index-bell-605"></a><br><dt>‘<samp><span class="samp">Bell([-100..100])</span></samp>’<dd>Rings the bell of your display. If no value is passed the setting
 of the resource <em>volume</em> will be used.
 
-     <p><a name="index-ChangeClearSize_0028_0029-589"></a><a name="index-change-sizes-590"></a><a name="index-sizes_002c-changing-of-objects-591"></a><a name="index-clearance_002c-changing-of-objects-592"></a><br><dt>‘<samp><span class="samp">ChangeClearSize(Object, value[, unit])</span></samp>’<dt>‘<samp><span class="samp">ChangeClearSize(SelectedPins|SelectedVias, value[, unit])</span></samp>’<dd>The effect of this action depends on if the soldermask display is  [...]
+     <p><a name="index-ChangeClearSize_0028_0029-606"></a><a name="index-change-sizes-607"></a><a name="index-sizes_002c-changing-of-objects-608"></a><a name="index-clearance_002c-changing-of-objects-609"></a><br><dt>‘<samp><span class="samp">ChangeClearSize(Object, value[, unit])</span></samp>’<dt>‘<samp><span class="samp">ChangeClearSize(SelectedPins|SelectedVias, value[, unit])</span></samp>’<dd>The effect of this action depends on if the soldermask display is  [...]
 turned on or off. If soldermask is displayed, then the soldermask
 relief size will be changed.  If soldermask display is turned off,
 then the clearance to polygons will be changed. 
@@ -4095,7 +4166,7 @@ to the internal unit of 0.01 mil.
      <pre class="example">          !Mod1<Key>k:      ChangeClearSize(Object, +2, mil)
           !Mod1 Shift<Key>k: ChangeClearSize(Object, -2, mil)
 </pre>
-     <p><a name="index-ChangeDrillSize_0028_0029-593"></a><a name="index-change-sizes-594"></a><a name="index-sizes_002c-changing-of-objects-595"></a><a name="index-drilling-hole_002c-changing-of-objects-596"></a><br><dt>‘<samp><span class="samp">ChangeDrillSize(Object, value[, unit])</span></samp>’<dt>‘<samp><span class="samp">ChangeDrillSize(SelectedPins|SelectedVias, value[, unit])</span></samp>’<dd>This action routine changes the drilling hole of pins and vias. 
+     <p><a name="index-ChangeDrillSize_0028_0029-610"></a><a name="index-change-sizes-611"></a><a name="index-sizes_002c-changing-of-objects-612"></a><a name="index-drilling-hole_002c-changing-of-objects-613"></a><br><dt>‘<samp><span class="samp">ChangeDrillSize(Object, value[, unit])</span></samp>’<dt>‘<samp><span class="samp">ChangeDrillSize(SelectedPins|SelectedVias, value[, unit])</span></samp>’<dd>This action routine changes the drilling hole of pins and vias. 
 If <em>value</em> starts with + or -, then it adds (or subtracts)
 <em>value</em> from the current hole diameter, otherwise it sets the
 diameter to the value. 
@@ -4105,18 +4176,18 @@ Default:
      <pre class="example">          !Mod1<Key>s:       Change2ndSize(Object, +5, mil)
           !Mod1 Shift<Key>s: Change2ndSize(Object, -5, mil)
 </pre>
-     <p><a name="index-ChangeFlag_0028_0029-597"></a><a name="index-flags_002c-changing-598"></a><a name="index-octagonal-flag_002c-changing-599"></a><a name="index-square-flag_002c-changing-600"></a><a name="index-thermal-flag_002c-changing-601"></a><dt>‘<samp><span class="samp">ChangeFlag(Object|SelectElements|SelectedPins|SelectedVias|Selected,thermal|octagon|square,0|1)</span></samp>’<dd>Sets/clears the indicated flag.  This adds/removes thermals, adds/removes the flag
+     <p><a name="index-ChangeFlag_0028_0029-614"></a><a name="index-flags_002c-changing-615"></a><a name="index-octagonal-flag_002c-changing-616"></a><a name="index-square-flag_002c-changing-617"></a><a name="index-thermal-flag_002c-changing-618"></a><br><dt>‘<samp><span class="samp">ChangeFlag(Object|SelectElements|SelectedPins|SelectedVias|Selected,thermal|octagon|square,0|1)</span></samp>’<dd>Sets/clears the indicated flag.  This adds/removes thermals, adds/removes the flag
 which indicates a pin/pad should be square, or adds/removes the flag which
 indicates a pin/pad should be octagonal.
      <pre class="example">          :ChangeFlag(SelectedVias,thermal,1)
           :ChangeFlag(SelectedPads,square,0)
 </pre>
-     <p><a name="index-ChangeHole_0028_0029-602"></a><a name="index-vias_002c-converting-to-mounting-hole-603"></a><a name="index-mounting-holes-604"></a><br><dt>‘<samp><span class="samp">ChangeHole(Object|SelectedVias)</span></samp>’<dd>This action routine converts a via to and from a hole.  A hole is
+     <p><a name="index-ChangeHole_0028_0029-619"></a><a name="index-vias_002c-converting-to-mounting-hole-620"></a><a name="index-mounting-holes-621"></a><br><dt>‘<samp><span class="samp">ChangeHole(Object|SelectedVias)</span></samp>’<dd>This action routine converts a via to and from a hole.  A hole is
 a via that has no copper annulus. The drill size for the via
 determines the hole diameter.
      <pre class="example">          !Ctrl<Key>h:	ChangeHole(Object)
 </pre>
-     <p><a name="index-ChangeName_0028_0029-605"></a><a name="index-name_002c-change-an-objects-606"></a><a name="index-change-object-name-607"></a><a name="index-object_002c-change-name-of-608"></a><br><dt>‘<samp><span class="samp">ChangeName(Object)</span></samp>’<dt>‘<samp><span class="samp">ChangeName(Layer|Layout)</span></samp>’<dd>Changes the name of the visible object at the cursor location. A text object
+     <p><a name="index-ChangeName_0028_0029-622"></a><a name="index-name_002c-change-an-objects-623"></a><a name="index-change-object-name-624"></a><a name="index-object_002c-change-name-of-625"></a><br><dt>‘<samp><span class="samp">ChangeName(Object)</span></samp>’<dt>‘<samp><span class="samp">ChangeName(Layer|Layout)</span></samp>’<dd>Changes the name of the visible object at the cursor location. A text object
 doesn't have a name therefore the text string itself is changed. 
 The element name currently used for display is always the one changed with this
 command. 
@@ -4125,17 +4196,17 @@ Passing <em>Layer</em> changes the current layers name.
 Default:
      <pre class="example">          None<Key>n: ChangeName(Object)
 </pre>
-     <p><a name="index-ChangeOctagon_0028_0029-609"></a><a name="index-pins_002c-changing-shape-of-610"></a><a name="index-vias_002c-changing-shape-of-611"></a><a name="index-octagonal-pins-and-vias-612"></a><dt>‘<samp><span class="samp">ChangeOctagon(Object|SelectElements|SelectedPins|SelectedVias|Selected)</span></samp>’<dd>Toggles what shape the affected pin(s) or via(s) will be drawn when they
+     <p><a name="index-ChangeOctagon_0028_0029-626"></a><a name="index-pins_002c-changing-shape-of-627"></a><a name="index-vias_002c-changing-shape-of-628"></a><a name="index-octagonal-pins-and-vias-629"></a><br><dt>‘<samp><span class="samp">ChangeOctagon(Object|SelectElements|SelectedPins|SelectedVias|Selected)</span></samp>’<dd>Toggles what shape the affected pin(s) or via(s) will be drawn when they
 are not square. The shape will either be round or octagonal. 
 Default:
      <pre class="example">          !Ctrl<Key>o: ChangeOctagon(Object)
 </pre>
-     <p><a name="index-ChangePinName_0028_0029-613"></a><a name="index-changing-pin_002fpad-names-614"></a><a name="index-pin_002fpad-names_002c-changing-615"></a><br><dt>‘<samp><span class="samp">ChangePinName(ElementName, PinNumber, PinName)</span></samp>’<dd>Changes the name for a specified pin or pad number on a specified element. 
+     <p><a name="index-ChangePinName_0028_0029-630"></a><a name="index-changing-pin_002fpad-names-631"></a><a name="index-pin_002fpad-names_002c-changing-632"></a><br><dt>‘<samp><span class="samp">ChangePinName(ElementName, PinNumber, PinName)</span></samp>’<dd>Changes the name for a specified pin or pad number on a specified element. 
 This action is typically used to forward annotate pin/pad names from a schematic
 to the layout.
      <pre class="example">          ChangePinName(U1, 14, VDD)
 </pre>
-     <p><a name="index-ChangeSize_0028_0029-616"></a><a name="index-change-sizes-617"></a><a name="index-sizes_002c-changing-of-objects-618"></a><a name="index-thickness_002c-changing-of-objects-619"></a><br><dt>‘<samp><span class="samp">ChangeSize(Object, value[, unit])</span></samp>’<dt>‘<samp><span class="samp">ChangeSize(SelectedLines|SelectedPins|SelectedVias, value[, unit])</span></samp>’<dt>‘<samp><span class="samp">ChangeSize(SelectedPads|SelectedTex [...]
+     <p><a name="index-ChangeSize_0028_0029-633"></a><a name="index-change-sizes-634"></a><a name="index-sizes_002c-changing-of-objects-635"></a><a name="index-thickness_002c-changing-of-objects-636"></a><br><dt>‘<samp><span class="samp">ChangeSize(Object, value[, unit])</span></samp>’<dt>‘<samp><span class="samp">ChangeSize(SelectedLines|SelectedPins|SelectedVias, value[, unit])</span></samp>’<dt>‘<samp><span class="samp">ChangeSize(SelectedPads|SelectedTex [...]
 <code>X</code> event (or use :ChangeSize(...)).  If <em>value</em> begins with
 a + or - then the value will be added (or subtracted) from the current
 size, otherwise the size is set equal to <em>value</em>. Range checking is
@@ -4151,24 +4222,24 @@ Default:
      <pre class="example">          None<Key>s:   ChangeSize(Object, +5)
           !Shift<Key>s: ChangeSize(Object, -5)
 </pre>
-     <p><a name="index-ChangeSquare_0028_0029-620"></a><a name="index-change-square-flag-621"></a><a name="index-square-flag_002c-changing-of-objects-622"></a><a name="index-thickness_002c-changing-of-objects-623"></a><br><dt>‘<samp><span class="samp">ChangeSquare(Object|SelectedElements|SelectedPins)</span></samp>’<dd>Toggles the setting of the square flag. The flag is used to identify a
+     <p><a name="index-ChangeSquare_0028_0029-637"></a><a name="index-change-square-flag-638"></a><a name="index-square-flag_002c-changing-of-objects-639"></a><a name="index-thickness_002c-changing-of-objects-640"></a><br><dt>‘<samp><span class="samp">ChangeSquare(Object|SelectedElements|SelectedPins)</span></samp>’<dd>Toggles the setting of the square flag. The flag is used to identify a
 certain pin, normally the first one, of circuits. It is also used to
 make SMD pads have square ends.
      <pre class="example">          None<Key>q:   ChangeSquare(Object)
 </pre>
-     <p><a name="index-ClrFlag_0028_0029-624"></a><a name="index-flags_002c-clearing-625"></a><a name="index-flags_002c-clearing-626"></a><a name="index-octagonal-flag_002c-clearing-627"></a><a name="index-square-flag_002c-clearing-628"></a><a name="index-thermal-flag_002c-clearing-629"></a><dt>‘<samp><span class="samp">ClrFlag(Object|SelectElements|SelectedPins|SelectedVias|Selected,thermal|octagon|square)</span></samp>’<dd>Clears the indicated flag.  This removes thermals,  [...]
+     <p><a name="index-ClrFlag_0028_0029-641"></a><a name="index-flags_002c-clearing-642"></a><a name="index-flags_002c-clearing-643"></a><a name="index-octagonal-flag_002c-clearing-644"></a><a name="index-square-flag_002c-clearing-645"></a><a name="index-thermal-flag_002c-clearing-646"></a><br><dt>‘<samp><span class="samp">ClrFlag(Object|SelectElements|SelectedPins|SelectedVias|Selected,thermal|octagon|square)</span></samp>’<dd>Clears the indicated flag.  This removes therma [...]
 which indicates a pin/pad should be square, or removes the flag which
 indicates a pin/pad should be octagonal.
      <pre class="example">          :ClrFlag(SelectedVias,thermal)
 </pre>
-     <p><a name="index-Command_0028_0029-630"></a><a name="index-start-user-input-631"></a><a name="index-inputfield_002c-start-user-input-632"></a><br><dt>‘<samp><span class="samp">Command()</span></samp>’<dd>Calling <em>Command()</em> pops up an input line at the bottom of the window
+     <p><a name="index-Command_0028_0029-647"></a><a name="index-start-user-input-648"></a><a name="index-inputfield_002c-start-user-input-649"></a><br><dt>‘<samp><span class="samp">Command()</span></samp>’<dd>Calling <em>Command()</em> pops up an input line at the bottom of the window
 which allows you to enter commands. Including all action commands! 
 The dialog ends when <em>None<Key>Return</em>
 to confirm or <em>None<Key>Escape</em> to abort is entered. 
 Default:
      <pre class="example">          <Key>colon: Command()
 </pre>
-     <p><a name="index-Connection_0028_0029-633"></a><a name="index-scanning-connections-634"></a><a name="index-searching-connections-635"></a><a name="index-connections_002c-reseting-636"></a><a name="index-reseting-found-connections-637"></a><a name="index-connections_002c-searching-for-638"></a><a name="index-saving-found-connections-639"></a><br><dt>‘<samp><span class="samp">Connection(Find)</span></samp>’<dt>‘<samp><span class="samp">Connection(ResetFoundLinesAndR [...]
+     <p><a name="index-Connection_0028_0029-650"></a><a name="index-scanning-connections-651"></a><a name="index-searching-connections-652"></a><a name="index-connections_002c-reseting-653"></a><a name="index-reseting-found-connections-654"></a><a name="index-connections_002c-searching-for-655"></a><a name="index-saving-found-connections-656"></a><br><dt>‘<samp><span class="samp">Connection(Find)</span></samp>’<dt>‘<samp><span class="samp">Connection(ResetFoundLinesAndR [...]
 line or via to others. 
 The <em>ResetFoundLinesAndRectangles, ResetFoundPinsAndVias</em> and
 <em>Reset</em> arguments may be used to reset all marked lines and rectangles,
@@ -4181,23 +4252,23 @@ Default:
           None<Key>f:   Connection(Find)
           !Shift<Key>f: Connection(Reset)
 </pre>
-     <p><a name="index-DeleteRats_0028_0029-640"></a><a name="index-rats-nest-641"></a><a name="index-rat_002dline-642"></a><a name="index-netlist-643"></a><br><dt>‘<samp><span class="samp">DeleteRats(AllRats|SelectedRats)</span></samp>’<dd>This routine deletes either all rat-lines in the layout, or only
+     <p><a name="index-DeleteRats_0028_0029-657"></a><a name="index-rats-nest-658"></a><a name="index-rat_002dline-659"></a><a name="index-netlist-660"></a><br><dt>‘<samp><span class="samp">DeleteRats(AllRats|SelectedRats)</span></samp>’<dd>This routine deletes either all rat-lines in the layout, or only
 the selected and visible ones. Non-rat-lines and other layout
 objects are unaffected. 
 Default:
      <pre class="example">          None<Key>e:   DeleteRats(AllRats)
           !Shift<Key>e: DeleteRats(SelectedRats)
 </pre>
-     <p><a name="index-DisableVendor_0028_0029-644"></a><a name="index-vendor-map_002c-disabling-645"></a><a name="index-vendor-drill-table_002c-disabling-646"></a><br><dt>‘<samp><span class="samp">DisableVendor()</span></samp>’<dd>Disables automatic drill size mapping to the loaded vendor drill table.
+     <p><a name="index-DisableVendor_0028_0029-661"></a><a name="index-vendor-map_002c-disabling-662"></a><a name="index-vendor-drill-table_002c-disabling-663"></a><br><dt>‘<samp><span class="samp">DisableVendor()</span></samp>’<dd>Disables automatic drill size mapping to the loaded vendor drill table.
      <pre class="example">          DisableVendor()
 </pre>
-     <p><a name="index-DisperseElements_0028_0029-647"></a><a name="index-dispersing-elements-648"></a><a name="index-distributing-elements-649"></a><a name="index-elements_002c-dispersing-650"></a><a name="index-elements_002c-distributing-651"></a><br><dt>‘<samp><span class="samp">DisperseElements(All|Selected)</span></samp>’<dd>Disperses either all elements or only the selected elements in the
+     <p><a name="index-DisperseElements_0028_0029-664"></a><a name="index-dispersing-elements-665"></a><a name="index-distributing-elements-666"></a><a name="index-elements_002c-dispersing-667"></a><a name="index-elements_002c-distributing-668"></a><br><dt>‘<samp><span class="samp">DisperseElements(All|Selected)</span></samp>’<dd>Disperses either all elements or only the selected elements in the
 layout.  This action should be used at the
 start of a design to spread out all footprints before any placement or
 routing is done.
      <pre class="example">          DisperseElements(All)
 </pre>
-     <p><a name="index-Display_0028_0029-652"></a><a name="index-centering-653"></a><a name="index-redrawing-layout-654"></a><a name="index-refreshing-layout-655"></a><a name="index-name-of-an-element-656"></a><a name="index-displaying-element-names-657"></a><a name="index-element_002c-display-names-of-658"></a><a name="index-grid_002c-absolute-and-relative-659"></a><a name="index-grid_002c-display-660"></a><a name="index-rubberband-661"></a><a name="index-pinout_002c-display-of-662"></a [...]
+     <p><a name="index-Display_0028_0029-669"></a><a name="index-centering-670"></a><a name="index-redrawing-layout-671"></a><a name="index-refreshing-layout-672"></a><a name="index-name-of-an-element-673"></a><a name="index-displaying-element-names-674"></a><a name="index-element_002c-display-names-of-675"></a><a name="index-grid_002c-absolute-and-relative-676"></a><a name="index-grid_002c-display-677"></a><a name="index-rubberband-678"></a><a name="index-pinout_002c-display-of-679"></a [...]
 used to center the display around the cursor location and to redraw the
 output area optionally after clearing the window. 
 Centering is done with respect to the <em>grid</em> setting. Displaying the
@@ -4225,10 +4296,10 @@ Default:
           None<Key>.:  Display(Toggle45Degree)
           None<Key>/:  Display(CycleClip)
 </pre>
-     <p><a name="index-DRC_0028_0029-666"></a><a name="index-design-rule-checking-667"></a><a name="index-drc-668"></a><br><dt>‘<samp><span class="samp">DRC()</span></samp>’<dd>Initiates design rule checking of the entire layout. Must be repeated
+     <p><a name="index-DRC_0028_0029-683"></a><a name="index-design-rule-checking-684"></a><a name="index-drc-685"></a><br><dt>‘<samp><span class="samp">DRC()</span></samp>’<dd>Initiates design rule checking of the entire layout. Must be repeated
 until no errors are found.
 
-     <p><a name="index-ExecuteFile_0028_0029-669"></a><a name="index-actions-file_002c-executing-670"></a><a name="index-script-file_002c-executing-671"></a><dt>‘<samp><span class="samp">ExecuteFile(filename)</span></samp>’<dd>Executes the PCB actions contained in the specified file. 
+     <p><a name="index-ExecuteFile_0028_0029-686"></a><a name="index-actions-file_002c-executing-687"></a><a name="index-script-file_002c-executing-688"></a><br><dt>‘<samp><span class="samp">ExecuteFile(filename)</span></samp>’<dd>Executes the PCB actions contained in the specified file. 
 This can be used to automate a complex sequence of operations.
      <pre class="example">          :ExecuteFile(custom.cmd)
 </pre>
@@ -4240,31 +4311,31 @@ lines.  For example
           SetValue(Zoom,2)
           DRC()
 </pre>
-     <p><a name="index-EditLayerGroups_0028_0029-672"></a><a name="index-layers_002c-editing-of-groups-673"></a><a name="index-groups_002c-editing-of-674"></a><br><dt>‘<samp><span class="samp">EditLayerGroups()</span></samp>’<dd>Pops up a dialog box to edit the layergroup setting. The function is also
+     <p><a name="index-EditLayerGroups_0028_0029-689"></a><a name="index-layers_002c-editing-of-groups-690"></a><a name="index-groups_002c-editing-of-691"></a><br><dt>‘<samp><span class="samp">EditLayerGroups()</span></samp>’<dd>Pops up a dialog box to edit the layergroup setting. The function is also
 available from the <em>Objects</em> menu. 
 There are no defaults.
 
-     <p><a name="index-EnableVendor_0028_0029-675"></a><a name="index-vendor-map_002c-enabling-676"></a><a name="index-vendor-drill-table_002c-enabling-677"></a><br><dt>‘<samp><span class="samp">EnableVendor()</span></samp>’<dd>Enables automatic drill size mapping to the loaded vendor drill table.
+     <p><a name="index-EnableVendor_0028_0029-692"></a><a name="index-vendor-map_002c-enabling-693"></a><a name="index-vendor-drill-table_002c-enabling-694"></a><br><dt>‘<samp><span class="samp">EnableVendor()</span></samp>’<dd>Enables automatic drill size mapping to the loaded vendor drill table.
      <pre class="example">          EnableVendor()
 </pre>
-     <p><a name="index-Load_0028_0029-678"></a><a name="index-loading-files-679"></a><br><dt>‘<samp><span class="samp">Load(ElementToBuffer|Layout|LayoutToBuffer|Nelist)</span></samp>’<dd>This routine pops up a fileselect box to load layout, element data,
+     <p><a name="index-Load_0028_0029-695"></a><a name="index-loading-files-696"></a><br><dt>‘<samp><span class="samp">Load(ElementToBuffer|Layout|LayoutToBuffer|Nelist)</span></samp>’<dd>This routine pops up a fileselect box to load layout, element data,
 or netlist. 
 The passed filename for layout data is saved and may be reused. 
 <em>ElementToBuffer</em> and <em>LayoutToBuffer</em> load the data into the
 current buffer. 
 There are no defaults.
 
-     <p><a name="index-LoadVendor_0028_0029-680"></a><a name="index-vendor-map_002c-loading-681"></a><a name="index-vendor-drill-table_002c-loading-682"></a><br><dt>‘<samp><span class="samp">LoadVendor(vendorfile)</span></samp>’<dd>Loads the specified vendor resource file.
+     <p><a name="index-LoadVendor_0028_0029-697"></a><a name="index-vendor-map_002c-loading-698"></a><a name="index-vendor-drill-table_002c-loading-699"></a><br><dt>‘<samp><span class="samp">LoadVendor(vendorfile)</span></samp>’<dd>Loads the specified vendor resource file.
      <pre class="example">          LoadVendor(myvendor.res)
 </pre>
-     <p><a name="index-MarkCrosshair_0028_0029-683"></a><a name="index-mark-684"></a><a name="index-cursor-position-685"></a><br><dt>‘<samp><span class="samp">MarkCrosshair()</span></samp>’<dd>This routine marks the current cursor location with an X, and then
+     <p><a name="index-MarkCrosshair_0028_0029-700"></a><a name="index-mark-701"></a><a name="index-cursor-position-702"></a><br><dt>‘<samp><span class="samp">MarkCrosshair()</span></samp>’<dd>This routine marks the current cursor location with an X, and then
 the cursor display shows both absolute position and position relative to
 the mark.  If a mark is already present, this routine removes it and
 stops displaying relative cursor coordinates. 
 Defaults:
      <pre class="example">          !Ctrl<key>m:	MarkCrosshair()
 </pre>
-     <p><a name="index-Mode_0028_0029-686"></a><a name="index-mode_002c-selecting-of-687"></a><a name="index-operation-modes_002c-selecting-of-688"></a><br><dt>‘<samp><span class="samp">Mode(Copy|InsertPoint|Line|Move|None|PasteBuffer|Polygon|Thermal)</span></samp>’<dt>‘<samp><span class="samp">Mode(Remove|Rectangle|RubberbandMove|Text|Via)</span></samp>’<dt>‘<samp><span class="samp">Mode(Cycle)</span></samp>’<dt>‘<samp><span class="samp">Mode(No [...]
+     <p><a name="index-Mode_0028_0029-703"></a><a name="index-mode_002c-selecting-of-704"></a><a name="index-operation-modes_002c-selecting-of-705"></a><br><dt>‘<samp><span class="samp">Mode(Copy|InsertPoint|Line|Move|None|PasteBuffer|Polygon|Thermal)</span></samp>’<dt>‘<samp><span class="samp">Mode(Remove|Rectangle|RubberbandMove|Text|Via)</span></samp>’<dt>‘<samp><span class="samp">Mode(Cycle)</span></samp>’<dt>‘<samp><span class="samp">Mode(No [...]
 line around the matching mode selector button. 
 Most of the functionality of <code>Pcb</code> is implemented by selecting a mode
 and calling <em>Mode(Notify)</em>. The arguments <em>Line</em>, <em>Polygon</em>,
@@ -4309,7 +4380,7 @@ Default:
           !Mod1<Btn2Up>:         Mode(Notify) Mode(Restore)
           Shift BTNMOD<Btn2Down>: Mode(Save) Mode(RubberbandMove) Mode(Notify)
 </pre>
-     <p><a name="index-MovePointer_0028_0029-689"></a><a name="index-pointer_002c-moving-of-690"></a><a name="index-cursor-movements-691"></a><br><dt>‘<samp><span class="samp">MovePointer(delta_x, delta_y)</span></samp>’<dd>With this function it is possible to move the cross hair cursor by using the
+     <p><a name="index-MovePointer_0028_0029-706"></a><a name="index-pointer_002c-moving-of-707"></a><a name="index-cursor-movements-708"></a><br><dt>‘<samp><span class="samp">MovePointer(delta_x, delta_y)</span></samp>’<dd>With this function it is possible to move the cross hair cursor by using the
 cursor keys. The <code>X</code> server's pointer follows because the necessary
 events are generated by <code>Pcb</code>. All movements are performed with respect
 to the currently set grid value. 
@@ -4323,7 +4394,7 @@ Default:
           None<Key>Left:    MovePointer(-1, 0)
           !Shift<Key>Left:  MovePointer(-10, 0)
 </pre>
-     <p><a name="index-MoveToCurrentLayer_0028_0029-692"></a><a name="index-objects_002c-moving-to-current-layer-693"></a><a name="index-moving-objects-to-current-layer-694"></a><br><dt>‘<samp><span class="samp">MoveToCurrentLayer(Object|SelectedObjects)</span></samp>’<dd>The function moves a single object at the cross hair location or all selected
+     <p><a name="index-MoveToCurrentLayer_0028_0029-709"></a><a name="index-objects_002c-moving-to-current-layer-710"></a><a name="index-moving-objects-to-current-layer-711"></a><br><dt>‘<samp><span class="samp">MoveToCurrentLayer(Object|SelectedObjects)</span></samp>’<dd>The function moves a single object at the cross hair location or all selected
 objects to the current layer. Elements are not movable by this function. 
 They have to be deleted and replaced on the other side. 
 If a line segment is moved and the movement would result in a loss of
@@ -4332,11 +4403,11 @@ maintain the connectivity.
      <pre class="example">          None<Key>m:       MoveToCurrentLayer(Object)
           !Shift<Key>m:     MoveToCurrentLayer(SelectedObjects)
 </pre>
-     <p><a name="index-New_0028_0029-695"></a><a name="index-layout_002c-start-a-new-696"></a><a name="index-starting-a-new-layout-697"></a><br><dt>‘<samp><span class="samp">New()</span></samp>’<dd>Clear the current layout and starts a new one after entering its name. 
+     <p><a name="index-New_0028_0029-712"></a><a name="index-layout_002c-start-a-new-713"></a><a name="index-starting-a-new-layout-714"></a><br><dt>‘<samp><span class="samp">New()</span></samp>’<dd>Clear the current layout and starts a new one after entering its name. 
 Refer to the resource <em>backup</em> for more information. 
 No defaults.
 
-     <p><a name="index-PasteBuffer_0028_0029-698"></a><a name="index-buffer_002c-selecting-a-699"></a><a name="index-pastebuffer_002c-selecting-a-700"></a><a name="index-selecting-a-buffer-701"></a><a name="index-rotating-a-buffer-702"></a><a name="index-cutting-objects-703"></a><a name="index-copying-objects-704"></a><br><dt>‘<samp><span class="samp">PasteBuffer(AddSelected|Clear|1..5)</span></samp>’<dt>‘<samp><span class="samp">PasteBuffer(Rotate, 1..3)</span></samp>& [...]
+     <p><a name="index-PasteBuffer_0028_0029-715"></a><a name="index-buffer_002c-selecting-a-716"></a><a name="index-pastebuffer_002c-selecting-a-717"></a><a name="index-selecting-a-buffer-718"></a><a name="index-rotating-a-buffer-719"></a><a name="index-cutting-objects-720"></a><a name="index-copying-objects-721"></a><br><dt>‘<samp><span class="samp">PasteBuffer(AddSelected|Clear|1..5)</span></samp>’<dt>‘<samp><span class="samp">PasteBuffer(Rotate, 1..3)</span></samp>& [...]
 cut-and-paste operations. Passing a buffer number selects one in of the
 range 1..5. The statusline is updated with the new number. 
 <em>Rotate</em> performs a number of 90 degree counter clockwise rotations
@@ -4361,7 +4432,7 @@ Default:
           !Shift<Key>5:      PasteBuffer(5)
           None<Key>F3:       Mode(PasteBuffer)
 </pre>
-     <p><a name="index-Polygon_0028_0029-705"></a><a name="index-polygon_002c-closing-a-706"></a><a name="index-polygon-point_002c-go-back-to-previous-707"></a><a name="index-closing-a-polygon-708"></a><br><dt>‘<samp><span class="samp">Polygon((Close|PreviousPoint)</span></samp>’<dd>Polygons need a special action routine to make life easier. Calling
+     <p><a name="index-Polygon_0028_0029-722"></a><a name="index-polygon_002c-closing-a-723"></a><a name="index-polygon-point_002c-go-back-to-previous-724"></a><a name="index-closing-a-polygon-725"></a><br><dt>‘<samp><span class="samp">Polygon(Close|PreviousPoint)</span></samp>’<dd>Polygons need a special action routine to make life easier. Calling
 <em>Polygon(PreviousPoint)</em> resets the newly entered corner to the
 previous one. The Undo action will call Polygon(PreviousPoint)
 when appropriate to do so.  <em>Close</em> creates the final
@@ -4371,7 +4442,7 @@ Default:
      <pre class="example">          None<Key>p:             Polygon(Close)
           !Shift<Key>p:           Polygon(Close)
 </pre>
-     <p><a name="index-Print_0028_0029-709"></a><a name="index-layout_002c-printing-a-710"></a><a name="index-printing-a-layout-711"></a><br><dt>‘<samp><span class="samp">Print()</span></samp>’<dd>Pops up a print control box that lets you select the output
+     <p><a name="index-Print_0028_0029-726"></a><a name="index-layout_002c-printing-a-727"></a><a name="index-printing-a-layout-728"></a><br><dt>‘<samp><span class="samp">Print()</span></samp>’<dd>Pops up a print control box that lets you select the output
 device, scaling and many more options. Each run creates all
 files that are supported by the selected device. These are
 mask files as well as drilling files, silk screens and so on. The table
@@ -4391,11 +4462,11 @@ shows the filenames for all possible files:
 with the current filename. The function is available from the <em>file</em> menu. 
 There are no defaults.
 
-     <p><a name="index-Quit_0028_0029-712"></a><a name="index-quit-713"></a><a name="index-exit-714"></a><br><dt>‘<samp><span class="samp">Quit()</span></samp>’<dd>Quits the application after confirming the operation. 
+     <p><a name="index-Quit_0028_0029-729"></a><a name="index-quit-730"></a><a name="index-exit-731"></a><br><dt>‘<samp><span class="samp">Quit()</span></samp>’<dd>Quits the application after confirming the operation. 
 Default:
      <pre class="example">          <Message>WM_PROTOCOLS: Quit()
 </pre>
-     <p><a name="index-Redo_0028_0029-715"></a><a name="index-redo-716"></a><a name="index-recover-717"></a><br><dt>‘<samp><span class="samp">Redo()</span></samp>’<dd>This routine allows you to recover from the last undo command. 
+     <p><a name="index-Redo_0028_0029-732"></a><a name="index-redo-733"></a><a name="index-recover-734"></a><br><dt>‘<samp><span class="samp">Redo()</span></samp>’<dd>This routine allows you to recover from the last undo command. 
 You might want to do this if you thought that undo was going to
 revert something other than what it actually did (in case you
 are confused about which operations are un-doable), or if you
@@ -4408,16 +4479,16 @@ the redo, you will lose the ability to "redo" the three "undone" lines.
 Default:
      <pre class="example">          !Shift<Key>r:	Redo()
 </pre>
-     <p><a name="index-RemoveSelected_0028_0029-718"></a><a name="index-removing-selected-objects-719"></a><a name="index-selected-object_002c-removing-an-720"></a><br><dt>‘<samp><span class="samp">RemoveSelected()</span></samp>’<dd>This routine removes all visible and selected objects. 
+     <p><a name="index-RemoveSelected_0028_0029-735"></a><a name="index-removing-selected-objects-736"></a><a name="index-selected-object_002c-removing-an-737"></a><br><dt>‘<samp><span class="samp">RemoveSelected()</span></samp>’<dd>This routine removes all visible and selected objects. 
 There are no defaults.
 
-     <p><a name="index-Report_0028_0029-721"></a><a name="index-report-722"></a><a name="index-information-about-objects-723"></a><a name="index-drill-724"></a><br><dt>‘<samp><span class="samp">Report(Object|DrillReport)</span></samp>’<dd>This routine pops up a dialog box describing the various
+     <p><a name="index-Report_0028_0029-738"></a><a name="index-report-739"></a><a name="index-information-about-objects-740"></a><a name="index-drill-741"></a><br><dt>‘<samp><span class="samp">Report(Object|DrillReport)</span></samp>’<dd>This routine pops up a dialog box describing the various
 characteristics of an object (or piece of an object such as a pad or pin)
 in the layout at the cursor position, or a report about all of the
 drill holes in the layout. 
 There are no defaults.
 
-     <p><a name="index-RouteStyle_0028_0029-725"></a><a name="index-routing-style-726"></a><a name="index-size-of-lines-and-vias-727"></a><br><dt>‘<samp><span class="samp">RouteStyle(1|2|3|4)</span></samp>’<dd>This routine copies the sizes corresponding to the numbered route style
+     <p><a name="index-RouteStyle_0028_0029-742"></a><a name="index-routing-style-743"></a><a name="index-size-of-lines-and-vias-744"></a><br><dt>‘<samp><span class="samp">RouteStyle(1|2|3|4)</span></samp>’<dd>This routine copies the sizes corresponding to the numbered route style
 into the active line thickens, via diameter, and via drill size. 
 Defaults:
      <pre class="example">          !Ctrl<Key>1: RouteStyle(1)
@@ -4427,7 +4498,7 @@ Defaults:
      <p>The variable <code>NUM_STYLES</code> is set at compile time in
 <samp><span class="file">globalconfig.h</span></samp>.
 
-     <p><a name="index-Save_0028_0029-728"></a><a name="index-saving-files-729"></a><a name="index-saving-connections-730"></a><br><dt>‘<samp><span class="samp">Save(Layout|LayoutAs)</span></samp>’<dt>‘<samp><span class="samp">Save(AllConnections|AllUnusedPins|ElementConnections)</span></samp>’<dd>Passing <em>Layout</em> saves the layout using the file from which it was
+     <p><a name="index-Save_0028_0029-745"></a><a name="index-saving-files-746"></a><a name="index-saving-connections-747"></a><br><dt>‘<samp><span class="samp">Save(Layout|LayoutAs)</span></samp>’<dt>‘<samp><span class="samp">Save(AllConnections|AllUnusedPins|ElementConnections)</span></samp>’<dd>Passing <em>Layout</em> saves the layout using the file from which it was
 loaded or, if it is a new layout, calls <em>Save(LayoutAs)</em> which queries
 the user for a filename. 
 The values: <em>AllConnections</em>, <em>AllUnusedPins</em> and
@@ -4435,7 +4506,7 @@ The values: <em>AllConnections</em>, <em>AllUnusedPins</em> and
 all unused pins or the connections of a single element to a file. 
 There are no defaults.
 
-     <p><a name="index-Select_0028_0029-731"></a><a name="index-selection-732"></a><a name="index-selecting-objects-733"></a><br><dt>‘<samp><span class="samp">Select(All|Block|Connection|ToggleObject)</span></samp>’<dt>‘<samp><span class="samp">Select(ElementByName|ObjectByName|PadByName|PinByName)</span></samp>’<dt>‘<samp><span class="samp">Select(TextByName|ViaByName)</span></samp>’<dd>Toggles either the selection flag of the object at the cross hair [...]
+     <p><a name="index-Select_0028_0029-748"></a><a name="index-selection-749"></a><a name="index-selecting-objects-750"></a><br><dt>‘<samp><span class="samp">Select(All|Block|Connection|ToggleObject)</span></samp>’<dt>‘<samp><span class="samp">Select(ElementByName|ObjectByName|PadByName|PinByName)</span></samp>’<dt>‘<samp><span class="samp">Select(TextByName|ViaByName)</span></samp>’<dd>Toggles either the selection flag of the object at the cross hair [...]
 (<em>ToggleObject</em>) or selects all visible objects, all inside a
 rectangle or all objects which have been found during the last connection
 scan. The <em>ByName</em> functions use a <a href="#Regular-Expressions">Regular Expressions</a> search,
@@ -4444,12 +4515,12 @@ Default:
      <pre class="example">          None<Btn3Down>:  Select(ToggleObject)
           None<Btn3Down>,None<Btn3Motion>: See resource file - this is complex
 </pre>
-     <p><a name="index-SetFlag_0028_0029-734"></a><a name="index-flags_002c-setting-735"></a><a name="index-octagonal-flag_002c-setting-736"></a><a name="index-square-flag_002c-setting-737"></a><a name="index-thermal-flag_002c-setting-738"></a><dt>‘<samp><span class="samp">SetFlag(Object|SelectElements|SelectedPins|SelectedVias|Selected,thermal|octagon|square)</span></samp>’<dd>Sets the indicated flag.  This adds thermals, sets the flag
+     <p><a name="index-SetFlag_0028_0029-751"></a><a name="index-flags_002c-setting-752"></a><a name="index-octagonal-flag_002c-setting-753"></a><a name="index-square-flag_002c-setting-754"></a><a name="index-thermal-flag_002c-setting-755"></a><br><dt>‘<samp><span class="samp">SetFlag(Object|SelectElements|SelectedPins|SelectedVias|Selected,thermal|octagon|square)</span></samp>’<dd>Sets the indicated flag.  This adds thermals, sets the flag
 which indicates a pin/pad should be square, or sets the flag which
 indicates a pin/pad should be octagonal.
      <pre class="example">          :SetFlag(Selected,thermal)
 </pre>
-     <p><a name="index-SetValue_0028_0029-739"></a><a name="index-change-settings-740"></a><a name="index-zoom_002c-setting-of-741"></a><a name="index-grid_002c-setting-of-742"></a><a name="index-drilling-hole_002c-setting-of-initial-size-743"></a><a name="index-vias_002c-setting-of-initial-size-744"></a><a name="index-lines_002c-setting-of-initial-size-745"></a><br><dt>‘<samp><span class="samp">SetValue(Grid|LineSize|TextScale|ViaDrillingHole|ViaSize|Zoom, value)</span></samp>&rsq [...]
+     <p><a name="index-SetValue_0028_0029-756"></a><a name="index-change-settings-757"></a><a name="index-zoom_002c-setting-of-758"></a><a name="index-grid_002c-setting-of-759"></a><a name="index-drilling-hole_002c-setting-of-initial-size-760"></a><a name="index-vias_002c-setting-of-initial-size-761"></a><a name="index-lines_002c-setting-of-initial-size-762"></a><br><dt>‘<samp><span class="samp">SetValue(Grid|LineSize|TextScale|ViaDrillingHole|ViaSize|Zoom, value)</span></samp>&rsq [...]
 The first parameter specifies which data has to be changed. The other one
 determines if the resource is set to the passed value, if <em>value</em> is
 specified without sign, or increments/decrements if it is specified with
@@ -4471,32 +4542,32 @@ Default:
           None<Key>z:        SetValue(Zoom, -1)
           !Shift<Key>z:      SetValue(Zoom, +1)
 </pre>
-     <p><a name="index-SwapSides_0028_0029-746"></a><a name="index-change-viewing-side-747"></a><a name="index-viewing-side_002c-changing-of-748"></a><br><dt>‘<samp><span class="samp">SwapSides()</span></samp>’<dd>This routine changes the board side you are viewing. 
+     <p><a name="index-SwapSides_0028_0029-763"></a><a name="index-change-viewing-side-764"></a><a name="index-viewing-side_002c-changing-of-765"></a><br><dt>‘<samp><span class="samp">SwapSides()</span></samp>’<dd>This routine changes the board side you are viewing. 
 Default:
      <pre class="example">          None<Key>Tab:      SwapSides()
 </pre>
-     <p><a name="index-SwitchDrawingLayer_0028_0029-749"></a><a name="index-change-drawing-layer-750"></a><a name="index-layer_002c-change-active-751"></a><br><dt>‘<samp><span class="samp">SwitchDrawingLayer(value)</span></samp>’<dd>Makes layer number 1..MAX_LAYER the current one. 
+     <p><a name="index-SwitchDrawingLayer_0028_0029-766"></a><a name="index-change-drawing-layer-767"></a><a name="index-layer_002c-change-active-768"></a><br><dt>‘<samp><span class="samp">SwitchDrawingLayer(value)</span></samp>’<dd>Makes layer number 1..MAX_LAYER the current one. 
 Default:
      <pre class="example">          None<Key>1:        SwitchDrawingLayer(1)
           ...
           None<Key>MAX_LAYER:        SwitchDrawingLayer(MAX_LAYER)
 </pre>
-     <p><a name="index-ToggleHideName_0028_0029-752"></a><a name="index-hide-element-name-753"></a><a name="index-element-name_002c-hiding-754"></a><a name="index-element-name_002c-removing-from-silk_002dscreen-755"></a><br><dt>‘<samp><span class="samp">ToggleHideName(Object|SelectedElements)</span></samp>’<dd>Toggles whether the element's name is displayed or hidden. If it
+     <p><a name="index-ToggleHideName_0028_0029-769"></a><a name="index-hide-element-name-770"></a><a name="index-element-name_002c-hiding-771"></a><a name="index-element-name_002c-removing-from-silk_002dscreen-772"></a><br><dt>‘<samp><span class="samp">ToggleHideName(Object|SelectedElements)</span></samp>’<dd>Toggles whether the element's name is displayed or hidden. If it
 is hidden you won't see it on the screen and it will not appear
 on the silk layer when you print the layout.
      <pre class="example">          None<Key>h:	ToggleHideName(Object)
           !Shift<Key>h:	ToggleHideName(SelectedElements)
 </pre>
-     <p><a name="index-ToggleVendor_0028_0029-756"></a><a name="index-vendor-map_002c-toggling-757"></a><a name="index-vendor-drill-table_002c-toggling-758"></a><br><dt>‘<samp><span class="samp">ToggleVendor()</span></samp>’<dd>Toggles automatic drill size mapping to the loaded vendor drill table.
+     <p><a name="index-ToggleVendor_0028_0029-773"></a><a name="index-vendor-map_002c-toggling-774"></a><a name="index-vendor-drill-table_002c-toggling-775"></a><br><dt>‘<samp><span class="samp">ToggleVendor()</span></samp>’<dd>Toggles automatic drill size mapping to the loaded vendor drill table.
      <pre class="example">          ToggleVendor()
 </pre>
-     <p><a name="index-ToggleVisibility_0028_0029-759"></a><a name="index-toggle-layer-visibility-760"></a><a name="index-layer-visibility_002c-toggling-761"></a><br><dt>‘<samp><span class="samp">ToggleVisibility(Layer)</span></samp>’<dd>Toggles the visibility of the layer.
+     <p><a name="index-ToggleVisibility_0028_0029-776"></a><a name="index-toggle-layer-visibility-777"></a><a name="index-layer-visibility_002c-toggling-778"></a><br><dt>‘<samp><span class="samp">ToggleVisibility(Layer)</span></samp>’<dd>Toggles the visibility of the layer.
      <pre class="example">          Mod1<Key>1:	ToggleVisibility(1)
           Mod1<Key>2:	ToggleVisibility(2)
           Mod1<Key>3:	ToggleVisibility(3)
           Mod1<Key>4:	ToggleVisibility(4)
 </pre>
-     <p><a name="index-Undo_0028_0029-762"></a><a name="index-undo-763"></a><a name="index-recover-764"></a><br><dt>‘<samp><span class="samp">Undo()</span></samp>’<dt>‘<samp><span class="samp">Undo(ClearList)</span></samp>’<dd>The unlimited undo feature of <code>Pcb</code> allows you to recover
+     <p><a name="index-Undo_0028_0029-779"></a><a name="index-undo-780"></a><a name="index-recover-781"></a><br><dt>‘<samp><span class="samp">Undo()</span></samp>’<dt>‘<samp><span class="samp">Undo(ClearList)</span></samp>’<dd>The unlimited undo feature of <code>Pcb</code> allows you to recover
 from most operations that materially affect you work. 
 Calling <em>Undo()</em> without any parameter recovers
 from the last (non-undo) operation. <em>ClearList</em> is used to release the
@@ -4506,10 +4577,10 @@ Default:
      <pre class="example">          None<Key>u:        Undo()
           !Shift Ctrl<Key>u: Undo(ClearList)
 </pre>
-     <p><a name="index-UnloadVendor_0028_0029-765"></a><a name="index-vendor-map_002c-unloading-766"></a><a name="index-vendor-drill-table_002c-unloading-767"></a><br><dt>‘<samp><span class="samp">UnloadVendor()</span></samp>’<dd>Unloads the loaded vendor drill table.
+     <p><a name="index-UnloadVendor_0028_0029-782"></a><a name="index-vendor-map_002c-unloading-783"></a><a name="index-vendor-drill-table_002c-unloading-784"></a><br><dt>‘<samp><span class="samp">UnloadVendor()</span></samp>’<dd>Unloads the loaded vendor drill table.
      <pre class="example">          UnloadVendor()
 </pre>
-     <p><a name="index-Unselect_0028_0029-768"></a><a name="index-selection-769"></a><a name="index-unselect-objects-770"></a><br><dt>‘<samp><span class="samp">Unselect(All|Block|Connection)</span></samp>’<dd>Unselects all visible objects, all inside a rectangle or all objects which
+     <p><a name="index-Unselect_0028_0029-785"></a><a name="index-selection-786"></a><a name="index-unselect-objects-787"></a><br><dt>‘<samp><span class="samp">Unselect(All|Block|Connection)</span></samp>’<dd>Unselects all visible objects, all inside a rectangle or all objects which
 have been found during the last connection scan. 
 Default:
      <pre class="example">          !Shift <Btn3Down>: Mode(Save) Mode(None) Unselect(Block)
@@ -4527,31 +4598,31 @@ Up: <a rel="up" accesskey="u" href="#X11-Interface">X11 Interface</a>
 
 <h3 class="section">7.3 Default Translations</h3>
 
-<p><a name="index-translations-771"></a><a name="index-default-translations-772"></a><a name="index-X11-default-translations-773"></a>
+<p><a name="index-translations-788"></a><a name="index-default-translations-789"></a><a name="index-X11-default-translations-790"></a>
 This section covers some default translations of key and button events as
 defined in the shipped default application resource file. Most of them have
 already been listed in <a href="#Actions">Actions</a>. <code>Pcb</code> makes use of a nice <code>X11</code>
 feature; calling several action routines for one event.
 
      
-<a name="index-removing-objects-774"></a>
-<a name="index-removing-connections-775"></a>
-<a name="index-object_002c-removing-an-776"></a>
-<a name="index-connection_002c-removing-an-777"></a>
+<a name="index-removing-objects-791"></a>
+<a name="index-removing-connections-792"></a>
+<a name="index-object_002c-removing-an-793"></a>
+<a name="index-connection_002c-removing-an-794"></a>
 <dl><dt>‘<samp><span class="samp">None<Key>BackSpace:</span></samp>’<br><dt>‘<samp><span class="samp">None<key>Delete:</span></samp>’<dt>‘<samp><span class="samp">!Shift<Key>BackSpace:</span></samp>’<dt>‘<samp><span class="samp">!Shift Ctrl<Btn1>:</span></samp>’<dd>The object at the cursor location is removed by <em>None<Key>BackSpace</em> or
 <em>Shift Ctrl<Btn1></em> whereas <em>Shift<Key>BackSpace</em> also removes
 all other objects that are fully-connected to the one at the cursor location.
 
-     <p><a name="index-scrolling-778"></a><br><dt>‘<samp><span class="samp">!Mod1 Ctrl<Key>Left:</span></samp>’<dt>‘<samp><span class="samp">!Mod1 Ctrl<Key>Right:</span></samp>’<dt>‘<samp><span class="samp">!Mod1 Ctrl<Key>Up:</span></samp>’<dt>‘<samp><span class="samp">!Mod1 Ctrl<Key>Down:</span></samp>’<dd>Scroll one page in one of the four directions.
+     <p><a name="index-scrolling-795"></a><br><dt>‘<samp><span class="samp">!Mod1 Ctrl<Key>Left:</span></samp>’<dt>‘<samp><span class="samp">!Mod1 Ctrl<Key>Right:</span></samp>’<dt>‘<samp><span class="samp">!Mod1 Ctrl<Key>Up:</span></samp>’<dt>‘<samp><span class="samp">!Mod1 Ctrl<Key>Down:</span></samp>’<dd>Scroll one page in one of the four directions.
 
-     <p><a name="index-scrolling-779"></a><br><dt>‘<samp><span class="samp">None<Key>Left:, !Shift<Key>Left:</span></samp>’<dt>‘<samp><span class="samp">None<Key>Right:, !Shift<Key>Right:</span></samp>’<dt>‘<samp><span class="samp">None<Key>Up:, !Shift<Key>Up:</span></samp>’<dt>‘<samp><span class="samp">None<Key>Down:, !Shift<Key>Down:</span></samp>’<dd>Move cross hair either one or ten points [...]
+     <p><a name="index-scrolling-796"></a><br><dt>‘<samp><span class="samp">None<Key>Left:, !Shift<Key>Left:</span></samp>’<dt>‘<samp><span class="samp">None<Key>Right:, !Shift<Key>Right:</span></samp>’<dt>‘<samp><span class="samp">None<Key>Up:, !Shift<Key>Up:</span></samp>’<dt>‘<samp><span class="samp">None<Key>Down:, !Shift<Key>Down:</span></samp>’<dd>Move cross hair either one or ten points [...]
 
-     <p><a name="index-user-input-780"></a><br><dt>‘<samp><span class="samp">None<Key>Return:</span></samp>’<dd>Finished user input, selects the 'default' button of dialogs.
+     <p><a name="index-user-input-797"></a><br><dt>‘<samp><span class="samp">None<Key>Return:</span></samp>’<dd>Finished user input, selects the 'default' button of dialogs.
 
-     <p><a name="index-user-input-781"></a><br><dt>‘<samp><span class="samp">None<Key>Escape:</span></samp>’<dd><em>Mode(Reset)</em>, aborts user input, selects the 'abort' button of
+     <p><a name="index-user-input-798"></a><br><dt>‘<samp><span class="samp">None<Key>Escape:</span></samp>’<dd><em>Mode(Reset)</em>, aborts user input, selects the 'abort' button of
 dialogs or resets all modes.
 
-     <p><a name="index-element_002c-move-name-of-782"></a><a name="index-object_002c-move-an-783"></a><a name="index-object_002c-copy-an-784"></a><a name="index-move-an-object-785"></a><a name="index-copy-an-object-786"></a><br><dt>‘<samp><span class="samp">None<Btn2Down>, Btn2<Motion>, None<Btn2Up>:</span></samp>’<dt>‘<samp><span class="samp">!Mod1<Btn2Down>, Btn2<Motion>, !Mod1<Btn2Up>:</span></samp>’<dd>The first sequence mov [...]
+     <p><a name="index-element_002c-move-name-of-799"></a><a name="index-object_002c-move-an-800"></a><a name="index-object_002c-copy-an-801"></a><a name="index-move-an-object-802"></a><a name="index-copy-an-object-803"></a><br><dt>‘<samp><span class="samp">None<Btn2Down>, Btn2<Motion>, None<Btn2Up>:</span></samp>’<dt>‘<samp><span class="samp">!Mod1<Btn2Down>, Btn2<Motion>, !Mod1<Btn2Up>:</span></samp>’<dd>The first sequence mov [...]
 The second one copies the objects. Copying isn't available for
 element names.
 
@@ -4569,7 +4640,7 @@ Up: <a rel="up" accesskey="u" href="#Top">Top</a>
 
 <h2 class="chapter">8 File Formats</h2>
 
-<p><a name="index-file-formats-787"></a><a name="index-ASCII-files_002c-format-of-788"></a>
+<p><a name="index-file-formats-804"></a><a name="index-ASCII-files_002c-format-of-805"></a>
 All files used by <code>Pcb</code> are read from the standard output of a command
 or written to the standard input of one as plain seven bit <code>ASCII</code>. This
 makes it possible to use any editor to change the contents of a layout file. 
@@ -4578,7 +4649,7 @@ To do so you'll need to study the example files <samp><span class="file">example
 <samp><span class="file">default_font</span></samp> which are shipped with <code>Pcb</code>. 
 For an overview refer to <a href="#Intro">Intro</a>.
 
-   <p><a name="index-elementCommand-789"></a><a name="index-fileCommand-790"></a><a name="index-fontCommand-791"></a><a name="index-libraryCommand-792"></a><a name="index-libraryContentsCommand-793"></a><a name="index-saveCommand-794"></a>The following sections provide the necessary information about the syntax of
+   <p><a name="index-elementCommand-806"></a><a name="index-fileCommand-807"></a><a name="index-fontCommand-808"></a><a name="index-libraryCommand-809"></a><a name="index-libraryContentsCommand-810"></a><a name="index-saveCommand-811"></a>The following sections provide the necessary information about the syntax of
 the files. 
 Netlist files are not created by <code>Pcb</code>, but it does use them. For information
 on the format of a netlist file see the <em>:rn</em>,
@@ -4618,7 +4689,7 @@ Up: <a rel="up" accesskey="u" href="#File-Formats">File Formats</a>
 
 <h3 class="section">8.1 Pad and Line Representation</h3>
 
-<p><a name="index-pad-specification-795"></a><a name="index-file-formats_002c-pads-and-lines-796"></a>
+<p><a name="index-pad-specification-812"></a><a name="index-file-formats_002c-pads-and-lines-813"></a>
 Pads and lines (copper traces, silk screen lines, etc) are represented by the
 line end points and the aperture used to draw the line.  It is important to
 understand this when creating the pads for a new footprint.  The following figure
@@ -4645,7 +4716,7 @@ Up: <a rel="up" accesskey="u" href="#File-Formats">File Formats</a>
 
 <h3 class="section">8.2 Layout File Format</h3>
 
-<p><a name="index-layout-files_002c-format-of-797"></a><a name="index-format-of-layout-files-798"></a><a name="index-file-format_002c-layout-data-799"></a>
+<p><a name="index-layout-files_002c-format-of-814"></a><a name="index-format-of-layout-files-815"></a><a name="index-file-format_002c-layout-data-816"></a>
 The layout file describes a complete layout including symbols, vias,
 elements and layers with lines, rectangles and text. This is the most
 complex file of all.  As <code>Pcb</code> has evolved, the file format has
@@ -4664,7 +4735,7 @@ is to examine the file <samp><span class="file">src/parse_y.y</span></samp> whic
 definition of the file format.
 
    <p>The PCB layout file contains the following contents, in this order (individual items
-are defined in <a href="#File-Syntax">File Syntax</a>:
+are defined in <a href="#File-Syntax">File Syntax</a>):
 
      <dl>
 <dt><code>PCB</code><dd>This names the board and sets its size
@@ -4698,7 +4769,7 @@ Up: <a rel="up" accesskey="u" href="#File-Formats">File Formats</a>
 
 <h3 class="section">8.3 Element File Format</h3>
 
-<p><a name="index-element_002c-file-format-800"></a><a name="index-format-of-element-files-801"></a><a name="index-file-format_002c-element-data-802"></a>
+<p><a name="index-element_002c-file-format-817"></a><a name="index-format-of-element-files-818"></a><a name="index-file-format_002c-element-data-819"></a>
 Element files are used to describe one component which then may be used
 several times within one or more layouts. You will normally split the
 file into two parts, one for the pinout and one for the package description. 
@@ -4727,7 +4798,7 @@ Up: <a rel="up" accesskey="u" href="#File-Formats">File Formats</a>
 
 <h3 class="section">8.4 Font File Format</h3>
 
-<p><a name="index-font-file_002c-format-of-803"></a><a name="index-format-of-font-files-804"></a><a name="index-file-format_002c-font-data-805"></a>
+<p><a name="index-font-file_002c-format-of-820"></a><a name="index-format-of-font-files-821"></a><a name="index-file-format_002c-font-data-822"></a>
 A number of user defined Symbols are called a font. There is only one per
 layout. All symbols are made of lines. See the file <samp><span class="file">default_font</span></samp>
 as an example.
@@ -4745,7 +4816,7 @@ Up: <a rel="up" accesskey="u" href="#File-Formats">File Formats</a>
 
 <h3 class="section">8.5 Netlist File Format</h3>
 
-<p><a name="index-netlist_002c-file-format-806"></a><a name="index-netlist_002c-reading-807"></a>
+<p><a name="index-netlist_002c-file-format-823"></a><a name="index-netlist_002c-reading-824"></a>
 Netlists read by <code>Pcb</code> must have this simple text form:
 
 <pre class="example">     netname [style] NAME-PINNUM NAME2-PINNUM2 NAME3-PINNUM3 ... [\]
@@ -4784,7 +4855,7 @@ Up: <a rel="up" accesskey="u" href="#File-Formats">File Formats</a>
 
 <h3 class="section">8.6 Library Contents File Format</h3>
 
-<p><a name="index-library-contents-file_002c-format-of-808"></a><a name="index-format-of-library-contents-809"></a><a name="index-file-format_002c-library-contents-810"></a>
+<p><a name="index-library-contents-file_002c-format-of-825"></a><a name="index-format-of-library-contents-826"></a><a name="index-file-format_002c-library-contents-827"></a>
 There is nothing like a special library format. The ones that have been
 introduced in 1.4.1 just use some nice (and time consuming) features of GNU
 <code>m4</code>. The only predefined format is the one of the contents file
@@ -4817,7 +4888,7 @@ Up: <a rel="up" accesskey="u" href="#File-Formats">File Formats</a>
 
 <h3 class="section">8.7 Library File Format</h3>
 
-<p><a name="index-library-file_002c-format-of-811"></a><a name="index-format-of-libraries-812"></a><a name="index-file-format_002c-libraries-813"></a>
+<p><a name="index-library-file_002c-format-of-828"></a><a name="index-format-of-libraries-829"></a><a name="index-file-format_002c-libraries-830"></a>
 This section provides an overview about the existing <code>m4</code> definitions
 of the elements. There are basically two different types of files. One
 to define element specific data like the pinout, package and so on, the
@@ -4887,10 +4958,10 @@ Up: <a rel="up" accesskey="u" href="#File-Formats">File Formats</a>
 
 <h3 class="section">8.8 File Syntax</h3>
 
-<p><a name="index-File-sytax-814"></a><a name="index-Syntax_002c-file-815"></a>
+<p><a name="index-File-syntax-831"></a><a name="index-Syntax_002c-file-832"></a>
 
 <!-- key pcbfile -->
-<!-- ./../src/parse_y.y 143 -->
+<!-- ./../src/parse_y.y 140 -->
    <p>A special note about units: Older versions of <code>pcb</code> used mils
 (1/1000 inch) as the base unit; a value of 500 in the file meant
 half an inch.  Newer versions uses a "high resolution" syntax,
@@ -4947,7 +5018,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.1 Arc</h4>
 
-<!-- ./../src/parse_y.y 660 -->
+<!-- ./../src/parse_y.y 650 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Arc [X Y Width Height Thickness Clearance StartAngle DeltaAngle SFlags]
 Arc (X Y Width Height Thickness Clearance StartAngle DeltaAngle NFlags)
@@ -4986,7 +5057,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.2 Attribute</h4>
 
-<!-- ./../src/parse_y.y 1268 -->
+<!-- ./../src/parse_y.y 1259 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Attribute ("Name" "Value")
 </pre>
@@ -5016,7 +5087,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.3 Connect</h4>
 
-<!-- ./../src/parse_y.y 1258 -->
+<!-- ./../src/parse_y.y 1249 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Connect ("PinPad")
 </pre>
@@ -5040,7 +5111,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.4 Cursor</h4>
 
-<!-- ./../src/parse_y.y 335 -->
+<!-- ./../src/parse_y.y 332 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Cursor [X Y Zoom]
 Cursor (X Y Zoom)
@@ -5049,10 +5120,14 @@ Cursor (X Y Zoom)
 
      <dl>
 <dt><var>X Y</var><dd>Location of the cursor when the board was saved. 
+As of November 2012 the cursor position is not written to file anymore. 
+Older versions of pcb ignore the absence of this line in the pcb file. 
 <br><dt><var>Zoom</var><dd>The current zoom factor.  Note that a zoom factor of "0" means 1 mil
 per screen pixel, N means 2^N mils per screen pixel, etc.  The
 first variant accepts floating point numbers.  The special value
 "1000" means "zoom to fit"
+
+     <p>This field is ignored by PCB. 
 </dl>
 
 <!-- pcbfile DRC -->
@@ -5067,7 +5142,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.5 DRC</h4>
 
-<!-- ./../src/parse_y.y 376 -->
+<!-- ./../src/parse_y.y 371 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">DRC [Bloat Shrink Line Silk Drill Ring]
 DRC [Bloat Shrink Line Silk]
@@ -5096,7 +5171,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.6 Element</h4>
 
-<!-- ./../src/parse_y.y 816 -->
+<!-- ./../src/parse_y.y 807 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Element [SFlags "Desc" "Name" "Value" MX MY TX TY TDir TScale TSFlags] (
 Element (NFlags "Desc" "Name" "Value" MX MY TX TY TDir TScale TNFlags) (
@@ -5148,7 +5223,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.7 ElementArc</h4>
 
-<!-- ./../src/parse_y.y 927 -->
+<!-- ./../src/parse_y.y 918 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">ElementArc [X Y Width Height StartAngle DeltaAngle Thickness]
 ElementArc (X Y Width Height StartAngle DeltaAngle Thickness)
@@ -5182,7 +5257,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.8 ElementLine</h4>
 
-<!-- ./../src/parse_y.y 925 -->
+<!-- ./../src/parse_y.y 916 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">ElementLine [X1 Y1 X2 Y2 Thickness]
 ElementLine (X1 Y1 X2 Y2 Thickness)
@@ -5208,7 +5283,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.9 FileVersion</h4>
 
-<!-- ./../src/parse_y.y 258 -->
+<!-- ./../src/parse_y.y 255 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">FileVersion[Version]
 </pre>
@@ -5235,7 +5310,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.10 Flags</h4>
 
-<!-- ./../src/parse_y.y 418 -->
+<!-- ./../src/parse_y.y 413 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Flags(Number)
 </pre>
@@ -5259,7 +5334,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.11 Grid</h4>
 
-<!-- ./../src/parse_y.y 294 -->
+<!-- ./../src/parse_y.y 291 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Grid [Step OffsetX OffsetY Visible]
 Grid (Step OffsetX OffsetY Visible)
@@ -5286,7 +5361,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.12 Groups</h4>
 
-<!-- ./../src/parse_y.y 432 -->
+<!-- ./../src/parse_y.y 427 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Groups("String")
 </pre>
@@ -5317,7 +5392,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.13 Layer</h4>
 
-<!-- ./../src/parse_y.y 573 -->
+<!-- ./../src/parse_y.y 561 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Layer (LayerNum "Name") (
    <small class="dots">...</small> contents <small class="dots">...</small>
@@ -5346,7 +5421,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.14 Line</h4>
 
-<!-- ./../src/parse_y.y 629 -->
+<!-- ./../src/parse_y.y 619 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Line [X1 Y1 X2 Y2 Thickness Clearance SFlags]
 Line (X1 Y1 X2 Y2 Thickness Clearance NFlags)
@@ -5377,7 +5452,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.15 Mark</h4>
 
-<!-- ./../src/parse_y.y 929 -->
+<!-- ./../src/parse_y.y 920 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Mark [X Y]
 Mark (X Y)
@@ -5401,7 +5476,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.16 Net</h4>
 
-<!-- ./../src/parse_y.y 1235 -->
+<!-- ./../src/parse_y.y 1226 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Net ("Name" "Style") (
    <small class="dots">...</small> connects <small class="dots">...</small>
@@ -5426,7 +5501,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.17 Netlist</h4>
 
-<!-- ./../src/parse_y.y 1214 -->
+<!-- ./../src/parse_y.y 1205 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Netlist ( ) (
    <small class="dots">...</small> nets <small class="dots">...</small>
@@ -5446,7 +5521,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.18 Pad</h4>
 
-<!-- ./../src/parse_y.y 1086 -->
+<!-- ./../src/parse_y.y 1077 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Pad [rX1 rY1 rX2 rY2 Thickness Clearance Mask "Name" "Number" SFlags]
 Pad (rX1 rY1 rX2 rY2 Thickness Clearance Mask "Name" "Number" NFlags)
@@ -5482,7 +5557,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.19 PCB</h4>
 
-<!-- ./../src/parse_y.y 271 -->
+<!-- ./../src/parse_y.y 268 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">PCB ["Name" Width Height]
 PCB ("Name" Width Height]
@@ -5510,7 +5585,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.20 Pin</h4>
 
-<!-- ./../src/parse_y.y 1013 -->
+<!-- ./../src/parse_y.y 1004 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Pin [rX rY Thickness Clearance Mask Drill "Name" "Number" SFlags]
 Pin (rX rY Thickness Clearance Mask Drill "Name" "Number" NFlags)
@@ -5545,7 +5620,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.21 PolyArea</h4>
 
-<!-- ./../src/parse_y.y 353 -->
+<!-- ./../src/parse_y.y 348 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">PolyArea [Area]
 </pre>
@@ -5567,7 +5642,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.22 Polygon</h4>
 
-<!-- ./../src/parse_y.y 743 -->
+<!-- ./../src/parse_y.y 733 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Polygon (SFlags) (
    <small class="dots">...</small> (X Y) <small class="dots">...</small>
@@ -5599,7 +5674,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.23 Rat</h4>
 
-<!-- ./../src/parse_y.y 558 -->
+<!-- ./../src/parse_y.y 546 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Rat [X1 Y1 Group1 X2 Y2 Group2 SFlags]
 Rat (X1 Y1 Group1 X2 Y2 Group2 NFlags)
@@ -5625,7 +5700,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.24 Styles</h4>
 
-<!-- ./../src/parse_y.y 442 -->
+<!-- ./../src/parse_y.y 437 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Styles("String")
 </pre>
@@ -5666,7 +5741,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.25 Symbol</h4>
 
-<!-- ./../src/parse_y.y 1148 -->
+<!-- ./../src/parse_y.y 1139 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Symbol [Char Delta] (
 Symbol (Char Delta) (
@@ -5693,10 +5768,10 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.26 SymbolLine</h4>
 
-<!-- ./../src/parse_y.y 1197 -->
+<!-- ./../src/parse_y.y 1188 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">SymbolLine [X1 Y1 X2 Y1 Thickness]
-SymbolLine (X1 Y1 X2 Y1 Thickness)
+<pre class="format">SymbolLine [X1 Y1 X2 Y2 Thickness]
+SymbolLine (X1 Y1 X2 Y2 Thickness)
 </pre>
    </td></tr></table>
 
@@ -5717,7 +5792,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.27 Text</h4>
 
-<!-- ./../src/parse_y.y 689 -->
+<!-- ./../src/parse_y.y 679 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Text [X Y Direction Scale "String" SFlags]
 Text (X Y Direction Scale "String" NFlags)
@@ -5749,7 +5824,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.28 Thermal</h4>
 
-<!-- ./../src/parse_y.y 365 -->
+<!-- ./../src/parse_y.y 360 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Thermal [Scale]
 </pre>
@@ -5773,7 +5848,7 @@ Up: <a rel="up" accesskey="u" href="#File-Syntax">File Syntax</a>
 
 <h4 class="subsection">8.8.29 Via</h4>
 
-<!-- ./../src/parse_y.y 498 -->
+<!-- ./../src/parse_y.y 486 -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Via [X Y Thickness Clearance Mask Drill "Name" SFlags]
 Via (X Y Thickness Clearance Mask Drill "Name" NFlags)
@@ -5795,7 +5870,7 @@ Via (X Y Thickness "Name" NFlags)
 </dl>
 
 <!-- pcbfile ~objectflags -->
-<!-- ./../src/const.h 110 -->
+<!-- ./../src/const.h 109 -->
 <div class="node">
 <a name="Object-Flags"></a>
 <p><hr>
@@ -5818,6 +5893,8 @@ the numeric value followed by the symbolic name.
 <br><dt><code>0x0004 found</code><dd>If set, this object has been found by <code>FindConnection()</code>. 
 <br><dt><code>0x0008 hole</code><dd>For pins and vias, this flag means that the pin or via is a hole
 without a copper annulus. 
+<br><dt><code>0x0008 nopaste</code><dd>For pads, set to prevent a solderpaste stencil opening for the
+pad.  Primarily used for pads used as fiducials. 
 <br><dt><code>0x0010 rat</code><dd>If set for a line, indicates that this line is a rat line instead of a
 copper trace. 
 <br><dt><code>0x0010 pininpoly</code><dd>For pins and pads, this flag is used internally to indicate that the
@@ -5848,11 +5925,10 @@ fingers.
 pins, indicates that the pin is closer to a horizontal edge and thus
 pinout text should be vertical. 
 <br><dt><code>0x8000 marker</code><dd>Marker used internally to avoid revisiting an object. 
-<br><dt><code>0x10000 nopaste</code><dd>For pads, set to prevent a solderpaste stencil opening for the
-pad.  Primarily used for pads used as fiducials. 
+<br><dt><code>0x10000 connected</code><dd>If set, this object has been as physically connected by <code>FindConnection()</code>. 
 </dl>
    <!-- pcbfile ~pcbflags -->
-<!-- ./../src/const.h 149 -->
+<!-- ./../src/const.h 153 -->
 <div class="node">
 <a name="PCBFlags"></a>
 <p><hr>
@@ -5903,7 +5979,7 @@ Up: <a rel="up" accesskey="u" href="#Top">Top</a>
 
 <h2 class="chapter">9 Library Creation</h2>
 
-<p><a name="index-library-creation-816"></a>
+<p><a name="index-library-creation-833"></a>
 This chapter provides a detailed look at how footprint libraries are
 created and used.  The chapter is split into two section, the first
 section covers the "old" style libraries which use the <code>m4</code> macro
@@ -6310,7 +6386,7 @@ save the new footprint to a file.
 <li>In the <code>Pcb</code> program, instantiate the footprint you wish to modify. 
 <li>Using the selection tool, select the footprint. 
 <li>Now left-click on the selected element, this brings up a popup menu, choose
-"Cut Selection to Buffer" from the popup menu. 
+"Cut to Buffer" from the popup menu. 
 <li>Under the buffer menu, choose "break buffer element to pieces",
 and then left-click to place the broken apart footprint to an open area of
 the layout.  Note that you must use the items under the buffer menu, the
@@ -6332,7 +6408,7 @@ Up: <a rel="up" accesskey="u" href="#Top">Top</a>
 
 <h2 class="chapter">10 Schematic Capture for PCB</h2>
 
-<p><a name="index-schematic-capture-817"></a><a name="index-schematic-frontend-818"></a>
+<p><a name="index-schematic-capture-834"></a><a name="index-schematic-frontend-835"></a>
 When designing a circuit board of any complexity, a schematic capture
 front-end for the design is highly desired.  Any schematic capture
 program which is able to generate a netlist in a user defined format as
@@ -6357,7 +6433,7 @@ Up: <a rel="up" accesskey="u" href="#Schematic-Frontends">Schematic Fronten
 
 <h3 class="section">10.1 gEDA</h3>
 
-<p><a name="index-gschem_002c-how-to-interface-with-819"></a><a name="index-gEDA_002c-how-to-interface-with-820"></a>
+<p><a name="index-gschem_002c-how-to-interface-with-836"></a><a name="index-gEDA_002c-how-to-interface-with-837"></a>
 This section shows how to use gEDA as the schematic capture front-end for
 a PCB design.  This section is not intended to be complete documentation
 on gEDA and it is assumed that the user has at least some familiarity
@@ -6551,10 +6627,10 @@ Up: <a rel="up" accesskey="u" href="#Schematic-Frontends">Schematic Fronten
 
 <h3 class="section">10.2 xcircuit</h3>
 
-<p><a name="index-xcircuit_002c-how-to-interface-with-821"></a><a name="index-xcircuit_002c-how-to-interface-with-822"></a>
+<p><a name="index-xcircuit_002c-how-to-interface-with-838"></a><a name="index-xcircuit_002c-how-to-interface-with-839"></a>
 If anyone cares to contribute this section, it will get added.  Please
 submit changes to the bug tracking system for PCB which can be found from
-the PCB homepage at <a href="http://pcb.gpleda.org">http://pcb.gpleda.org</a>.
+the PCB homepage at <a href="http://pcb.geda-project.org">http://pcb.geda-project.org</a>.
 
 <!--  Appendix A - -->
 <div class="node">
@@ -6588,7 +6664,7 @@ Up: <a rel="up" accesskey="u" href="#Installation">Installation</a>
 
 <h3 class="section">A.1 Compiling and Installing</h3>
 
-<p><a name="index-install_002c-how-to-823"></a><a name="index-compile_002c-how-to-824"></a>
+<p><a name="index-install_002c-how-to-840"></a><a name="index-compile_002c-how-to-841"></a>
 This section covers the steps which are necessary to compile the package.
 
 <ul class="menu">
@@ -6606,7 +6682,7 @@ Up: <a rel="up" accesskey="u" href="#compiling">compiling</a>
 
 <h4 class="subsection">A.1.1 Quick Start</h4>
 
-<p><a name="index-GNU-build-system-825"></a>
+<p><a name="index-GNU-build-system-842"></a>
 Starting with version 2.0, <code>Pcb</code> has switched to a GNU
 autoconf/automake build system.  Installation of <code>Pcb</code> consists of
 three steps:  configuration, building, and installing. 
@@ -6625,24 +6701,24 @@ Up: <a rel="up" accesskey="u" href="#compiling">compiling</a>
 
 <h4 class="subsection">A.1.2 Running the configure Script</h4>
 
-<p><a name="index-GNU-configure-script-826"></a><a name="index-configure-827"></a>
+<p><a name="index-GNU-configure-script-843"></a><a name="index-configure-844"></a>
 The <code>configure</code> script accepts all of the standard GNU configure
 options.  For a complete list of configuration options, run
 <code>./configure --help</code>.
 
      
-<a name="index-INFOLIBDIR-828"></a>
+<a name="index-INFOLIBDIR-845"></a>
 <dl><dt>‘<samp><span class="samp">INFOLIBDIR</span></samp>’<dd>must be set to the directory where your GNU info files are located.
 
-     <p><a name="index-PCBLIBDIR-829"></a><br><dt>‘<samp><span class="samp">PCBLIBDIR</span></samp>’<dd>is the path of a directory where the font files will be installed.
+     <p><a name="index-PCBLIBDIR-846"></a><br><dt>‘<samp><span class="samp">PCBLIBDIR</span></samp>’<dd>is the path of a directory where the font files will be installed.
 
-     <p><a name="index-DEFAULTFONT-830"></a><br><dt>‘<samp><span class="samp">DEFAULTFONT</span></samp>’<dd>the name of the default font file.
+     <p><a name="index-DEFAULTFONT-847"></a><br><dt>‘<samp><span class="samp">DEFAULTFONT</span></samp>’<dd>the name of the default font file.
 
-     <p><a name="index-DEFAULTLIBRARY-831"></a><br><dt>‘<samp><span class="samp">DEFAULTLIBRARY</span></samp>’<dd>the name of the default library.
+     <p><a name="index-DEFAULTLIBRARY-848"></a><br><dt>‘<samp><span class="samp">DEFAULTLIBRARY</span></samp>’<dd>the name of the default library.
 
-     <p><a name="index-GNUM4-832"></a><br><dt>‘<samp><span class="samp">GNUM4</span></samp>’<dd>the name of GNUs m4 version.
+     <p><a name="index-GNUM4-849"></a><br><dt>‘<samp><span class="samp">GNUM4</span></samp>’<dd>the name of GNUs m4 version.
 
-     <p><a name="index-BTNMOD-833"></a><br><dt>‘<samp><span class="samp">BTNMOD</span></samp>’<dd>If your window manager has already bound <em>Mod1</em> together with some
+     <p><a name="index-BTNMOD-850"></a><br><dt>‘<samp><span class="samp">BTNMOD</span></samp>’<dd>If your window manager has already bound <em>Mod1</em> together with some
 function keys you may want to change this setting. This is true for HP-VUE.
 
    </dl>
@@ -6666,7 +6742,7 @@ Up: <a rel="up" accesskey="u" href="#Installation">Installation</a>
 
 <h3 class="section">A.2 Troubleshooting</h3>
 
-<p><a name="index-problems-834"></a><a name="index-troubleshooting-835"></a>
+<p><a name="index-problems-851"></a><a name="index-troubleshooting-852"></a>
 There are some known problems. Most of them are related to
 missing parts of a standard <code>X11</code> distribution. Some others are caused by
 third party applications such as <code>X</code> servers. To make this list more
@@ -6707,7 +6783,7 @@ Up: <a rel="up" accesskey="u" href="#problems">problems</a>
 
 <h4 class="subsection">A.2.1 HP Series 700 and 800</h4>
 
-<p><a name="index-architecture-836"></a><a name="index-HP-837"></a><a name="index-Hewlett-Packard-838"></a>
+<p><a name="index-architecture-853"></a><a name="index-HP-854"></a><a name="index-Hewlett-Packard-855"></a>
 You have to install several <code>X11</code> include files
 or, better, install a complete <code>X11R5</code> release. Hewlett-Packard doesn't
 support the Athena Widgets. So the header files and libraries are missing
@@ -6730,7 +6806,7 @@ Up: <a rel="up" accesskey="u" href="#problems">problems</a>
 
 <h4 class="subsection">A.2.2 Sun SPARC architecture</h4>
 
-<p><a name="index-architecture-839"></a><a name="index-Sun-840"></a><a name="index-Solaris-841"></a><a name="index-OpenWindows-842"></a>
+<p><a name="index-architecture-856"></a><a name="index-Sun-857"></a><a name="index-Solaris-858"></a><a name="index-OpenWindows-859"></a>
 There are no known problems with Sun machines if they use <code>X11R5</code> instead
 of <code>OpenWindows</code>. <code>Pcb</code> compiled successfully with all kinds of
 SPARCstations <code>Solaris-2.[345]</code>.
@@ -6748,7 +6824,7 @@ Up: <a rel="up" accesskey="u" href="#problems">problems</a>
 
 <h4 class="subsection">A.2.3 Silicon Graphics</h4>
 
-<p><a name="index-architecture-843"></a><a name="index-Silicon-Graphics-844"></a><a name="index-SGI-845"></a>
+<p><a name="index-architecture-860"></a><a name="index-Silicon-Graphics-861"></a><a name="index-SGI-862"></a>
 <code>Pcb</code> has been tested on some boxes running either <code>IRIX-4.0.5</code> or
 <code>IRIX-5.3</code>. The former one uses a <code>X11R4</code> server. 
 There are no problems. 
@@ -6766,7 +6842,7 @@ Up: <a rel="up" accesskey="u" href="#problems">problems</a>
 
 <h4 class="subsection">A.2.4 DEC Alpha</h4>
 
-<p><a name="index-architecture-846"></a><a name="index-DEC-847"></a><a name="index-Alpha-848"></a>
+<p><a name="index-architecture-863"></a><a name="index-DEC-864"></a><a name="index-Alpha-865"></a>
 <code>Pcb</code> compiled and runs without problems on <code>DEC UNIX V3.2c</code>.
 
 <div class="node">
@@ -6780,7 +6856,7 @@ Up: <a rel="up" accesskey="u" href="#problems">problems</a>
 
 <h4 class="subsection">A.2.5 SCO Unix</h4>
 
-<p><a name="index-architecture-849"></a><a name="index-SCO-850"></a><a name="index-PC-UNIX-851"></a>
+<p><a name="index-architecture-866"></a><a name="index-SCO-867"></a><a name="index-PC-UNIX-868"></a>
 John DuBois <spcecdt at deeptht.armory.com> wrote:
 <pre class="example">     <code>SCO-ODT-3.0</code> requires the latest version of tls003, the Athena
      widget library (available from sosco.sco.com). The main problems
@@ -6800,7 +6876,7 @@ Up: <a rel="up" accesskey="u" href="#problems">problems</a>
 
 <h4 class="subsection">A.2.6 Linux</h4>
 
-<p><a name="index-architecture-852"></a><a name="index-Linux-853"></a><a name="index-PC-UNIX-854"></a>
+<p><a name="index-architecture-869"></a><a name="index-Linux-870"></a><a name="index-PC-UNIX-871"></a>
 Since the <code>X11</code> version of <code>Pcb</code> has been developed on a Linux
 system here are no known problems.
 
@@ -6815,7 +6891,7 @@ Up: <a rel="up" accesskey="u" href="#problems">problems</a>
 
 <h4 class="subsection">A.2.7 FreeBSD and NetBSD</h4>
 
-<p><a name="index-FreeBSD-855"></a><a name="index-NetBSD-856"></a><a name="index-PC-UNIX-857"></a>
+<p><a name="index-FreeBSD-872"></a><a name="index-NetBSD-873"></a><a name="index-PC-UNIX-874"></a>
 <code>Pcb</code> has been tested on NetBSD and works without any problems. 
 You may also be able to find a NetBSD package at
 <a href="ftp://ftp.netbsd.org/pub/NetBSD/packages/cad/pcb/README.html">ftp://ftp.netbsd.org/pub/NetBSD/packages/cad/pcb/README.html</a> or a
@@ -6833,10 +6909,10 @@ Up: <a rel="up" accesskey="u" href="#problems">problems</a>
 
 <h4 class="subsection">A.2.8 Problems related to X11</h4>
 
-<p><a name="index-X11_002c-problems-858"></a>
+<p><a name="index-X11_002c-problems-875"></a>
 There are a some problems related to <code>X11R4</code> or systems derived from
 <code>X11</code> such as <code>OpenWindows</code>. See <a href="#Sun">Sun</a>. You at least have to change
-all occurances of <em>baseTranslations</em> in the resource files to
+all occurrences of <em>baseTranslations</em> in the resource files to
 <em>translations</em> if you are using a <code>X11R4</code> server. Look at the
 <code>X11R5</code> <em>Intrinsics</em> manual for details.
 
@@ -6861,7 +6937,7 @@ Up: <a rel="up" accesskey="u" href="#problems">problems</a>
 
 <h4 class="subsection">A.2.9 Problems related to TeX</h4>
 
-<p><a name="index-TeX_002c-problems-859"></a>
+<p><a name="index-TeX_002c-problems-876"></a>
 If your <code>TeX</code> installation complains about a missing <samp><span class="file">texinfo.tex</span></samp>
 file copy the one included in this release (directory <samp><span class="file">doc</span></samp>
 to your <code>TeX</code> macro directory. 
@@ -7012,17 +7088,18 @@ resources can be used to set the font, color, and spacing of buttons.
 As a convenience, “fg” can be used as an abbreviation for “foreground”.
 
    <p>Within the menu's resource file, Pcb will look for a few key named
-subresources.  At the moment, the only one it looks for is one called
-<code>MainMenu</code>.  This will be used for the main menu bar.  In the
-future, other named subresources will be used for popup resources.
+subresources.  At the moment, there are just two key named subresources. 
+<code>MainMenu</code> will be used for the main menu bar and <code>Mouse</code> will be
+used to define mouse actions.  In the future, other named subresources will
+be used for popup resources.
 
    <p>Given all this, a small sample <samp><span class="file">pcb-menu.res</span></samp> would be:
 
 <pre class="example">     MainMenu = {
        {File
-         {"Load layout" Load(Layout)}
+         {"Open..." Load(Layout)}
          -
-         {"Quit Program" Quit() fg=red font=10x20}
+         {"Quit" Quit() fg=red font=10x20}
        }
      }
 </pre>
@@ -7070,7 +7147,7 @@ Up: <a rel="up" accesskey="u" href="#Top">Top</a>
 
 <h2 class="appendix">Appendix C Element Search/Regular Expressions</h2>
 
-<p><a name="index-Element-Search-860"></a><a name="index-Regular-Expressions-861"></a><a name="index-Element-Search-862"></a><a name="index-Regular-Expressions-863"></a>
+<p><a name="index-Element-Search-877"></a><a name="index-Regular-Expressions-878"></a><a name="index-Element-Search-879"></a><a name="index-Regular-Expressions-880"></a>
 
 <h3 class="section">C.1 Element Search/Regular Expressions</h3>
 
@@ -7113,11 +7190,11 @@ may be given explicitly, or as ranges.
 preceding and the following character.  E.g., the range of digits is
 “0-9” .  The range of letters from C to K is “C-K” .
 
-     <br><dt>‘<samp><span class="samp">\^ inside square brackets</span></samp>’<dd>Inside square brackets the caret is an anti operator. Its presence makes
-the square prackets match anything except the contents of the brackets.
+     <br><dt>‘<samp><span class="samp">^ inside square brackets</span></samp>’<dd>Inside square brackets the caret is an anti operator. Its presence makes
+the square brackets match anything except the contents of the brackets.
 
      <br><dt>‘<samp><span class="samp">( )</span></samp>’<dd>Round parenthesis group parts of a regular expression. This is very much
-like they do in math formulars.
+like they do in math formulas.
 
    </dl>
 
@@ -7157,10 +7234,10 @@ TB1a.
      <br><dt>‘<samp><span class="samp">[A-D].*</span></samp>’<dd>Select all items, whose name starts with “A”, “B”, “C”, or “D”.
 
      <br><dt>‘<samp><span class="samp">.*N{2}.*</span></samp>’<dd>Select all items, whose name contains two “N” in a row such as
-CONN23, or connA, but not CON5
+CONN23, or connA, but not CON5.
 
      <br><dt>‘<samp><span class="samp">[^D].*</span></samp>’<dd>Select all items that do not start with the letter “D”, such as C2, or
-R34, but not D34
+R34, but not D34.
 
    </dl>
 
@@ -7176,12 +7253,11 @@ Up: <a rel="up" accesskey="u" href="#Top">Top</a>
 
 <h2 class="appendix">Appendix D Standard Drill Size Tables</h2>
 
-<p><a name="index-drill-sizes_002c-list-of-standard-864"></a><a name="index-standard-drill-sizes-865"></a>
+<p><a name="index-drill-sizes_002c-list-of-standard-881"></a><a name="index-standard-drill-sizes-882"></a>
 
 <h3 class="section">D.1 American Standard Wire Size Drills</h3>
 
 <!-- Generated file.  Do not edit directly -->
-<!-- $Id$ -->
 <p><table summary=""><tr align="left"><td valign="top" width="17%">Drill </td><td valign="top" width="17%">Diameter </td><td valign="top" width="17%">Drill </td><td valign="top" width="17%">Diameter </td><td valign="top" width="17%">Drill </td><td valign="top" width="17%">Diameter
 <br></td></tr><tr align="left"><td valign="top" width="17%">Size </td><td valign="top" width="17%">(inches) </td><td valign="top" width="17%">Size </td><td valign="top" width="17%">(inches) </td><td valign="top" width="17%">Size </td><td valign="top" width="17%">(inches)
 
@@ -7223,7 +7299,6 @@ Up: <a rel="up" accesskey="u" href="#Top">Top</a>
 <h3 class="section">D.2 American Standard Letter Size Drills</h3>
 
 <!-- Generated file.  Do not edit directly -->
-<!-- $Id$ -->
 <p><table summary=""><tr align="left"><td valign="top" width="17%">Drill </td><td valign="top" width="17%">Diameter </td><td valign="top" width="17%">Drill </td><td valign="top" width="17%">Diameter </td><td valign="top" width="17%">Drill </td><td valign="top" width="17%">Diameter
 <br></td></tr><tr align="left"><td valign="top" width="17%">Size </td><td valign="top" width="17%">(inches) </td><td valign="top" width="17%">Size </td><td valign="top" width="17%">(inches) </td><td valign="top" width="17%">Size </td><td valign="top" width="17%">(inches)
 
@@ -7241,7 +7316,6 @@ Up: <a rel="up" accesskey="u" href="#Top">Top</a>
 <h3 class="section">D.3 Fractional Inch Size Drills</h3>
 
 <!-- Generated file.  Do not edit directly -->
-<!-- $Id$ -->
 <p><table summary=""><tr align="left"><td valign="top" width="17%">Drill </td><td valign="top" width="17%">Diameter </td><td valign="top" width="17%">Drill </td><td valign="top" width="17%">Diameter </td><td valign="top" width="17%">Drill </td><td valign="top" width="17%">Diameter
 <br></td></tr><tr align="left"><td valign="top" width="17%">Size </td><td valign="top" width="17%">(inches) </td><td valign="top" width="17%">Size </td><td valign="top" width="17%">(inches) </td><td valign="top" width="17%">Size </td><td valign="top" width="17%">(inches)
 
@@ -7272,7 +7346,6 @@ Up: <a rel="up" accesskey="u" href="#Top">Top</a>
 <h3 class="section">D.4 Metric Drills</h3>
 
 <!-- Generated file.  Do not edit directly -->
-<!-- $Id$ -->
 <p><table summary=""><tr align="left"><td valign="top" width="17%">Drill </td><td valign="top" width="17%">Diameter </td><td valign="top" width="17%">Drill </td><td valign="top" width="17%">Diameter </td><td valign="top" width="17%">Drill </td><td valign="top" width="17%">Diameter
 <br></td></tr><tr align="left"><td valign="top" width="17%">Size </td><td valign="top" width="17%">(inches) </td><td valign="top" width="17%">Size </td><td valign="top" width="17%">(inches) </td><td valign="top" width="17%">Size </td><td valign="top" width="17%">(inches)
 
@@ -7345,7 +7418,7 @@ Up: <a rel="up" accesskey="u" href="#Top">Top</a>
 <div class="node">
 <a name="Centroid-File-Format"></a>
 <p><hr>
-Next: <a rel="next" accesskey="n" href="#Action-Reference">Action Reference</a>,
+Next: <a rel="next" accesskey="n" href="#Annotation-File-Format">Annotation File Format</a>,
 Previous: <a rel="previous" accesskey="p" href="#Standard-Drill-Sizes">Standard Drill Sizes</a>,
 Up: <a rel="up" accesskey="u" href="#Top">Top</a>
 
@@ -7353,7 +7426,7 @@ Up: <a rel="up" accesskey="u" href="#Top">Top</a>
 
 <h2 class="appendix">Appendix E Centroid (X-Y) File Format</h2>
 
-<p><a name="index-centroid-file-format-866"></a><a name="index-x_002dy-file-format-867"></a>
+<p><a name="index-centroid-file-format-883"></a><a name="index-x_002dy-file-format-884"></a>
 
 <h3 class="section">E.1 Overview</h3>
 
@@ -7361,15 +7434,13 @@ Up: <a rel="up" accesskey="u" href="#Top">Top</a>
 
 <p>The centroid output file is in a standard comma seperated values (CSV)
 format.  Comment lines begin with a “#”.  The output file contains a
-header with an RCS Id tag (useful for those who will check the file
-into a version control system), a version number for the file format,
-some comments containing the author and title of the board, and a
-comment describing the remainder of the file format.
+header with a version number for the file format, some comments
+containing the author and title of the board, and a comment describing
+the remainder of the file format.
 
    <p>An example centroid file is shown below.
 
 <pre class="example">     
-     # <tt>$</tt>Id<tt>$</tt>
      # PcbXY Version 1.0
      # Date: Fri Jul 22 03:40:08 2005 UTC
      # Author: PCB User
@@ -7384,7 +7455,7 @@ comment describing the remainder of the file format.
 </pre>
    <h3 class="section">E.3 Computation of Centroid and Rotation</h3>
 
-<p><a name="index-centroid-file_002c-algorithms-868"></a><a name="index-x_002dy-file_002c-algorithms-869"></a>The center of each element is found by averaging the (X,Y) coordinates
+<p><a name="index-centroid-file_002c-algorithms-885"></a><a name="index-x_002dy-file_002c-algorithms-886"></a>The center of each element is found by averaging the (X,Y) coordinates
 for the center of each pin and pad in the element.  For example if an
 element has 2 pins, 1 at (1,0) and another at (1,4) then the centroid
 will be at (1,2).
@@ -7414,22 +7485,96 @@ for the definitions of rotation.  In other words, when pin #1 is at
 the centroid of the part and pin #2 is in the upper left quadrant, the
 rotation is declared to be zero degrees.
 
+<!--  Appendix - Annotation File Format - -->
+<div class="node">
+<a name="Annotation-File-Format"></a>
+<p><hr>
+Next: <a rel="next" accesskey="n" href="#Action-Reference">Action Reference</a>,
+Previous: <a rel="previous" accesskey="p" href="#Centroid-File-Format">Centroid File Format</a>,
+Up: <a rel="up" accesskey="u" href="#Top">Top</a>
+
+</div>
+
+<h2 class="appendix">Appendix F Annotation File Format</h2>
+
+<p><a name="index-annotation-file-format-887"></a><a name="index-backannotation-file-format-888"></a>
+
+<h3 class="section">F.1 Overview</h3>
+
+<h3 class="section">F.2 File Format</h3>
+
+<p>The annotation output file an ASCII file that can be used to communicate
+layout changes that affect the netlist back to a schematic tool.  Currently
+the only place this file is used is if when the Renumber() action is called
+within Pcb.  Renumber() will renumber all the reference designators (instance
+names) in the layout.  The result of the renumbering will be written out to
+an annotation file which can be used to propagate the changes to the schematic
+sources.  See <a href="#Renumber-Action">Renumber Action</a> for details on the Renumber() action.  If you
+are using gschem (part of gEDA/gaf) as your schematic entry tool then refer
+to pcb_backannotate(1) for details on how to use the annotation file to make
+the changes to the schematics.
+
+   <p>The annotation file format is fairly simple.  Each line consists of a command followed
+by arguments.  Blank lines and lines consisting of only whitespace are ignored. 
+There are no line continuations.
+
+   <p>An example annotation file is shown below.
+<pre class="example">     
+     *COMMENT* PCB Annotation File
+     *FILEVERSION* 20061031
+     *RENAME* "C17" "C1"
+     *RENAME* "U5" "U1"
+     *RENAME* "U6" "U2"
+     *RENAME* "C21" "C2"
+     *RENAME* "R14" "R1"
+     *RENAME* "C7" "C3"
+     *RENAME* "C8" "C4"
+     *RENAME* "C6" "C5"
+     
+</pre>
+   <h4 class="subsection">F.2.1 *COMMENT*</h4>
+
+<p>Command for a comment.  The text of a comment is ignored by tools which process
+the annotation file. 
+<p><table class="cartouche" summary="cartouche" border="1"><tr><td>
+<pre class="format">*COMMENT* text
+</pre>
+   </td></tr></table>
+
+<h4 class="subsection">F.2.2 *FILEVERSION*</h4>
+
+<p>Indicates what version of the annotation file is in use.  The date code corresponds to the
+date when the current version was added to the Pcb sources. 
+<p><table class="cartouche" summary="cartouche" border="1"><tr><td>
+<pre class="format">*FILEVERSION* datecode
+</pre>
+   </td></tr></table>
+
+<h4 class="subsection">F.2.3 *RENAME*</h4>
+
+<p>Renames an element.  The arguments are enclosed in double quotes and are the original name
+and the new name. 
+<p><table class="cartouche" summary="cartouche" border="1"><tr><td>
+<pre class="format">*RENAME* “old” “new”
+</pre>
+   </td></tr></table>
+
 <!--  Appendix - Actions - -->
 <div class="node">
 <a name="Action-Reference"></a>
 <p><hr>
 Next: <a rel="next" accesskey="n" href="#Glossary">Glossary</a>,
-Previous: <a rel="previous" accesskey="p" href="#Centroid-File-Format">Centroid File Format</a>,
+Previous: <a rel="previous" accesskey="p" href="#Annotation-File-Format">Annotation File Format</a>,
 Up: <a rel="up" accesskey="u" href="#Top">Top</a>
 
 </div>
 
-<h2 class="appendix">Appendix F Action Reference</h2>
+<h2 class="appendix">Appendix G Action Reference</h2>
 
-<p><a name="index-action-reference-870"></a>
+<p><a name="index-action-reference-889"></a>
 
 <!-- key actions -->
-<!-- ./../src/action.c 225 -->
+<!-- ./../src/action.c 224 -->
    <p>Many actions take a <code>delta</code> parameter as the last parameter,
 which is an amount to change something.  That <code>delta</code> may include
 units, as an additional parameter, such as <code>Action(Object,5,mm)</code>. 
@@ -7445,9 +7590,9 @@ Otherwise, the size size is set to the given amount.
    <p>Actions which take a <code>delta</code> parameter which do not accept all
 these options will specify what they do take.
 
-<!-- ./../src/action.c 229 -->
-<!-- ./../src/command.c 64 -->
-<!-- ./../src/action.c 227 -->
+<!-- ./../src/action.c 228 -->
+<!-- ./../src/command.c 60 -->
+<!-- ./../src/action.c 226 -->
    <p>Many actions act on indicated objects on the board.  They will have
 parameters like <code>ToggleObject</code> or <code>SelectedVias</code> to indicate
 what group of objects they act on.  Unless otherwise specified, these
@@ -7481,108 +7626,108 @@ Up: <a rel="up" accesskey="u" href="#Action-Reference">Action Reference</a>
 
 </div>
 
-<h3 class="section">F.1 Core actions</h3>
+<h3 class="section">G.1 Core actions</h3>
 
 <ul class="menu">
-<li><a accesskey="1" href="#AddRats-Action">AddRats Action</a>:  Add one or more rat lines to the board. 
-<li><a accesskey="2" href="#ApplyVendor-Action">ApplyVendor Action</a>:  Applies the currently loaded vendor drill table to the current design. 
-<li><a accesskey="3" href="#Atomic-Action">Atomic Action</a>:  Save or restore the undo serial number. 
-<li><a accesskey="4" href="#Attributes-Action">Attributes Action</a>:  Let the user edit the attributes of the layout, current or given
-layer, or selected element. 
-<li><a accesskey="5" href="#AutoPlaceSelected-Action">AutoPlaceSelected Action</a>:  Auto-place selected components. 
-<li><a accesskey="6" href="#AutoRoute-Action">AutoRoute Action</a>:  Auto-route some or all rat lines. 
-<li><a accesskey="7" href="#ChangeClearSize-Action">ChangeClearSize Action</a>:  Changes the clearance size of objects. 
-<li><a accesskey="8" href="#ChangeDrillSize-Action">ChangeDrillSize Action</a>:  Changes the drilling hole size of objects. 
-<li><a accesskey="9" href="#ChangeFlag-Action">ChangeFlag Action</a>:  Sets or clears flags on objects. 
-<li><a href="#ChangeHole-Action">ChangeHole Action</a>:  Changes the hole flag of objects. 
-<li><a href="#ChangeJoin-Action">ChangeJoin Action</a>:  Changes the join (clearance through polygons) of objects. 
-<li><a href="#ChangeName-Action">ChangeName Action</a>:  Sets the name of objects. 
-<li><a href="#ChangeOctagon-Action">ChangeOctagon Action</a>:  Changes the octagon-flag of pins and vias. 
-<li><a href="#ChangePaste-Action">ChangePaste Action</a>:  Changes the no paste flag of objects. 
-<li><a href="#ChangePinName-Action">ChangePinName Action</a>:  Sets the name of a specific pin on a specific element. 
-<li><a href="#ChangeSize-Action">ChangeSize Action</a>:  Changes the size of objects. 
-<li><a href="#ChangeSquare-Action">ChangeSquare Action</a>:  Changes the square flag of pins and pads. 
-<li><a href="#ClearOctagon-Action">ClearOctagon Action</a>:  Clears the octagon-flag of pins and vias. 
-<li><a href="#ClearSquare-Action">ClearSquare Action</a>:  Clears the square-flag of pins and pads. 
-<li><a href="#ClrFlag-Action">ClrFlag Action</a>:  Clears flags on objects. 
-<li><a href="#Connection-Action">Connection Action</a>:  Searches connections of the object at the cursor position. 
-<li><a href="#Delete-Action">Delete Action</a>:  Delete stuff. 
-<li><a href="#DeleteRats-Action">DeleteRats Action</a>:  Delete rat lines. 
-<li><a href="#DisableVendor-Action">DisableVendor Action</a>:  Disables automatic drill size mapping. 
-<li><a href="#DisperseElements-Action">DisperseElements Action</a>:  Disperses elements. 
-<li><a href="#Display-Action">Display Action</a>:  Several display-related actions. 
+<li><a accesskey="1" href="#AddRats-Action">AddRats Action</a>:    N_("Add one or more rat lines to the board.");
+<li><a accesskey="2" href="#ApplyVendor-Action">ApplyVendor Action</a>:    N_("Applies the currently loaded vendor drill table to the current design.");
+<li><a accesskey="3" href="#Atomic-Action">Atomic Action</a>:   N_("Save or restore the undo serial number.");
+<li><a accesskey="4" href="#Attributes-Action">Attributes Action</a>:    N_("Let the user edit the attributes of the layout, current or given
+layer, or selected element.");
+<li><a accesskey="5" href="#AutoPlaceSelected-Action">AutoPlaceSelected Action</a>:   N_("Auto-place selected components.");
+<li><a accesskey="6" href="#AutoRoute-Action">AutoRoute Action</a>:   N_("Auto-route some or all rat lines.");
+<li><a accesskey="7" href="#ChangeClearSize-Action">ChangeClearSize Action</a>:    N_("Changes the clearance size of objects.");
+<li><a accesskey="8" href="#ChangeDrillSize-Action">ChangeDrillSize Action</a>:    N_("Changes the drilling hole size of objects.");
+<li><a accesskey="9" href="#ChangeFlag-Action">ChangeFlag Action</a>:   N_("Sets or clears flags on objects.");
+<li><a href="#ChangeHole-Action">ChangeHole Action</a>:   N_("Changes the hole flag of objects.");
+<li><a href="#ChangeJoin-Action">ChangeJoin Action</a>:    N_("Changes the join (clearance through polygons) of objects.");
+<li><a href="#ChangeName-Action">ChangeName Action</a>:   N_("Sets the name of objects.");
+<li><a href="#ChangeOctagon-Action">ChangeOctagon Action</a>:    N_("Changes the octagon-flag of pins and vias.");
+<li><a href="#ChangePaste-Action">ChangePaste Action</a>:    N_("Changes the no paste flag of objects.");
+<li><a href="#ChangePinName-Action">ChangePinName Action</a>:    N_("Sets the name of a specific pin on a specific element.");
+<li><a href="#ChangeSize-Action">ChangeSize Action</a>:   N_("Changes the size of objects.");
+<li><a href="#ChangeSquare-Action">ChangeSquare Action</a>:    N_("Changes the square flag of pins and pads.");
+<li><a href="#ClearOctagon-Action">ClearOctagon Action</a>:    N_("Clears the octagon-flag of pins and vias.");
+<li><a href="#ClearSquare-Action">ClearSquare Action</a>:    N_("Clears the square-flag of pins and pads.");
+<li><a href="#ClrFlag-Action">ClrFlag Action</a>:   N_("Clears flags on objects.");
+<li><a href="#Connection-Action">Connection Action</a>:    N_("Searches connections of the object at the cursor position.");
+<li><a href="#Delete-Action">Delete Action</a>:   N_("Delete stuff.");
+<li><a href="#DeleteRats-Action">DeleteRats Action</a>:   N_("Delete rat lines.");
+<li><a href="#DisableVendor-Action">DisableVendor Action</a>:    N_("Disables automatic drill size mapping.");
+<li><a href="#DisperseElements-Action">DisperseElements Action</a>:   N_("Disperses elements.");
+<li><a href="#Display-Action">Display Action</a>:   N_("Several display-related actions.");
 <li><a href="#djopt-Action">djopt Action</a>:  Perform various optimizations on the current board. 
-<li><a href="#DRC-Action">DRC Action</a>:  Invoke the DRC check. 
-<li><a href="#DumpLibrary-Action">DumpLibrary Action</a>:  Display the entire contents of the libraries. 
-<li><a href="#elementlist-Action">elementlist Action</a>:  Adds the given element if it doesn't already exist. 
-<li><a href="#elementsetattr-Action">elementsetattr Action</a>:  Sets or clears an element-specific attribute. 
-<li><a href="#EnableVendor-Action">EnableVendor Action</a>:  Enables automatic drill size mapping. 
-<li><a href="#execcommand-Action">execcommand Action</a>:  Runs a command. 
-<li><a href="#ExecuteFile-Action">ExecuteFile Action</a>:  Run actions from the given file. 
-<li><a href="#Flip-Action">Flip Action</a>:  Flip an element to the opposite side of the board. 
+<li><a href="#DRC-Action">DRC Action</a>:   N_("Invoke the DRC check.");
+<li><a href="#DumpLibrary-Action">DumpLibrary Action</a>:    N_("Display the entire contents of the libraries.");
+<li><a href="#elementlist-Action">elementlist Action</a>:    N_("Adds the given element if it doesn't already exist.");
+<li><a href="#elementsetattr-Action">elementsetattr Action</a>:    N_("Sets or clears an element-specific attribute.");
+<li><a href="#EnableVendor-Action">EnableVendor Action</a>:    N_("Enables automatic drill size mapping.");
+<li><a href="#execcommand-Action">execcommand Action</a>:   N_("Runs a command.");
+<li><a href="#ExecuteFile-Action">ExecuteFile Action</a>:   N_("Run actions from the given file.");
+<li><a href="#Flip-Action">Flip Action</a>:    N_("Flip an element to the opposite side of the board.");
 <li><a href="#FontEdit-Action">FontEdit Action</a>:  Convert the current font to a PCB for editing. 
 <li><a href="#FontSave-Action">FontSave Action</a>:  Convert the current PCB back to a font. 
-<li><a href="#FreeRotateBuffer-Action">FreeRotateBuffer Action</a>:  Rotates the current paste buffer contents by the specified angle.  The
+<li><a href="#FreeRotateBuffer-Action">FreeRotateBuffer Action</a>:    N_("Rotates the current paste buffer contents by the specified angle.  The
 angle is given in degrees.  If no angle is given, the user is prompted
-for one.
-
+for one. 
+");
 <li><a href="#GlobalPuller-Action">GlobalPuller Action</a>:  Pull all traces tight. 
 <li><a href="#h-Action">h Action</a>:  Print a help message for commands. 
-<li><a href="#Import-Action">Import Action</a>:  Import schematics. 
+<li><a href="#Import-Action">Import Action</a>:   N_("Import schematics.");
 <li><a href="#l-Action">l Action</a>:  Loads layout data. 
 <li><a href="#le-Action">le Action</a>:  Loads an element into the current buffer. 
-<li><a href="#LoadFootprint-Action">LoadFootprint Action</a>:  Loads a single footprint by name. 
-<li><a href="#LoadFrom-Action">LoadFrom Action</a>:  Load layout data from a file. 
-<li><a href="#LoadVendorFrom-Action">LoadVendorFrom Action</a>:  Loads the specified vendor resource file. 
+<li><a href="#LoadFootprint-Action">LoadFootprint Action</a>:    N_("Loads a single footprint by name.");
+<li><a href="#LoadFrom-Action">LoadFrom Action</a>:   N_("Load layout data from a file.");
+<li><a href="#LoadVendorFrom-Action">LoadVendorFrom Action</a>:    N_("Loads the specified vendor resource file.");
 <li><a href="#m-Action">m Action</a>:  Loads a layout into the current buffer. 
-<li><a href="#MarkCrosshair-Action">MarkCrosshair Action</a>:  Set/Reset the Crosshair mark. 
-<li><a href="#Message-Action">Message Action</a>:  Writes a message to the log window. 
-<li><a href="#MinClearGap-Action">MinClearGap Action</a>:  Ensures that polygons are a minimum distance from objects. 
-<li><a href="#MinMaskGap-Action">MinMaskGap Action</a>:  Ensures the mask is a minimum distance from pins and pads. 
-<li><a href="#Mode-Action">Mode Action</a>:  Change or use the tool mode. 
-<li><a href="#MorphPolygon-Action">MorphPolygon Action</a>:  Converts dead polygon islands into separate polygons. 
+<li><a href="#MarkCrosshair-Action">MarkCrosshair Action</a>:   N_("Set/Reset the Crosshair mark.");
+<li><a href="#Message-Action">Message Action</a>:   N_("Writes a message to the log window.");
+<li><a href="#MinClearGap-Action">MinClearGap Action</a>:    N_("Ensures that polygons are a minimum distance from objects.");
+<li><a href="#MinMaskGap-Action">MinMaskGap Action</a>:    N_("Ensures the mask is a minimum distance from pins and pads.");
+<li><a href="#Mode-Action">Mode Action</a>:   N_("Change or use the tool mode.");
+<li><a href="#MorphPolygon-Action">MorphPolygon Action</a>:    N_("Converts dead polygon islands into separate polygons.");
 <li><a href="#MoveLayer-Action">MoveLayer Action</a>:  Moves/Creates/Deletes Layers. 
-<li><a href="#MoveObject-Action">MoveObject Action</a>:  Moves the object under the crosshair. 
-<li><a href="#MoveToCurrentLayer-Action">MoveToCurrentLayer Action</a>:  Moves objects to the current layer. 
+<li><a href="#MoveObject-Action">MoveObject Action</a>:    N_("Moves the object under the crosshair.");
+<li><a href="#MoveToCurrentLayer-Action">MoveToCurrentLayer Action</a>:    N_("Moves objects to the current layer.");
 <li><a href="#Netlist-Action">Netlist Action</a>:  Perform various actions on netlists. 
-<li><a href="#New-Action">New Action</a>:  Starts a new layout. 
+<li><a href="#New-Action">New Action</a>:   N_("Starts a new layout.");
 <li><a href="#OptAutoOnly-Action">OptAutoOnly Action</a>:  Toggles the optimize-only-autorouted flag. 
-<li><a href="#PasteBuffer-Action">PasteBuffer Action</a>:  Various operations on the paste buffer. 
-<li><a href="#Polygon-Action">Polygon Action</a>:  Some polygon related stuff. 
+<li><a href="#PasteBuffer-Action">PasteBuffer Action</a>:    N_("Various operations on the paste buffer.");
+<li><a href="#Polygon-Action">Polygon Action</a>:   N_("Some polygon related stuff.");
 <li><a href="#Puller-Action">Puller Action</a>:  Pull an arc-line junction tight. 
 <li><a href="#q-Action">q Action</a>:  Quits the application after confirming. 
 <li><a href="#q_0021-Action">q! Action</a>:  Quits the application without confirming. 
-<li><a href="#Quit-Action">Quit Action</a>:  Quits the application after confirming. 
-<li><a href="#Redo-Action">Redo Action</a>:  Redo recent``undo''operations. 
-<li><a href="#RemoveSelected-Action">RemoveSelected Action</a>:  Removes any selected objects. 
-<li><a href="#Renumber-Action">Renumber Action</a>:  Renumber all elements.  The changes will be recorded to filename
-for use in backannotating these changes to the schematic. 
-<li><a href="#Report-Action">Report Action</a>:  Produce various report. 
-<li><a href="#ReportDialog-Action">ReportDialog Action</a>:  Report on the object under the crosshair
-<li><a href="#RipUp-Action">RipUp Action</a>:  Ripup auto-routed tracks, or convert an element to parts. 
+<li><a href="#Quit-Action">Quit Action</a>:   N_("Quits the application after confirming.");
+<li><a href="#Redo-Action">Redo Action</a>:   N_("Redo recent``undo''operations.");
+<li><a href="#RemoveSelected-Action">RemoveSelected Action</a>:   N_("Removes any selected objects.");
+<li><a href="#Renumber-Action">Renumber Action</a>:    N_("Renumber all elements.  The changes will be recorded to filename
+for use in backannotating these changes to the schematic.");
+<li><a href="#Report-Action">Report Action</a>:   N_("Produce various report.");
+<li><a href="#ReportDialog-Action">ReportDialog Action</a>:    N_("Report on the object under the crosshair");
+<li><a href="#RipUp-Action">RipUp Action</a>:    N_("Ripup auto-routed tracks, or convert an element to parts.");
 <li><a href="#rn-Action">rn Action</a>:  Reads netlist. 
-<li><a href="#RouteStyle-Action">RouteStyle Action</a>:  Copies the indicated routing style into the current sizes. 
+<li><a href="#RouteStyle-Action">RouteStyle Action</a>:    N_("Copies the indicated routing style into the current sizes.");
 <li><a href="#s-Action">s Action</a>:  Saves layout data. 
-<li><a href="#SaveSettings-Action">SaveSettings Action</a>:  Saves settings. 
-<li><a href="#SaveTo-Action">SaveTo Action</a>:  Saves data to a file. 
-<li><a href="#Select-Action">Select Action</a>:  Toggles or sets the selection. 
-<li><a href="#SetFlag-Action">SetFlag Action</a>:  Sets flags on objects. 
-<li><a href="#SetOctagon-Action">SetOctagon Action</a>:  Sets the octagon-flag of objects. 
-<li><a href="#SetSame-Action">SetSame Action</a>:  Sets current layer and sizes to match indicated item. 
-<li><a href="#SetSquare-Action">SetSquare Action</a>:  sets the square-flag of objects. 
-<li><a href="#SetThermal-Action">SetThermal Action</a>:  Set the thermal (on the current layer) of pins or vias to the given style. 
+<li><a href="#SaveSettings-Action">SaveSettings Action</a>:   N_("Saves settings.");
+<li><a href="#SaveTo-Action">SaveTo Action</a>:   N_("Saves data to a file.");
+<li><a href="#Select-Action">Select Action</a>:   N_("Toggles or sets the selection.");
+<li><a href="#SetFlag-Action">SetFlag Action</a>:   N_("Sets flags on objects.");
+<li><a href="#SetOctagon-Action">SetOctagon Action</a>:   N_("Sets the octagon-flag of objects.");
+<li><a href="#SetSame-Action">SetSame Action</a>:    N_("Sets current layer and sizes to match indicated item.");
+<li><a href="#SetSquare-Action">SetSquare Action</a>:   N_("sets the square-flag of objects.");
+<li><a href="#SetThermal-Action">SetThermal Action</a>:    N_("Set the thermal (on the current layer) of pins or vias to the given style. 
 Style = 0 means no thermal. 
 Style = 1 has diagonal fingers with sharp edges. 
 Style = 2 has horizontal and vertical fingers with sharp edges. 
 Style = 3 is a solid connection to the plane.Style = 4 has diagonal fingers with rounded edges. 
-Style = 5 has horizontal and vertical fingers with rounded edges.
-
-<li><a href="#SetValue-Action">SetValue Action</a>:  Change various board-wide values and sizes. 
-<li><a href="#ToggleHideName-Action">ToggleHideName Action</a>:  Toggles the visibility of element names. 
-<li><a href="#ToggleVendor-Action">ToggleVendor Action</a>:  Toggles the state of automatic drill size mapping. 
-<li><a href="#Undo-Action">Undo Action</a>:  Undo recent changes. 
-<li><a href="#UnloadVendor-Action">UnloadVendor Action</a>:  Unloads the current vendor drill mapping table. 
-<li><a href="#Unselect-Action">Unselect Action</a>:  Unselects the object at the pointer location or the specified objects. 
+Style = 5 has horizontal and vertical fingers with rounded edges. 
+");
+<li><a href="#SetValue-Action">SetValue Action</a>:    N_("Change various board-wide values and sizes.");
+<li><a href="#ToggleHideName-Action">ToggleHideName Action</a>:    N_("Toggles the visibility of element names.");
+<li><a href="#ToggleVendor-Action">ToggleVendor Action</a>:    N_("Toggles the state of automatic drill size mapping.");
+<li><a href="#Undo-Action">Undo Action</a>:   N_("Undo recent changes.");
+<li><a href="#UnloadVendor-Action">UnloadVendor Action</a>:    N_("Unloads the current vendor drill mapping table.");
+<li><a href="#Unselect-Action">Unselect Action</a>:    N_("Unselects the object at the pointer location or the specified objects.");
 <li><a href="#w-Action">w Action</a>:  Saves layout data. 
 <li><a href="#wq-Action">wq Action</a>:  Saves the layout data and quits. 
 </ul>
@@ -7594,15 +7739,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.1 AddRats</h4>
+<h4 class="subsection">G.1.1 AddRats</h4>
 
 <!-- key AddRats in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">AddRats(AllRats|SelectedRats|Close)</pre>
+<pre class="format"> N_("AddRats(AllRats|SelectedRats|Close)");
+</pre>
    </td></tr></table>
 
-   <p>Add one or more rat lines to the board. 
-<!-- ./../src/action.c 3310 -->
+   <p>N_("Add one or more rat lines to the board.");
+<!-- ./../src/action.c 3311 -->
 
      <dl>
 <dt><code>AllRats</code><dd>Create rat lines for all loaded nets that aren't already connected on
@@ -7624,16 +7770,17 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.2 ApplyVendor</h4>
+<h4 class="subsection">G.1.2 ApplyVendor</h4>
 
 <!-- key ApplyVendor in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ApplyVendor()</pre>
+<pre class="format"> N_("ApplyVendor()");
+</pre>
    </td></tr></table>
 
-   <p>Applies the currently loaded vendor drill table to the current design. 
-<!-- ./../src/vendor.c 112 -->
-<a name="index-vendor-map-871"></a><a name="index-vendor-drill-table-872"></a><a name="index-ApplyVendor_0028_0029-873"></a>
+   <p>N_("Applies the currently loaded vendor drill table to the current design.");
+<!-- ./../src/vendor.c 108 -->
+<a name="index-vendor-map-890"></a><a name="index-vendor-drill-table-891"></a><a name="index-ApplyVendor_0028_0029-892"></a>
 This will modify all of your drill holes to match the list of allowed
 sizes for your vendor.
 
@@ -7646,15 +7793,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.3 Atomic</h4>
+<h4 class="subsection">G.1.3 Atomic</h4>
 
 <!-- key Atomic in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Atomic(Save|Restore|Close|Block)</pre>
+<pre class="format"> N_("Atomic(Save|Restore|Close|Block)");
+</pre>
    </td></tr></table>
 
-   <p>Save or restore the undo serial number. 
-<!-- ./../src/action.c 1720 -->
+   <p>N_("Save or restore the undo serial number.");
+<!-- ./../src/action.c 1707 -->
 
    <p>This action allows making multiple-action bindings into an atomic
 operation that will be undone by a single Undo command.  For example,
@@ -7688,17 +7836,18 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.4 Attributes</h4>
+<h4 class="subsection">G.1.4 Attributes</h4>
 
 <!-- key Attributes in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Attributes(Layout|Layer|Element)
-Attributes(Layer,layername)</pre>
+<pre class="format">  N_("Attributes(Layout|Layer|Element)
+Attributes(Layer,layername)");
+</pre>
    </td></tr></table>
 
-   <p>Let the user edit the attributes of the layout, current or given
-layer, or selected element. 
-<!-- ./../src/action.c 6761 -->
+   <p>N_("Let the user edit the attributes of the layout, current or given
+layer, or selected element.");
+<!-- ./../src/action.c 6793 -->
 
    <p>This just pops up a dialog letting the user edit the attributes of the
 pcb, an element, or a layer.
@@ -7712,15 +7861,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.5 AutoPlaceSelected</h4>
+<h4 class="subsection">G.1.5 AutoPlaceSelected</h4>
 
 <!-- key AutoPlaceSelected in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">AutoPlaceSelected()</pre>
+<pre class="format"> N_("AutoPlaceSelected()");
+</pre>
    </td></tr></table>
 
-   <p>Auto-place selected components. 
-<!-- ./../src/action.c 3450 -->
+   <p>N_("Auto-place selected components.");
+<!-- ./../src/action.c 3451 -->
 
    <p>Attempts to re-arrange the selected components such that the nets
 connecting them are minimized.  Note that you cannot undo this.
@@ -7734,15 +7884,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.6 AutoRoute</h4>
+<h4 class="subsection">G.1.6 AutoRoute</h4>
 
 <!-- key AutoRoute in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">AutoRoute(AllRats|SelectedRats)</pre>
+<pre class="format"> N_("AutoRoute(AllRats|SelectedRats)");
+</pre>
    </td></tr></table>
 
-   <p>Auto-route some or all rat lines. 
-<!-- ./../src/action.c 3471 -->
+   <p>N_("Auto-route some or all rat lines.");
+<!-- ./../src/action.c 3472 -->
 
      <dl>
 <dt><code>AllRats</code><dd>Attempt to autoroute all rats.
@@ -7769,18 +7920,19 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.7 ChangeClearSize</h4>
+<h4 class="subsection">G.1.7 ChangeClearSize</h4>
 
 <!-- key ChangeClearSize in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ChangeClearSize(Object, delta)
+<pre class="format">  N_("ChangeClearSize(Object, delta)
 ChangeClearSize(SelectedPins|SelectedPads|SelectedVias, delta)
 ChangeClearSize(SelectedLines|SelectedArcs, delta
-ChangeClearSize(Selected|SelectedObjects, delta)</pre>
+ChangeClearSize(Selected|SelectedObjects, delta)");
+</pre>
    </td></tr></table>
 
-   <p>Changes the clearance size of objects. 
-<!-- ./../src/action.c 3686 -->
+   <p>N_("Changes the clearance size of objects.");
+<!-- ./../src/action.c 3690 -->
 
    <p>If the solder mask is currently showing, this action changes the
 solder mask clearance.  If the mask is not showing, this action
@@ -7795,16 +7947,17 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.8 ChangeDrillSize</h4>
+<h4 class="subsection">G.1.8 ChangeDrillSize</h4>
 
 <!-- key ChangeDrillSize in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ChangeDrillSize(Object, delta)
-ChangeDrillSize(SelectedPins|SelectedVias|Selected|SelectedObjects, delta)</pre>
+<pre class="format">  N_("ChangeDrillSize(Object, delta)
+ChangeDrillSize(SelectedPins|SelectedVias|Selected|SelectedObjects, delta)");
+</pre>
    </td></tr></table>
 
-   <p>Changes the drilling hole size of objects. 
-<!-- ./../src/action.c 3630 -->
+   <p>N_("Changes the drilling hole size of objects.");
+<!-- ./../src/action.c 3634 -->
 
 <div class="node">
 <a name="ChangeFlag-Action"></a>
@@ -7815,20 +7968,21 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.9 ChangeFlag</h4>
+<h4 class="subsection">G.1.9 ChangeFlag</h4>
 
 <!-- key ChangeFlag in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ChangeFlag(Object|Selected|SelectedObjects, flag, value)
+<pre class="format">  N_("ChangeFlag(Object|Selected|SelectedObjects, flag, value)
 ChangeFlag(SelectedLines|SelectedPins|SelectedVias, flag, value)
 ChangeFlag(SelectedPads|SelectedTexts|SelectedNames, flag, value)
 ChangeFlag(SelectedElements, flag, value)
 flag = square | octagon | thermal | join
-value = 0 | 1</pre>
+value = 0 | 1");
+</pre>
    </td></tr></table>
 
-   <p>Sets or clears flags on objects. 
-<!-- ./../src/action.c 5750 -->
+   <p>N_("Sets or clears flags on objects.");
+<!-- ./../src/action.c 5779 -->
 
    <p>Toggles the given flag on the indicated object(s).  The flag may be
 one of the flags listed above (square, octagon, thermal, join).  The
@@ -7844,15 +7998,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.10 ChangeHole</h4>
+<h4 class="subsection">G.1.10 ChangeHole</h4>
 
 <!-- key ChangeHole in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ChangeHole(ToggleObject|Object|SelectedVias|Selected)</pre>
+<pre class="format">  N_("ChangeHole(ToggleObject|Object|SelectedVias|Selected)");
+</pre>
    </td></tr></table>
 
-   <p>Changes the hole flag of objects. 
-<!-- ./../src/action.c 4571 -->
+   <p>N_("Changes the hole flag of objects.");
+<!-- ./../src/action.c 4578 -->
 
    <p>The "hole flag" of a via determines whether the via is a
 plated-through hole (not set), or an unplated hole (set).
@@ -7866,15 +8021,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.11 ChangeJoin</h4>
+<h4 class="subsection">G.1.11 ChangeJoin</h4>
 
 <!-- key ChangeJoin in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ChangeJoin(ToggleObject|SelectedLines|SelectedArcs|Selected)</pre>
+<pre class="format">  N_("ChangeJoin(ToggleObject|SelectedLines|SelectedArcs|Selected)");
+</pre>
    </td></tr></table>
 
-   <p>Changes the join (clearance through polygons) of objects. 
-<!-- ./../src/action.c 4199 -->
+   <p>N_("Changes the join (clearance through polygons) of objects.");
+<!-- ./../src/action.c 4206 -->
 
    <p>The join flag determines whether a line or arc, drawn to intersect a
 polygon, electrically connects to the polygon or not.  When joined,
@@ -7891,16 +8047,17 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.12 ChangeName</h4>
+<h4 class="subsection">G.1.12 ChangeName</h4>
 
 <!-- key ChangeName in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ChangeName(Object)
-ChangeName(Layout|Layer)</pre>
+<pre class="format">  N_("ChangeName(Object)
+ChangeName(Layout|Layer)");
+</pre>
    </td></tr></table>
 
-   <p>Sets the name of objects. 
-<!-- ./../src/action.c 4005 -->
+   <p>N_("Sets the name of objects.");
+<!-- ./../src/action.c 4012 -->
 
      <dl>
 <dt><code>Object</code><dd>Changes the name of the element under the cursor.
@@ -7920,16 +8077,17 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.13 ChangeOctagon</h4>
+<h4 class="subsection">G.1.13 ChangeOctagon</h4>
 
 <!-- key ChangeOctagon in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ChangeOctagon(Object|ToggleObject|SelectedObjects|Selected)
-ChangeOctagon(SelectedElements|SelectedPins|SelectedVias)</pre>
+<pre class="format">  N_("ChangeOctagon(Object|ToggleObject|SelectedObjects|Selected)
+ChangeOctagon(SelectedElements|SelectedPins|SelectedVias)");
+</pre>
    </td></tr></table>
 
-   <p>Changes the octagon-flag of pins and vias. 
-<!-- ./../src/action.c 4403 -->
+   <p>N_("Changes the octagon-flag of pins and vias.");
+<!-- ./../src/action.c 4410 -->
 
    <p>Pins, pads, and vias can have various shapes.  All may be round.  Pins
 and pads may be square (obviously "square" pads are usually
@@ -7951,15 +8109,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.14 ChangePaste</h4>
+<h4 class="subsection">G.1.14 ChangePaste</h4>
 
 <!-- key ChangePaste in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ChangePaste(ToggleObject|Object|SelectedPads|Selected)</pre>
+<pre class="format">  N_("ChangePaste(ToggleObject|Object|SelectedPads|Selected)");
+</pre>
    </td></tr></table>
 
-   <p>Changes the no paste flag of objects. 
-<!-- ./../src/action.c 4611 -->
+   <p>N_("Changes the no paste flag of objects.");
+<!-- ./../src/action.c 4618 -->
 
    <p>The "no paste flag" of a pad determines whether the solderpaste
  stencil will have an opening for the pad (no set) or if there wil be
@@ -7975,15 +8134,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.15 ChangePinName</h4>
+<h4 class="subsection">G.1.15 ChangePinName</h4>
 
 <!-- key ChangePinName in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ChangePinName(ElementName,PinNumber,PinName)</pre>
+<pre class="format">  N_("ChangePinName(ElementName,PinNumber,PinName)");
+</pre>
    </td></tr></table>
 
-   <p>Sets the name of a specific pin on a specific element. 
-<!-- ./../src/action.c 3924 -->
+   <p>N_("Sets the name of a specific pin on a specific element.");
+<!-- ./../src/action.c 3931 -->
 
    <p>This can be especially useful for annotating pin names from a
 schematic to the layout without requiring knowledge of the pcb file
@@ -8000,19 +8160,20 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.16 ChangeSize</h4>
+<h4 class="subsection">G.1.16 ChangeSize</h4>
 
 <!-- key ChangeSize in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ChangeSize(Object, delta)
+<pre class="format">  N_("ChangeSize(Object, delta)
 ChangeSize(SelectedObjects|Selected, delta)
 ChangeSize(SelectedLines|SelectedPins|SelectedVias, delta)
 ChangeSize(SelectedPads|SelectedTexts|SelectedNames, delta)
-ChangeSize(SelectedElements, delta)</pre>
+ChangeSize(SelectedElements, delta)");
+</pre>
    </td></tr></table>
 
-   <p>Changes the size of objects. 
-<!-- ./../src/action.c 3543 -->
+   <p>N_("Changes the size of objects.");
+<!-- ./../src/action.c 3544 -->
 
    <p>For lines and arcs, this changes the width.  For pins and vias, this
 changes the overall diameter of the copper annulus.  For pads, this
@@ -8029,17 +8190,18 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.17 ChangeSquare</h4>
+<h4 class="subsection">G.1.17 ChangeSquare</h4>
 
 <!-- key ChangeSquare in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ChangeSquare(ToggleObject)
+<pre class="format">  N_("ChangeSquare(ToggleObject)
 ChangeSquare(SelectedElements|SelectedPins)
-ChangeSquare(Selected|SelectedObjects)</pre>
+ChangeSquare(Selected|SelectedObjects)");
+</pre>
    </td></tr></table>
 
-   <p>Changes the square flag of pins and pads. 
-<!-- ./../src/action.c 4250 -->
+   <p>N_("Changes the square flag of pins and pads.");
+<!-- ./../src/action.c 4257 -->
 
    <p>Note that <code>Pins</code> means both pins and pads.
 
@@ -8063,16 +8225,17 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.18 ClearOctagon</h4>
+<h4 class="subsection">G.1.18 ClearOctagon</h4>
 
 <!-- key ClearOctagon in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ClearOctagon(ToggleObject|Object|SelectedObjects|Selected)
-ClearOctagon(SelectedElements|SelectedPins|SelectedVias)</pre>
+<pre class="format">  N_("ClearOctagon(ToggleObject|Object|SelectedObjects|Selected)
+ClearOctagon(SelectedElements|SelectedPins|SelectedVias)");
+</pre>
    </td></tr></table>
 
-   <p>Clears the octagon-flag of pins and vias. 
-<!-- ./../src/action.c 4515 -->
+   <p>N_("Clears the octagon-flag of pins and vias.");
+<!-- ./../src/action.c 4522 -->
 
    <p>Pins, pads, and vias can have various shapes.  All may be round.  Pins
 and pads may be square (obviously "square" pads are usually
@@ -8094,15 +8257,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.19 ClearSquare</h4>
+<h4 class="subsection">G.1.19 ClearSquare</h4>
 
 <!-- key ClearSquare in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ClearSquare(ToggleObject|SelectedElements|SelectedPins)</pre>
+<pre class="format">  N_("ClearSquare(ToggleObject|SelectedElements|SelectedPins)");
+</pre>
    </td></tr></table>
 
-   <p>Clears the square-flag of pins and pads. 
-<!-- ./../src/action.c 4352 -->
+   <p>N_("Clears the square-flag of pins and pads.");
+<!-- ./../src/action.c 4359 -->
 
    <p>Note that <code>Pins</code> means pins and pads.
 
@@ -8126,19 +8290,20 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.20 ClrFlag</h4>
+<h4 class="subsection">G.1.20 ClrFlag</h4>
 
 <!-- key ClrFlag in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ClrFlag(Object|Selected|SelectedObjects, flag)
+<pre class="format">  N_("ClrFlag(Object|Selected|SelectedObjects, flag)
 ClrFlag(SelectedLines|SelectedPins|SelectedVias, flag)
 ClrFlag(SelectedPads|SelectedTexts|SelectedNames, flag)
 ClrFlag(SelectedElements, flag)
-flag = square | octagon | thermal | join</pre>
+flag = square | octagon | thermal | join");
+</pre>
    </td></tr></table>
 
-   <p>Clears flags on objects. 
-<!-- ./../src/action.c 5733 -->
+   <p>N_("Clears flags on objects.");
+<!-- ./../src/action.c 5762 -->
 
    <p>Turns the given flag off, regardless of its previous setting.  See
 <code>ChangeFlag</code>.
@@ -8154,15 +8319,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.21 Connection</h4>
+<h4 class="subsection">G.1.21 Connection</h4>
 
 <!-- key Connection in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Connection(Find|ResetLinesAndPolygons|ResetPinsAndVias|Reset)</pre>
+<pre class="format">  N_("Connection(Find|ResetLinesAndPolygons|ResetPinsAndVias|Reset)");
+</pre>
    </td></tr></table>
 
-   <p>Searches connections of the object at the cursor position. 
-<!-- ./../src/action.c 2093 -->
+   <p>N_("Searches connections of the object at the cursor position.");
+<!-- ./../src/action.c 2089 -->
 
    <p>Connections found with this action will be highlighted in the
 “connected-color” color and will have the “found” flag set.
@@ -8187,16 +8353,17 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.22 Delete</h4>
+<h4 class="subsection">G.1.22 Delete</h4>
 
 <!-- key Delete in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Delete(Object|Selected)
-Delete(AllRats|SelectedRats)</pre>
+<pre class="format">  N_("Delete(Object|Selected)
+Delete(AllRats|SelectedRats)");
+</pre>
    </td></tr></table>
 
-   <p>Delete stuff. 
-<!-- ./../src/action.c 3371 -->
+   <p>N_("Delete stuff.");
+<!-- ./../src/action.c 3372 -->
 
 <div class="node">
 <a name="DeleteRats-Action"></a>
@@ -8207,15 +8374,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.23 DeleteRats</h4>
+<h4 class="subsection">G.1.23 DeleteRats</h4>
 
 <!-- key DeleteRats in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">DeleteRats(AllRats|Selected|SelectedRats)</pre>
+<pre class="format">  N_("DeleteRats(AllRats|Selected|SelectedRats)");
+</pre>
    </td></tr></table>
 
-   <p>Delete rat lines. 
-<!-- ./../src/action.c 3418 -->
+   <p>N_("Delete rat lines.");
+<!-- ./../src/action.c 3419 -->
 
 <div class="node">
 <a name="DisableVendor-Action"></a>
@@ -8226,17 +8394,18 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.24 DisableVendor</h4>
+<h4 class="subsection">G.1.24 DisableVendor</h4>
 
 <!-- key DisableVendor in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">DisableVendor()</pre>
+<pre class="format"> N_("DisableVendor()");
+</pre>
    </td></tr></table>
 
-   <p>Disables automatic drill size mapping. 
-<!-- ./../src/vendor.c 161 -->
+   <p>N_("Disables automatic drill size mapping.");
+<!-- ./../src/vendor.c 157 -->
 
-   <p><a name="index-vendor-map-874"></a><a name="index-vendor-drill-table-875"></a><a name="index-DisableVendor_0028_0029-876"></a>
+   <p><a name="index-vendor-map-893"></a><a name="index-vendor-drill-table-894"></a><a name="index-DisableVendor_0028_0029-895"></a>
 When drill mapping is enabled, new instances of pins and vias will
 have their drill holes mapped to one of the allowed drill sizes
 specified in the currently loaded vendor drill table.
@@ -8250,15 +8419,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.25 DisperseElements</h4>
+<h4 class="subsection">G.1.25 DisperseElements</h4>
 
 <!-- key DisperseElements in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">DisperseElements(All|Selected)</pre>
+<pre class="format">  N_("DisperseElements(All|Selected)");
+</pre>
    </td></tr></table>
 
-   <p>Disperses elements. 
-<!-- ./../src/action.c 2146 -->
+   <p>N_("Disperses elements.");
+<!-- ./../src/action.c 2143 -->
 
    <p>Normally this is used when starting a board, by selecting all elements
 and then dispersing them.  This scatters the elements around the board
@@ -8275,11 +8445,11 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.26 Display</h4>
+<h4 class="subsection">G.1.26 Display</h4>
 
 <!-- key Display in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Display(NameOnPCB|Description|Value)
+<pre class="format">  N_("Display(NameOnPCB|Description|Value)
 Display(Grid|Redraw)
 Display(CycleClip|CycleCrosshair|Toggle45Degree|ToggleStartDirection)
 Display(ToggleGrid|ToggleRubberBandMode|ToggleUniqueNames)
@@ -8287,11 +8457,12 @@ Display(ToggleMask|ToggleName|ToggleClearLine|ToggleFullPoly|ToggleSnapPin)
 Display(ToggleThindraw|ToggleThindrawPoly|ToggleOrthoMove|ToggleLocalRef)
 Display(ToggleCheckPlanes|ToggleShowDRC|ToggleAutoDRC)
 Display(ToggleLiveRoute|LockNames|OnlyNames)
-Display(Pinout|PinOrPadName)</pre>
+Display(Pinout|PinOrPadName)");
+</pre>
    </td></tr></table>
 
-   <p>Several display-related actions. 
-<!-- ./../src/action.c 2262 -->
+   <p>N_("Several display-related actions.");
+<!-- ./../src/action.c 2259 -->
 
      <dl>
 <dt><code>NameOnPCB</code><br><dt><code>Description</code><br><dt><code>Value</code><dd>Specify whether all elements show their name, description, or value.
@@ -8390,17 +8561,18 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.27 djopt</h4>
+<h4 class="subsection">G.1.27 djopt</h4>
 
 <!-- key djopt in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">djopt(debumpify|unjaggy|simple|vianudge|viatrim|orthopull)
+<pre class="format">djopt(debumpify|unjaggy|simple|vianudge|viatrim|orthopull|splitlines)
 djopt(auto) - all of the above
-djopt(miter)</pre>
+djopt(miter)
+</pre>
    </td></tr></table>
 
    <p>Perform various optimizations on the current board. 
-<!-- ./../src/djopt.c 2853 -->
+<!-- ./../src/djopt.c 2849 -->
 
    <p>The different types of optimizations change your board in order to
 reduce the total trace length and via count.
@@ -8447,15 +8619,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.28 DRC</h4>
+<h4 class="subsection">G.1.28 DRC</h4>
 
 <!-- key DRC in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">DRC()</pre>
+<pre class="format"> N_("DRC()");
+</pre>
    </td></tr></table>
 
-   <p>Invoke the DRC check. 
-<!-- ./../src/action.c 1755 -->
+   <p>N_("Invoke the DRC check.");
+<!-- ./../src/action.c 1742 -->
 
    <p>Note that the design rule check uses the current board rule settings,
 not the current style settings.
@@ -8469,15 +8642,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.29 DumpLibrary</h4>
+<h4 class="subsection">G.1.29 DumpLibrary</h4>
 
 <!-- key DumpLibrary in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">DumpLibrary()</pre>
+<pre class="format"> N_("DumpLibrary()");
+</pre>
    </td></tr></table>
 
-   <p>Display the entire contents of the libraries. 
-<!-- ./../src/action.c 1791 -->
+   <p>N_("Display the entire contents of the libraries.");
+<!-- ./../src/action.c 1778 -->
 
 <div class="node">
 <a name="elementlist-Action"></a>
@@ -8488,15 +8662,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.30 elementlist</h4>
+<h4 class="subsection">G.1.30 elementlist</h4>
 
 <!-- key elementlist in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ElementList(Start|Done|Need,<refdes>,<footprint>,<value>)</pre>
+<pre class="format">  N_("ElementList(Start|Done|Need,<refdes>,<footprint>,<value>)");
+</pre>
    </td></tr></table>
 
-   <p>Adds the given element if it doesn't already exist. 
-<!-- ./../src/action.c 5983 -->
+   <p>N_("Adds the given element if it doesn't already exist.");
+<!-- ./../src/action.c 6012 -->
 
      <dl>
 <dt><code>Start</code><dd>Indicates the start of an element list; call this before any Need
@@ -8524,15 +8699,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.31 elementsetattr</h4>
+<h4 class="subsection">G.1.31 elementsetattr</h4>
 
 <!-- key elementsetattr in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ElementSetAttr(refdes,name[,value])</pre>
+<pre class="format">  N_("ElementSetAttr(refdes,name[,value])");
+</pre>
    </td></tr></table>
 
-   <p>Sets or clears an element-specific attribute. 
-<!-- ./../src/action.c 6176 -->
+   <p>N_("Sets or clears an element-specific attribute.");
+<!-- ./../src/action.c 6205 -->
 
    <p>If a value is specified, the named attribute is added (if not already
 present) or changed (if it is) to the given value.  If the value is
@@ -8547,17 +8723,18 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.32 EnableVendor</h4>
+<h4 class="subsection">G.1.32 EnableVendor</h4>
 
 <!-- key EnableVendor in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">EnableVendor()</pre>
+<pre class="format"> N_("EnableVendor()");
+</pre>
    </td></tr></table>
 
-   <p>Enables automatic drill size mapping. 
-<!-- ./../src/vendor.c 146 -->
+   <p>N_("Enables automatic drill size mapping.");
+<!-- ./../src/vendor.c 142 -->
 
-   <p><a name="index-vendor-map-877"></a><a name="index-vendor-drill-table-878"></a><a name="index-EnableVendor_0028_0029-879"></a>
+   <p><a name="index-vendor-map-896"></a><a name="index-vendor-drill-table-897"></a><a name="index-EnableVendor_0028_0029-898"></a>
 When drill mapping is enabled, new instances of pins and vias will
 have their drill holes mapped to one of the allowed drill sizes
 specified in the currently loaded vendor drill table.  To enable drill
@@ -8573,15 +8750,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.33 execcommand</h4>
+<h4 class="subsection">G.1.33 execcommand</h4>
 
 <!-- key execcommand in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ExecCommand(command)</pre>
+<pre class="format"> N_("ExecCommand(command)");
+</pre>
    </td></tr></table>
 
-   <p>Runs a command. 
-<!-- ./../src/action.c 6234 -->
+   <p>N_("Runs a command.");
+<!-- ./../src/action.c 6263 -->
 
    <p>Runs the given command, which is a system executable.
 
@@ -8594,15 +8772,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.34 ExecuteFile</h4>
+<h4 class="subsection">G.1.34 ExecuteFile</h4>
 
 <!-- key ExecuteFile in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ExecuteFile(filename)</pre>
+<pre class="format"> N_("ExecuteFile(filename)");
+</pre>
    </td></tr></table>
 
-   <p>Run actions from the given file. 
-<!-- ./../src/action.c 5861 -->
+   <p>N_("Run actions from the given file.");
+<!-- ./../src/action.c 5890 -->
 
    <p>Lines starting with <code>#</code> are ignored.
 
@@ -8615,15 +8794,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.35 Flip</h4>
+<h4 class="subsection">G.1.35 Flip</h4>
 
 <!-- key Flip in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Flip(Object|Selected|SelectedElements)</pre>
+<pre class="format"> N_("Flip(Object|Selected|SelectedElements)");
+</pre>
    </td></tr></table>
 
-   <p>Flip an element to the opposite side of the board. 
-<!-- ./../src/action.c 1841 -->
+   <p>N_("Flip an element to the opposite side of the board.");
+<!-- ./../src/action.c 1828 -->
 
    <p>Note that the location of the element will be symmetric about the
 cursor location; i.e. if the part you are pointing at will still be at
@@ -8640,15 +8820,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.36 FontEdit</h4>
+<h4 class="subsection">G.1.36 FontEdit</h4>
 
 <!-- key FontEdit in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">FontEdit()</pre>
+<pre class="format">FontEdit()
+</pre>
    </td></tr></table>
 
    <p>Convert the current font to a PCB for editing. 
-<!-- ./../src/fontmode.c 73 -->
+<!-- ./../src/fontmode.c 69 -->
 
 <div class="node">
 <a name="FontSave-Action"></a>
@@ -8659,15 +8840,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.37 FontSave</h4>
+<h4 class="subsection">G.1.37 FontSave</h4>
 
 <!-- key FontSave in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">FontSave()</pre>
+<pre class="format">FontSave()
+</pre>
    </td></tr></table>
 
    <p>Convert the current PCB back to a font. 
-<!-- ./../src/fontmode.c 173 -->
+<!-- ./../src/fontmode.c 169 -->
 
 <div class="node">
 <a name="FreeRotateBuffer-Action"></a>
@@ -8678,18 +8860,20 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.38 FreeRotateBuffer</h4>
+<h4 class="subsection">G.1.38 FreeRotateBuffer</h4>
 
 <!-- key FreeRotateBuffer in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">FreeRotateBuffer([Angle])</pre>
+<pre class="format">  N_("FreeRotateBuffer([Angle])");
+</pre>
    </td></tr></table>
 
-   <p>Rotates the current paste buffer contents by the specified angle.  The
+   <p>N_("Rotates the current paste buffer contents by the specified angle.  The
 angle is given in degrees.  If no angle is given, the user is prompted
-for one.
+for one. 
+");
+<!-- ./../src/buffer.c 1345 -->
 
-<!-- ./../src/buffer.c 1370 -->
    <p>Rotates the contents of the pastebuffer by an arbitrary angle.  If no
 angle is given, the user is prompted for one.
 
@@ -8702,15 +8886,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.39 GlobalPuller</h4>
+<h4 class="subsection">G.1.39 GlobalPuller</h4>
 
 <!-- key GlobalPuller in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">GlobalPuller()</pre>
+<pre class="format">GlobalPuller()
+</pre>
    </td></tr></table>
 
    <p>Pull all traces tight. 
-<!-- ./../src/puller.c 534 -->
+<!-- ./../src/puller.c 530 -->
 
 <div class="node">
 <a name="h-Action"></a>
@@ -8721,15 +8906,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.40 h</h4>
+<h4 class="subsection">G.1.40 h</h4>
 
 <!-- key h in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">h</pre>
+<pre class="format">h
+</pre>
    </td></tr></table>
 
    <p>Print a help message for commands. 
-<!-- ./../src/command.c 72 -->
+<!-- ./../src/command.c 68 -->
 
    <p>This is one of the command box helper actions.  While it is a regular
 action and can be used like any other action, its name and syntax are
@@ -8745,19 +8931,20 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.41 Import</h4>
+<h4 class="subsection">G.1.41 Import</h4>
 
 <!-- key Import in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Import()
+<pre class="format">  N_("Import()
 Import([gnetlist|make[,source,source,...]])
 Import(setnewpoint[,(mark|center|X,Y)])
 Import(setdisperse,D,units)
+");
 </pre>
    </td></tr></table>
 
-   <p>Import schematics. 
-<!-- ./../src/action.c 6464 -->
+   <p>N_("Import schematics.");
+<!-- ./../src/action.c 6493 -->
 
    <p>Imports element and netlist data from the schematics (or some other
 source).  The first parameter, which is optional, is the mode.  If not
@@ -8860,15 +9047,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.42 l</h4>
+<h4 class="subsection">G.1.42 l</h4>
 
 <!-- key l in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">l [name]</pre>
+<pre class="format">l [name]
+</pre>
    </td></tr></table>
 
    <p>Loads layout data. 
-<!-- ./../src/command.c 99 -->
+<!-- ./../src/command.c 95 -->
 
    <p>Loads a new datafile (layout) and, if confirmed, overwrites any
 existing unsaved data.  The filename and the searchpath
@@ -8890,15 +9078,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.43 le</h4>
+<h4 class="subsection">G.1.43 le</h4>
 
 <!-- key le in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">le [name]</pre>
+<pre class="format">le [name]
+</pre>
    </td></tr></table>
 
    <p>Loads an element into the current buffer. 
-<!-- ./../src/command.c 129 -->
+<!-- ./../src/command.c 125 -->
 
    <p>The filename and the searchpath (<em>elementPath</em>) are passed to the
 command defined by <em>elementCommand</em>.  If no filename is specified
@@ -8918,15 +9107,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.44 LoadFootprint</h4>
+<h4 class="subsection">G.1.44 LoadFootprint</h4>
 
 <!-- key LoadFootprint in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">LoadFootprint(filename[,refdes,value])</pre>
+<pre class="format">  N_("LoadFootprint(filename[,refdes,value])");
+</pre>
    </td></tr></table>
 
-   <p>Loads a single footprint by name. 
-<!-- ./../src/buffer.c 809 -->
+   <p>N_("Loads a single footprint by name.");
+<!-- ./../src/buffer.c 782 -->
 
    <p>Loads a single footprint by name, rather than by reference or through
 the library.  If a refdes and value are specified, those are inserted
@@ -8941,15 +9131,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.45 LoadFrom</h4>
+<h4 class="subsection">G.1.45 LoadFrom</h4>
 
 <!-- key LoadFrom in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">LoadFrom(Layout|LayoutToBuffer|ElementToBuffer|Netlist|Revert,filename)</pre>
+<pre class="format">  N_("LoadFrom(Layout|LayoutToBuffer|ElementToBuffer|Netlist|Revert,filename)");
+</pre>
    </td></tr></table>
 
-   <p>Load layout data from a file. 
-<!-- ./../src/action.c 5031 -->
+   <p>N_("Load layout data from a file.");
+<!-- ./../src/action.c 5058 -->
 
    <p>This action assumes you know what the filename is.  The various GUIs
 should have a similar <code>Load</code> action where the filename is
@@ -8981,17 +9172,18 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.46 LoadVendorFrom</h4>
+<h4 class="subsection">G.1.46 LoadVendorFrom</h4>
 
 <!-- key LoadVendorFrom in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">LoadVendorFrom(filename)</pre>
+<pre class="format"> N_("LoadVendorFrom(filename)");
+</pre>
    </td></tr></table>
 
-   <p>Loads the specified vendor resource file. 
-<!-- ./../src/vendor.c 201 -->
+   <p>N_("Loads the specified vendor resource file.");
+<!-- ./../src/vendor.c 197 -->
 
-   <p><a name="index-vendor-map-880"></a><a name="index-vendor-drill-table-881"></a><a name="index-LoadVendorFrom_0028_0029-882"></a>
+   <p><a name="index-vendor-map-899"></a><a name="index-vendor-drill-table-900"></a><a name="index-LoadVendorFrom_0028_0029-901"></a>
      <dl>
 <dt><var>filename</var><dd>Name of the vendor resource file.  If not specified, the user will
 be prompted to enter one. 
@@ -9006,15 +9198,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.47 m</h4>
+<h4 class="subsection">G.1.47 m</h4>
 
 <!-- key m in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">m [name]</pre>
+<pre class="format">m [name]
+</pre>
    </td></tr></table>
 
    <p>Loads a layout into the current buffer. 
-<!-- ./../src/command.c 157 -->
+<!-- ./../src/command.c 153 -->
 
    <p>The filename and the searchpath (<em>filePath</em>) are passed to the
 command defined by <em>fileCommand</em>. 
@@ -9034,16 +9227,17 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.48 MarkCrosshair</h4>
+<h4 class="subsection">G.1.48 MarkCrosshair</h4>
 
 <!-- key MarkCrosshair in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">MarkCrosshair()
-MarkCrosshair(Center)</pre>
+<pre class="format">  N_("MarkCrosshair()
+MarkCrosshair(Center)");
+</pre>
    </td></tr></table>
 
-   <p>Set/Reset the Crosshair mark. 
-<!-- ./../src/action.c 3502 -->
+   <p>N_("Set/Reset the Crosshair mark.");
+<!-- ./../src/action.c 3503 -->
 
    <p>The “mark” is a small X-shaped target on the display which is
 treated like a second origin (the normal origin is the upper let
@@ -9064,15 +9258,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.49 Message</h4>
+<h4 class="subsection">G.1.49 Message</h4>
 
 <!-- key Message in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Message(message)</pre>
+<pre class="format"> N_("Message(message)");
+</pre>
    </td></tr></table>
 
-   <p>Writes a message to the log window. 
-<!-- ./../src/action.c 1886 -->
+   <p>N_("Writes a message to the log window.");
+<!-- ./../src/action.c 1873 -->
 
    <p>This action displays a message to the log window.  This action is primarily
 provided for use by other programs which may interface with PCB.  If
@@ -9088,16 +9283,17 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.50 MinClearGap</h4>
+<h4 class="subsection">G.1.50 MinClearGap</h4>
 
 <!-- key MinClearGap in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">MinClearGap(delta)
-MinClearGap(Selected, delta)</pre>
+<pre class="format">  N_("MinClearGap(delta)
+MinClearGap(Selected, delta)");
+</pre>
    </td></tr></table>
 
-   <p>Ensures that polygons are a minimum distance from objects. 
-<!-- ./../src/action.c 3827 -->
+   <p>N_("Ensures that polygons are a minimum distance from objects.");
+<!-- ./../src/action.c 3834 -->
 
    <p>Checks all specified objects, and increases the polygon clearance if
 needed to ensure a minimum distance between their edges and the
@@ -9112,16 +9308,17 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.51 MinMaskGap</h4>
+<h4 class="subsection">G.1.51 MinMaskGap</h4>
 
 <!-- key MinMaskGap in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">MinMaskGap(delta)
-MinMaskGap(Selected, delta)</pre>
+<pre class="format">  N_("MinMaskGap(delta)
+MinMaskGap(Selected, delta)");
+</pre>
    </td></tr></table>
 
-   <p>Ensures the mask is a minimum distance from pins and pads. 
-<!-- ./../src/action.c 3752 -->
+   <p>N_("Ensures the mask is a minimum distance from pins and pads.");
+<!-- ./../src/action.c 3759 -->
 
    <p>Checks all specified pins and/or pads, and increases the mask if
 needed to ensure a minimum distance between the pin or pad edge and
@@ -9136,18 +9333,19 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.52 Mode</h4>
+<h4 class="subsection">G.1.52 Mode</h4>
 
 <!-- key Mode in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Mode(Arc|Arrow|Copy|InsertPoint|Line|Lock|Move|None|PasteBuffer)
+<pre class="format">  N_("Mode(Arc|Arrow|Copy|InsertPoint|Line|Lock|Move|None|PasteBuffer)
 Mode(Polygon|Rectangle|Remove|Rotate|Text|Thermal|Via)
 Mode(Notify|Release|Cancel|Stroke)
-Mode(Save|Restore)</pre>
+Mode(Save|Restore)");
+</pre>
    </td></tr></table>
 
-   <p>Change or use the tool mode. 
-<!-- ./../src/action.c 2612 -->
+   <p>N_("Change or use the tool mode.");
+<!-- ./../src/action.c 2613 -->
 
      <dl>
 <dt><code>Arc</code><dt><code>Arrow</code><dt><code>Copy</code><dt><code>InsertPoint</code><dt><code>Line</code><dt><code>Lock</code><dt><code>Move</code><dt><code>None</code><dt><code>PasteBuffer</code><dt><code>Polygon</code><dt><code>Rectangle</code><dt><code>Remove</code><dt><code>Rotate</code><dt><code>Text</code><dt><code>Thermal</code><dt><code>Via</code><dd>Select the indicated tool.
@@ -9182,15 +9380,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.53 MorphPolygon</h4>
+<h4 class="subsection">G.1.53 MorphPolygon</h4>
 
 <!-- key MorphPolygon in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">MorphPolygon(Object|Selected)</pre>
+<pre class="format"> N_("MorphPolygon(Object|Selected)");
+</pre>
    </td></tr></table>
 
-   <p>Converts dead polygon islands into separate polygons. 
-<!-- ./../src/action.c 4087 -->
+   <p>N_("Converts dead polygon islands into separate polygons.");
+<!-- ./../src/action.c 4094 -->
 
    <p>If a polygon is divided into unconnected "islands", you can use
 this command to convert the otherwise disappeared islands into
@@ -9207,15 +9406,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.54 MoveLayer</h4>
+<h4 class="subsection">G.1.54 MoveLayer</h4>
 
 <!-- key MoveLayer in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">MoveLayer(old,new)</pre>
+<pre class="format">MoveLayer(old,new)
+</pre>
    </td></tr></table>
 
    <p>Moves/Creates/Deletes Layers. 
-<!-- ./../src/move.c 1091 -->
+<!-- ./../src/move.c 1090 -->
 
    <p>Moves a layer, creates a new layer, or deletes a layer.
 
@@ -9253,15 +9453,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.55 MoveObject</h4>
+<h4 class="subsection">G.1.55 MoveObject</h4>
 
 <!-- key MoveObject in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">MoveObject(X,Y,dim)</pre>
+<pre class="format"> N_("MoveObject(X,Y,dim)");
+</pre>
    </td></tr></table>
 
-   <p>Moves the object under the crosshair. 
-<!-- ./../src/action.c 5567 -->
+   <p>N_("Moves the object under the crosshair.");
+<!-- ./../src/action.c 5596 -->
 
    <p>The <code>X</code> and <code>Y</code> are treated like <code>delta</code> is for many
 other objects.  For each, if it's prefixed by <code>+</code> or <code>-</code>,
@@ -9278,15 +9479,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.56 MoveToCurrentLayer</h4>
+<h4 class="subsection">G.1.56 MoveToCurrentLayer</h4>
 
 <!-- key MoveToCurrentLayer in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">MoveToCurrentLayer(Object|SelectedObjects)</pre>
+<pre class="format">  N_("MoveToCurrentLayer(Object|SelectedObjects)");
+</pre>
    </td></tr></table>
 
-   <p>Moves objects to the current layer. 
-<!-- ./../src/action.c 5609 -->
+   <p>N_("Moves objects to the current layer.");
+<!-- ./../src/action.c 5638 -->
 
    <p>Note that moving an element from a component layer to a solder layer,
 or from solder to component, won't automatically flip it.  Use the
@@ -9301,17 +9503,18 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.57 Netlist</h4>
+<h4 class="subsection">G.1.57 Netlist</h4>
 
 <!-- key Netlist in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Net(find|select|rats|norats|clear[,net[,pin]])
 Net(freeze|thaw|forcethaw)
-Net(add,net,pin)</pre>
+Net(add,net,pin)
+</pre>
    </td></tr></table>
 
    <p>Perform various actions on netlists. 
-<!-- ./../src/netlist.c 289 -->
+<!-- ./../src/netlist.c 285 -->
 
    <p>Each of these actions apply to a specified set of nets.  <var>net</var> and
 <var>pin</var> are patterns which match one or more nets or pins; these
@@ -9359,15 +9562,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.58 New</h4>
+<h4 class="subsection">G.1.58 New</h4>
 
 <!-- key New in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">New([name])</pre>
+<pre class="format"> N_("New([name])");
+</pre>
    </td></tr></table>
 
-   <p>Starts a new layout. 
-<!-- ./../src/action.c 5093 -->
+   <p>N_("Starts a new layout.");
+<!-- ./../src/action.c 5120 -->
 
    <p>If a name is not given, one is prompted for.
 
@@ -9380,15 +9584,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.59 OptAutoOnly</h4>
+<h4 class="subsection">G.1.59 OptAutoOnly</h4>
 
 <!-- key OptAutoOnly in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">OptAutoOnly()</pre>
+<pre class="format">OptAutoOnly()
+</pre>
    </td></tr></table>
 
    <p>Toggles the optimize-only-autorouted flag. 
-<!-- ./../src/djopt.c 129 -->
+<!-- ./../src/djopt.c 125 -->
 
    <p>The original purpose of the trace optimizer was to clean up the traces
 created by the various autorouters that have been used with PCB.  When
@@ -9407,18 +9612,19 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.60 PasteBuffer</h4>
+<h4 class="subsection">G.1.60 PasteBuffer</h4>
 
 <!-- key PasteBuffer in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">PasteBuffer(AddSelected|Clear|1..MAX_BUFFER)
+<pre class="format">  N_("PasteBuffer(AddSelected|Clear|1..MAX_BUFFER)
 PasteBuffer(Rotate, 1..3)
 PasteBuffer(Convert|Save|Restore|Mirror)
-PasteBuffer(ToLayout, X, Y, units)</pre>
+PasteBuffer(ToLayout, X, Y, units)");
+</pre>
    </td></tr></table>
 
-   <p>Various operations on the paste buffer. 
-<!-- ./../src/action.c 5153 -->
+   <p>N_("Various operations on the paste buffer.");
+<!-- ./../src/action.c 5181 -->
 
    <p>There are a number of paste buffers; the actual limit is a
 compile-time constant <code>MAX_BUFFER</code> in <samp><span class="file">globalconst.h</span></samp>.  It
@@ -9465,15 +9671,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.61 Polygon</h4>
+<h4 class="subsection">G.1.61 Polygon</h4>
 
 <!-- key Polygon in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Polygon(Close|PreviousPoint)</pre>
+<pre class="format"> N_("Polygon(Close|PreviousPoint)");
+</pre>
    </td></tr></table>
 
-   <p>Some polygon related stuff. 
-<!-- ./../src/action.c 5503 -->
+   <p>N_("Some polygon related stuff.");
+<!-- ./../src/action.c 5532 -->
 
    <p>Polygons need a special action routine to make life easier.
 
@@ -9495,15 +9702,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.62 Puller</h4>
+<h4 class="subsection">G.1.62 Puller</h4>
 
 <!-- key Puller in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Puller()</pre>
+<pre class="format">Puller()
+</pre>
    </td></tr></table>
 
    <p>Pull an arc-line junction tight. 
-<!-- ./../src/puller.c 411 -->
+<!-- ./../src/puller.c 407 -->
 
    <p>The <code>Puller()</code> action is a special-purpose optimization.  When
 invoked while the crosshair is over the junction of an arc and a line,
@@ -9526,15 +9734,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.63 q</h4>
+<h4 class="subsection">G.1.63 q</h4>
 
 <!-- key q in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">q</pre>
+<pre class="format">q
+</pre>
    </td></tr></table>
 
    <p>Quits the application after confirming. 
-<!-- ./../src/command.c 185 -->
+<!-- ./../src/command.c 181 -->
 
    <p>If you have unsaved changes, you will be prompted to confirm (or
 save) before quitting.
@@ -9554,15 +9763,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.64 q!</h4>
+<h4 class="subsection">G.1.64 q!</h4>
 
 <!-- key q! in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">q!</pre>
+<pre class="format">q!
+</pre>
    </td></tr></table>
 
    <p>Quits the application without confirming. 
-<!-- ./../src/command.c 199 -->
+<!-- ./../src/command.c 195 -->
 
    <p>Note that this command neither saves your data nor prompts for
 confirmation.
@@ -9581,15 +9791,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.65 Quit</h4>
+<h4 class="subsection">G.1.65 Quit</h4>
 
 <!-- key Quit in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Quit()</pre>
+<pre class="format"> N_("Quit()");
+</pre>
    </td></tr></table>
 
-   <p>Quits the application after confirming. 
-<!-- ./../src/action.c 2071 -->
+   <p>N_("Quits the application after confirming.");
+<!-- ./../src/action.c 2067 -->
 
    <p>If you have unsaved changes, you will be prompted to confirm (or
 save) before quitting.
@@ -9603,15 +9814,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.66 Redo</h4>
+<h4 class="subsection">G.1.66 Redo</h4>
 
 <!-- key Redo in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Redo()</pre>
+<pre class="format"> N_("Redo()");
+</pre>
    </td></tr></table>
 
-   <p>Redo recent“undo”operations. 
-<!-- ./../src/action.c 5468 -->
+   <p>N_("Redo recent“undo”operations.");
+<!-- ./../src/action.c 5497 -->
 
    <p>This routine allows you to recover from the last undo command.  You
 might want to do this if you thought that undo was going to revert
@@ -9633,15 +9845,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.67 RemoveSelected</h4>
+<h4 class="subsection">G.1.67 RemoveSelected</h4>
 
 <!-- key RemoveSelected in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">RemoveSelected()</pre>
+<pre class="format"> N_("RemoveSelected()");
+</pre>
    </td></tr></table>
 
-   <p>Removes any selected objects. 
-<!-- ./../src/action.c 2832 -->
+   <p>N_("Removes any selected objects.");
+<!-- ./../src/action.c 2833 -->
 
 <div class="node">
 <a name="Renumber-Action"></a>
@@ -9652,17 +9865,18 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.68 Renumber</h4>
+<h4 class="subsection">G.1.68 Renumber</h4>
 
 <!-- key Renumber in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Renumber()
-Renumber(filename)</pre>
+<pre class="format"> N_("Renumber()
+Renumber(filename)");
+</pre>
    </td></tr></table>
 
-   <p>Renumber all elements.  The changes will be recorded to filename
-for use in backannotating these changes to the schematic. 
-<!-- ./../src/action.c 2848 -->
+   <p>N_("Renumber all elements.  The changes will be recorded to filename
+for use in backannotating these changes to the schematic.");
+<!-- ./../src/action.c 2849 -->
 
 <div class="node">
 <a name="Report-Action"></a>
@@ -9673,15 +9887,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.69 Report</h4>
+<h4 class="subsection">G.1.69 Report</h4>
 
 <!-- key Report in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Report(Object|DrillReport|FoundPins|NetLength|AllNetLengths|[,name])</pre>
+<pre class="format">  N_("Report(Object|DrillReport|FoundPins|NetLength|AllNetLengths|[,name])");
+</pre>
    </td></tr></table>
 
-   <p>Produce various report. 
-<!-- ./../src/report.c 942 -->
+   <p>N_("Produce various report.");
+<!-- ./../src/report.c 943 -->
 
      <dl>
 <dt><code>Object</code><dd>The object under the crosshair will be reported, describing various
@@ -9711,14 +9926,15 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.70 ReportDialog</h4>
+<h4 class="subsection">G.1.70 ReportDialog</h4>
 
 <!-- key ReportDialog in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ReportDialog()</pre>
+<pre class="format"> N_("ReportDialog()");
+</pre>
    </td></tr></table>
 
-   <p>Report on the object under the crosshair
+   <p>N_("Report on the object under the crosshair");
 <!-- ./../src/report.c 125 -->
 
    <p>This is a shortcut for <code>Report(Object)</code>.
@@ -9732,15 +9948,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.71 RipUp</h4>
+<h4 class="subsection">G.1.71 RipUp</h4>
 
 <!-- key RipUp in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">RipUp(All|Selected|Element)</pre>
+<pre class="format"> N_("RipUp(All|Selected|Element)");
+</pre>
    </td></tr></table>
 
-   <p>Ripup auto-routed tracks, or convert an element to parts. 
-<!-- ./../src/action.c 3199 -->
+   <p>N_("Ripup auto-routed tracks, or convert an element to parts.");
+<!-- ./../src/action.c 3200 -->
 
      <dl>
 <dt><code>All</code><dd>Removes all lines and vias which were created by the autorouter.
@@ -9762,15 +9979,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.72 rn</h4>
+<h4 class="subsection">G.1.72 rn</h4>
 
 <!-- key rn in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">rn [name]</pre>
+<pre class="format">rn [name]
+</pre>
    </td></tr></table>
 
    <p>Reads netlist. 
-<!-- ./../src/command.c 214 -->
+<!-- ./../src/command.c 210 -->
 
    <p>If no filename is given a file select box will pop up.  The file is
 read via the command defined by the <em>RatCommand</em> resource. The
@@ -9794,15 +10012,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.73 RouteStyle</h4>
+<h4 class="subsection">G.1.73 RouteStyle</h4>
 
 <!-- key RouteStyle in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">RouteStyle(1|2|3|4)</pre>
+<pre class="format"> N_("RouteStyle(1|2|3|4)");
+</pre>
    </td></tr></table>
 
-   <p>Copies the indicated routing style into the current sizes. 
-<!-- ./../src/action.c 5535 -->
+   <p>N_("Copies the indicated routing style into the current sizes.");
+<!-- ./../src/action.c 5564 -->
 
 <div class="node">
 <a name="s-Action"></a>
@@ -9813,15 +10032,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.74 s</h4>
+<h4 class="subsection">G.1.74 s</h4>
 
 <!-- key s in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">s [name]</pre>
+<pre class="format">s [name]
+</pre>
    </td></tr></table>
 
    <p>Saves layout data. 
-<!-- ./../src/command.c 244 -->
+<!-- ./../src/command.c 240 -->
 
    <p>Data and the filename are passed to the command defined by the
 resource <em>saveCommand</em>. It must read the layout data from
@@ -9842,16 +10062,17 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.75 SaveSettings</h4>
+<h4 class="subsection">G.1.75 SaveSettings</h4>
 
 <!-- key SaveSettings in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">SaveSettings()
-SaveSettings(local)</pre>
+<pre class="format">  N_("SaveSettings()
+SaveSettings(local)");
+</pre>
    </td></tr></table>
 
-   <p>Saves settings. 
-<!-- ./../src/action.c 5015 -->
+   <p>N_("Saves settings.");
+<!-- ./../src/action.c 5042 -->
 
    <p>If you pass no arguments, the settings are stored in
 <code>$HOME/.pcb/settings</code>.  If you pass the word <code>local</code> they're
@@ -9866,17 +10087,18 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.76 SaveTo</h4>
+<h4 class="subsection">G.1.76 SaveTo</h4>
 
 <!-- key SaveTo in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">SaveTo(Layout|LayoutAs,filename)
+<pre class="format">  N_("SaveTo(Layout|LayoutAs,filename)
 SaveTo(AllConnections|AllUnusedPins|ElementConnections,filename)
-SaveTo(PasteBuffer,filename)</pre>
+SaveTo(PasteBuffer,filename)");
+</pre>
    </td></tr></table>
 
-   <p>Saves data to a file. 
-<!-- ./../src/action.c 4919 -->
+   <p>N_("Saves data to a file.");
+<!-- ./../src/action.c 4946 -->
 
      <dl>
 <dt><code>Layout</code><dd>Saves the current layout.
@@ -9902,21 +10124,22 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.77 Select</h4>
+<h4 class="subsection">G.1.77 Select</h4>
 
 <!-- key Select in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Select(Object|ToggleObject)
+<pre class="format">  N_("Select(Object|ToggleObject)
 Select(All|Block|Connection)
 Select(ElementByName|ObjectByName|PadByName|PinByName)
 Select(ElementByName|ObjectByName|PadByName|PinByName, Name)
 Select(TextByName|ViaByName|NetByName)
 Select(TextByName|ViaByName|NetByName, Name)
-Select(Convert)</pre>
+Select(Convert)");
+</pre>
    </td></tr></table>
 
-   <p>Toggles or sets the selection. 
-<!-- ./../src/action.c 4651 -->
+   <p>N_("Toggles or sets the selection.");
+<!-- ./../src/action.c 4658 -->
 
      <dl>
 <dt><code>ElementByName</code><br><dt><code>ObjectByName</code><br><dt><code>PadByName</code><br><dt><code>PinByName</code><br><dt><code>TextByName</code><br><dt><code>ViaByName</code><br><dt><code>NetByName</code><dd>
@@ -9931,7 +10154,9 @@ type specified are selected.
 
      <br><dt><code>All</code><dd>Selects all objects on the board.
 
-     <br><dt><code>Connection</code><dd>Selects all connections with the “found” flag set.
+     <br><dt><code>Found</code><dd>Selects all connections with the “found” flag set.
+
+     <br><dt><code>Connection</code><dd>Selects all connections with the “connected” flag set.
 
      <br><dt><code>Convert</code><dd>Converts the selected objects to an element.  This uses the highest
 numbered paste buffer.
@@ -9947,19 +10172,20 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.78 SetFlag</h4>
+<h4 class="subsection">G.1.78 SetFlag</h4>
 
 <!-- key SetFlag in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">SetFlag(Object|Selected|SelectedObjects, flag)
+<pre class="format">  N_("SetFlag(Object|Selected|SelectedObjects, flag)
 SetFlag(SelectedLines|SelectedPins|SelectedVias, flag)
 SetFlag(SelectedPads|SelectedTexts|SelectedNames, flag)
 SetFlag(SelectedElements, flag)
-flag = square | octagon | thermal | join</pre>
+flag = square | octagon | thermal | join");
+</pre>
    </td></tr></table>
 
-   <p>Sets flags on objects. 
-<!-- ./../src/action.c 5716 -->
+   <p>N_("Sets flags on objects.");
+<!-- ./../src/action.c 5745 -->
 
    <p>Turns the given flag on, regardless of its previous setting.  See
 <code>ChangeFlag</code>.
@@ -9975,15 +10201,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.79 SetOctagon</h4>
+<h4 class="subsection">G.1.79 SetOctagon</h4>
 
 <!-- key SetOctagon in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">SetOctagon(Object|ToggleObject|SelectedElements|Selected)</pre>
+<pre class="format">  N_("SetOctagon(Object|ToggleObject|SelectedElements|Selected)");
+</pre>
    </td></tr></table>
 
-   <p>Sets the octagon-flag of objects. 
-<!-- ./../src/action.c 4459 -->
+   <p>N_("Sets the octagon-flag of objects.");
+<!-- ./../src/action.c 4466 -->
 
    <p>Pins, pads, and vias can have various shapes.  All may be round.  Pins
 and pads may be square (obviously "square" pads are usually
@@ -10005,15 +10232,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.80 SetSame</h4>
+<h4 class="subsection">G.1.80 SetSame</h4>
 
 <!-- key SetSame in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">SetSame()</pre>
+<pre class="format"> N_("SetSame()");
+</pre>
    </td></tr></table>
 
-   <p>Sets current layer and sizes to match indicated item. 
-<!-- ./../src/action.c 5648 -->
+   <p>N_("Sets current layer and sizes to match indicated item.");
+<!-- ./../src/action.c 5677 -->
 
    <p>When invoked over any line, arc, polygon, or via, this changes the
 current layer to be the layer that item is on, and changes the current
@@ -10028,15 +10256,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.81 SetSquare</h4>
+<h4 class="subsection">G.1.81 SetSquare</h4>
 
 <!-- key SetSquare in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">SetSquare(ToggleObject|SelectedElements|SelectedPins)</pre>
+<pre class="format">  N_("SetSquare(ToggleObject|SelectedElements|SelectedPins)");
+</pre>
    </td></tr></table>
 
-   <p>sets the square-flag of objects. 
-<!-- ./../src/action.c 4301 -->
+   <p>N_("sets the square-flag of objects.");
+<!-- ./../src/action.c 4308 -->
 
    <p>Note that <code>Pins</code> means pins and pads.
 
@@ -10060,21 +10289,23 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.82 SetThermal</h4>
+<h4 class="subsection">G.1.82 SetThermal</h4>
 
 <!-- key SetThermal in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">SetThermal(Object|SelectedPins|SelectedVias|Selected, Style)</pre>
+<pre class="format">SetThermal(Object|SelectedPins|SelectedVias|Selected, Style)
+</pre>
    </td></tr></table>
 
-   <p>Set the thermal (on the current layer) of pins or vias to the given style. 
+   <p>N_("Set the thermal (on the current layer) of pins or vias to the given style. 
 Style = 0 means no thermal. 
 Style = 1 has diagonal fingers with sharp edges. 
 Style = 2 has horizontal and vertical fingers with sharp edges. 
 Style = 3 is a solid connection to the plane.Style = 4 has diagonal fingers with rounded edges. 
-Style = 5 has horizontal and vertical fingers with rounded edges.
+Style = 5 has horizontal and vertical fingers with rounded edges. 
+");
+<!-- ./../src/action.c 1899 -->
 
-<!-- ./../src/action.c 1912 -->
    <p>This changes how/whether pins or vias connect to any rectangle or polygon
 on the current layer. The first argument can specify one object, or all
 selected pins, or all selected vias, or all selected pins and vias. 
@@ -10099,15 +10330,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.83 SetValue</h4>
+<h4 class="subsection">G.1.83 SetValue</h4>
 
 <!-- key SetValue in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">SetValue(Grid|Line|LineSize|Text|TextScale|ViaDrillingHole|Via|ViaSize, delta)</pre>
+<pre class="format">  N_("SetValue(Grid|Line|LineSize|Text|TextScale|ViaDrillingHole|Via|ViaSize, delta)");
+</pre>
    </td></tr></table>
 
-   <p>Change various board-wide values and sizes. 
-<!-- ./../src/action.c 1996 -->
+   <p>N_("Change various board-wide values and sizes.");
+<!-- ./../src/action.c 1983 -->
 
      <dl>
 <dt><code>ViaDrillingHole</code><dd>Changes the diameter of the drill for new vias.
@@ -10131,15 +10363,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.84 ToggleHideName</h4>
+<h4 class="subsection">G.1.84 ToggleHideName</h4>
 
 <!-- key ToggleHideName in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ToggleHideName(Object|SelectedElements)</pre>
+<pre class="format">  N_("ToggleHideName(Object|SelectedElements)");
+</pre>
    </td></tr></table>
 
-   <p>Toggles the visibility of element names. 
-<!-- ./../src/action.c 4134 -->
+   <p>N_("Toggles the visibility of element names.");
+<!-- ./../src/action.c 4141 -->
 
    <p>If names are hidden you won't see them on the screen and they will not
 appear on the silk layer when you print the layout.
@@ -10153,17 +10386,18 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.85 ToggleVendor</h4>
+<h4 class="subsection">G.1.85 ToggleVendor</h4>
 
 <!-- key ToggleVendor in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ToggleVendor()</pre>
+<pre class="format"> N_("ToggleVendor()");
+</pre>
    </td></tr></table>
 
-   <p>Toggles the state of automatic drill size mapping. 
-<!-- ./../src/vendor.c 128 -->
+   <p>N_("Toggles the state of automatic drill size mapping.");
+<!-- ./../src/vendor.c 124 -->
 
-   <p><a name="index-vendor-map-883"></a><a name="index-vendor-drill-table-884"></a><a name="index-ToggleVendor_0028_0029-885"></a>
+   <p><a name="index-vendor-map-902"></a><a name="index-vendor-drill-table-903"></a><a name="index-ToggleVendor_0028_0029-904"></a>
 When drill mapping is enabled, new instances of pins and vias will
 have their drill holes mapped to one of the allowed drill sizes
 specified in the currently loaded vendor drill table.  To enable drill
@@ -10179,16 +10413,17 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.86 Undo</h4>
+<h4 class="subsection">G.1.86 Undo</h4>
 
 <!-- key Undo in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Undo()
-Undo(ClearList)</pre>
+<pre class="format"> N_("Undo()
+Undo(ClearList)");
+</pre>
    </td></tr></table>
 
-   <p>Undo recent changes. 
-<!-- ./../src/action.c 5304 -->
+   <p>N_("Undo recent changes.");
+<!-- ./../src/action.c 5332 -->
 
    <p>The unlimited undo feature of <code>Pcb</code> allows you to recover from
 most operations that materially affect you work.  Calling
@@ -10210,17 +10445,18 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.87 UnloadVendor</h4>
+<h4 class="subsection">G.1.87 UnloadVendor</h4>
 
 <!-- key UnloadVendor in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">UnloadVendor()</pre>
+<pre class="format"> N_("UnloadVendor()");
+</pre>
    </td></tr></table>
 
-   <p>Unloads the current vendor drill mapping table. 
-<!-- ./../src/vendor.c 176 -->
+   <p>N_("Unloads the current vendor drill mapping table.");
+<!-- ./../src/vendor.c 172 -->
 
-   <p><a name="index-vendor-map-886"></a><a name="index-vendor-drill-table-887"></a><a name="index-UnloadVendor_0028_0029-888"></a>
+   <p><a name="index-vendor-map-905"></a><a name="index-vendor-drill-table-906"></a><a name="index-UnloadVendor_0028_0029-907"></a>
 
 <div class="node">
 <a name="Unselect-Action"></a>
@@ -10231,20 +10467,21 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.88 Unselect</h4>
+<h4 class="subsection">G.1.88 Unselect</h4>
 
 <!-- key Unselect in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Unselect(All|Block|Connection)
+<pre class="format">  N_("Unselect(All|Block|Connection)
 Unselect(ElementByName|ObjectByName|PadByName|PinByName)
 Unselect(ElementByName|ObjectByName|PadByName|PinByName, Name)
 Unselect(TextByName|ViaByName)
 Unselect(TextByName|ViaByName, Name)
+");
 </pre>
    </td></tr></table>
 
-   <p>Unselects the object at the pointer location or the specified objects. 
-<!-- ./../src/action.c 4803 -->
+   <p>N_("Unselects the object at the pointer location or the specified objects.");
+<!-- ./../src/action.c 4820 -->
 
      <dl>
 <dt><code>All</code><dd>Unselect all objects.
@@ -10270,15 +10507,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.89 w</h4>
+<h4 class="subsection">G.1.89 w</h4>
 
 <!-- key w in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">w [name]</pre>
+<pre class="format">w [name]
+</pre>
    </td></tr></table>
 
    <p>Saves layout data. 
-<!-- ./../src/command.c 250 -->
+<!-- ./../src/command.c 246 -->
 
    <p>This commands has been added for the convenience of <code>vi</code> users
 and has the same functionality as <code>s</code>.
@@ -10296,15 +10534,16 @@ Up: <a rel="up" accesskey="u" href="#core-actions">core actions</a>
 
 </div>
 
-<h4 class="subsection">F.1.90 wq</h4>
+<h4 class="subsection">G.1.90 wq</h4>
 
 <!-- key wq in hid -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">wq</pre>
+<pre class="format">wq
+</pre>
    </td></tr></table>
 
    <p>Saves the layout data and quits. 
-<!-- ./../src/command.c 291 -->
+<!-- ./../src/command.c 287 -->
 
    <p>This command has been added for the convenience of <code>vi</code> users and
 has the same functionality as <code>s</code> combined with <code>q</code>.
@@ -10323,9 +10562,9 @@ Up: <a rel="up" accesskey="u" href="#Action-Reference">Action Reference</a>
 
 </div>
 
-<h3 class="section">F.2 common actions</h3>
+<h3 class="section">G.2 common actions</h3>
 
-<!-- ./../src/hid/common/actions.c 425 -->
+<!-- ./../src/hid/common/actions.c 421 -->
 <ul class="menu">
 <li><a accesskey="1" href="#LayersChanged-Action">LayersChanged Action</a>:  Tells the GUI that the layers have changed. 
 <li><a accesskey="2" href="#LibraryChanged-Action">LibraryChanged Action</a>:  Tells the GUI that the libraries have changed. 
@@ -10341,15 +10580,16 @@ Up: <a rel="up" accesskey="u" href="#common-actions">common actions</a>
 
 </div>
 
-<h4 class="subsection">F.2.1 LayersChanged</h4>
+<h4 class="subsection">G.2.1 LayersChanged</h4>
 
 <!-- key LayersChanged in hid common -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">LayersChanged()</pre>
+<pre class="format">LayersChanged()
+</pre>
    </td></tr></table>
 
    <p>Tells the GUI that the layers have changed. 
-<!-- ./../src/hid/common/actions.c 446 -->
+<!-- ./../src/hid/common/actions.c 442 -->
 
    <p>This includes layer names, colors, stacking order, visibility, etc.
 
@@ -10368,15 +10608,16 @@ Up: <a rel="up" accesskey="u" href="#common-actions">common actions</a>
 
 </div>
 
-<h4 class="subsection">F.2.2 LibraryChanged</h4>
+<h4 class="subsection">G.2.2 LibraryChanged</h4>
 
 <!-- key LibraryChanged in hid common -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">LibraryChanged()</pre>
+<pre class="format">LibraryChanged()
+</pre>
    </td></tr></table>
 
    <p>Tells the GUI that the libraries have changed. 
-<!-- ./../src/hid/common/actions.c 451 -->
+<!-- ./../src/hid/common/actions.c 447 -->
 
    <p>This is one of a number of actions which are part of the HID
 interface.  The core functions use these actions to tell the current
@@ -10393,15 +10634,16 @@ Up: <a rel="up" accesskey="u" href="#common-actions">common actions</a>
 
 </div>
 
-<h4 class="subsection">F.2.3 NetlistChanged</h4>
+<h4 class="subsection">G.2.3 NetlistChanged</h4>
 
 <!-- key NetlistChanged in hid common -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">NetlistChanged()</pre>
+<pre class="format">NetlistChanged()
+</pre>
    </td></tr></table>
 
    <p>Tells the GUI that the netlist has changed. 
-<!-- ./../src/hid/common/actions.c 441 -->
+<!-- ./../src/hid/common/actions.c 437 -->
 
    <p>This is one of a number of actions which are part of the HID
 interface.  The core functions use these actions to tell the current
@@ -10418,15 +10660,16 @@ Up: <a rel="up" accesskey="u" href="#common-actions">common actions</a>
 
 </div>
 
-<h4 class="subsection">F.2.4 PCBChanged</h4>
+<h4 class="subsection">G.2.4 PCBChanged</h4>
 
 <!-- key PCBChanged in hid common -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">PCBChanged([revert])</pre>
+<pre class="format">PCBChanged([revert])
+</pre>
    </td></tr></table>
 
    <p>Tells the GUI that the whole PCB has changed. The optional“revert"parameter can be used as a hint to the GUI that the same design is beingreloaded, and that it might keep some viewport settings
-<!-- ./../src/hid/common/actions.c 431 -->
+<!-- ./../src/hid/common/actions.c 427 -->
 
    <p>This is one of a number of actions which are part of the HID
 interface.  The core functions use these actions to tell the current
@@ -10442,15 +10685,16 @@ Up: <a rel="up" accesskey="u" href="#common-actions">common actions</a>
 
 </div>
 
-<h4 class="subsection">F.2.5 RouteStylesChanged</h4>
+<h4 class="subsection">G.2.5 RouteStylesChanged</h4>
 
 <!-- key RouteStylesChanged in hid common -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">RouteStylesChanged()</pre>
+<pre class="format">RouteStylesChanged()
+</pre>
    </td></tr></table>
 
    <p>Tells the GUI that the routing styles have changed. 
-<!-- ./../src/hid/common/actions.c 436 -->
+<!-- ./../src/hid/common/actions.c 432 -->
 
    <p>This is one of a number of actions which are part of the HID
 interface.  The core functions use these actions to tell the current
@@ -10467,15 +10711,15 @@ Up: <a rel="up" accesskey="u" href="#Action-Reference">Action Reference</a>
 
 </div>
 
-<h3 class="section">F.3 gtk actions</h3>
+<h3 class="section">G.3 gtk actions</h3>
 
 <ul class="menu">
 <li><a accesskey="1" href="#gtk-About-Action">gtk About Action</a>:  N_("Tell the user about this version of PCB.");
-<li><a accesskey="2" href="#gtk-AdjustStyle-Action">gtk AdjustStyle Action</a>:  Open the window which allows editing of the route styles. 
+<li><a accesskey="2" href="#gtk-AdjustStyle-Action">gtk AdjustStyle Action</a>:      N_("Open the window which allows editing of the route styles.");
 <li><a accesskey="3" href="#gtk-Center-Action">gtk Center Action</a>:  N_("Moves the pointer to the center of the window.");
 <li><a accesskey="4" href="#gtk-Cursor-Action">gtk Cursor Action</a>:  N_("Move the cursor.");
 <li><a accesskey="5" href="#gtk-DoWindows-Action">gtk DoWindows Action</a>:  N_("Open various GUI windows.");
-<li><a accesskey="6" href="#gtk-EditLayerGroups-Action">gtk EditLayerGroups Action</a>:  Open the preferences window which allows editing of the layer groups. 
+<li><a accesskey="6" href="#gtk-EditLayerGroups-Action">gtk EditLayerGroups Action</a>:      N_("Open the preferences window which allows editing of the layer groups.");
 <li><a accesskey="7" href="#gtk-GetXY-Action">gtk GetXY Action</a>:  N_("Get a coordinate.");
 <li><a accesskey="8" href="#gtk-ImportGUI-Action">gtk ImportGUI Action</a>:  N_("Asks user which schematics to import into PCB. 
 ");
@@ -10488,10 +10732,10 @@ must be specified as the optional second argument.");
 <li><a href="#gtk-Print-Action">gtk Print Action</a>:  N_("Print the layout.");
 <li><a href="#gtk-PrintCalibrate-Action">gtk PrintCalibrate Action</a>:  N_("Calibrate the printer.");
 <li><a href="#gtk-Save-Action">gtk Save Action</a>:  N_("Save layout and/or element data to a user-selected file.");
-<li><a href="#gtk-SelectLayer-Action">gtk SelectLayer Action</a>:  Select which layer is the current layer. 
+<li><a href="#gtk-SelectLayer-Action">gtk SelectLayer Action</a>:      N_("Select which layer is the current layer.");
 <li><a href="#gtk-SetUnits-Action">gtk SetUnits Action</a>:  N_("Set the default measurement units.");
 <li><a href="#gtk-SwapSides-Action">gtk SwapSides Action</a>:  N_("Swaps the side of the board you're looking at.");
-<li><a href="#gtk-ToggleView-Action">gtk ToggleView Action</a>:  Toggle the visibility of the specified layer or layer group. 
+<li><a href="#gtk-ToggleView-Action">gtk ToggleView Action</a>:      N_("Toggle the visibility of the specified layer or layer group.");
 <li><a href="#gtk-Zoom-Action">gtk Zoom Action</a>:  N_("Various zoom factor changes.");
 </ul>
 <div class="node">
@@ -10502,15 +10746,16 @@ Up: <a rel="up" accesskey="u" href="#gtk-actions">gtk actions</a>
 
 </div>
 
-<h4 class="subsection">F.3.1 gtk About</h4>
+<h4 class="subsection">G.3.1 gtk About</h4>
 
 <!-- key gtk About in hid gtk -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">About()</pre>
+<pre class="format">About()
+</pre>
    </td></tr></table>
 
    <p>N_("Tell the user about this version of PCB.");
-<!-- ./../src/hid/gtk/gtkhid-main.c 1059 -->
+<!-- ./../src/hid/gtk/gtkhid-main.c 1051 -->
 
    <p>This just pops up a dialog telling the user which version of
 <code>pcb</code> they're running.
@@ -10524,16 +10769,17 @@ Up: <a rel="up" accesskey="u" href="#gtk-actions">gtk actions</a>
 
 </div>
 
-<h4 class="subsection">F.3.2 gtk AdjustStyle</h4>
+<h4 class="subsection">G.3.2 gtk AdjustStyle</h4>
 
 <!-- key gtk AdjustStyle in hid gtk -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">AdjustStyle()
+<pre class="format">    N_("AdjustStyle()
+");
 </pre>
    </td></tr></table>
 
-   <p>Open the window which allows editing of the route styles. 
-<!-- ./../src/hid/gtk/gui-top-window.c 2081 -->
+   <p>N_("Open the window which allows editing of the route styles.");
+<!-- ./../src/hid/gtk/gui-top-window.c 2143 -->
 
    <p>Opens the window which allows editing of the route styles.
 
@@ -10546,16 +10792,17 @@ Up: <a rel="up" accesskey="u" href="#gtk-actions">gtk actions</a>
 
 </div>
 
-<h4 class="subsection">F.3.3 gtk Center</h4>
+<h4 class="subsection">G.3.3 gtk Center</h4>
 
 <!-- key gtk Center in hid gtk -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Center()
+
 </pre>
    </td></tr></table>
 
    <p>N_("Moves the pointer to the center of the window.");
-<!-- ./../src/hid/gtk/gtkhid-main.c 1470 -->
+<!-- ./../src/hid/gtk/gtkhid-main.c 1462 -->
 
    <p>Move the pointer to the center of the window, but only if it's
 currently within the window already.
@@ -10569,15 +10816,16 @@ Up: <a rel="up" accesskey="u" href="#gtk-actions">gtk actions</a>
 
 </div>
 
-<h4 class="subsection">F.3.4 gtk Cursor</h4>
+<h4 class="subsection">G.3.4 gtk Cursor</h4>
 
 <!-- key gtk Cursor in hid gtk -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Cursor(Type,DeltaUp,DeltaRight,Units)</pre>
+<pre class="format">Cursor(Type,DeltaUp,DeltaRight,Units)
+</pre>
    </td></tr></table>
 
    <p>N_("Move the cursor.");
-<!-- ./../src/hid/gtk/gtkhid-main.c 1515 -->
+<!-- ./../src/hid/gtk/gtkhid-main.c 1507 -->
 
    <p>This action moves the mouse cursor.  Unlike other actions which take
 coordinates, this action's coordinates are always relative to the
@@ -10613,16 +10861,17 @@ Up: <a rel="up" accesskey="u" href="#gtk-actions">gtk actions</a>
 
 </div>
 
-<h4 class="subsection">F.3.5 gtk DoWindows</h4>
+<h4 class="subsection">G.3.5 gtk DoWindows</h4>
 
 <!-- key gtk DoWindows in hid gtk -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">DoWindows(1|2|3|4|5|6)
-DoWindows(Layout|Library|Log|Netlist|Preferences|DRC)</pre>
+DoWindows(Layout|Library|Log|Netlist|Preferences|DRC)
+</pre>
    </td></tr></table>
 
    <p>N_("Open various GUI windows.");
-<!-- ./../src/hid/gtk/gtkhid-main.c 1563 -->
+<!-- ./../src/hid/gtk/gtkhid-main.c 1555 -->
 
      <dl>
 <dt><code>1</code><dt><code>Layout</code><dd>Open the layout window.  Since the layout window is always shown
@@ -10649,16 +10898,17 @@ Up: <a rel="up" accesskey="u" href="#gtk-actions">gtk actions</a>
 
 </div>
 
-<h4 class="subsection">F.3.6 gtk EditLayerGroups</h4>
+<h4 class="subsection">G.3.6 gtk EditLayerGroups</h4>
 
 <!-- key gtk EditLayerGroups in hid gtk -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">EditLayerGroups()
+<pre class="format">    N_("EditLayerGroups()
+");
 </pre>
    </td></tr></table>
 
-   <p>Open the preferences window which allows editing of the layer groups. 
-<!-- ./../src/hid/gtk/gui-top-window.c 2100 -->
+   <p>N_("Open the preferences window which allows editing of the layer groups.");
+<!-- ./../src/hid/gtk/gui-top-window.c 2162 -->
 
    <p>Opens the preferences window which is where the layer groups
 are edited.  This action is primarily provides to provide menu
@@ -10673,15 +10923,16 @@ Up: <a rel="up" accesskey="u" href="#gtk-actions">gtk actions</a>
 
 </div>
 
-<h4 class="subsection">F.3.7 gtk GetXY</h4>
+<h4 class="subsection">G.3.7 gtk GetXY</h4>
 
 <!-- key gtk GetXY in hid gtk -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">GetXY()</pre>
+<pre class="format">GetXY()
+</pre>
    </td></tr></table>
 
    <p>N_("Get a coordinate.");
-<!-- ./../src/hid/gtk/gtkhid-main.c 1074 -->
+<!-- ./../src/hid/gtk/gtkhid-main.c 1066 -->
 
    <p>Prompts the user for a coordinate, if one is not already selected.
 
@@ -10694,16 +10945,17 @@ Up: <a rel="up" accesskey="u" href="#gtk-actions">gtk actions</a>
 
 </div>
 
-<h4 class="subsection">F.3.8 gtk ImportGUI</h4>
+<h4 class="subsection">G.3.8 gtk ImportGUI</h4>
 
 <!-- key gtk ImportGUI in hid gtk -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ImportGUI()</pre>
+<pre class="format">ImportGUI()
+</pre>
    </td></tr></table>
 
    <p>N_("Asks user which schematics to import into PCB. 
 ");
-<!-- ./../src/hid/gtk/gtkhid-main.c 1750 -->
+<!-- ./../src/hid/gtk/gtkhid-main.c 1742 -->
 
    <p>Asks user which schematics to import into PCB.
 
@@ -10716,17 +10968,18 @@ Up: <a rel="up" accesskey="u" href="#gtk-actions">gtk actions</a>
 
 </div>
 
-<h4 class="subsection">F.3.9 gtk Pan</h4>
+<h4 class="subsection">G.3.9 gtk Pan</h4>
 
 <!-- key gtk Pan in hid gtk -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Pan([thumb], Mode)</pre>
+<pre class="format">Pan([thumb], Mode)
+</pre>
    </td></tr></table>
 
    <p>N_("Start or stop panning (Mode = 1 to start, 0 to stop)
 Optional thumb argument is ignored for now in gtk hid. 
 ");
-<!-- ./../src/hid/gtk/gtkhid-main.c 1687 -->
+<!-- ./../src/hid/gtk/gtkhid-main.c 1679 -->
 
    <p>Start or stop panning.  To start call with Mode = 1, to stop call with
 Mode = 0.
@@ -10740,21 +10993,23 @@ Up: <a rel="up" accesskey="u" href="#gtk-actions">gtk actions</a>
 
 </div>
 
-<h4 class="subsection">F.3.10 gtk Popup</h4>
+<h4 class="subsection">G.3.10 gtk Popup</h4>
 
 <!-- key gtk Popup in hid gtk -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Popup(MenuName, [Button])</pre>
+<pre class="format">Popup(MenuName, [Button])
+</pre>
    </td></tr></table>
 
    <p>N_("Bring up the popup menu specified by <code>MenuName</code>. 
 If called by a mouse event then the mouse button number
 must be specified as the optional second argument.");
-<!-- ./../src/hid/gtk/gtkhid-main.c 1719 -->
+<!-- ./../src/hid/gtk/gtkhid-main.c 1711 -->
 
    <p>This just pops up the specified menu.  The menu must have been defined
 as a named subresource of the Popups resource in the menu resource
-file.
+file. The second, optional (and ignored) argument represents the mouse
+button number which is triggering the popup.
 
 <div class="node">
 <a name="gtk-Print-Action"></a>
@@ -10765,15 +11020,16 @@ Up: <a rel="up" accesskey="u" href="#gtk-actions">gtk actions</a>
 
 </div>
 
-<h4 class="subsection">F.3.11 gtk Print</h4>
+<h4 class="subsection">G.3.11 gtk Print</h4>
 
 <!-- key gtk Print in hid gtk -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Print()</pre>
+<pre class="format">Print()
+</pre>
    </td></tr></table>
 
    <p>N_("Print the layout.");
-<!-- ./../src/hid/gtk/gtkhid-main.c 1350 -->
+<!-- ./../src/hid/gtk/gtkhid-main.c 1342 -->
 
    <p>This will find the default printing HID, prompt the user for its
 options, and print the layout.
@@ -10787,15 +11043,16 @@ Up: <a rel="up" accesskey="u" href="#gtk-actions">gtk actions</a>
 
 </div>
 
-<h4 class="subsection">F.3.12 gtk PrintCalibrate</h4>
+<h4 class="subsection">G.3.12 gtk PrintCalibrate</h4>
 
 <!-- key gtk PrintCalibrate in hid gtk -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">PrintCalibrate()</pre>
+<pre class="format">PrintCalibrate()
+</pre>
    </td></tr></table>
 
    <p>N_("Calibrate the printer.");
-<!-- ./../src/hid/gtk/gtkhid-main.c 1401 -->
+<!-- ./../src/hid/gtk/gtkhid-main.c 1393 -->
 
    <p>This will print a calibration page, which you would measure and type
 the measurements in, so that future printouts will be more precise.
@@ -10809,18 +11066,19 @@ Up: <a rel="up" accesskey="u" href="#gtk-actions">gtk actions</a>
 
 </div>
 
-<h4 class="subsection">F.3.13 gtk Save</h4>
+<h4 class="subsection">G.3.13 gtk Save</h4>
 
 <!-- key gtk Save in hid gtk -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Save()
 Save(Layout|LayoutAs)
 Save(AllConnections|AllUnusedPins|ElementConnections)
-Save(PasteBuffer)</pre>
+Save(PasteBuffer)
+</pre>
    </td></tr></table>
 
    <p>N_("Save layout and/or element data to a user-selected file.");
-<!-- ./../src/hid/gtk/gtkhid-main.c 1230 -->
+<!-- ./../src/hid/gtk/gtkhid-main.c 1222 -->
 
    <p>This action is a GUI front-end to the core's <code>SaveTo</code> action
 (see <a href="#SaveTo-Action">SaveTo Action</a>).  If you happen to pass a filename, like
@@ -10837,15 +11095,16 @@ Up: <a rel="up" accesskey="u" href="#gtk-actions">gtk actions</a>
 
 </div>
 
-<h4 class="subsection">F.3.14 gtk SelectLayer</h4>
+<h4 class="subsection">G.3.14 gtk SelectLayer</h4>
 
 <!-- key gtk SelectLayer in hid gtk -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">SelectLayer(1..MAXLAYER|Silk|Rats)</pre>
+<pre class="format">    N_("SelectLayer(1..MAXLAYER|Silk|Rats)");
+</pre>
    </td></tr></table>
 
-   <p>Select which layer is the current layer. 
-<!-- ./../src/hid/gtk/gui-top-window.c 1851 -->
+   <p>N_("Select which layer is the current layer.");
+<!-- ./../src/hid/gtk/gui-top-window.c 1908 -->
 
    <p>The specified layer becomes the currently active layer.  It is made
 visible if it is not already visible
@@ -10859,15 +11118,16 @@ Up: <a rel="up" accesskey="u" href="#gtk-actions">gtk actions</a>
 
 </div>
 
-<h4 class="subsection">F.3.15 gtk SetUnits</h4>
+<h4 class="subsection">G.3.15 gtk SetUnits</h4>
 
 <!-- key gtk SetUnits in hid gtk -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">SetUnits(mm|mil)</pre>
+<pre class="format">SetUnits(mm|mil)
+</pre>
    </td></tr></table>
 
    <p>N_("Set the default measurement units.");
-<!-- ./../src/hid/gtk/gtkhid-main.c 1606 -->
+<!-- ./../src/hid/gtk/gtkhid-main.c 1598 -->
 
      <dl>
 <dt><code>mil</code><dd>Sets the display units to mils (1/1000 inch).
@@ -10885,15 +11145,16 @@ Up: <a rel="up" accesskey="u" href="#gtk-actions">gtk actions</a>
 
 </div>
 
-<h4 class="subsection">F.3.16 gtk SwapSides</h4>
+<h4 class="subsection">G.3.16 gtk SwapSides</h4>
 
 <!-- key gtk SwapSides in hid gtk -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">SwapSides(|v|h|r)</pre>
+<pre class="format">SwapSides(|v|h|r)
+</pre>
    </td></tr></table>
 
    <p>N_("Swaps the side of the board you're looking at.");
-<!-- ./../src/hid/gtk/gtkhid-main.c 1295 -->
+<!-- ./../src/hid/gtk/gtkhid-main.c 1287 -->
 
    <p>This action changes the way you view the board.
 
@@ -10929,17 +11190,18 @@ Up: <a rel="up" accesskey="u" href="#gtk-actions">gtk actions</a>
 
 </div>
 
-<h4 class="subsection">F.3.17 gtk ToggleView</h4>
+<h4 class="subsection">G.3.17 gtk ToggleView</h4>
 
 <!-- key gtk ToggleView in hid gtk -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ToggleView(1..MAXLAYER)
+<pre class="format">    N_("ToggleView(1..MAXLAYER)
 ToggleView(layername)
-ToggleView(Silk|Rats|Pins|Vias|Mask|BackSide)</pre>
+ToggleView(Silk|Rats|Pins|Vias|Mask|BackSide)");
+</pre>
    </td></tr></table>
 
-   <p>Toggle the visibility of the specified layer or layer group. 
-<!-- ./../src/hid/gtk/gui-top-window.c 1792 -->
+   <p>N_("Toggle the visibility of the specified layer or layer group.");
+<!-- ./../src/hid/gtk/gui-top-window.c 1849 -->
 
    <p>If you pass an integer, that layer is specified by index (the first
 layer is <code>1</code>, etc).  If you pass a layer name, that layer is
@@ -10958,16 +11220,17 @@ Up: <a rel="up" accesskey="u" href="#gtk-actions">gtk actions</a>
 
 </div>
 
-<h4 class="subsection">F.3.18 gtk Zoom</h4>
+<h4 class="subsection">G.3.18 gtk Zoom</h4>
 
 <!-- key gtk Zoom in hid gtk -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Zoom()
-Zoom(factor)</pre>
+Zoom(factor)
+</pre>
    </td></tr></table>
 
    <p>N_("Various zoom factor changes.");
-<!-- ./../src/hid/gtk/gtkhid-main.c 161 -->
+<!-- ./../src/hid/gtk/gtkhid-main.c 155 -->
 Changes the zoom (magnification) of the view of the board.  If no
 arguments are passed, the view is scaled such that the board just fits
 inside the visible window (i.e. “view all”).  Otherwise,
@@ -11006,7 +11269,7 @@ Up: <a rel="up" accesskey="u" href="#Action-Reference">Action Reference</a>
 
 </div>
 
-<h3 class="section">F.4 lesstif actions</h3>
+<h3 class="section">G.4 lesstif actions</h3>
 
 <ul class="menu">
 <li><a accesskey="1" href="#lesstif-About-Action">lesstif About Action</a>:  Tell the user about this version of PCB. 
@@ -11046,15 +11309,16 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.1 lesstif About</h4>
+<h4 class="subsection">G.4.1 lesstif About</h4>
 
 <!-- key lesstif About in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">About()</pre>
+<pre class="format">About()
+</pre>
    </td></tr></table>
 
    <p>Tell the user about this version of PCB. 
-<!-- ./../src/hid/lesstif/dialogs.c 867 -->
+<!-- ./../src/hid/lesstif/dialogs.c 863 -->
 
    <p>This just pops up a dialog telling the user which version of
 <code>pcb</code> they're running.
@@ -11068,15 +11332,16 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.2 lesstif AdjustSizes</h4>
+<h4 class="subsection">G.4.2 lesstif AdjustSizes</h4>
 
 <!-- key lesstif AdjustSizes in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">AdjustSizes()</pre>
+<pre class="format">AdjustSizes()
+</pre>
    </td></tr></table>
 
    <p>Let the user change the board size, DRC parameters, etc
-<!-- ./../src/hid/lesstif/dialogs.c 1136 -->
+<!-- ./../src/hid/lesstif/dialogs.c 1132 -->
 
    <p>Displays a dialog box that lets the user change the board
 size, DRC parameters, and text scale.
@@ -11092,15 +11357,16 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.3 lesstif AdjustStyle</h4>
+<h4 class="subsection">G.4.3 lesstif AdjustStyle</h4>
 
 <!-- key lesstif AdjustStyle in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">AdjustStyle()</pre>
+<pre class="format">AdjustStyle()
+</pre>
    </td></tr></table>
 
    <p>Displays the route style adjustment window. 
-<!-- ./../src/hid/lesstif/styles.c 344 -->
+<!-- ./../src/hid/lesstif/styles.c 340 -->
 
 <div class="node">
 <a name="lesstif-Benchmark-Action"></a>
@@ -11111,15 +11377,16 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.4 lesstif Benchmark</h4>
+<h4 class="subsection">G.4.4 lesstif Benchmark</h4>
 
 <!-- key lesstif Benchmark in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Benchmark()</pre>
+<pre class="format">Benchmark()
+</pre>
    </td></tr></table>
 
    <p>Benchmark the GUI speed. 
-<!-- ./../src/hid/lesstif/main.c 659 -->
+<!-- ./../src/hid/lesstif/main.c 656 -->
 
    <p>This action is used to speed-test the Lesstif graphics subsystem.  It
 redraws the current screen as many times as possible in ten seconds. 
@@ -11134,27 +11401,28 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.5 lesstif Command</h4>
+<h4 class="subsection">G.4.5 lesstif Command</h4>
 
 <!-- key lesstif Command in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Command()</pre>
+<pre class="format">Command()
+</pre>
    </td></tr></table>
 
    <p>Displays the command line input window. 
-<!-- ./../src/hid/lesstif/main.c 644 -->
+<!-- ./../src/hid/lesstif/main.c 641 -->
 
    <p>The command window allows the user to manually enter actions to be
 executed.  Action syntax can be done one of two ways:
 
-     <dl>
-<dt><dd>Follow the action name by an open parenthesis, arguments separated by
+     <ul>
+<li>Follow the action name by an open parenthesis, arguments separated by
 commas, end with a close parenthesis.  Example: <code>Abc(1,2,3)</code>
 
-     <br><dt><dd>Separate the action name and arguments by spaces.  Example: <code>Abc
+     <li>Separate the action name and arguments by spaces.  Example: <code>Abc
 1 2 3</code>.
 
-   </dl>
+   </ul>
 
    <p>The first option allows you to have arguments with spaces in them,
 but the second is more “natural” to type for most people.
@@ -11182,15 +11450,16 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.6 lesstif Cursor</h4>
+<h4 class="subsection">G.4.6 lesstif Cursor</h4>
 
 <!-- key lesstif Cursor in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Cursor(Type,DeltaUp,DeltaRight,Units)</pre>
+<pre class="format">Cursor(Type,DeltaUp,DeltaRight,Units)
+</pre>
    </td></tr></table>
 
    <p>Move the cursor. 
-<!-- ./../src/hid/lesstif/main.c 716 -->
+<!-- ./../src/hid/lesstif/main.c 713 -->
 
    <p>This action moves the mouse cursor.  Unlike other actions which take
 coordinates, this action's coordinates are always relative to the
@@ -11226,15 +11495,16 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.7 lesstif Debug</h4>
+<h4 class="subsection">G.4.7 lesstif Debug</h4>
 
 <!-- key lesstif Debug in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Debug(...)</pre>
+<pre class="format">Debug(...)
+</pre>
    </td></tr></table>
 
    <p>Debug action. 
-<!-- ./../src/hid/lesstif/menu.c 66 -->
+<!-- ./../src/hid/lesstif/menu.c 62 -->
 
    <p>This action exists to help debug scripts; it simply prints all its
 arguments to stdout.
@@ -11248,15 +11518,16 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.8 lesstif DebugXY</h4>
+<h4 class="subsection">G.4.8 lesstif DebugXY</h4>
 
 <!-- key lesstif DebugXY in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">DebugXY(...)</pre>
+<pre class="format">DebugXY(...)
+</pre>
    </td></tr></table>
 
    <p>Debug action, with coordinates
-<!-- ./../src/hid/lesstif/menu.c 72 -->
+<!-- ./../src/hid/lesstif/menu.c 68 -->
 
    <p>Like <code>Debug</code>, but requires a coordinate.  If the user hasn't yet
 indicated a location on the board, the user will be prompted to click
@@ -11271,16 +11542,17 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.9 lesstif DoWindows</h4>
+<h4 class="subsection">G.4.9 lesstif DoWindows</h4>
 
 <!-- key lesstif DoWindows in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">DoWindows(1|2|3|4)
-DoWindows(Layout|Library|Log|Netlist)</pre>
+DoWindows(Layout|Library|Log|Netlist)
+</pre>
    </td></tr></table>
 
    <p>Open various GUI windows. 
-<!-- ./../src/hid/lesstif/dialogs.c 831 -->
+<!-- ./../src/hid/lesstif/dialogs.c 827 -->
 
      <dl>
 <dt><code>1</code><dt><code>Layout</code><dd>Open the layout window.  Since the layout window is always shown
@@ -11303,15 +11575,16 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.10 lesstif DumpKeys</h4>
+<h4 class="subsection">G.4.10 lesstif DumpKeys</h4>
 
 <!-- key lesstif DumpKeys in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">DumpKeys()</pre>
+<pre class="format">DumpKeys()
+</pre>
    </td></tr></table>
 
    <p>Dump Lesstif key bindings. 
-<!-- ./../src/hid/lesstif/menu.c 101 -->
+<!-- ./../src/hid/lesstif/menu.c 97 -->
 
    <p>Causes the list of key bindings (from <code>pcb-menu.res</code>) to be
 dumped to stdout.  This is most useful when invoked from the command
@@ -11328,15 +11601,16 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.11 lesstif EditLayerGroups</h4>
+<h4 class="subsection">G.4.11 lesstif EditLayerGroups</h4>
 
 <!-- key lesstif EditLayerGroups in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">EditLayerGroups()</pre>
+<pre class="format">EditLayerGroups()
+</pre>
    </td></tr></table>
 
    <p>Let the user change the layer groupings
-<!-- ./../src/hid/lesstif/dialogs.c 1448 -->
+<!-- ./../src/hid/lesstif/dialogs.c 1444 -->
 
    <p>Displays a dialog that lets the user view and change the layer
 groupings.  Each layer (row) can be a member of any one layer group
@@ -11355,15 +11629,16 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.12 lesstif Export</h4>
+<h4 class="subsection">G.4.12 lesstif Export</h4>
 
 <!-- key lesstif Export in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Export()</pre>
+<pre class="format">Export()
+</pre>
    </td></tr></table>
 
    <p>Export the layout. 
-<!-- ./../src/hid/lesstif/dialogs.c 957 -->
+<!-- ./../src/hid/lesstif/dialogs.c 953 -->
 
    <p>Prompts the user for an exporter to use.  Then, prompts the user for
 that exporter's options, and exports the layout.
@@ -11377,15 +11652,16 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.13 lesstif GetXY</h4>
+<h4 class="subsection">G.4.13 lesstif GetXY</h4>
 
 <!-- key lesstif GetXY in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">GetXY()</pre>
+<pre class="format">GetXY()
+</pre>
    </td></tr></table>
 
    <p>Get a coordinate. 
-<!-- ./../src/hid/lesstif/menu.c 54 -->
+<!-- ./../src/hid/lesstif/menu.c 50 -->
 
    <p>Prompts the user for a coordinate, if one is not already selected.
 
@@ -11398,15 +11674,16 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.14 lesstif ImportGUI</h4>
+<h4 class="subsection">G.4.14 lesstif ImportGUI</h4>
 
 <!-- key lesstif ImportGUI in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">ImportGUI()</pre>
+<pre class="format">ImportGUI()
+</pre>
    </td></tr></table>
 
    <p>Lets the user choose the schematics to import from
-<!-- ./../src/hid/lesstif/dialogs.c 1882 -->
+<!-- ./../src/hid/lesstif/dialogs.c 1878 -->
 
    <p>Displays a dialog that lets the user select the schematic(s) to import
 from, then saves that information in the layout's attributes for
@@ -11421,15 +11698,16 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.15 lesstif LibraryShow</h4>
+<h4 class="subsection">G.4.15 lesstif LibraryShow</h4>
 
 <!-- key lesstif LibraryShow in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">LibraryShow()</pre>
+<pre class="format">LibraryShow()
+</pre>
    </td></tr></table>
 
    <p>Displays the library window. 
-<!-- ./../src/hid/lesstif/library.c 151 -->
+<!-- ./../src/hid/lesstif/library.c 147 -->
 
 <div class="node">
 <a name="lesstif-Load-Action"></a>
@@ -11440,16 +11718,17 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.16 lesstif Load</h4>
+<h4 class="subsection">G.4.16 lesstif Load</h4>
 
 <!-- key lesstif Load in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Load()
-Load(Layout|LayoutToBuffer|ElementToBuffer|Netlist|Revert)</pre>
+Load(Layout|LayoutToBuffer|ElementToBuffer|Netlist|Revert)
+</pre>
    </td></tr></table>
 
    <p>Load layout data from a user-selected file. 
-<!-- ./../src/hid/lesstif/dialogs.c 99 -->
+<!-- ./../src/hid/lesstif/dialogs.c 95 -->
 
    <p>This action is a GUI front-end to the core's <code>LoadFrom</code> action
 (see <a href="#LoadFrom-Action">LoadFrom Action</a>).  If you happen to pass a filename, like
@@ -11466,15 +11745,16 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.17 lesstif LoadVendor</h4>
+<h4 class="subsection">G.4.17 lesstif LoadVendor</h4>
 
 <!-- key lesstif LoadVendor in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">LoadVendor()</pre>
+<pre class="format">LoadVendor()
+</pre>
    </td></tr></table>
 
    <p>Loads a user-selected vendor resource file. 
-<!-- ./../src/hid/lesstif/dialogs.c 152 -->
+<!-- ./../src/hid/lesstif/dialogs.c 148 -->
 
    <p>The user is prompted for a file to load, and then
 <code>LoadVendorFrom</code> is called (see <a href="#LoadVendorFrom-Action">LoadVendorFrom Action</a>) to
@@ -11489,15 +11769,16 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.18 lesstif NetlistShow</h4>
+<h4 class="subsection">G.4.18 lesstif NetlistShow</h4>
 
 <!-- key lesstif NetlistShow in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">NetlistShow(pinname|netname)</pre>
+<pre class="format">NetlistShow(pinname|netname)
+</pre>
    </td></tr></table>
 
    <p>Selects the given pinname or netname in the netlist window. 
-<!-- ./../src/hid/lesstif/netlist.c 415 -->
+<!-- ./../src/hid/lesstif/netlist.c 411 -->
 
 <div class="node">
 <a name="lesstif-Print-Action"></a>
@@ -11508,15 +11789,16 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.19 lesstif Print</h4>
+<h4 class="subsection">G.4.19 lesstif Print</h4>
 
 <!-- key lesstif Print in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Print()</pre>
+<pre class="format">Print()
+</pre>
    </td></tr></table>
 
    <p>Print the layout. 
-<!-- ./../src/hid/lesstif/dialogs.c 894 -->
+<!-- ./../src/hid/lesstif/dialogs.c 890 -->
 
    <p>This will find the default printing HID, prompt the user for its
 options, and print the layout.
@@ -11530,15 +11812,16 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.20 lesstif PrintCalibrate</h4>
+<h4 class="subsection">G.4.20 lesstif PrintCalibrate</h4>
 
 <!-- key lesstif PrintCalibrate in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">PrintCalibrate()</pre>
+<pre class="format">PrintCalibrate()
+</pre>
    </td></tr></table>
 
    <p>Calibrate the printer. 
-<!-- ./../src/hid/lesstif/dialogs.c 937 -->
+<!-- ./../src/hid/lesstif/dialogs.c 933 -->
 
    <p>This will print a calibration page, which you would measure and type
 the measurements in, so that future printouts will be more precise.
@@ -11552,15 +11835,16 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.21 lesstif PromptFor</h4>
+<h4 class="subsection">G.4.21 lesstif PromptFor</h4>
 
 <!-- key lesstif PromptFor in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">PromptFor([message[,default]])</pre>
+<pre class="format">PromptFor([message[,default]])
+</pre>
    </td></tr></table>
 
    <p>Prompt for a response. 
-<!-- ./../src/hid/lesstif/dialogs.c 560 -->
+<!-- ./../src/hid/lesstif/dialogs.c 556 -->
 
    <p>This is mostly for testing the lesstif HID interface.  The parameters
 are passed to the <code>prompt_for()</code> HID function, causing the user
@@ -11576,15 +11860,16 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.22 lesstif Return</h4>
+<h4 class="subsection">G.4.22 lesstif Return</h4>
 
 <!-- key lesstif Return in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">Return(0|1)</pre>
+<pre class="format">Return(0|1)
+</pre>
    </td></tr></table>
 
    <p>Simulate a passing or failing action. 
-<!-- ./../src/hid/lesstif/menu.c 89 -->
+<!-- ./../src/hid/lesstif/menu.c 85 -->
 
    <p>This is for testing.  If passed a 0, does nothing and succeeds.  If
 passed a 1, does nothing but pretends to fail.
@@ -11598,18 +11883,19 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.23 lesstif Save</h4>
+<h4 class="subsection">G.4.23 lesstif Save</h4>
 
 <!-- key lesstif Save in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Save()
 Save(Layout|LayoutAs)
 Save(AllConnections|AllUnusedPins|ElementConnections)
-Save(PasteBuffer)</pre>
+Save(PasteBuffer)
+</pre>
    </td></tr></table>
 
    <p>Save layout data to a user-selected file. 
-<!-- ./../src/hid/lesstif/dialogs.c 197 -->
+<!-- ./../src/hid/lesstif/dialogs.c 193 -->
 
    <p>This action is a GUI front-end to the core's <code>SaveTo</code> action
 (see <a href="#SaveTo-Action">SaveTo Action</a>).  If you happen to pass a filename, like
@@ -11626,15 +11912,16 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.24 lesstif SelectLayer</h4>
+<h4 class="subsection">G.4.24 lesstif SelectLayer</h4>
 
 <!-- key lesstif SelectLayer in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">SelectLayer(1..MAXLAYER|Silk|Rats)</pre>
+<pre class="format">SelectLayer(1..MAXLAYER|Silk|Rats)
+</pre>
    </td></tr></table>
 
    <p>Select which layer is the current layer. 
-<!-- ./../src/hid/lesstif/menu.c 387 -->
+<!-- ./../src/hid/lesstif/menu.c 383 -->
 
    <p>The specified layer becomes the currently active layer.  It is made
 visible if it is not already visible
@@ -11648,15 +11935,16 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.25 lesstif SetUnits</h4>
+<h4 class="subsection">G.4.25 lesstif SetUnits</h4>
 
 <!-- key lesstif SetUnits in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">SetUnits(mm|mil)</pre>
+<pre class="format">SetUnits(mm|mil)
+</pre>
    </td></tr></table>
 
    <p>Set the default measurement units. 
-<!-- ./../src/hid/lesstif/main.c 395 -->
+<!-- ./../src/hid/lesstif/main.c 392 -->
 
      <dl>
 <dt><code>mil</code><dd>Sets the display units to mils (1/1000 inch).
@@ -11674,15 +11962,16 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.26 lesstif SwapSides</h4>
+<h4 class="subsection">G.4.26 lesstif SwapSides</h4>
 
 <!-- key lesstif SwapSides in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
-<pre class="format">SwapSides(|v|h|r)</pre>
+<pre class="format">SwapSides(|v|h|r)
+</pre>
    </td></tr></table>
 
    <p>Swaps the side of the board you're looking at. 
-<!-- ./../src/hid/lesstif/main.c 494 -->
+<!-- ./../src/hid/lesstif/main.c 491 -->
 
    <p>This action changes the way you view the board.
 
@@ -11718,17 +12007,18 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.27 lesstif ToggleView</h4>
+<h4 class="subsection">G.4.27 lesstif ToggleView</h4>
 
 <!-- key lesstif ToggleView in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">ToggleView(1..MAXLAYER)
 ToggleView(layername)
-ToggleView(Silk|Rats|Pins|Vias|Mask|BackSide)</pre>
+ToggleView(Silk|Rats|Pins|Vias|Mask|BackSide)
+</pre>
    </td></tr></table>
 
    <p>Toggle the visibility of the specified layer or layer group. 
-<!-- ./../src/hid/lesstif/menu.c 409 -->
+<!-- ./../src/hid/lesstif/menu.c 411 -->
 
    <p>If you pass an integer, that layer is specified by index (the first
 layer is <code>1</code>, etc).  If you pass a layer name, that layer is
@@ -11747,16 +12037,17 @@ Up: <a rel="up" accesskey="u" href="#lesstif-actions">lesstif actions</a>
 
 </div>
 
-<h4 class="subsection">F.4.28 lesstif Zoom</h4>
+<h4 class="subsection">G.4.28 lesstif Zoom</h4>
 
 <!-- key lesstif Zoom in hid lesstif -->
 <p><table class="cartouche" summary="cartouche" border="1"><tr><td>
 <pre class="format">Zoom()
-Zoom(factor)</pre>
+Zoom(factor)
+</pre>
    </td></tr></table>
 
    <p>Various zoom factor changes. 
-<!-- ./../src/hid/lesstif/main.c 419 -->
+<!-- ./../src/hid/lesstif/main.c 416 -->
 
    <p>Changes the zoom (magnification) of the view of the board.  If no
 arguments are passed, the view is scaled such that the board just fits
@@ -11797,9 +12088,9 @@ Up: <a rel="up" accesskey="u" href="#Top">Top</a>
 
 </div>
 
-<h2 class="appendix">Appendix G Glossary</h2>
+<h2 class="appendix">Appendix H Glossary</h2>
 
-<p><a name="index-glossary-889"></a><a name="index-terminology-890"></a><a name="index-index-of-terms-891"></a>
+<p><a name="index-glossary-908"></a><a name="index-terminology-909"></a><a name="index-index-of-terms-910"></a>
      <dl>
 <dt>Footprint<dd>The pattern of metal, silkscreen, soldermask relief, and drills which
 defines where you place a component on a circuit board. 
@@ -11820,7 +12111,7 @@ the thermal resistance to the plane, it becomes easier to solder to the
 pin.  In the drawing below, the pin on the left is connected to the
 polygon using a solid connection with no thermal relief, the middle
 pin is connected using a thermal, while the pin on the right has no
-connection to the polygon.  In PCB, the “Thermal” Tool is used to
+connection to the polygon.  In <code>Pcb</code>, the “Thermal” Tool is used to
 make both a solid connection and one with thermal relief (see <a href="#Polygon-Objects">Polygon Objects</a>).
 
      <div align="center"><img src="thermal.png" alt="Example of a thermal relief"></div>
@@ -11839,239 +12130,253 @@ Up: <a rel="up" accesskey="u" href="#Top">Top</a>
 <h2 class="unnumbered">Index of Resources</h2>
 
 <ul class="index-vr" compact>
-<li><a href="#index-absoluteGrid-371"><code>absoluteGrid</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-alignmentDistance-373"><code>alignmentDistance</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-allDirectionLines-375"><code>allDirectionLines</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-backgroundImage-378"><code>backgroundImage</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-backupInterval-380"><code>backupInterval</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-bloat-382"><code>bloat</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-BTNMOD-833"><code>BTNMOD</code></a>: <a href="#running-configure">running configure</a></li>
-<li><a href="#index-connectedColor-385"><code>connectedColor</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-cross-hairColor-388"><code>cross hairColor</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-DEFAULTFONT-830"><code>DEFAULTFONT</code></a>: <a href="#running-configure">running configure</a></li>
-<li><a href="#index-DEFAULTLIBRARY-831"><code>DEFAULTLIBRARY</code></a>: <a href="#running-configure">running configure</a></li>
-<li><a href="#index-Element-Search-862"><code>Element Search</code></a>: <a href="#Regular-Expressions">Regular Expressions</a></li>
-<li><a href="#index-elementColor-391"><code>elementColor</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-elementCommand-789"><code>elementCommand</code></a>: <a href="#File-Formats">File Formats</a></li>
-<li><a href="#index-elementCommand-395"><code>elementCommand</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-elementContentsCommand-458"><code>elementContentsCommand</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-elementPath-402"><code>elementPath</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-elementSelectedColor-392"><code>elementSelectedColor</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-absoluteGrid-388"><code>absoluteGrid</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-alignmentDistance-390"><code>alignmentDistance</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-allDirectionLines-392"><code>allDirectionLines</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-backgroundImage-395"><code>backgroundImage</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-backupInterval-397"><code>backupInterval</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-bloat-399"><code>bloat</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-BTNMOD-850"><code>BTNMOD</code></a>: <a href="#running-configure">running configure</a></li>
+<li><a href="#index-connectedColor-402"><code>connectedColor</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-cross-hairColor-405"><code>cross hairColor</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-DEFAULTFONT-847"><code>DEFAULTFONT</code></a>: <a href="#running-configure">running configure</a></li>
+<li><a href="#index-DEFAULTLIBRARY-848"><code>DEFAULTLIBRARY</code></a>: <a href="#running-configure">running configure</a></li>
+<li><a href="#index-Element-Search-879"><code>Element Search</code></a>: <a href="#Regular-Expressions">Regular Expressions</a></li>
+<li><a href="#index-elementColor-408"><code>elementColor</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-elementCommand-806"><code>elementCommand</code></a>: <a href="#File-Formats">File Formats</a></li>
+<li><a href="#index-elementCommand-412"><code>elementCommand</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-elementContentsCommand-475"><code>elementContentsCommand</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-elementPath-419"><code>elementPath</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-elementSelectedColor-409"><code>elementSelectedColor</code></a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-Exporting-a-layout-141"><code>Exporting a layout</code></a>: <a href="#Exporting">Exporting</a></li>
-<li><a href="#index-fileCommand-790"><code>fileCommand</code></a>: <a href="#File-Formats">File Formats</a></li>
-<li><a href="#index-fileCommand-407"><code>fileCommand</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-filePath-414"><code>filePath</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-fontCommand-791"><code>fontCommand</code></a>: <a href="#File-Formats">File Formats</a></li>
-<li><a href="#index-fontCommand-419"><code>fontCommand</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-fontFile-427"><code>fontFile</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-fontPath-430"><code>fontPath</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-GNUM4-832"><code>GNUM4</code></a>: <a href="#running-configure">running configure</a></li>
-<li><a href="#index-grid-436"><code>grid</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-gridColor-439"><code>gridColor</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-INFOLIBDIR-828"><code>INFOLIBDIR</code></a>: <a href="#running-configure">running configure</a></li>
-<li><a href="#index-invisibleObjectsColor-442"><code>invisibleObjectsColor</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-layerColor-445"><code>layerColor</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-layerGroups-449"><code>layerGroups</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-layerName-452"><code>layerName</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-layerSelectedColor-446"><code>layerSelectedColor</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-libraryCommand-792"><code>libraryCommand</code></a>: <a href="#File-Formats">File Formats</a></li>
-<li><a href="#index-libraryCommand-454"><code>libraryCommand</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-libraryContentsCommand-793"><code>libraryContentsCommand</code></a>: <a href="#File-Formats">File Formats</a></li>
-<li><a href="#index-libraryFilename-462"><code>libraryFilename</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-libraryPath-465"><code>libraryPath</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-lineThickness-469"><code>lineThickness</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-fileCommand-807"><code>fileCommand</code></a>: <a href="#File-Formats">File Formats</a></li>
+<li><a href="#index-fileCommand-424"><code>fileCommand</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-filePath-431"><code>filePath</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-fontCommand-808"><code>fontCommand</code></a>: <a href="#File-Formats">File Formats</a></li>
+<li><a href="#index-fontCommand-436"><code>fontCommand</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-fontFile-444"><code>fontFile</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-fontPath-447"><code>fontPath</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-GNUM4-849"><code>GNUM4</code></a>: <a href="#running-configure">running configure</a></li>
+<li><a href="#index-grid-453"><code>grid</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-gridColor-456"><code>gridColor</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-INFOLIBDIR-845"><code>INFOLIBDIR</code></a>: <a href="#running-configure">running configure</a></li>
+<li><a href="#index-invisibleObjectsColor-459"><code>invisibleObjectsColor</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-layerColor-462"><code>layerColor</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-layerGroups-466"><code>layerGroups</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-layerName-469"><code>layerName</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-layerSelectedColor-463"><code>layerSelectedColor</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-libraryCommand-809"><code>libraryCommand</code></a>: <a href="#File-Formats">File Formats</a></li>
+<li><a href="#index-libraryCommand-471"><code>libraryCommand</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-libraryContentsCommand-810"><code>libraryContentsCommand</code></a>: <a href="#File-Formats">File Formats</a></li>
+<li><a href="#index-libraryFilename-479"><code>libraryFilename</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-libraryPath-482"><code>libraryPath</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-lineThickness-486"><code>lineThickness</code></a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-Measuring-distances-173"><code>Measuring distances</code></a>: <a href="#Measuring-distances">Measuring distances</a></li>
-<li><a href="#index-media-473"><code>media</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-offLimitColor-477"><code>offLimitColor</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-PCBLIBDIR-829"><code>PCBLIBDIR</code></a>: <a href="#running-configure">running configure</a></li>
-<li><a href="#index-pinColor-480"><code>pinColor</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-pinoutFont0_002e_002e6-484"><code>pinoutFont0..6</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-pinoutNameLength-487"><code>pinoutNameLength</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-pinoutOffsetX-491"><code>pinoutOffsetX</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-pinoutOffsetY-492"><code>pinoutOffsetY</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-pinoutTextOffsetX-494"><code>pinoutTextOffsetX</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-pinoutTextOffsetY-495"><code>pinoutTextOffsetY</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-pinoutZoom-497"><code>pinoutZoom</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-pinSelectedColor-481"><code>pinSelectedColor</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-printCommand-500"><code>printCommand</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-raiseLogWindow-502"><code>raiseLogWindow</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-ratCommand-505"><code>ratCommand</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-ratPath-508"><code>ratPath</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-Regular-Expressions-863"><code>Regular Expressions</code></a>: <a href="#Regular-Expressions">Regular Expressions</a></li>
-<li><a href="#index-resetAfterElement-511"><code>resetAfterElement</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-ringBellWhenFinished-514"><code>ringBellWhenFinished</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-routeStyle-516"><code>routeStyle</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-rubberBandMode-518"><code>rubberBandMode</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-saveCommand-794"><code>saveCommand</code></a>: <a href="#File-Formats">File Formats</a></li>
-<li><a href="#index-saveCommand-522"><code>saveCommand</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-saveInTMP-529"><code>saveInTMP</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-saveLastCommand-536"><code>saveLastCommand</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-media-490"><code>media</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-offLimitColor-494"><code>offLimitColor</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-PCBLIBDIR-846"><code>PCBLIBDIR</code></a>: <a href="#running-configure">running configure</a></li>
+<li><a href="#index-pinColor-497"><code>pinColor</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-pinoutFont0_002e_002e6-501"><code>pinoutFont0..6</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-pinoutNameLength-504"><code>pinoutNameLength</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-pinoutOffsetX-508"><code>pinoutOffsetX</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-pinoutOffsetY-509"><code>pinoutOffsetY</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-pinoutTextOffsetX-511"><code>pinoutTextOffsetX</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-pinoutTextOffsetY-512"><code>pinoutTextOffsetY</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-pinoutZoom-514"><code>pinoutZoom</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-pinSelectedColor-498"><code>pinSelectedColor</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-printCommand-517"><code>printCommand</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-raiseLogWindow-519"><code>raiseLogWindow</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-ratCommand-522"><code>ratCommand</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-ratPath-525"><code>ratPath</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-Regular-Expressions-880"><code>Regular Expressions</code></a>: <a href="#Regular-Expressions">Regular Expressions</a></li>
+<li><a href="#index-resetAfterElement-528"><code>resetAfterElement</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-ringBellWhenFinished-531"><code>ringBellWhenFinished</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-routeStyle-533"><code>routeStyle</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-rubberBandMode-535"><code>rubberBandMode</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-saveCommand-811"><code>saveCommand</code></a>: <a href="#File-Formats">File Formats</a></li>
+<li><a href="#index-saveCommand-539"><code>saveCommand</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-saveInTMP-546"><code>saveInTMP</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-saveLastCommand-553"><code>saveLastCommand</code></a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-Searching-for-elements-171"><code>Searching for elements</code></a>: <a href="#Searching-for-elements">Searching for elements</a></li>
-<li><a href="#index-shrink-539"><code>shrink</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-size-542"><code>size</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-stipplePolygons-545"><code>stipplePolygons</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-textScale-548"><code>textScale</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-useLogWindow-551"><code>useLogWindow</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-viaColor-554"><code>viaColor</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-viaDrillingHole-559"><code>viaDrillingHole</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-viaSelectedColor-555"><code>viaSelectedColor</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-viaThickness-558"><code>viaThickness</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-volume-563"><code>volume</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-warnColor-566"><code>warnColor</code></a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-zoom-569"><code>zoom</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-shrink-556"><code>shrink</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-size-559"><code>size</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-stipplePolygons-562"><code>stipplePolygons</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-textScale-565"><code>textScale</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-useLogWindow-568"><code>useLogWindow</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-viaColor-571"><code>viaColor</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-viaDrillingHole-576"><code>viaDrillingHole</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-viaSelectedColor-572"><code>viaSelectedColor</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-viaThickness-575"><code>viaThickness</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-volume-580"><code>volume</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-warnColor-583"><code>warnColor</code></a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-zoom-586"><code>zoom</code></a>: <a href="#Resources">Resources</a></li>
 </ul><h2 class="unnumbered">Index of Actions, Commands and Options</h2>
 
 
 
 <ul class="index-fn" compact>
-<li><a href="#index-g_t_002d_002d-basename-_003cstring_003e-363"><code>-- basename <string></code></a>: <a href="#nelma-Options">nelma Options</a></li>
-<li><a href="#index-g_t_002d_002daction_002dscript-_003cstring_003e-221"><code>--action-script <string></code></a>: <a href="#General-Options">General Options</a></li>
-<li><a href="#index-g_t_002d_002daction_002dstring-_003cstring_003e-222"><code>--action-string <string></code></a>: <a href="#General-Options">General Options</a></li>
-<li><a href="#index-g_t_002d_002dalign_002dmarks-319"><code>--align-marks</code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
-<li><a href="#index-g_t_002d_002dalignment_002ddistance-_003cnum_003e-291"><code>--alignment-distance <num></code></a>: <a href="#Sizes">Sizes</a></li>
-<li><a href="#index-g_t_002d_002dall_002ddirection_002dlines-238"><code>--all-direction-lines</code></a>: <a href="#General-GUI-Options">General GUI Options</a></li>
-<li><a href="#index-g_t_002d_002dall_002dlayers-313"><code>--all-layers</code></a>: <a href="#Gerber-Export">Gerber Export</a></li>
-<li><a href="#index-g_t_002d_002das_002dshown-352"><code>--as-shown</code></a>: <a href="#PNG-Options">PNG Options</a></li>
-<li><a href="#index-g_t_002d_002das_002dshown-343"><code>--as-shown</code></a>: <a href="#Encapsulated-Postscript-Export">Encapsulated Postscript Export</a></li>
-<li><a href="#index-g_t_002d_002dauto_002dmirror-323"><code>--auto-mirror</code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
-<li><a href="#index-g_t_002d_002dbackground_002dcolor-_003cstring_003e-248"><code>--background-color <string></code></a>: <a href="#Colors">Colors</a></li>
-<li><a href="#index-g_t_002d_002dbackup_002dinterval-217"><code>--backup-interval</code></a>: <a href="#General-Options">General Options</a></li>
-<li><a href="#index-g_t_002d_002dbg_002dimage-_003cstring_003e-244"><code>--bg-image <string></code></a>: <a href="#lesstif-GUI-Options">lesstif GUI Options</a></li>
-<li><a href="#index-g_t_002d_002dbg_002dimage-_003cstring_003e-241"><code>--bg-image <string></code></a>: <a href="#GTK_002b-GUI-Options">GTK+ GUI Options</a></li>
-<li><a href="#index-g_t_002d_002dblack_002dcolor-_003cstring_003e-246"><code>--black-color <string></code></a>: <a href="#Colors">Colors</a></li>
-<li><a href="#index-g_t_002d_002dbloat-_003cnum_003e-303"><code>--bloat <num></code></a>: <a href="#DRC-Options">DRC Options</a></li>
-<li><a href="#index-g_t_002d_002dbomfile-_003cstring_003e-309"><code>--bomfile <string></code></a>: <a href="#BOM-Creation">BOM Creation</a></li>
-<li><a href="#index-g_t_002d_002dclear_002dline-234"><code>--clear-line</code></a>: <a href="#General-GUI-Options">General GUI Options</a></li>
-<li><a href="#index-g_t_002d_002dconnected_002dcolor-_003cstring_003e-262"><code>--connected-color <string></code></a>: <a href="#Colors">Colors</a></li>
-<li><a href="#index-g_t_002d_002dcopper_002dheight-_003cnum_003e-365"><code>--copper-height <num></code></a>: <a href="#nelma-Options">nelma Options</a></li>
+<li><a href="#index-g_t_002d_002d-basename-_003cstring_003e-380"><code>-- basename <string></code></a>: <a href="#nelma-Options">nelma Options</a></li>
+<li><a href="#index-g_t_002d_002daction_002dscript-_003cstring_003e-229"><code>--action-script <string></code></a>: <a href="#General-Options">General Options</a></li>
+<li><a href="#index-g_t_002d_002daction_002dstring-_003cstring_003e-230"><code>--action-string <string></code></a>: <a href="#General-Options">General Options</a></li>
+<li><a href="#index-g_t_002d_002dalign_002dmarks-329"><code>--align-marks</code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002dalignment_002ddistance-_003cnum_003e-300"><code>--alignment-distance <num></code></a>: <a href="#Sizes">Sizes</a></li>
+<li><a href="#index-g_t_002d_002dall_002ddirection_002dlines-246"><code>--all-direction-lines</code></a>: <a href="#General-GUI-Options">General GUI Options</a></li>
+<li><a href="#index-g_t_002d_002dall_002dlayers-322"><code>--all-layers</code></a>: <a href="#Gerber-Export">Gerber Export</a></li>
+<li><a href="#index-g_t_002d_002das_002dshown-362"><code>--as-shown</code></a>: <a href="#PNG-Options">PNG Options</a></li>
+<li><a href="#index-g_t_002d_002das_002dshown-353"><code>--as-shown</code></a>: <a href="#Encapsulated-Postscript-Export">Encapsulated Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002dauto_002dmirror-333"><code>--auto-mirror</code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002dbackground_002dcolor-_003cstring_003e-256"><code>--background-color <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002dbackup_002dinterval-225"><code>--backup-interval</code></a>: <a href="#General-Options">General Options</a></li>
+<li><a href="#index-g_t_002d_002dbg_002dimage-_003cstring_003e-252"><code>--bg-image <string></code></a>: <a href="#lesstif-GUI-Options">lesstif GUI Options</a></li>
+<li><a href="#index-g_t_002d_002dbg_002dimage-_003cstring_003e-249"><code>--bg-image <string></code></a>: <a href="#GTK_002b-GUI-Options">GTK+ GUI Options</a></li>
+<li><a href="#index-g_t_002d_002dblack_002dcolor-_003cstring_003e-254"><code>--black-color <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002dbloat-_003cnum_003e-312"><code>--bloat <num></code></a>: <a href="#DRC-Options">DRC Options</a></li>
+<li><a href="#index-g_t_002d_002dbomfile-_003cstring_003e-318"><code>--bomfile <string></code></a>: <a href="#BOM-Creation">BOM Creation</a></li>
+<li><a href="#index-g_t_002d_002dclear_002dincrement_002dmil-_003cstring_003e-221"><code>--clear-increment-mil <string></code></a>: <a href="#General-Options">General Options</a></li>
+<li><a href="#index-g_t_002d_002dclear_002dincrement_002dmm-_003cstring_003e-217"><code>--clear-increment-mm <string></code></a>: <a href="#General-Options">General Options</a></li>
+<li><a href="#index-g_t_002d_002dclear_002dline-242"><code>--clear-line</code></a>: <a href="#General-GUI-Options">General GUI Options</a></li>
+<li><a href="#index-g_t_002d_002dconnected_002dcolor-_003cstring_003e-270"><code>--connected-color <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002dcopper_002dheight-_003cnum_003e-382"><code>--copper-height <num></code></a>: <a href="#nelma-Options">nelma Options</a></li>
 <li><a href="#index-g_t_002d_002dcopyright-212"><code>--copyright</code></a>: <a href="#General-Options">General Options</a></li>
-<li><a href="#index-g_t_002d_002dcross_002dcolor-_003cstring_003e-250"><code>--cross-color <string></code></a>: <a href="#Colors">Colors</a></li>
-<li><a href="#index-g_t_002d_002dcrosshair_002dcolor-_003cstring_003e-249"><code>--crosshair-color <string></code></a>: <a href="#Colors">Colors</a></li>
-<li><a href="#index-g_t_002d_002ddefault_002dfont-_003cstring_003e-279"><code>--default-font <string></code></a>: <a href="#Paths">Paths</a></li>
-<li><a href="#index-g_t_002d_002ddefault_002dPCB_002dheight-_003cnum_003e-289"><code>--default-PCB-height <num></code></a>: <a href="#Sizes">Sizes</a></li>
-<li><a href="#index-g_t_002d_002ddefault_002dPCB_002dwidth-_003cnum_003e-288"><code>--default-PCB-width <num></code></a>: <a href="#Sizes">Sizes</a></li>
-<li><a href="#index-g_t_002d_002ddpi-348"><code>--dpi</code></a>: <a href="#PNG-Options">PNG Options</a></li>
-<li><a href="#index-g_t_002d_002ddpi-_003cnum_003e-364"><code>--dpi <num></code></a>: <a href="#nelma-Options">nelma Options</a></li>
-<li><a href="#index-g_t_002d_002ddraw_002dgrid-233"><code>--draw-grid</code></a>: <a href="#General-GUI-Options">General GUI Options</a></li>
-<li><a href="#index-g_t_002d_002ddrill_002dcopper-337"><code>--drill-copper</code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
-<li><a href="#index-g_t_002d_002ddrill_002dhelper-317"><code>--drill-helper</code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002dcross_002dcolor-_003cstring_003e-258"><code>--cross-color <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002dcrosshair_002dcolor-_003cstring_003e-257"><code>--crosshair-color <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002ddefault_002dfont-_003cstring_003e-288"><code>--default-font <string></code></a>: <a href="#Paths">Paths</a></li>
+<li><a href="#index-g_t_002d_002ddefault_002dPCB_002dheight-_003cnum_003e-298"><code>--default-PCB-height <num></code></a>: <a href="#Sizes">Sizes</a></li>
+<li><a href="#index-g_t_002d_002ddefault_002dPCB_002dwidth-_003cnum_003e-297"><code>--default-PCB-width <num></code></a>: <a href="#Sizes">Sizes</a></li>
+<li><a href="#index-g_t_002d_002ddpi-358"><code>--dpi</code></a>: <a href="#PNG-Options">PNG Options</a></li>
+<li><a href="#index-g_t_002d_002ddpi-_003cnum_003e-381"><code>--dpi <num></code></a>: <a href="#nelma-Options">nelma Options</a></li>
+<li><a href="#index-g_t_002d_002ddraw_002dgrid-241"><code>--draw-grid</code></a>: <a href="#General-GUI-Options">General GUI Options</a></li>
+<li><a href="#index-g_t_002d_002ddrill_002dcopper-347"><code>--drill-copper</code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002ddrill_002dhelper-327"><code>--drill-helper</code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
 <li><a href="#index-g_t_002d_002ddump_002dactions-215"><code>--dump-actions</code></a>: <a href="#General-Options">General Options</a></li>
-<li><a href="#index-g_t_002d_002delement_002dcolor-_003cstring_003e-256"><code>--element-color <string></code></a>: <a href="#Colors">Colors</a></li>
-<li><a href="#index-g_t_002d_002delement_002dcommand-_003cstring_003e-296"><code>--element-command <string></code></a>: <a href="#Commands">Commands</a></li>
-<li><a href="#index-g_t_002d_002delement_002dpath-_003cstring_003e-220"><code>--element-path <string></code></a>: <a href="#General-Options">General Options</a></li>
-<li><a href="#index-g_t_002d_002delement_002dselected_002dcolor-_003cstring_003e-260"><code>--element-selected-color <string></code></a>: <a href="#Colors">Colors</a></li>
-<li><a href="#index-g_t_002d_002deps_002dfile-_003cstring_003e-340"><code>--eps-file <string></code></a>: <a href="#Encapsulated-Postscript-Export">Encapsulated Postscript Export</a></li>
-<li><a href="#index-g_t_002d_002deps_002dscale-_003cnum_003e-341"><code>--eps-scale <num></code></a>: <a href="#Encapsulated-Postscript-Export">Encapsulated Postscript Export</a></li>
-<li><a href="#index-g_t_002d_002dfab_002dauthor-_003cstring_003e-223"><code>--fab-author <string></code></a>: <a href="#General-Options">General Options</a></li>
-<li><a href="#index-g_t_002d_002dfile_002dcommand-_003cstring_003e-295"><code>--file-command <string></code></a>: <a href="#Commands">Commands</a></li>
-<li><a href="#index-g_t_002d_002dfile_002dpath-_003cstring_003e-280"><code>--file-path <string></code></a>: <a href="#Paths">Paths</a></li>
-<li><a href="#index-g_t_002d_002dfill_002dpage-322"><code>--fill-page</code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
-<li><a href="#index-g_t_002d_002dfont_002dcommand-_003cstring_003e-294"><code>--font-command <string></code></a>: <a href="#Commands">Commands</a></li>
-<li><a href="#index-g_t_002d_002dfont_002dpath-_003cstring_003e-281"><code>--font-path <string></code></a>: <a href="#Paths">Paths</a></li>
-<li><a href="#index-g_t_002d_002dformat-_003cstring_003e-356"><code>--format <string></code></a>: <a href="#PNG-Options">PNG Options</a></li>
-<li><a href="#index-g_t_002d_002dfull_002dpoly-235"><code>--full-poly</code></a>: <a href="#General-GUI-Options">General GUI Options</a></li>
-<li><a href="#index-g_t_002d_002dgerberfile-_003cstring_003e-312"><code>--gerberfile <string></code></a>: <a href="#Gerber-Export">Gerber Export</a></li>
-<li><a href="#index-g_t_002d_002dgrid-_003cnum_003e-292"><code>--grid <num></code></a>: <a href="#Sizes">Sizes</a></li>
-<li><a href="#index-g_t_002d_002dgrid_002dcolor-_003cstring_003e-264"><code>--grid-color <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002delement_002dcolor-_003cstring_003e-264"><code>--element-color <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002delement_002dcommand-_003cstring_003e-305"><code>--element-command <string></code></a>: <a href="#Commands">Commands</a></li>
+<li><a href="#index-g_t_002d_002delement_002dpath-_003cstring_003e-228"><code>--element-path <string></code></a>: <a href="#General-Options">General Options</a></li>
+<li><a href="#index-g_t_002d_002delement_002dselected_002dcolor-_003cstring_003e-268"><code>--element-selected-color <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002deps_002dfile-_003cstring_003e-350"><code>--eps-file <string></code></a>: <a href="#Encapsulated-Postscript-Export">Encapsulated Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002deps_002dscale-_003cnum_003e-351"><code>--eps-scale <num></code></a>: <a href="#Encapsulated-Postscript-Export">Encapsulated Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002dfab_002dauthor-_003cstring_003e-231"><code>--fab-author <string></code></a>: <a href="#General-Options">General Options</a></li>
+<li><a href="#index-g_t_002d_002dfile_002dcommand-_003cstring_003e-304"><code>--file-command <string></code></a>: <a href="#Commands">Commands</a></li>
+<li><a href="#index-g_t_002d_002dfile_002dpath-_003cstring_003e-289"><code>--file-path <string></code></a>: <a href="#Paths">Paths</a></li>
+<li><a href="#index-g_t_002d_002dfill_002dholes-366"><code>--fill-holes</code></a>: <a href="#PNG-Options">PNG Options</a></li>
+<li><a href="#index-g_t_002d_002dfill_002dpage-332"><code>--fill-page</code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002dfont_002dcommand-_003cstring_003e-303"><code>--font-command <string></code></a>: <a href="#Commands">Commands</a></li>
+<li><a href="#index-g_t_002d_002dfont_002dpath-_003cstring_003e-290"><code>--font-path <string></code></a>: <a href="#Paths">Paths</a></li>
+<li><a href="#index-g_t_002d_002dformat-_003cstring_003e-367"><code>--format <string></code></a>: <a href="#PNG-Options">PNG Options</a></li>
+<li><a href="#index-g_t_002d_002dfound_002dcolor-_003cstring_003e-271"><code>--found-color <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002dfull_002dpoly-243"><code>--full-poly</code></a>: <a href="#General-GUI-Options">General GUI Options</a></li>
+<li><a href="#index-g_t_002d_002dgerberfile-_003cstring_003e-321"><code>--gerberfile <string></code></a>: <a href="#Gerber-Export">Gerber Export</a></li>
+<li><a href="#index-g_t_002d_002dgrid-_003cnum_003e-301"><code>--grid <num></code></a>: <a href="#Sizes">Sizes</a></li>
+<li><a href="#index-g_t_002d_002dgrid_002dcolor-_003cstring_003e-273"><code>--grid-color <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002dgrid_002dincrement_002dmil-_003cstring_003e-222"><code>--grid-increment-mil <string></code></a>: <a href="#General-Options">General Options</a></li>
+<li><a href="#index-g_t_002d_002dgrid_002dincrement_002dmm-_003cstring_003e-218"><code>--grid-increment-mm <string></code></a>: <a href="#General-Options">General Options</a></li>
 <li><a href="#index-g_t_002d_002dgrid_002dunits_002dmm-_003cstring_003e-216"><code>--grid-units-mm <string></code></a>: <a href="#General-Options">General Options</a></li>
-<li><a href="#index-g_t_002d_002dgroups-_003cstring_003e-218"><code>--groups <string></code></a>: <a href="#General-Options">General Options</a></li>
+<li><a href="#index-g_t_002d_002dgroups-_003cstring_003e-226"><code>--groups <string></code></a>: <a href="#General-Options">General Options</a></li>
 <li><a href="#index-g_t_002d_002dhelp-209"><code>--help</code></a>: <a href="#General-Options">General Options</a></li>
-<li><a href="#index-g_t_002d_002dinvisible_002dmark_002dcolor-_003cstring_003e-259"><code>--invisible-mark-color <string></code></a>: <a href="#Colors">Colors</a></li>
-<li><a href="#index-g_t_002d_002dinvisible_002dobjects_002dcolor-_003cstring_003e-258"><code>--invisible-objects-color <string></code></a>: <a href="#Colors">Colors</a></li>
-<li><a href="#index-g_t_002d_002dkeepaway-_003cnum_003e-287"><code>--keepaway <num></code></a>: <a href="#Sizes">Sizes</a></li>
-<li><a href="#index-g_t_002d_002dlayer_002dcolor_002d_003cn_003e-_003cstring_003e-265"><code>--layer-color-<n> <string></code></a>: <a href="#Colors">Colors</a></li>
-<li><a href="#index-g_t_002d_002dlayer_002dname_002d1-_003cstring_003e-269"><code>--layer-name-1 <string></code></a>: <a href="#Layer-Names">Layer Names</a></li>
-<li><a href="#index-g_t_002d_002dlayer_002dname_002d2-_003cstring_003e-270"><code>--layer-name-2 <string></code></a>: <a href="#Layer-Names">Layer Names</a></li>
-<li><a href="#index-g_t_002d_002dlayer_002dname_002d3-_003cstring_003e-271"><code>--layer-name-3 <string></code></a>: <a href="#Layer-Names">Layer Names</a></li>
-<li><a href="#index-g_t_002d_002dlayer_002dname_002d4-_003cstring_003e-272"><code>--layer-name-4 <string></code></a>: <a href="#Layer-Names">Layer Names</a></li>
-<li><a href="#index-g_t_002d_002dlayer_002dname_002d5-_003cstring_003e-273"><code>--layer-name-5 <string></code></a>: <a href="#Layer-Names">Layer Names</a></li>
-<li><a href="#index-g_t_002d_002dlayer_002dname_002d6-_003cstring_003e-274"><code>--layer-name-6 <string></code></a>: <a href="#Layer-Names">Layer Names</a></li>
-<li><a href="#index-g_t_002d_002dlayer_002dname_002d7-_003cstring_003e-275"><code>--layer-name-7 <string></code></a>: <a href="#Layer-Names">Layer Names</a></li>
-<li><a href="#index-g_t_002d_002dlayer_002dname_002d8-_003cstring_003e-276"><code>--layer-name-8 <string></code></a>: <a href="#Layer-Names">Layer Names</a></li>
-<li><a href="#index-g_t_002d_002dlayer_002dselected_002dcolor_002d_003cn_003e-_003cstring_003e-266"><code>--layer-selected-color-<n> <string></code></a>: <a href="#Colors">Colors</a></li>
-<li><a href="#index-g_t_002d_002dlayer_002dstack-_003cstring_003e-224"><code>--layer-stack <string></code></a>: <a href="#General-Options">General Options</a></li>
-<li><a href="#index-g_t_002d_002dlib_002dcommand-_003cstring_003e-299"><code>--lib-command <string></code></a>: <a href="#Commands">Commands</a></li>
-<li><a href="#index-g_t_002d_002dlib_002dcommand_002ddir-_003cstring_003e-298"><code>--lib-command-dir <string></code></a>: <a href="#Commands">Commands</a></li>
-<li><a href="#index-g_t_002d_002dlib_002dcontents_002dcommand-_003cstring_003e-300"><code>--lib-contents-command <string></code></a>: <a href="#Commands">Commands</a></li>
-<li><a href="#index-g_t_002d_002dlib_002dname-_003cstring_003e-278"><code>--lib-name <string></code></a>: <a href="#Paths">Paths</a></li>
-<li><a href="#index-g_t_002d_002dlib_002dnewlib-_003cstring_003e-277"><code>--lib-newlib <string></code></a>: <a href="#Paths">Paths</a></li>
-<li><a href="#index-g_t_002d_002dlib_002dpath-_003cstring_003e-282"><code>--lib-path <string></code></a>: <a href="#Paths">Paths</a></li>
-<li><a href="#index-g_t_002d_002dline_002dthickness-_003cnum_003e-285"><code>--line-thickness <num></code></a>: <a href="#Sizes">Sizes</a></li>
-<li><a href="#index-g_t_002d_002dlisten-243"><code>--listen</code></a>: <a href="#lesstif-GUI-Options">lesstif GUI Options</a></li>
-<li><a href="#index-g_t_002d_002dlisten-240"><code>--listen</code></a>: <a href="#GTK_002b-GUI-Options">GTK+ GUI Options</a></li>
-<li><a href="#index-g_t_002d_002dlprcommand-_003cstring_003e-362"><code>--lprcommand <string></code></a>: <a href="#lpr-Printing-Options">lpr Printing Options</a></li>
-<li><a href="#index-g_t_002d_002dmask_002dcolor-_003cstring_003e-268"><code>--mask-color <string></code></a>: <a href="#Colors">Colors</a></li>
-<li><a href="#index-g_t_002d_002dmedia-_003cmedia_002dname_003e-329"><code>--media <media-name></code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
-<li><a href="#index-g_t_002d_002dmin_002ddrill-_003cnum_003e-307"><code>--min-drill <num></code></a>: <a href="#DRC-Options">DRC Options</a></li>
-<li><a href="#index-g_t_002d_002dmin_002dring-_003cnum_003e-308"><code>--min-ring <num></code></a>: <a href="#DRC-Options">DRC Options</a></li>
-<li><a href="#index-g_t_002d_002dmin_002dsilk-_003cnum_003e-306"><code>--min-silk <num></code></a>: <a href="#DRC-Options">DRC Options</a></li>
-<li><a href="#index-g_t_002d_002dmin_002dwidth-_003cnum_003e-305"><code>--min-width <num></code></a>: <a href="#DRC-Options">DRC Options</a></li>
-<li><a href="#index-g_t_002d_002dminimum-polygon-area-_003cnum_003e-293"><code>--minimum polygon area <num></code></a>: <a href="#Sizes">Sizes</a></li>
-<li><a href="#index-g_t_002d_002dmirror-321"><code>--mirror</code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
-<li><a href="#index-g_t_002d_002dmonochrome-353"><code>--monochrome</code></a>: <a href="#PNG-Options">PNG Options</a></li>
-<li><a href="#index-g_t_002d_002dmonochrome-344"><code>--monochrome</code></a>: <a href="#Encapsulated-Postscript-Export">Encapsulated Postscript Export</a></li>
-<li><a href="#index-g_t_002d_002dmulti_002dfile-334"><code>--multi-file</code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
-<li><a href="#index-g_t_002d_002doff_002dlimit_002dcolor-_003cstring_003e-263"><code>--off-limit-color <string></code></a>: <a href="#Colors">Colors</a></li>
-<li><a href="#index-g_t_002d_002donly_002dvisible-346"><code>--only-visible</code></a>: <a href="#Encapsulated-Postscript-Export">Encapsulated Postscript Export</a></li>
-<li><a href="#index-g_t_002d_002donly_002dvivible-354"><code>--only-vivible</code></a>: <a href="#PNG-Options">PNG Options</a></li>
-<li><a href="#index-g_t_002d_002doutfile-_003cstring_003e-347"><code>--outfile <string></code></a>: <a href="#PNG-Options">PNG Options</a></li>
-<li><a href="#index-g_t_002d_002doutline-320"><code>--outline</code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
-<li><a href="#index-g_t_002d_002dpcb_002dmenu-_003cstring_003e-245"><code>--pcb-menu <string></code></a>: <a href="#lesstif-GUI-Options">lesstif GUI Options</a></li>
-<li><a href="#index-g_t_002d_002dpcb_002dmenu-_003cstring_003e-242"><code>--pcb-menu <string></code></a>: <a href="#GTK_002b-GUI-Options">GTK+ GUI Options</a></li>
-<li><a href="#index-g_t_002d_002dphoto_002dflip_002dx-360"><code>--photo-flip-x</code></a>: <a href="#PNG-Options">PNG Options</a></li>
-<li><a href="#index-g_t_002d_002dphoto_002dflip_002dy-361"><code>--photo-flip-y</code></a>: <a href="#PNG-Options">PNG Options</a></li>
-<li><a href="#index-g_t_002d_002dphoto_002dmode-359"><code>--photo-mode</code></a>: <a href="#PNG-Options">PNG Options</a></li>
-<li><a href="#index-g_t_002d_002dpin_002dcolor-_003cstring_003e-253"><code>--pin-color <string></code></a>: <a href="#Colors">Colors</a></li>
-<li><a href="#index-g_t_002d_002dpin_002dname_002dcolor-_003cstring_003e-255"><code>--pin-name-color <string></code></a>: <a href="#Colors">Colors</a></li>
-<li><a href="#index-g_t_002d_002dpin_002dselected_002dcolor-_003cstring_003e-254"><code>--pin-selected-color <string></code></a>: <a href="#Colors">Colors</a></li>
-<li><a href="#index-g_t_002d_002dpinout_002doffset_002dx-_003cnum_003e-229"><code>--pinout-offset-x <num></code></a>: <a href="#General-GUI-Options">General GUI Options</a></li>
-<li><a href="#index-g_t_002d_002dpinout_002doffset_002dy-_003cnum_003e-230"><code>--pinout-offset-y <num></code></a>: <a href="#General-GUI-Options">General GUI Options</a></li>
-<li><a href="#index-g_t_002d_002dpinout_002dtext_002doffset_002dx-_003cnum_003e-231"><code>--pinout-text-offset-x <num></code></a>: <a href="#General-GUI-Options">General GUI Options</a></li>
-<li><a href="#index-g_t_002d_002dpinout_002dtext_002doffset_002dy-_003cnum_003e-232"><code>--pinout-text-offset-y <num></code></a>: <a href="#General-GUI-Options">General GUI Options</a></li>
-<li><a href="#index-g_t_002d_002dpng_002dbloat-_003cnum_003e_003cdim_003e-357"><code>--png-bloat <num><dim></code></a>: <a href="#PNG-Options">PNG Options</a></li>
-<li><a href="#index-g_t_002d_002dprint_002dfile-_003cstring_003e-297"><code>--print-file <string></code></a>: <a href="#Commands">Commands</a></li>
-<li><a href="#index-g_t_002d_002dps_002dbloat-_003cnum_003e-326"><code>--ps-bloat <num></code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
-<li><a href="#index-g_t_002d_002dps_002dcolor-324"><code>--ps-color</code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
-<li><a href="#index-g_t_002d_002dps_002dinvert-328"><code>--ps-invert</code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
-<li><a href="#index-g_t_002d_002dpsfade-_003cnum_003e-331"><code>--psfade <num></code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
-<li><a href="#index-g_t_002d_002dpsfile-_003cstring_003e-315"><code>--psfile <string></code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
-<li><a href="#index-g_t_002d_002drat_002dcolor-_003cstring_003e-257"><code>--rat-color <string></code></a>: <a href="#Colors">Colors</a></li>
-<li><a href="#index-g_t_002d_002drat_002dcommand-_003cstring_003e-302"><code>--rat-command <string></code></a>: <a href="#Commands">Commands</a></li>
-<li><a href="#index-g_t_002d_002drat_002dselected_002dcolor-_003cstring_003e-261"><code>--rat-selected-color <string></code></a>: <a href="#Colors">Colors</a></li>
-<li><a href="#index-g_t_002d_002drat_002dthickness-_003cnum_003e-286"><code>--rat-thickness <num></code></a>: <a href="#Sizes">Sizes</a></li>
-<li><a href="#index-g_t_002d_002dreset_002dafter_002delement-227"><code>--reset-after-element</code></a>: <a href="#General-Options">General Options</a></li>
-<li><a href="#index-g_t_002d_002dring_002dbell_002dfinished-228"><code>--ring-bell-finished</code></a>: <a href="#General-Options">General Options</a></li>
-<li><a href="#index-g_t_002d_002droute_002dstyles-_003cstring_003e-219"><code>--route-styles <string></code></a>: <a href="#General-Options">General Options</a></li>
-<li><a href="#index-g_t_002d_002dsave_002dcommand-_003cstring_003e-301"><code>--save-command <string></code></a>: <a href="#Commands">Commands</a></li>
-<li><a href="#index-g_t_002d_002dsave_002din_002dtmp-226"><code>--save-in-tmp</code></a>: <a href="#General-Options">General Options</a></li>
-<li><a href="#index-g_t_002d_002dsave_002dlast_002dcommand-225"><code>--save-last-command</code></a>: <a href="#General-Options">General Options</a></li>
-<li><a href="#index-g_t_002d_002dscale-_003cnum_003e-332"><code>--scale <num></code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002dinvisible_002dmark_002dcolor-_003cstring_003e-267"><code>--invisible-mark-color <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002dinvisible_002dobjects_002dcolor-_003cstring_003e-266"><code>--invisible-objects-color <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002dkeepaway-_003cnum_003e-296"><code>--keepaway <num></code></a>: <a href="#Sizes">Sizes</a></li>
+<li><a href="#index-g_t_002d_002dlayer_002dcolor_002d_003cn_003e-_003cstring_003e-274"><code>--layer-color-<n> <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002dlayer_002dname_002d1-_003cstring_003e-278"><code>--layer-name-1 <string></code></a>: <a href="#Layer-Names">Layer Names</a></li>
+<li><a href="#index-g_t_002d_002dlayer_002dname_002d2-_003cstring_003e-279"><code>--layer-name-2 <string></code></a>: <a href="#Layer-Names">Layer Names</a></li>
+<li><a href="#index-g_t_002d_002dlayer_002dname_002d3-_003cstring_003e-280"><code>--layer-name-3 <string></code></a>: <a href="#Layer-Names">Layer Names</a></li>
+<li><a href="#index-g_t_002d_002dlayer_002dname_002d4-_003cstring_003e-281"><code>--layer-name-4 <string></code></a>: <a href="#Layer-Names">Layer Names</a></li>
+<li><a href="#index-g_t_002d_002dlayer_002dname_002d5-_003cstring_003e-282"><code>--layer-name-5 <string></code></a>: <a href="#Layer-Names">Layer Names</a></li>
+<li><a href="#index-g_t_002d_002dlayer_002dname_002d6-_003cstring_003e-283"><code>--layer-name-6 <string></code></a>: <a href="#Layer-Names">Layer Names</a></li>
+<li><a href="#index-g_t_002d_002dlayer_002dname_002d7-_003cstring_003e-284"><code>--layer-name-7 <string></code></a>: <a href="#Layer-Names">Layer Names</a></li>
+<li><a href="#index-g_t_002d_002dlayer_002dname_002d8-_003cstring_003e-285"><code>--layer-name-8 <string></code></a>: <a href="#Layer-Names">Layer Names</a></li>
+<li><a href="#index-g_t_002d_002dlayer_002dselected_002dcolor_002d_003cn_003e-_003cstring_003e-275"><code>--layer-selected-color-<n> <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002dlayer_002dstack-_003cstring_003e-232"><code>--layer-stack <string></code></a>: <a href="#General-Options">General Options</a></li>
+<li><a href="#index-g_t_002d_002dlib_002dcommand-_003cstring_003e-308"><code>--lib-command <string></code></a>: <a href="#Commands">Commands</a></li>
+<li><a href="#index-g_t_002d_002dlib_002dcommand_002ddir-_003cstring_003e-307"><code>--lib-command-dir <string></code></a>: <a href="#Commands">Commands</a></li>
+<li><a href="#index-g_t_002d_002dlib_002dcontents_002dcommand-_003cstring_003e-309"><code>--lib-contents-command <string></code></a>: <a href="#Commands">Commands</a></li>
+<li><a href="#index-g_t_002d_002dlib_002dname-_003cstring_003e-287"><code>--lib-name <string></code></a>: <a href="#Paths">Paths</a></li>
+<li><a href="#index-g_t_002d_002dlib_002dnewlib-_003cstring_003e-286"><code>--lib-newlib <string></code></a>: <a href="#Paths">Paths</a></li>
+<li><a href="#index-g_t_002d_002dlib_002dpath-_003cstring_003e-291"><code>--lib-path <string></code></a>: <a href="#Paths">Paths</a></li>
+<li><a href="#index-g_t_002d_002dline_002dincrement_002dmil-_003cstring_003e-223"><code>--line-increment-mil <string></code></a>: <a href="#General-Options">General Options</a></li>
+<li><a href="#index-g_t_002d_002dline_002dincrement_002dmm-_003cstring_003e-219"><code>--line-increment-mm <string></code></a>: <a href="#General-Options">General Options</a></li>
+<li><a href="#index-g_t_002d_002dline_002dthickness-_003cnum_003e-294"><code>--line-thickness <num></code></a>: <a href="#Sizes">Sizes</a></li>
+<li><a href="#index-g_t_002d_002dlisten-251"><code>--listen</code></a>: <a href="#lesstif-GUI-Options">lesstif GUI Options</a></li>
+<li><a href="#index-g_t_002d_002dlisten-248"><code>--listen</code></a>: <a href="#GTK_002b-GUI-Options">GTK+ GUI Options</a></li>
+<li><a href="#index-g_t_002d_002dlprcommand-_003cstring_003e-379"><code>--lprcommand <string></code></a>: <a href="#lpr-Printing-Options">lpr Printing Options</a></li>
+<li><a href="#index-g_t_002d_002dmask_002dcolor-_003cstring_003e-277"><code>--mask-color <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002dmedia-_003cmedia_002dname_003e-339"><code>--media <media-name></code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002dmetric-324"><code>--metric</code></a>: <a href="#Gerber-Export">Gerber Export</a></li>
+<li><a href="#index-g_t_002d_002dmin_002ddrill-_003cnum_003e-316"><code>--min-drill <num></code></a>: <a href="#DRC-Options">DRC Options</a></li>
+<li><a href="#index-g_t_002d_002dmin_002dring-_003cnum_003e-317"><code>--min-ring <num></code></a>: <a href="#DRC-Options">DRC Options</a></li>
+<li><a href="#index-g_t_002d_002dmin_002dsilk-_003cnum_003e-315"><code>--min-silk <num></code></a>: <a href="#DRC-Options">DRC Options</a></li>
+<li><a href="#index-g_t_002d_002dmin_002dwidth-_003cnum_003e-314"><code>--min-width <num></code></a>: <a href="#DRC-Options">DRC Options</a></li>
+<li><a href="#index-g_t_002d_002dminimum-polygon-area-_003cnum_003e-302"><code>--minimum polygon area <num></code></a>: <a href="#Sizes">Sizes</a></li>
+<li><a href="#index-g_t_002d_002dmirror-331"><code>--mirror</code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002dmonochrome-363"><code>--monochrome</code></a>: <a href="#PNG-Options">PNG Options</a></li>
+<li><a href="#index-g_t_002d_002dmonochrome-354"><code>--monochrome</code></a>: <a href="#Encapsulated-Postscript-Export">Encapsulated Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002dmulti_002dfile-344"><code>--multi-file</code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002doff_002dlimit_002dcolor-_003cstring_003e-272"><code>--off-limit-color <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002donly_002dvisible-364"><code>--only-visible</code></a>: <a href="#PNG-Options">PNG Options</a></li>
+<li><a href="#index-g_t_002d_002donly_002dvisible-356"><code>--only-visible</code></a>: <a href="#Encapsulated-Postscript-Export">Encapsulated Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002doutfile-_003cstring_003e-357"><code>--outfile <string></code></a>: <a href="#PNG-Options">PNG Options</a></li>
+<li><a href="#index-g_t_002d_002doutline-330"><code>--outline</code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002dpcb_002dmenu-_003cstring_003e-253"><code>--pcb-menu <string></code></a>: <a href="#lesstif-GUI-Options">lesstif GUI Options</a></li>
+<li><a href="#index-g_t_002d_002dpcb_002dmenu-_003cstring_003e-250"><code>--pcb-menu <string></code></a>: <a href="#GTK_002b-GUI-Options">GTK+ GUI Options</a></li>
+<li><a href="#index-g_t_002d_002dphoto_002dflip_002dx-371"><code>--photo-flip-x</code></a>: <a href="#PNG-Options">PNG Options</a></li>
+<li><a href="#index-g_t_002d_002dphoto_002dflip_002dy-372"><code>--photo-flip-y</code></a>: <a href="#PNG-Options">PNG Options</a></li>
+<li><a href="#index-g_t_002d_002dphoto_002dmask_002dcolour-_003ccolour_003e-374"><code>--photo-mask-colour <colour></code></a>: <a href="#PNG-Options">PNG Options</a></li>
+<li><a href="#index-g_t_002d_002dphoto_002dmode-370"><code>--photo-mode</code></a>: <a href="#PNG-Options">PNG Options</a></li>
+<li><a href="#index-g_t_002d_002dphoto_002dplating-376"><code>--photo-plating</code></a>: <a href="#PNG-Options">PNG Options</a></li>
+<li><a href="#index-g_t_002d_002dphoto_002dsilk_002dcolour-378"><code>--photo-silk-colour</code></a>: <a href="#PNG-Options">PNG Options</a></li>
+<li><a href="#index-g_t_002d_002dpin_002dcolor-_003cstring_003e-261"><code>--pin-color <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002dpin_002dname_002dcolor-_003cstring_003e-263"><code>--pin-name-color <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002dpin_002dselected_002dcolor-_003cstring_003e-262"><code>--pin-selected-color <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002dpinout_002doffset_002dx-_003cnum_003e-237"><code>--pinout-offset-x <num></code></a>: <a href="#General-GUI-Options">General GUI Options</a></li>
+<li><a href="#index-g_t_002d_002dpinout_002doffset_002dy-_003cnum_003e-238"><code>--pinout-offset-y <num></code></a>: <a href="#General-GUI-Options">General GUI Options</a></li>
+<li><a href="#index-g_t_002d_002dpinout_002dtext_002doffset_002dx-_003cnum_003e-239"><code>--pinout-text-offset-x <num></code></a>: <a href="#General-GUI-Options">General GUI Options</a></li>
+<li><a href="#index-g_t_002d_002dpinout_002dtext_002doffset_002dy-_003cnum_003e-240"><code>--pinout-text-offset-y <num></code></a>: <a href="#General-GUI-Options">General GUI Options</a></li>
+<li><a href="#index-g_t_002d_002dpng_002dbloat-_003cnum_003e_003cdim_003e-368"><code>--png-bloat <num><dim></code></a>: <a href="#PNG-Options">PNG Options</a></li>
+<li><a href="#index-g_t_002d_002dprint_002dfile-_003cstring_003e-306"><code>--print-file <string></code></a>: <a href="#Commands">Commands</a></li>
+<li><a href="#index-g_t_002d_002dps_002dbloat-_003cnum_003e-336"><code>--ps-bloat <num></code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002dps_002dcolor-334"><code>--ps-color</code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002dps_002dinvert-338"><code>--ps-invert</code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002dpsfade-_003cnum_003e-341"><code>--psfade <num></code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002dpsfile-_003cstring_003e-325"><code>--psfile <string></code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002drat_002dcolor-_003cstring_003e-265"><code>--rat-color <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002drat_002dcommand-_003cstring_003e-311"><code>--rat-command <string></code></a>: <a href="#Commands">Commands</a></li>
+<li><a href="#index-g_t_002d_002drat_002dselected_002dcolor-_003cstring_003e-269"><code>--rat-selected-color <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002drat_002dthickness-_003cnum_003e_003cunit_003e-295"><code>--rat-thickness <num><unit></code></a>: <a href="#Sizes">Sizes</a></li>
+<li><a href="#index-g_t_002d_002dreset_002dafter_002delement-235"><code>--reset-after-element</code></a>: <a href="#General-Options">General Options</a></li>
+<li><a href="#index-g_t_002d_002dring_002dbell_002dfinished-236"><code>--ring-bell-finished</code></a>: <a href="#General-Options">General Options</a></li>
+<li><a href="#index-g_t_002d_002droute_002dstyles-_003cstring_003e-227"><code>--route-styles <string></code></a>: <a href="#General-Options">General Options</a></li>
+<li><a href="#index-g_t_002d_002dsave_002dcommand-_003cstring_003e-310"><code>--save-command <string></code></a>: <a href="#Commands">Commands</a></li>
+<li><a href="#index-g_t_002d_002dsave_002din_002dtmp-234"><code>--save-in-tmp</code></a>: <a href="#General-Options">General Options</a></li>
+<li><a href="#index-g_t_002d_002dsave_002dlast_002dcommand-233"><code>--save-last-command</code></a>: <a href="#General-Options">General Options</a></li>
+<li><a href="#index-g_t_002d_002dscale-_003cnum_003e-342"><code>--scale <num></code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
 <li><a href="#index-g_t_002d_002dshow_002dactions-214"><code>--show-actions</code></a>: <a href="#General-Options">General Options</a></li>
 <li><a href="#index-g_t_002d_002dshow_002ddefaults-213"><code>--show-defaults</code></a>: <a href="#General-Options">General Options</a></li>
-<li><a href="#index-g_t_002d_002dshow_002dlegend-339"><code>--show-legend</code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
-<li><a href="#index-g_t_002d_002dshow_002dnumber-239"><code>--show-number</code></a>: <a href="#General-GUI-Options">General GUI Options</a></li>
-<li><a href="#index-g_t_002d_002dshrink-_003cnum_003e-304"><code>--shrink <num></code></a>: <a href="#DRC-Options">DRC Options</a></li>
-<li><a href="#index-g_t_002d_002dsnap_002dpin-237"><code>--snap-pin</code></a>: <a href="#General-GUI-Options">General GUI Options</a></li>
-<li><a href="#index-g_t_002d_002dsubstrate_002depsilon-_003cnum_003e-367"><code>--substrate-epsilon <num></code></a>: <a href="#nelma-Options">nelma Options</a></li>
-<li><a href="#index-g_t_002d_002dsubstrate_002dheight-_003cnum_003e-366"><code>--substrate-height <num></code></a>: <a href="#nelma-Options">nelma Options</a></li>
-<li><a href="#index-g_t_002d_002dtext_002dscale-_003cnum_003e-290"><code>--text-scale <num></code></a>: <a href="#Sizes">Sizes</a></li>
-<li><a href="#index-g_t_002d_002dunique_002dnames-236"><code>--unique-names</code></a>: <a href="#General-GUI-Options">General GUI Options</a></li>
-<li><a href="#index-g_t_002d_002duse_002dalpha-355"><code>--use-alpha</code></a>: <a href="#PNG-Options">PNG Options</a></li>
-<li><a href="#index-g_t_002d_002dverbose-314"><code>--verbose</code></a>: <a href="#Gerber-Export">Gerber Export</a></li>
+<li><a href="#index-g_t_002d_002dshow_002dlegend-349"><code>--show-legend</code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002dshow_002dnumber-247"><code>--show-number</code></a>: <a href="#General-GUI-Options">General GUI Options</a></li>
+<li><a href="#index-g_t_002d_002dshrink-_003cnum_003e-313"><code>--shrink <num></code></a>: <a href="#DRC-Options">DRC Options</a></li>
+<li><a href="#index-g_t_002d_002dsize_002dincrement_002dmil-_003cstring_003e-224"><code>--size-increment-mil <string></code></a>: <a href="#General-Options">General Options</a></li>
+<li><a href="#index-g_t_002d_002dsize_002dincrement_002dmm-_003cstring_003e-220"><code>--size-increment-mm <string></code></a>: <a href="#General-Options">General Options</a></li>
+<li><a href="#index-g_t_002d_002dsnap_002dpin-245"><code>--snap-pin</code></a>: <a href="#General-GUI-Options">General GUI Options</a></li>
+<li><a href="#index-g_t_002d_002dsubstrate_002depsilon-_003cnum_003e-384"><code>--substrate-epsilon <num></code></a>: <a href="#nelma-Options">nelma Options</a></li>
+<li><a href="#index-g_t_002d_002dsubstrate_002dheight-_003cnum_003e-383"><code>--substrate-height <num></code></a>: <a href="#nelma-Options">nelma Options</a></li>
+<li><a href="#index-g_t_002d_002dtext_002dscale-_003cnum_003e-299"><code>--text-scale <num></code></a>: <a href="#Sizes">Sizes</a></li>
+<li><a href="#index-g_t_002d_002dunique_002dnames-244"><code>--unique-names</code></a>: <a href="#General-GUI-Options">General GUI Options</a></li>
+<li><a href="#index-g_t_002d_002duse_002dalpha-365"><code>--use-alpha</code></a>: <a href="#PNG-Options">PNG Options</a></li>
+<li><a href="#index-g_t_002d_002dverbose-323"><code>--verbose</code></a>: <a href="#Gerber-Export">Gerber Export</a></li>
 <li><a href="#index-g_t_002d_002dverbose-211"><code>--verbose</code></a>: <a href="#General-Options">General Options</a></li>
 <li><a href="#index-g_t_002d_002dversion-210"><code>--version</code></a>: <a href="#General-Options">General Options</a></li>
-<li><a href="#index-g_t_002d_002dvia_002dcolor-_003cstring_003e-251"><code>--via-color <string></code></a>: <a href="#Colors">Colors</a></li>
-<li><a href="#index-g_t_002d_002dvia_002ddrilling_002dhole-_003cnum_003e-284"><code>--via-drilling-hole <num></code></a>: <a href="#Sizes">Sizes</a></li>
-<li><a href="#index-g_t_002d_002dvia_002dselected_002dcolor-_003cstring_003e-252"><code>--via-selected-color <string></code></a>: <a href="#Colors">Colors</a></li>
-<li><a href="#index-g_t_002d_002dvia_002dthickness-_003cnum_003e-283"><code>--via-thickness <num></code></a>: <a href="#Sizes">Sizes</a></li>
-<li><a href="#index-g_t_002d_002dwarn_002dcolor-_003cstring_003e-267"><code>--warn-color <string></code></a>: <a href="#Colors">Colors</a></li>
-<li><a href="#index-g_t_002d_002dx_002dmax-349"><code>--x-max</code></a>: <a href="#PNG-Options">PNG Options</a></li>
-<li><a href="#index-g_t_002d_002dxcalib-_003cnum_003e-335"><code>--xcalib <num></code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
-<li><a href="#index-g_t_002d_002dxy_002dmax-351"><code>--xy-max</code></a>: <a href="#PNG-Options">PNG Options</a></li>
-<li><a href="#index-g_t_002d_002dxy_002dunit-_003cunit_003e-311"><code>--xy-unit <unit></code></a>: <a href="#BOM-Creation">BOM Creation</a></li>
-<li><a href="#index-g_t_002d_002dxyfile-_003cstring_003e-310"><code>--xyfile <string></code></a>: <a href="#BOM-Creation">BOM Creation</a></li>
-<li><a href="#index-g_t_002d_002dy_002dmax-350"><code>--y-max</code></a>: <a href="#PNG-Options">PNG Options</a></li>
-<li><a href="#index-g_t_002d_002dycalib-_003cnum_003e-336"><code>--ycalib <num></code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002dvia_002dcolor-_003cstring_003e-259"><code>--via-color <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002dvia_002ddrilling_002dhole-_003cnum_003e-293"><code>--via-drilling-hole <num></code></a>: <a href="#Sizes">Sizes</a></li>
+<li><a href="#index-g_t_002d_002dvia_002dselected_002dcolor-_003cstring_003e-260"><code>--via-selected-color <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002dvia_002dthickness-_003cnum_003e-292"><code>--via-thickness <num></code></a>: <a href="#Sizes">Sizes</a></li>
+<li><a href="#index-g_t_002d_002dwarn_002dcolor-_003cstring_003e-276"><code>--warn-color <string></code></a>: <a href="#Colors">Colors</a></li>
+<li><a href="#index-g_t_002d_002dx_002dmax-359"><code>--x-max</code></a>: <a href="#PNG-Options">PNG Options</a></li>
+<li><a href="#index-g_t_002d_002dxcalib-_003cnum_003e-345"><code>--xcalib <num></code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-g_t_002d_002dxy_002dmax-361"><code>--xy-max</code></a>: <a href="#PNG-Options">PNG Options</a></li>
+<li><a href="#index-g_t_002d_002dxy_002dunit-_003cunit_003e-320"><code>--xy-unit <unit></code></a>: <a href="#BOM-Creation">BOM Creation</a></li>
+<li><a href="#index-g_t_002d_002dxyfile-_003cstring_003e-319"><code>--xyfile <string></code></a>: <a href="#BOM-Creation">BOM Creation</a></li>
+<li><a href="#index-g_t_002d_002dy_002dmax-360"><code>--y-max</code></a>: <a href="#PNG-Options">PNG Options</a></li>
+<li><a href="#index-g_t_002d_002dycalib-_003cnum_003e-346"><code>--ycalib <num></code></a>: <a href="#Postscript-Export">Postscript Export</a></li>
 <li><a href="#index-g_t_003aactionCommand_0028_0029-204"><code>:actionCommand()</code></a>: <a href="#User-Commands">User Commands</a></li>
 <li><a href="#index-g_t_003al-181"><code>:l</code></a>: <a href="#User-Commands">User Commands</a></li>
 <li><a href="#index-g_t_003ale-184"><code>:le</code></a>: <a href="#User-Commands">User Commands</a></li>
@@ -12080,197 +12385,199 @@ Up: <a rel="up" accesskey="u" href="#Top">Top</a>
 <li><a href="#index-g_t_003arn-198"><code>:rn</code></a>: <a href="#User-Commands">User Commands</a></li>
 <li><a href="#index-g_t_003as-195"><code>:s</code></a>: <a href="#User-Commands">User Commands</a></li>
 <li><a href="#index-g_t_003aw_005bq_005d-201"><code>:w[q]</code></a>: <a href="#User-Commands">User Commands</a></li>
-<li><a href="#index-AddRats_0028_0029-576"><code>AddRats()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-ApplyVendor_0028_0029-873"><code>ApplyVendor()</code></a>: <a href="#ApplyVendor-Action">ApplyVendor Action</a></li>
-<li><a href="#index-ApplyVendor_0028_0029-580"><code>ApplyVendor()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-Atomic_0028_0029-583"><code>Atomic()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-Bell_0028_0029-586"><code>Bell()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-ChangeClearSize_0028_0029-589"><code>ChangeClearSize()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-ChangeDrillSize_0028_0029-593"><code>ChangeDrillSize()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-ChangeFlag_0028_0029-597"><code>ChangeFlag()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-ChangeHole_0028_0029-602"><code>ChangeHole()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-ChangeName_0028_0029-605"><code>ChangeName()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-ChangeOctagon_0028_0029-609"><code>ChangeOctagon()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-ChangePinName_0028_0029-613"><code>ChangePinName()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-ChangeSize_0028_0029-616"><code>ChangeSize()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-ChangeSquare_0028_0029-620"><code>ChangeSquare()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-ClrFlag_0028_0029-624"><code>ClrFlag()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-Command_0028_0029-630"><code>Command()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-Connection_0028_0029-633"><code>Connection()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-DeleteRats_0028_0029-640"><code>DeleteRats()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-DisableVendor_0028_0029-876"><code>DisableVendor()</code></a>: <a href="#DisableVendor-Action">DisableVendor Action</a></li>
-<li><a href="#index-DisableVendor_0028_0029-644"><code>DisableVendor()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-DisperseElements_0028_0029-647"><code>DisperseElements()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-Display_0028_0029-652"><code>Display()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-DRC_0028_0029-666"><code>DRC()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-EditLayerGroups_0028_0029-672"><code>EditLayerGroups()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-EnableVendor_0028_0029-879"><code>EnableVendor()</code></a>: <a href="#EnableVendor-Action">EnableVendor Action</a></li>
-<li><a href="#index-EnableVendor_0028_0029-675"><code>EnableVendor()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-ExecuteFile_0028_0029-669"><code>ExecuteFile()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-Load_0028_0029-678"><code>Load()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-LoadVendor_0028_0029-680"><code>LoadVendor()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-LoadVendorFrom_0028_0029-882"><code>LoadVendorFrom()</code></a>: <a href="#LoadVendorFrom-Action">LoadVendorFrom Action</a></li>
-<li><a href="#index-MarkCrosshair_0028_0029-683"><code>MarkCrosshair()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-Mode_0028_0029-686"><code>Mode()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-MovePointer_0028_0029-689"><code>MovePointer()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-MoveToCurrentLayer_0028_0029-692"><code>MoveToCurrentLayer()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-New_0028_0029-695"><code>New()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-PasteBuffer_0028_0029-698"><code>PasteBuffer()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-Polygon_0028_0029-705"><code>Polygon()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-Print_0028_0029-709"><code>Print()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-Quit_0028_0029-712"><code>Quit()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-Redo_0028_0029-715"><code>Redo()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-RemoveSelected_0028_0029-718"><code>RemoveSelected()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-Report_0028_0029-721"><code>Report()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-RouteStyle_0028_0029-725"><code>RouteStyle()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-Save_0028_0029-728"><code>Save()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-Select_0028_0029-731"><code>Select()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-SetFlag_0028_0029-734"><code>SetFlag()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-SetValue_0028_0029-739"><code>SetValue()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-SwapSides_0028_0029-746"><code>SwapSides()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-SwitchDrawingLayer_0028_0029-749"><code>SwitchDrawingLayer()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-ToggleHideName_0028_0029-752"><code>ToggleHideName()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-ToggleVendor_0028_0029-885"><code>ToggleVendor()</code></a>: <a href="#ToggleVendor-Action">ToggleVendor Action</a></li>
-<li><a href="#index-ToggleVendor_0028_0029-756"><code>ToggleVendor()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-ToggleVisibility_0028_0029-759"><code>ToggleVisibility()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-Undo_0028_0029-762"><code>Undo()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-UnloadVendor_0028_0029-888"><code>UnloadVendor()</code></a>: <a href="#UnloadVendor-Action">UnloadVendor Action</a></li>
-<li><a href="#index-UnloadVendor_0028_0029-765"><code>UnloadVendor()</code></a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-Unselect_0028_0029-768"><code>Unselect()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-AddRats_0028_0029-593"><code>AddRats()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-ApplyVendor_0028_0029-892"><code>ApplyVendor()</code></a>: <a href="#ApplyVendor-Action">ApplyVendor Action</a></li>
+<li><a href="#index-ApplyVendor_0028_0029-597"><code>ApplyVendor()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-Atomic_0028_0029-600"><code>Atomic()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-Bell_0028_0029-603"><code>Bell()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-ChangeClearSize_0028_0029-606"><code>ChangeClearSize()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-ChangeDrillSize_0028_0029-610"><code>ChangeDrillSize()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-ChangeFlag_0028_0029-614"><code>ChangeFlag()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-ChangeHole_0028_0029-619"><code>ChangeHole()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-ChangeName_0028_0029-622"><code>ChangeName()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-ChangeOctagon_0028_0029-626"><code>ChangeOctagon()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-ChangePinName_0028_0029-630"><code>ChangePinName()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-ChangeSize_0028_0029-633"><code>ChangeSize()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-ChangeSquare_0028_0029-637"><code>ChangeSquare()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-ClrFlag_0028_0029-641"><code>ClrFlag()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-Command_0028_0029-647"><code>Command()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-Connection_0028_0029-650"><code>Connection()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-DeleteRats_0028_0029-657"><code>DeleteRats()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-DisableVendor_0028_0029-895"><code>DisableVendor()</code></a>: <a href="#DisableVendor-Action">DisableVendor Action</a></li>
+<li><a href="#index-DisableVendor_0028_0029-661"><code>DisableVendor()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-DisperseElements_0028_0029-664"><code>DisperseElements()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-Display_0028_0029-669"><code>Display()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-DRC_0028_0029-683"><code>DRC()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-EditLayerGroups_0028_0029-689"><code>EditLayerGroups()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-EnableVendor_0028_0029-898"><code>EnableVendor()</code></a>: <a href="#EnableVendor-Action">EnableVendor Action</a></li>
+<li><a href="#index-EnableVendor_0028_0029-692"><code>EnableVendor()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-ExecuteFile_0028_0029-686"><code>ExecuteFile()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-Load_0028_0029-695"><code>Load()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-LoadVendor_0028_0029-697"><code>LoadVendor()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-LoadVendorFrom_0028_0029-901"><code>LoadVendorFrom()</code></a>: <a href="#LoadVendorFrom-Action">LoadVendorFrom Action</a></li>
+<li><a href="#index-MarkCrosshair_0028_0029-700"><code>MarkCrosshair()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-Mode_0028_0029-703"><code>Mode()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-MovePointer_0028_0029-706"><code>MovePointer()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-MoveToCurrentLayer_0028_0029-709"><code>MoveToCurrentLayer()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-New_0028_0029-712"><code>New()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-PasteBuffer_0028_0029-715"><code>PasteBuffer()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-Polygon_0028_0029-722"><code>Polygon()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-Print_0028_0029-726"><code>Print()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-Quit_0028_0029-729"><code>Quit()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-Redo_0028_0029-732"><code>Redo()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-RemoveSelected_0028_0029-735"><code>RemoveSelected()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-Report_0028_0029-738"><code>Report()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-RouteStyle_0028_0029-742"><code>RouteStyle()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-Save_0028_0029-745"><code>Save()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-Select_0028_0029-748"><code>Select()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-SetFlag_0028_0029-751"><code>SetFlag()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-SetValue_0028_0029-756"><code>SetValue()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-SwapSides_0028_0029-763"><code>SwapSides()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-SwitchDrawingLayer_0028_0029-766"><code>SwitchDrawingLayer()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-ToggleHideName_0028_0029-769"><code>ToggleHideName()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-ToggleVendor_0028_0029-904"><code>ToggleVendor()</code></a>: <a href="#ToggleVendor-Action">ToggleVendor Action</a></li>
+<li><a href="#index-ToggleVendor_0028_0029-773"><code>ToggleVendor()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-ToggleVisibility_0028_0029-776"><code>ToggleVisibility()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-Undo_0028_0029-779"><code>Undo()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-UnloadVendor_0028_0029-907"><code>UnloadVendor()</code></a>: <a href="#UnloadVendor-Action">UnloadVendor Action</a></li>
+<li><a href="#index-UnloadVendor_0028_0029-782"><code>UnloadVendor()</code></a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-Unselect_0028_0029-785"><code>Unselect()</code></a>: <a href="#Actions">Actions</a></li>
    </ul><h2 class="unnumbered">Index of Concepts</h2>
 
 
 
 <ul class="index-cp" compact>
-<li><a href="#index-g_t_002ftmp-534">/tmp</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-g_t_002ftmp-551">/tmp</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-g_t_002ftmp-121">/tmp</a>: <a href="#Loading-and-Saving">Loading and Saving</a></li>
 <li><a href="#index-action-command-205">action command</a>: <a href="#User-Commands">User Commands</a></li>
-<li><a href="#index-action-reference-870">action reference</a>: <a href="#Action-Reference">Action Reference</a></li>
-<li><a href="#index-actions-571">actions</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-actions-file_002c-executing-670">actions file, executing</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-action-reference-889">action reference</a>: <a href="#Action-Reference">Action Reference</a></li>
+<li><a href="#index-actions-588">actions</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-actions-file_002c-executing-687">actions file, executing</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-Actions_002c-initiating-206">Actions, initiating</a>: <a href="#User-Commands">User Commands</a></li>
-<li><a href="#index-align_002dmarks-318">align-marks</a>: <a href="#Postscript-Export">Postscript Export</a></li>
-<li><a href="#index-alignment-374">alignment</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-align_002dmarks-328">align-marks</a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-alignment-391">alignment</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-alignment-targets-132">alignment targets</a>: <a href="#Printing">Printing</a></li>
-<li><a href="#index-Alpha-848">Alpha</a>: <a href="#DEC-Alpha">DEC Alpha</a></li>
+<li><a href="#index-Alpha-865">Alpha</a>: <a href="#DEC-Alpha">DEC Alpha</a></li>
+<li><a href="#index-annotation-file-format-887">annotation file format</a>: <a href="#Annotation-File-Format">Annotation File Format</a></li>
 <li><a href="#index-arc-16">arc</a>: <a href="#Arc-Objects">Arc Objects</a></li>
 <li><a href="#index-arc_002c-an-example-83">arc, an example</a>: <a href="#Arcs">Arcs</a></li>
-<li><a href="#index-architecture-852">architecture</a>: <a href="#Linux">Linux</a></li>
-<li><a href="#index-architecture-849">architecture</a>: <a href="#SCO">SCO</a></li>
-<li><a href="#index-architecture-846">architecture</a>: <a href="#DEC-Alpha">DEC Alpha</a></li>
-<li><a href="#index-architecture-843">architecture</a>: <a href="#SGI">SGI</a></li>
-<li><a href="#index-architecture-839">architecture</a>: <a href="#Sun">Sun</a></li>
-<li><a href="#index-architecture-836">architecture</a>: <a href="#HP">HP</a></li>
+<li><a href="#index-architecture-869">architecture</a>: <a href="#Linux">Linux</a></li>
+<li><a href="#index-architecture-866">architecture</a>: <a href="#SCO">SCO</a></li>
+<li><a href="#index-architecture-863">architecture</a>: <a href="#DEC-Alpha">DEC Alpha</a></li>
+<li><a href="#index-architecture-860">architecture</a>: <a href="#SGI">SGI</a></li>
+<li><a href="#index-architecture-856">architecture</a>: <a href="#Sun">Sun</a></li>
+<li><a href="#index-architecture-853">architecture</a>: <a href="#HP">HP</a></li>
 <li><a href="#index-arrow-tool-159">arrow tool</a>: <a href="#Arrow-Tool">Arrow Tool</a></li>
-<li><a href="#index-as_002dshown-_0028EPS_0029-342">as-shown (EPS)</a>: <a href="#Encapsulated-Postscript-Export">Encapsulated Postscript Export</a></li>
-<li><a href="#index-ASCII-files_002c-format-of-788">ASCII files, format of</a>: <a href="#File-Formats">File Formats</a></li>
+<li><a href="#index-as_002dshown-_0028EPS_0029-352">as-shown (EPS)</a>: <a href="#Encapsulated-Postscript-Export">Encapsulated Postscript Export</a></li>
+<li><a href="#index-ASCII-files_002c-format-of-805">ASCII files, format of</a>: <a href="#File-Formats">File Formats</a></li>
 <li><a href="#index-Atari-version-1">Atari version</a>: <a href="#History">History</a></li>
-<li><a href="#index-atomic-585">atomic</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-atomic-602">atomic</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-auto_002drouter-49">auto-router</a>: <a href="#Menu">Menu</a></li>
 <li><a href="#index-autorouter-178">autorouter</a>: <a href="#Autorouter">Autorouter</a></li>
-<li><a href="#index-background-379">background</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-backup-381">backup</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-backannotation-file-format-888">backannotation file format</a>: <a href="#Annotation-File-Format">Annotation File Format</a></li>
+<li><a href="#index-background-396">background</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-backup-398">backup</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-backup-118">backup</a>: <a href="#Loading-and-Saving">Loading and Saving</a></li>
-<li><a href="#index-bell-588">bell</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-bell-605">bell</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-bill-of-materials-143">bill of materials</a>: <a href="#bom">bom</a></li>
-<li><a href="#index-bloat-383">bloat</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-bloat-400">bloat</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-bom-142">bom</a>: <a href="#bom">bom</a></li>
 <li><a href="#index-buffer_002c-an-example-106">buffer, an example</a>: <a href="#Pastebuffer">Pastebuffer</a></li>
 <li><a href="#index-buffer_002c-convert-contents-to-element-103">buffer, convert contents to element</a>: <a href="#Elements">Elements</a></li>
 <li><a href="#index-Buffer_002c-popup-menu-45">Buffer, popup menu</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-buffer_002c-selecting-a-699">buffer, selecting a</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-button-translations-574">button translations</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-cat-413">cat</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-centering-653">centering</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-centroid-file-format-866">centroid file format</a>: <a href="#Centroid-File-Format">Centroid File Format</a></li>
-<li><a href="#index-centroid-file_002c-algorithms-868">centroid file, algorithms</a>: <a href="#Centroid-File-Format">Centroid File Format</a></li>
+<li><a href="#index-buffer_002c-selecting-a-716">buffer, selecting a</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-button-translations-591">button translations</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-cat-430">cat</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-centering-670">centering</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-centroid-file-format-883">centroid file format</a>: <a href="#Centroid-File-Format">Centroid File Format</a></li>
+<li><a href="#index-centroid-file_002c-algorithms-885">centroid file, algorithms</a>: <a href="#Centroid-File-Format">Centroid File Format</a></li>
 <li><a href="#index-change-active-layer-62">change active layer</a>: <a href="#Layer-Controls">Layer Controls</a></li>
-<li><a href="#index-change-drawing-layer-750">change drawing layer</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-change-object-name-607">change object name</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-change-settings-740">change settings</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-change-sizes-590">change sizes</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-change-square-flag-621">change square flag</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-change-viewing-side-747">change viewing side</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-change-drawing-layer-767">change drawing layer</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-change-object-name-624">change object name</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-change-settings-757">change settings</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-change-sizes-607">change sizes</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-change-square-flag-638">change square flag</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-change-viewing-side-764">change viewing side</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-changing-layers-113">changing layers</a>: <a href="#Moving-and-Copying">Moving and Copying</a></li>
-<li><a href="#index-changing-pin_002fpad-names-614">changing pin/pad names</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-changing-pin_002fpad-names-631">changing pin/pad names</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-clearance-15">clearance</a>: <a href="#Line-Objects">Line Objects</a></li>
-<li><a href="#index-clearance_002c-changing-of-objects-592">clearance, changing of objects</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-clearance_002c-changing-of-objects-609">clearance, changing of objects</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-clearance_002c-for-new-lines-41">clearance, for new lines</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-clipping-lines-to-45-degree-665">clipping lines to 45 degree</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-clipping-lines-to-45-degree-377">clipping lines to 45 degree</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-closing-a-polygon-708">closing a polygon</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-clipping-lines-to-45-degree-682">clipping lines to 45 degree</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-clipping-lines-to-45-degree-394">clipping lines to 45 degree</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-closing-a-polygon-725">closing a polygon</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-cnc-146">cnc</a>: <a href="#gcode">gcode</a></li>
 <li><a href="#index-color-printout-130">color printout</a>: <a href="#Printing">Printing</a></li>
-<li><a href="#index-color_002c-warning-568">color, warning</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-colors-386">colors</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-color_002c-warning-585">color, warning</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-colors-403">colors</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-command_002dline-options-208">command-line options</a>: <a href="#Command_002dLine-Options">Command-Line Options</a></li>
-<li><a href="#index-compile_002c-how-to-824">compile, how to</a>: <a href="#compiling">compiling</a></li>
-<li><a href="#index-configure-827">configure</a>: <a href="#running-configure">running configure</a></li>
-<li><a href="#index-connection_002c-removing-an-777">connection, removing an</a>: <a href="#Translations">Translations</a></li>
-<li><a href="#index-connections_002c-colors-387">connections, colors</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-compile_002c-how-to-841">compile, how to</a>: <a href="#compiling">compiling</a></li>
+<li><a href="#index-configure-844">configure</a>: <a href="#running-configure">running configure</a></li>
+<li><a href="#index-connection_002c-removing-an-794">connection, removing an</a>: <a href="#Translations">Translations</a></li>
+<li><a href="#index-connections_002c-colors-404">connections, colors</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-connections_002c-creating-list-of-156">connections, creating list of</a>: <a href="#Connection-Lists">Connection Lists</a></li>
-<li><a href="#index-connections_002c-reseting-636">connections, reseting</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-connections_002c-reseting-after-element-512">connections, reseting after element</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-connections_002c-searching-for-638">connections, searching for</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-connections_002c-reseting-653">connections, reseting</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-connections_002c-reseting-after-element-529">connections, reseting after element</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-connections_002c-searching-for-655">connections, searching for</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-Connects_002c-popup-menu-48">Connects, popup menu</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-copy-an-object-786">copy an object</a>: <a href="#Translations">Translations</a></li>
-<li><a href="#index-copying-objects-704">copying objects</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-copy-an-object-803">copy an object</a>: <a href="#Translations">Translations</a></li>
+<li><a href="#index-copying-objects-721">copying objects</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-copying_002c-an-example-109">copying, an example</a>: <a href="#Moving-and-Copying">Moving and Copying</a></li>
 <li><a href="#index-creating-objects-75">creating objects</a>: <a href="#Common">Common</a></li>
-<li><a href="#index-cursor-color-390">cursor color</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-cursor-movements-691">cursor movements</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-cursor-position-685">cursor position</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-cursor-steps-438">cursor steps</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-cutting-objects-703">cutting objects</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-DEC-847">DEC</a>: <a href="#DEC-Alpha">DEC Alpha</a></li>
-<li><a href="#index-default-font-428">default font</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-default-layout-size-543">default layout size</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-default-library-463">default library</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-default-text-scaling-550">default text scaling</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-default-translations-772">default translations</a>: <a href="#Translations">Translations</a></li>
+<li><a href="#index-cursor-color-407">cursor color</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-cursor-movements-708">cursor movements</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-cursor-position-702">cursor position</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-cursor-steps-455">cursor steps</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-cutting-objects-720">cutting objects</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-DEC-864">DEC</a>: <a href="#DEC-Alpha">DEC Alpha</a></li>
+<li><a href="#index-default-font-445">default font</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-default-layout-size-560">default layout size</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-default-library-480">default library</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-default-text-scaling-567">default text scaling</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-default-translations-789">default translations</a>: <a href="#Translations">Translations</a></li>
 <li><a href="#index-design-rule-checker_002c-invoking-50">design rule checker, invoking</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-design-rule-checking-667">design rule checking</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-design-rule-checking-684">design rule checking</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-design-rule-checking-164">design rule checking</a>: <a href="#Design-Rule-Checking">Design Rule Checking</a></li>
 <li><a href="#index-device_002c-selecting-an-output-126">device, selecting an output</a>: <a href="#Printing">Printing</a></li>
-<li><a href="#index-directory-_002ftmp-535">directory /tmp</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-directory-_002ftmp-552">directory /tmp</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-directory-_002ftmp-122">directory /tmp</a>: <a href="#Loading-and-Saving">Loading and Saving</a></li>
-<li><a href="#index-dispersing-elements-648">dispersing elements</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-display-547">display</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-displaying-element-names-657">displaying element names</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-displaying-element-names-30">displaying element names</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-displaying-pinout-663">displaying pinout</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-dispersing-elements-665">dispersing elements</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-display-564">display</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-displaying-element-names-674">displaying element names</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-displaying-element-names-31">displaying element names</a>: <a href="#Menu">Menu</a></li>
+<li><a href="#index-displaying-pinout-680">displaying pinout</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-displaying-status-information-57">displaying status information</a>: <a href="#Status_002dline-and-Input_002dfield">Status-line and Input-field</a></li>
-<li><a href="#index-distributing-elements-649">distributing elements</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-distributing-elements-666">distributing elements</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-DOS-filenames-138">DOS filenames</a>: <a href="#Printing">Printing</a></li>
 <li><a href="#index-drawing-objects-71">drawing objects</a>: <a href="#Drawing-and-Removing">Drawing and Removing</a></li>
-<li><a href="#index-drc-668">drc</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-drc-384">drc</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-drc-685">drc</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-drc-401">drc</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-drc-165">drc</a>: <a href="#Design-Rule-Checking">Design Rule Checking</a></li>
-<li><a href="#index-drill-724">drill</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-drill-741">drill</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-drill-report-54">drill report</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-drill-sizes_002c-list-of-standard-864">drill sizes, list of standard</a>: <a href="#Standard-Drill-Sizes">Standard Drill Sizes</a></li>
+<li><a href="#index-drill-sizes_002c-list-of-standard-881">drill sizes, list of standard</a>: <a href="#Standard-Drill-Sizes">Standard Drill Sizes</a></li>
 <li><a href="#index-Drill-table-176">Drill table</a>: <a href="#Vendor-drill-mapping">Vendor drill mapping</a></li>
-<li><a href="#index-drill_002dhelper-316">drill-helper</a>: <a href="#Postscript-Export">Postscript Export</a></li>
-<li><a href="#index-drilling-hole_002c-changing-of-objects-596">drilling hole, changing of objects</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-drilling-hole_002c-setting-of-initial-size-743">drilling hole, setting of initial size</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-drill_002dhelper-326">drill-helper</a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-drilling-hole_002c-changing-of-objects-613">drilling hole, changing of objects</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-drilling-hole_002c-setting-of-initial-size-760">drilling hole, setting of initial size</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-Edit_002c-popup-menu-26">Edit, popup menu</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-element-name_002c-hiding-754">element name, hiding</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-element-name_002c-removing-from-silk_002dscreen-755">element name, removing from silk-screen</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-Element-Search-860">Element Search</a>: <a href="#Regular-Expressions">Regular Expressions</a></li>
+<li><a href="#index-element-name_002c-hiding-771">element name, hiding</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-element-name_002c-removing-from-silk_002dscreen-772">element name, removing from silk-screen</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-Element-Search-877">Element Search</a>: <a href="#Regular-Expressions">Regular Expressions</a></li>
 <li><a href="#index-element_002c-an-example-93">element, an example</a>: <a href="#Elements">Elements</a></li>
 <li><a href="#index-element_002c-an-overview-7">element, an overview</a>: <a href="#Element-Objects">Element Objects</a></li>
-<li><a href="#index-element_002c-color-394">element, color</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-element_002c-command-396">element, command</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-element_002c-color-411">element, color</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-element_002c-command-413">element, command</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-element_002c-creating-a-new-package-101">element, creating a new package</a>: <a href="#Elements">Elements</a></li>
-<li><a href="#index-element_002c-display-names-of-658">element, display names of</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-element_002c-display-names-of-31">element, display names of</a>: <a href="#Menu">Menu</a></li>
+<li><a href="#index-element_002c-display-names-of-675">element, display names of</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-element_002c-display-names-of-32">element, display names of</a>: <a href="#Menu">Menu</a></li>
 <li><a href="#index-element_002c-editing-47">element, editing</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-element_002c-file-format-800">element, file format</a>: <a href="#Element-File">Element File</a></li>
-<li><a href="#index-element_002c-files-397">element, files</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-element_002c-file-format-817">element, file format</a>: <a href="#Element-File">Element File</a></li>
+<li><a href="#index-element_002c-files-414">element, files</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-element_002c-loading-to-buffer-186">element, loading to buffer</a>: <a href="#User-Commands">User Commands</a></li>
-<li><a href="#index-element_002c-move-name-of-782">element, move name of</a>: <a href="#Translations">Translations</a></li>
-<li><a href="#index-elements_002c-dispersing-650">elements, dispersing</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-elements_002c-distributing-651">elements, distributing</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-element_002c-move-name-of-799">element, move name of</a>: <a href="#Translations">Translations</a></li>
+<li><a href="#index-elements_002c-dispersing-667">elements, dispersing</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-elements_002c-distributing-668">elements, distributing</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-encapsulated-postscript-154">encapsulated postscript</a>: <a href="#eps">eps</a></li>
 <li><a href="#index-entering-user-commands-180">entering user commands</a>: <a href="#User-Commands">User Commands</a></li>
 <li><a href="#index-eps-153">eps</a>: <a href="#eps">eps</a></li>
@@ -12293,402 +12600,405 @@ Up: <a rel="up" accesskey="u" href="#Top">Top</a>
 <li><a href="#index-example-of-saving-116">example of saving</a>: <a href="#Loading-and-Saving">Loading and Saving</a></li>
 <li><a href="#index-example-of-text-handling-90">example of text handling</a>: <a href="#Text">Text</a></li>
 <li><a href="#index-example-of-via-handling-92">example of via handling</a>: <a href="#Vias">Vias</a></li>
-<li><a href="#index-exit-714">exit</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-exit-731">exit</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-exit-193">exit</a>: <a href="#User-Commands">User Commands</a></li>
 <li><a href="#index-Exporting-a-layout-140">Exporting a layout</a>: <a href="#Exporting">Exporting</a></li>
-<li><a href="#index-file-format_002c-element-data-802">file format, element data</a>: <a href="#Element-File">Element File</a></li>
-<li><a href="#index-file-format_002c-font-data-805">file format, font data</a>: <a href="#Font-File">Font File</a></li>
-<li><a href="#index-file-format_002c-layout-data-799">file format, layout data</a>: <a href="#Layout-File">Layout File</a></li>
-<li><a href="#index-file-format_002c-libraries-813">file format, libraries</a>: <a href="#Library-File">Library File</a></li>
-<li><a href="#index-file-format_002c-library-contents-810">file format, library contents</a>: <a href="#Library-Contents-File">Library Contents File</a></li>
-<li><a href="#index-file-formats-787">file formats</a>: <a href="#File-Formats">File Formats</a></li>
-<li><a href="#index-file-formats_002c-pads-and-lines-796">file formats, pads and lines</a>: <a href="#Pad-and-Line-Representation">Pad and Line Representation</a></li>
-<li><a href="#index-file-load-command-408">file load command</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-file-save-command-523">file save command</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-File-sytax-814">File sytax</a>: <a href="#File-Syntax">File Syntax</a></li>
+<li><a href="#index-file-format_002c-element-data-819">file format, element data</a>: <a href="#Element-File">Element File</a></li>
+<li><a href="#index-file-format_002c-font-data-822">file format, font data</a>: <a href="#Font-File">Font File</a></li>
+<li><a href="#index-file-format_002c-layout-data-816">file format, layout data</a>: <a href="#Layout-File">Layout File</a></li>
+<li><a href="#index-file-format_002c-libraries-830">file format, libraries</a>: <a href="#Library-File">Library File</a></li>
+<li><a href="#index-file-format_002c-library-contents-827">file format, library contents</a>: <a href="#Library-Contents-File">Library Contents File</a></li>
+<li><a href="#index-file-formats-804">file formats</a>: <a href="#File-Formats">File Formats</a></li>
+<li><a href="#index-file-formats_002c-pads-and-lines-813">file formats, pads and lines</a>: <a href="#Pad-and-Line-Representation">Pad and Line Representation</a></li>
+<li><a href="#index-file-load-command-425">file load command</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-file-save-command-540">file save command</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-File-syntax-831">File syntax</a>: <a href="#File-Syntax">File Syntax</a></li>
 <li><a href="#index-File_002c-popup-menu-25">File, popup menu</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-flags_002c-changing-598">flags, changing</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-flags_002c-clearing-625">flags, clearing</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-flags_002c-setting-735">flags, setting</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-font-command-420">font command</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-font-file_002c-format-of-803">font file, format of</a>: <a href="#Font-File">Font File</a></li>
-<li><a href="#index-font-files-421">font files</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-flags_002c-changing-615">flags, changing</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-flags_002c-clearing-642">flags, clearing</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-flags_002c-setting-752">flags, setting</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-font-command-437">font command</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-font-file_002c-format-of-820">font file, format of</a>: <a href="#Font-File">Font File</a></li>
+<li><a href="#index-font-files-438">font files</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-font_002c-an-overview-5">font, an overview</a>: <a href="#Symbol-Objects">Symbol Objects</a></li>
-<li><a href="#index-font_002c-used-for-pin-names-485">font, used for pin names</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-format-of-element-files-801">format of element files</a>: <a href="#Element-File">Element File</a></li>
-<li><a href="#index-format-of-font-files-804">format of font files</a>: <a href="#Font-File">Font File</a></li>
-<li><a href="#index-format-of-layout-files-798">format of layout files</a>: <a href="#Layout-File">Layout File</a></li>
-<li><a href="#index-format-of-libraries-812">format of libraries</a>: <a href="#Library-File">Library File</a></li>
-<li><a href="#index-format-of-library-contents-809">format of library contents</a>: <a href="#Library-Contents-File">Library Contents File</a></li>
-<li><a href="#index-FreeBSD-855">FreeBSD</a>: <a href="#BSD">BSD</a></li>
+<li><a href="#index-font_002c-used-for-pin-names-502">font, used for pin names</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-format-of-element-files-818">format of element files</a>: <a href="#Element-File">Element File</a></li>
+<li><a href="#index-format-of-font-files-821">format of font files</a>: <a href="#Font-File">Font File</a></li>
+<li><a href="#index-format-of-layout-files-815">format of layout files</a>: <a href="#Layout-File">Layout File</a></li>
+<li><a href="#index-format-of-libraries-829">format of libraries</a>: <a href="#Library-File">Library File</a></li>
+<li><a href="#index-format-of-library-contents-826">format of library contents</a>: <a href="#Library-Contents-File">Library Contents File</a></li>
+<li><a href="#index-FreeBSD-872">FreeBSD</a>: <a href="#BSD">BSD</a></li>
 <li><a href="#index-g_002dcode-145">g-code</a>: <a href="#gcode">gcode</a></li>
 <li><a href="#index-gcode-144">gcode</a>: <a href="#gcode">gcode</a></li>
-<li><a href="#index-gEDA_002c-how-to-interface-with-820">gEDA, how to interface with</a>: <a href="#gEDA">gEDA</a></li>
+<li><a href="#index-gEDA_002c-how-to-interface-with-837">gEDA, how to interface with</a>: <a href="#gEDA">gEDA</a></li>
 <li><a href="#index-gerber-147">gerber</a>: <a href="#gerber">gerber</a></li>
-<li><a href="#index-glossary-889">glossary</a>: <a href="#Glossary">Glossary</a></li>
-<li><a href="#index-GNU-build-system-825">GNU build system</a>: <a href="#quickstart">quickstart</a></li>
-<li><a href="#index-GNU-configure-script-826">GNU configure script</a>: <a href="#running-configure">running configure</a></li>
-<li><a href="#index-grid-372">grid</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-glossary-908">glossary</a>: <a href="#Glossary">Glossary</a></li>
+<li><a href="#index-GNU-build-system-842">GNU build system</a>: <a href="#quickstart">quickstart</a></li>
+<li><a href="#index-GNU-configure-script-843">GNU configure script</a>: <a href="#running-configure">running configure</a></li>
+<li><a href="#index-grid-389">grid</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-grid-66">grid</a>: <a href="#Layout-Area">Layout Area</a></li>
-<li><a href="#index-grid-color-441">grid color</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-grid_002c-absolute-and-relative-659">grid, absolute and relative</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-grid_002c-alignment-33">grid, alignment</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-grid_002c-display-660">grid, display</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-grid_002c-display-32">grid, display</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-grid_002c-setting-of-742">grid, setting of</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-groups-451">groups</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-groups_002c-editing-of-674">groups, editing of</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-gschem_002c-how-to-interface-with-819">gschem, how to interface with</a>: <a href="#gEDA">gEDA</a></li>
-<li><a href="#index-Hewlett-Packard-838">Hewlett Packard</a>: <a href="#HP">HP</a></li>
-<li><a href="#index-hide-element-name-753">hide element name</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-grid-color-458">grid color</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-grid_002c-absolute-and-relative-676">grid, absolute and relative</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-grid_002c-alignment-34">grid, alignment</a>: <a href="#Menu">Menu</a></li>
+<li><a href="#index-grid_002c-display-677">grid, display</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-grid_002c-display-33">grid, display</a>: <a href="#Menu">Menu</a></li>
+<li><a href="#index-grid_002c-setting-of-759">grid, setting of</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-groups-468">groups</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-groups_002c-editing-of-691">groups, editing of</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-gschem_002c-how-to-interface-with-836">gschem, how to interface with</a>: <a href="#gEDA">gEDA</a></li>
+<li><a href="#index-Hewlett-Packard-855">Hewlett Packard</a>: <a href="#HP">HP</a></li>
+<li><a href="#index-hide-element-name-770">hide element name</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-how-to-start-22">how to start</a>: <a href="#Getting-Started">Getting Started</a></li>
-<li><a href="#index-HP-837">HP</a>: <a href="#HP">HP</a></li>
+<li><a href="#index-HP-854">HP</a>: <a href="#HP">HP</a></li>
 <li><a href="#index-image-export-150">image export</a>: <a href="#png">png</a></li>
-<li><a href="#index-index-of-terms-891">index of terms</a>: <a href="#Glossary">Glossary</a></li>
+<li><a href="#index-index-of-terms-910">index of terms</a>: <a href="#Glossary">Glossary</a></li>
 <li><a href="#index-Info_002c-popup-menu-51">Info, popup menu</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-information-about-objects-723">information about objects</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-information-about-objects-740">information about objects</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-input_002dfield_002c-position-of-58">input-field, position of</a>: <a href="#Status_002dline-and-Input_002dfield">Status-line and Input-field</a></li>
-<li><a href="#index-inputfield_002c-saving-entered-command_002dline-538">inputfield, saving entered command-line</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-inputfield_002c-start-user-input-632">inputfield, start user input</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-install_002c-how-to-823">install, how to</a>: <a href="#compiling">compiling</a></li>
-<li><a href="#index-key-translations-573">key translations</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-keyboard-bell-515">keyboard bell</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-inputfield_002c-saving-entered-command_002dline-555">inputfield, saving entered command-line</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-inputfield_002c-start-user-input-649">inputfield, start user input</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-install_002c-how-to-840">install, how to</a>: <a href="#compiling">compiling</a></li>
+<li><a href="#index-key-translations-590">key translations</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-keyboard-bell-532">keyboard bell</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-layer-controls-59">layer controls</a>: <a href="#Layer-Controls">Layer Controls</a></li>
 <li><a href="#index-layer-groups-12">layer groups</a>: <a href="#Layer-Objects">Layer Objects</a></li>
-<li><a href="#index-layer-visibility_002c-toggling-761">layer visibility, toggling</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-layer_002c-change-active-751">layer, change active</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-layer_002c-name-of-453">layer, name of</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-layer-visibility_002c-toggling-778">layer visibility, toggling</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-layer_002c-change-active-768">layer, change active</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-layer_002c-name-of-470">layer, name of</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-layers_002c-an-overview-11">layers, an overview</a>: <a href="#Layer-Objects">Layer Objects</a></li>
 <li><a href="#index-layers_002c-changing-which-is-active-61">layers, changing which is active</a>: <a href="#Layer-Controls">Layer Controls</a></li>
-<li><a href="#index-layers_002c-colors-448">layers, colors</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-layers_002c-editing-of-groups-673">layers, editing of groups</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-layers_002c-groups-450">layers, groups</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-layers_002c-colors-465">layers, colors</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-layers_002c-editing-of-groups-690">layers, editing of groups</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-layers_002c-groups-467">layers, groups</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-layers_002c-switching-on_002foff-60">layers, switching on/off</a>: <a href="#Layer-Controls">Layer Controls</a></li>
-<li><a href="#index-layout-files-409">layout files</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-layout-files_002c-format-of-797">layout files, format of</a>: <a href="#Layout-File">Layout File</a></li>
+<li><a href="#index-layout-files-426">layout files</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-layout-files_002c-format-of-814">layout files, format of</a>: <a href="#Layout-File">Layout File</a></li>
 <li><a href="#index-layout-files_002c-saving-of-197">layout files, saving of</a>: <a href="#User-Commands">User Commands</a></li>
 <li><a href="#index-layout-objects_002c-an-overview-3">layout objects, an overview</a>: <a href="#Intro">Intro</a></li>
-<li><a href="#index-layout_002c-default-size-of-544">layout, default size of</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-layout_002c-default-size-of-561">layout, default size of</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-layout_002c-loading-a-183">layout, loading a</a>: <a href="#User-Commands">User Commands</a></li>
 <li><a href="#index-layout_002c-loading-to-buffer-190">layout, loading to buffer</a>: <a href="#User-Commands">User Commands</a></li>
 <li><a href="#index-layout_002c-merging-a-191">layout, merging a</a>: <a href="#User-Commands">User Commands</a></li>
-<li><a href="#index-layout_002c-printing-a-710">layout, printing a</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-layout_002c-start-a-new-696">layout, start a new</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-layout_002c-printing-a-727">layout, printing a</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-layout_002c-start-a-new-713">layout, start a new</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-layout_002dname-200">layout-name</a>: <a href="#User-Commands">User Commands</a></li>
 <li><a href="#index-layout_002dname-8">layout-name</a>: <a href="#Element-Objects">Element Objects</a></li>
-<li><a href="#index-length-of-a-pin-name-490">length of a pin name</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-length-of-a-pin-name-507">length of a pin name</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-library-accuracy-10">library accuracy</a>: <a href="#Element-Objects">Element Objects</a></li>
-<li><a href="#index-library-command-455">library command</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-library-contents-command-459">library contents command</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-library-contents-file_002c-format-of-808">library contents file, format of</a>: <a href="#Library-Contents-File">Library Contents File</a></li>
-<li><a href="#index-library-creation-816">library creation</a>: <a href="#Library-Creation">Library Creation</a></li>
-<li><a href="#index-library-file_002c-format-of-811">library file, format of</a>: <a href="#Library-File">Library File</a></li>
-<li><a href="#index-library-name-464">library name</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-library-searchpath-468">library searchpath</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-library-command-472">library command</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-library-contents-command-476">library contents command</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-library-contents-file_002c-format-of-825">library contents file, format of</a>: <a href="#Library-Contents-File">Library Contents File</a></li>
+<li><a href="#index-library-creation-833">library creation</a>: <a href="#Library-Creation">Library Creation</a></li>
+<li><a href="#index-library-file_002c-format-of-828">library file, format of</a>: <a href="#Library-File">Library File</a></li>
+<li><a href="#index-library-name-481">library name</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-library-searchpath-485">library searchpath</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-library-window-69">library window</a>: <a href="#Library-Window">Library Window</a></li>
 <li><a href="#index-lines_002c-an-example-81">lines, an example</a>: <a href="#Lines">Lines</a></li>
 <li><a href="#index-lines_002c-an-overview-13">lines, an overview</a>: <a href="#Line-Objects">Line Objects</a></li>
-<li><a href="#index-lines_002c-clipping-to-45-degree-664">lines, clipping to 45 degree</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-lines_002c-clipping-to-45-degree-376">lines, clipping to 45 degree</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-lines_002c-setting-of-initial-size-745">lines, setting of initial size</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-lines_002c-size-470">lines, size</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-Linux-853">Linux</a>: <a href="#Linux">Linux</a></li>
-<li><a href="#index-listing-library-contents-460">listing library contents</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-lines_002c-clipping-to-45-degree-681">lines, clipping to 45 degree</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-lines_002c-clipping-to-45-degree-393">lines, clipping to 45 degree</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-lines_002c-setting-of-initial-size-762">lines, setting of initial size</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-lines_002c-size-487">lines, size</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-Linux-870">Linux</a>: <a href="#Linux">Linux</a></li>
+<li><a href="#index-listing-library-contents-477">listing library contents</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-loading-a-layout-to-buffer-188">loading a layout to buffer</a>: <a href="#User-Commands">User Commands</a></li>
-<li><a href="#index-loading-elements-398">loading elements</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-loading-elements-415">loading elements</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-loading-elements-to-buffer-185">loading elements to buffer</a>: <a href="#User-Commands">User Commands</a></li>
-<li><a href="#index-loading-files-679">loading files</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-loading-fonts-422">loading fonts</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-loading-layouts-410">loading layouts</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-loading-files-696">loading files</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-loading-fonts-439">loading fonts</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-loading-layouts-427">loading layouts</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-loading-layouts-182">loading layouts</a>: <a href="#User-Commands">User Commands</a></li>
-<li><a href="#index-loading-symbols-423">loading symbols</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-loading-symbols-440">loading symbols</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-loading_002c-an-example-114">loading, an example</a>: <a href="#Loading-and-Saving">Loading and Saving</a></li>
-<li><a href="#index-log-window-503">log window</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-log-window-520">log window</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-log-window-67">log window</a>: <a href="#Log-Window">Log Window</a></li>
-<li><a href="#index-m4-401">m4</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-m4-418">m4</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-m4_002c-preprocessing-example-files-96">m4, preprocessing example files</a>: <a href="#Elements">Elements</a></li>
-<li><a href="#index-mark-684">mark</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-mark-701">mark</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-Measuring-distances-172">Measuring distances</a>: <a href="#Measuring-distances">Measuring distances</a></li>
-<li><a href="#index-media-474">media</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-media-margin-475">media margin</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-media-491">media</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-media-margin-492">media margin</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-media_002c-size-of-135">media, size of</a>: <a href="#Printing">Printing</a></li>
 <li><a href="#index-menus-23">menus</a>: <a href="#Menu">Menu</a></li>
 <li><a href="#index-merging-layouts-189">merging layouts</a>: <a href="#User-Commands">User Commands</a></li>
-<li><a href="#index-messages-504">messages</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-messages-521">messages</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-messages-68">messages</a>: <a href="#Log-Window">Log Window</a></li>
 <li><a href="#index-mirroring-printout-129">mirroring printout</a>: <a href="#Printing">Printing</a></li>
 <li><a href="#index-mode-selection-63">mode selection</a>: <a href="#Tool-Selectors">Tool Selectors</a></li>
-<li><a href="#index-mode_002c-selecting-of-687">mode, selecting of</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-mounting-holes-604">mounting holes</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-move-519">move</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-move-an-object-785">move an object</a>: <a href="#Translations">Translations</a></li>
+<li><a href="#index-mode_002c-selecting-of-704">mode, selecting of</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-mounting-holes-621">mounting holes</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-move-536">move</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-move-an-object-802">move an object</a>: <a href="#Translations">Translations</a></li>
 <li><a href="#index-moving-objects-158">moving objects</a>: <a href="#Arrow-Tool">Arrow Tool</a></li>
-<li><a href="#index-moving-objects-to-current-layer-694">moving objects to current layer</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-moving-objects-to-current-layer-711">moving objects to current layer</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-moving_002c-an-example-108">moving, an example</a>: <a href="#Moving-and-Copying">Moving and Copying</a></li>
 <li><a href="#index-moving_002c-traces-to-a-different-layer-112">moving, traces to a different layer</a>: <a href="#Moving-and-Copying">Moving and Copying</a></li>
-<li><a href="#index-multi_002dfile-333">multi-file</a>: <a href="#Postscript-Export">Postscript Export</a></li>
-<li><a href="#index-name-of-an-element-656">name of an element</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-name_002c-change-an-objects-606">name, change an objects</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-namelength-of-pins-488">namelength of pins</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-multi_002dfile-343">multi-file</a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-name-of-an-element-673">name of an element</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-name_002c-change-an-objects-623">name, change an objects</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-namelength-of-pins-505">namelength of pins</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-nelma-148">nelma</a>: <a href="#nelma">nelma</a></li>
-<li><a href="#index-NetBSD-856">NetBSD</a>: <a href="#BSD">BSD</a></li>
-<li><a href="#index-netlist-578">netlist</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-netlist-507">netlist</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-NetBSD-873">NetBSD</a>: <a href="#BSD">BSD</a></li>
+<li><a href="#index-netlist-595">netlist</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-netlist-524">netlist</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-netlist-162">netlist</a>: <a href="#Rats-Nest">Rats Nest</a></li>
 <li><a href="#index-netlist-21">netlist</a>: <a href="#Net-Objects">Net Objects</a></li>
 <li><a href="#index-Netlist-Window-70">Netlist Window</a>: <a href="#Netlist-Window">Netlist Window</a></li>
-<li><a href="#index-netlist_002c-file-format-806">netlist, file format</a>: <a href="#Netlist-File">Netlist File</a></li>
-<li><a href="#index-netlist_002c-reading-807">netlist, reading</a>: <a href="#Netlist-File">Netlist File</a></li>
+<li><a href="#index-netlist_002c-file-format-823">netlist, file format</a>: <a href="#Netlist-File">Netlist File</a></li>
+<li><a href="#index-netlist_002c-reading-824">netlist, reading</a>: <a href="#Netlist-File">Netlist File</a></li>
 <li><a href="#index-object-report-53">object report</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-object_002c-change-name-of-608">object, change name of</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-object_002c-change-name-of-625">object, change name of</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-object_002c-changing-the-size-of-an-80">object, changing the size of an</a>: <a href="#Common">Common</a></li>
-<li><a href="#index-object_002c-copy-an-784">object, copy an</a>: <a href="#Translations">Translations</a></li>
+<li><a href="#index-object_002c-copy-an-801">object, copy an</a>: <a href="#Translations">Translations</a></li>
 <li><a href="#index-object_002c-creating-an-76">object, creating an</a>: <a href="#Common">Common</a></li>
 <li><a href="#index-object_002c-drawing-and-removing-74">object, drawing and removing</a>: <a href="#Drawing-and-Removing">Drawing and Removing</a></li>
-<li><a href="#index-object_002c-move-an-783">object, move an</a>: <a href="#Translations">Translations</a></li>
-<li><a href="#index-object_002c-removing-an-776">object, removing an</a>: <a href="#Translations">Translations</a></li>
+<li><a href="#index-object_002c-move-an-800">object, move an</a>: <a href="#Translations">Translations</a></li>
+<li><a href="#index-object_002c-removing-an-793">object, removing an</a>: <a href="#Translations">Translations</a></li>
 <li><a href="#index-object_002c-removing-an-78">object, removing an</a>: <a href="#Common">Common</a></li>
-<li><a href="#index-objects_002c-moving-to-current-layer-693">objects, moving to current layer</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-octagonal-flag_002c-changing-599">octagonal flag, changing</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-octagonal-flag_002c-clearing-627">octagonal flag, clearing</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-octagonal-flag_002c-setting-736">octagonal flag, setting</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-octagonal-pins-and-vias-612">octagonal pins and vias</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-off-limit-color-479">off limit color</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-offset-of-pinnames-496">offset of pinnames</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-offset-of-pinout-493">offset of pinout</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-objects_002c-moving-to-current-layer-710">objects, moving to current layer</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-octagonal-flag_002c-changing-616">octagonal flag, changing</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-octagonal-flag_002c-clearing-644">octagonal flag, clearing</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-octagonal-flag_002c-setting-753">octagonal flag, setting</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-octagonal-pins-and-vias-629">octagonal pins and vias</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-off-limit-color-496">off limit color</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-offset-of-pinnames-513">offset of pinnames</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-offset-of-pinout-510">offset of pinout</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-offset-of-printout-136">offset of printout</a>: <a href="#Printing">Printing</a></li>
 <li><a href="#index-old-library-9">old library</a>: <a href="#Element-Objects">Element Objects</a></li>
-<li><a href="#index-only_002dvisible-345">only-visible</a>: <a href="#Encapsulated-Postscript-Export">Encapsulated Postscript Export</a></li>
-<li><a href="#index-OpenWindows-842">OpenWindows</a>: <a href="#Sun">Sun</a></li>
-<li><a href="#index-operation-modes_002c-selecting-of-688">operation modes, selecting of</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-only_002dvisible-355">only-visible</a>: <a href="#Encapsulated-Postscript-Export">Encapsulated Postscript Export</a></li>
+<li><a href="#index-OpenWindows-859">OpenWindows</a>: <a href="#Sun">Sun</a></li>
+<li><a href="#index-operation-modes_002c-selecting-of-705">operation modes, selecting of</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-optimizer-169">optimizer</a>: <a href="#Trace-Optimizer">Trace Optimizer</a></li>
 <li><a href="#index-outline-printout-131">outline printout</a>: <a href="#Printing">Printing</a></li>
 <li><a href="#index-output-device-127">output device</a>: <a href="#Printing">Printing</a></li>
 <li><a href="#index-overlap_002c-minimum-167">overlap, minimum</a>: <a href="#Design-Rule-Checking">Design Rule Checking</a></li>
-<li><a href="#index-pad-specification-795">pad specification</a>: <a href="#Pad-and-Line-Representation">Pad and Line Representation</a></li>
+<li><a href="#index-pad-specification-812">pad specification</a>: <a href="#Pad-and-Line-Representation">Pad and Line Representation</a></li>
 <li><a href="#index-pastebuffer_002c-an-example-104">pastebuffer, an example</a>: <a href="#Pastebuffer">Pastebuffer</a></li>
 <li><a href="#index-pastebuffer_002c-convert-contents-to-element-102">pastebuffer, convert contents to element</a>: <a href="#Elements">Elements</a></li>
 <li><a href="#index-pastebuffer_002c-popup-menu-46">pastebuffer, popup menu</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-pastebuffer_002c-selecting-a-700">pastebuffer, selecting a</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-path-for-element-files-404">path for element files</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-path-for-font-files-432">path for font files</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-path-for-layout-files-416">path for layout files</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-path-for-libraries-467">path for libraries</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-PC-UNIX-857">PC UNIX</a>: <a href="#BSD">BSD</a></li>
-<li><a href="#index-PC-UNIX-854">PC UNIX</a>: <a href="#Linux">Linux</a></li>
-<li><a href="#index-PC-UNIX-851">PC UNIX</a>: <a href="#SCO">SCO</a></li>
+<li><a href="#index-pastebuffer_002c-selecting-a-717">pastebuffer, selecting a</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-path-for-element-files-421">path for element files</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-path-for-font-files-449">path for font files</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-path-for-layout-files-433">path for layout files</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-path-for-libraries-484">path for libraries</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-PC-UNIX-874">PC UNIX</a>: <a href="#BSD">BSD</a></li>
+<li><a href="#index-PC-UNIX-871">PC UNIX</a>: <a href="#Linux">Linux</a></li>
+<li><a href="#index-PC-UNIX-868">PC UNIX</a>: <a href="#SCO">SCO</a></li>
 <li><a href="#index-PCB_002c-an-overview-2">PCB, an overview</a>: <a href="#Overview">Overview</a></li>
-<li><a href="#index-photo_002dmode-358">photo-mode</a>: <a href="#PNG-Options">PNG Options</a></li>
-<li><a href="#index-pin-color-483">pin color</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-pin_002c-name-of-489">pin, name of</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-pin_002fpad-names_002c-changing-615">pin/pad names, changing</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-pinout_002c-display-of-662">pinout, display of</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-pinout_002c-font-to-display-pin-names-486">pinout, font to display pin names</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-pinout_002c-zoomfactor-of-display-498">pinout, zoomfactor of display</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-photo_002dmask_002dcolour-373">photo-mask-colour</a>: <a href="#PNG-Options">PNG Options</a></li>
+<li><a href="#index-photo_002dmode-369">photo-mode</a>: <a href="#PNG-Options">PNG Options</a></li>
+<li><a href="#index-photo_002dplating-375">photo-plating</a>: <a href="#PNG-Options">PNG Options</a></li>
+<li><a href="#index-photo_002dsilk_002dcolour-377">photo-silk-colour</a>: <a href="#PNG-Options">PNG Options</a></li>
+<li><a href="#index-pin-color-500">pin color</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-pin_002c-name-of-506">pin, name of</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-pin_002fpad-names_002c-changing-632">pin/pad names, changing</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-pinout_002c-display-of-679">pinout, display of</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-pinout_002c-font-to-display-pin-names-503">pinout, font to display pin names</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-pinout_002c-zoomfactor-of-display-515">pinout, zoomfactor of display</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-pins_002c-an-example-98">pins, an example</a>: <a href="#Elements">Elements</a></li>
-<li><a href="#index-pins_002c-changing-shape-of-610">pins, changing shape of</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-pins_002c-changing-shape-of-627">pins, changing shape of</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-png-149">png</a>: <a href="#png">png</a></li>
-<li><a href="#index-pointer_002c-moving-of-690">pointer, moving of</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-polygon-546">polygon</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-polygon-point_002c-go-back-to-previous-707">polygon point, go back to previous</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-pointer_002c-moving-of-707">pointer, moving of</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-polygon-563">polygon</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-polygon-point_002c-go-back-to-previous-724">polygon point, go back to previous</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-polygon_002c-an-example-84">polygon, an example</a>: <a href="#Polygons">Polygons</a></li>
 <li><a href="#index-polygon_002c-an-overview-17">polygon, an overview</a>: <a href="#Polygon-Objects">Polygon Objects</a></li>
-<li><a href="#index-polygon_002c-closing-a-706">polygon, closing a</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-polygon_002c-closing-a-723">polygon, closing a</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-popping-up-menus-24">popping up menus</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-postprocessing-layout-data-526">postprocessing layout data</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-postprocessing-layout-data-543">postprocessing layout data</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-postscript-152">postscript</a>: <a href="#ps">ps</a></li>
-<li><a href="#index-preprocessing-element-data-399">preprocessing element data</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-preprocessing-font-data-424">preprocessing font data</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-preprocessing-layout-data-411">preprocessing layout data</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-preventing-loss-of-data-532">preventing loss of data</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-preprocessing-element-data-416">preprocessing element data</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-preprocessing-font-data-441">preprocessing font data</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-preprocessing-layout-data-428">preprocessing layout data</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-preventing-loss-of-data-549">preventing loss of data</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-preventing-loss-of-data-120">preventing loss of data</a>: <a href="#Loading-and-Saving">Loading and Saving</a></li>
 <li><a href="#index-print-command-139">print command</a>: <a href="#Printing">Printing</a></li>
-<li><a href="#index-print-media-476">print media</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-print-media-493">print media</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-print-media-134">print media</a>: <a href="#Printing">Printing</a></li>
 <li><a href="#index-print-offset-137">print offset</a>: <a href="#Printing">Printing</a></li>
-<li><a href="#index-printing-501">printing</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-printing-a-layout-711">printing a layout</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-printing-518">printing</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-printing-a-layout-728">printing a layout</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-printing_002c-an-example-124">printing, an example</a>: <a href="#Printing">Printing</a></li>
-<li><a href="#index-problems-834">problems</a>: <a href="#problems">problems</a></li>
+<li><a href="#index-problems-851">problems</a>: <a href="#problems">problems</a></li>
 <li><a href="#index-ps-151">ps</a>: <a href="#ps">ps</a></li>
-<li><a href="#index-ps_002dbloat-325">ps-bloat</a>: <a href="#Postscript-Export">Postscript Export</a></li>
-<li><a href="#index-ps_002dinvert-327">ps-invert</a>: <a href="#Postscript-Export">Postscript Export</a></li>
-<li><a href="#index-psfade-330">psfade</a>: <a href="#Postscript-Export">Postscript Export</a></li>
-<li><a href="#index-quit-713">quit</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-ps_002dbloat-335">ps-bloat</a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-ps_002dinvert-337">ps-invert</a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-psfade-340">psfade</a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-quit-730">quit</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-quit-194">quit</a>: <a href="#User-Commands">User Commands</a></li>
 <li><a href="#index-rat_0027s-nest-199">rat's nest</a>: <a href="#User-Commands">User Commands</a></li>
-<li><a href="#index-rat_002dline-579">rat-line</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-rat_002dline-596">rat-line</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-rat_002dline-163">rat-line</a>: <a href="#Rats-Nest">Rats Nest</a></li>
-<li><a href="#index-rats-nest-577">rats nest</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-rats-nest-506">rats nest</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-rats-nest-594">rats nest</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-rats-nest-523">rats nest</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-rats-nest-161">rats nest</a>: <a href="#Rats-Nest">Rats Nest</a></li>
 <li><a href="#index-rats_002dnest-20">rats-nest</a>: <a href="#Net-Objects">Net Objects</a></li>
-<li><a href="#index-recover-717">recover</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-recover-734">recover</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-rectangle_002c-an-example-86">rectangle, an example</a>: <a href="#Polygons">Polygons</a></li>
-<li><a href="#index-redo-716">redo</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-redo-733">redo</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-redo-28">redo</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-redrawing-layout-654">redrawing layout</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-refreshing-layout-655">refreshing layout</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-Regular-Expressions-861">Regular Expressions</a>: <a href="#Regular-Expressions">Regular Expressions</a></li>
-<li><a href="#index-removing-connections-775">removing connections</a>: <a href="#Translations">Translations</a></li>
-<li><a href="#index-removing-objects-774">removing objects</a>: <a href="#Translations">Translations</a></li>
+<li><a href="#index-redrawing-layout-671">redrawing layout</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-refreshing-layout-672">refreshing layout</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-Regular-Expressions-878">Regular Expressions</a>: <a href="#Regular-Expressions">Regular Expressions</a></li>
+<li><a href="#index-removing-connections-792">removing connections</a>: <a href="#Translations">Translations</a></li>
+<li><a href="#index-removing-objects-791">removing objects</a>: <a href="#Translations">Translations</a></li>
 <li><a href="#index-removing-objects-77">removing objects</a>: <a href="#Common">Common</a></li>
 <li><a href="#index-removing-objects-72">removing objects</a>: <a href="#Drawing-and-Removing">Drawing and Removing</a></li>
-<li><a href="#index-removing-selected-objects-719">removing selected objects</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-report-722">report</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-removing-selected-objects-736">removing selected objects</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-report-739">report</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-report-52">report</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-reseting-found-connections-637">reseting found connections</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-reseting-found-connections-513">reseting found connections</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-resources-369">resources</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-rotate-521">rotate</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-rotating-a-buffer-702">rotating a buffer</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-reseting-found-connections-654">reseting found connections</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-reseting-found-connections-530">reseting found connections</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-resources-386">resources</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-rotate-538">rotate</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-rotating-a-buffer-719">rotating a buffer</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-rotating-printout-128">rotating printout</a>: <a href="#Printing">Printing</a></li>
-<li><a href="#index-routing-style-726">routing style</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-routing-style-517">routing style</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-Route-Styles_002c-popup-menu-29">Route Styles, popup menu</a>: <a href="#Menu">Menu</a></li>
+<li><a href="#index-routing-style-743">routing style</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-routing-style-534">routing style</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-rubber-band-39">rubber band</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-rubberband-661">rubberband</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-rubberband-520">rubberband</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-saving-connections-730">saving connections</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-saving-files-729">saving files</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-saving-found-connections-639">saving found connections</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-saving-last-entered-user-command-537">saving last entered user command</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-saving-layouts-525">saving layouts</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-rubberband-678">rubberband</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-rubberband-537">rubberband</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-saving-connections-747">saving connections</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-saving-files-746">saving files</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-saving-found-connections-656">saving found connections</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-saving-last-entered-user-command-554">saving last entered user command</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-saving-layouts-542">saving layouts</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-saving-layouts-196">saving layouts</a>: <a href="#User-Commands">User Commands</a></li>
 <li><a href="#index-saving-layouts-119">saving layouts</a>: <a href="#Loading-and-Saving">Loading and Saving</a></li>
 <li><a href="#index-saving_002c-an-example-115">saving, an example</a>: <a href="#Loading-and-Saving">Loading and Saving</a></li>
 <li><a href="#index-scaling-a-printout-133">scaling a printout</a>: <a href="#Printing">Printing</a></li>
-<li><a href="#index-scanning-connections-634">scanning connections</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-schematic-capture-817">schematic capture</a>: <a href="#Schematic-Frontends">Schematic Frontends</a></li>
-<li><a href="#index-schematic-frontend-818">schematic frontend</a>: <a href="#Schematic-Frontends">Schematic Frontends</a></li>
-<li><a href="#index-SCO-850">SCO</a>: <a href="#SCO">SCO</a></li>
-<li><a href="#index-Screen_002c-popup-menu-29">Screen, popup menu</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-script-file_002c-executing-671">script file, executing</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-scrolling-778">scrolling</a>: <a href="#Translations">Translations</a></li>
-<li><a href="#index-searching-connections-635">searching connections</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-scanning-connections-651">scanning connections</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-schematic-capture-834">schematic capture</a>: <a href="#Schematic-Frontends">Schematic Frontends</a></li>
+<li><a href="#index-schematic-frontend-835">schematic frontend</a>: <a href="#Schematic-Frontends">Schematic Frontends</a></li>
+<li><a href="#index-SCO-867">SCO</a>: <a href="#SCO">SCO</a></li>
+<li><a href="#index-script-file_002c-executing-688">script file, executing</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-scrolling-795">scrolling</a>: <a href="#Translations">Translations</a></li>
+<li><a href="#index-searching-connections-652">searching connections</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-Searching-for-elements-170">Searching for elements</a>: <a href="#Searching-for-elements">Searching for elements</a></li>
-<li><a href="#index-searchpath-for-element-files-403">searchpath for element files</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-searchpath-for-font-files-431">searchpath for font files</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-searchpath-for-layout-files-415">searchpath for layout files</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-searchpath-for-libraries-466">searchpath for libraries</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-searchpath-for-element-files-420">searchpath for element files</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-searchpath-for-font-files-448">searchpath for font files</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-searchpath-for-layout-files-432">searchpath for layout files</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-searchpath-for-libraries-483">searchpath for libraries</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-Select_002c-popup-menu-42">Select, popup menu</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-selected-object_002c-removing-an-720">selected object, removing an</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-selected-object_002c-removing-an-737">selected object, removing an</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-selected-objects_002c-changing-sizes-44">selected objects, changing sizes</a>: <a href="#Menu">Menu</a></li>
 <li><a href="#index-selected-objects_002c-removing-43">selected objects, removing</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-selecting-a-buffer-701">selecting a buffer</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-selecting-a-buffer-718">selecting a buffer</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-selecting-a-new-tool-65">selecting a new tool</a>: <a href="#Tool-Selectors">Tool Selectors</a></li>
-<li><a href="#index-selecting-objects-733">selecting objects</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-selecting-objects-750">selecting objects</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-selecting_002c-using-the-arrow-tool-157">selecting, using the arrow tool</a>: <a href="#Arrow-Tool">Arrow Tool</a></li>
-<li><a href="#index-selection-732">selection</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-selection-749">selection</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-Settings_002c-popup-menu-37">Settings, popup menu</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-SGI-845">SGI</a>: <a href="#SGI">SGI</a></li>
-<li><a href="#index-show_002dlegend-338">show-legend</a>: <a href="#Postscript-Export">Postscript Export</a></li>
-<li><a href="#index-shrink-540">shrink</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-signal-587">signal</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-Silicon-Graphics-844">Silicon Graphics</a>: <a href="#SGI">SGI</a></li>
-<li><a href="#index-size-of-lines-471">size of lines</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-size-of-lines-and-vias-727">size of lines and vias</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-size-of-vias-561">size of vias</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-sizes_002c-changing-of-objects-591">sizes, changing of objects</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-Sizes_002c-popup-menu-36">Sizes, popup menu</a>: <a href="#Menu">Menu</a></li>
+<li><a href="#index-SGI-862">SGI</a>: <a href="#SGI">SGI</a></li>
+<li><a href="#index-show_002dlegend-348">show-legend</a>: <a href="#Postscript-Export">Postscript Export</a></li>
+<li><a href="#index-shrink-557">shrink</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-signal-604">signal</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-Silicon-Graphics-861">Silicon Graphics</a>: <a href="#SGI">SGI</a></li>
+<li><a href="#index-size-of-lines-488">size of lines</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-size-of-lines-and-vias-744">size of lines and vias</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-size-of-vias-578">size of vias</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-sizes_002c-changing-of-objects-608">sizes, changing of objects</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-snap-to-pins-40">snap to pins</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-Solaris-841">Solaris</a>: <a href="#Sun">Sun</a></li>
-<li><a href="#index-solder-mask_002c-viewing-and-editing-35">solder mask, viewing and editing</a>: <a href="#Menu">Menu</a></li>
+<li><a href="#index-Solaris-858">Solaris</a>: <a href="#Sun">Sun</a></li>
+<li><a href="#index-solder-mask_002c-viewing-and-editing-36">solder mask, viewing and editing</a>: <a href="#Menu">Menu</a></li>
 <li><a href="#index-spacing_002c-minimum-166">spacing, minimum</a>: <a href="#Design-Rule-Checking">Design Rule Checking</a></li>
-<li><a href="#index-speaker-volume-564">speaker volume</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-square-flag_002c-changing-600">square flag, changing</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-square-flag_002c-changing-of-objects-622">square flag, changing of objects</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-square-flag_002c-clearing-628">square flag, clearing</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-square-flag_002c-setting-737">square flag, setting</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-standard-drill-sizes-865">standard drill sizes</a>: <a href="#Standard-Drill-Sizes">Standard Drill Sizes</a></li>
-<li><a href="#index-start-user-input-631">start user input</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-starting-a-new-layout-697">starting a new layout</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-speaker-volume-581">speaker volume</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-square-flag_002c-changing-617">square flag, changing</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-square-flag_002c-changing-of-objects-639">square flag, changing of objects</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-square-flag_002c-clearing-645">square flag, clearing</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-square-flag_002c-setting-754">square flag, setting</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-standard-drill-sizes-882">standard drill sizes</a>: <a href="#Standard-Drill-Sizes">Standard Drill Sizes</a></li>
+<li><a href="#index-start-user-input-648">start user input</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-starting-a-new-layout-714">starting a new layout</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-starting-_0040pcb_007b_007d-207">starting <code>Pcb</code></a>: <a href="#Command_002dLine-Options">Command-Line Options</a></li>
 <li><a href="#index-status-information-56">status information</a>: <a href="#Status_002dline-and-Input_002dfield">Status-line and Input-field</a></li>
 <li><a href="#index-strings_002c-an-example-89">strings, an example</a>: <a href="#Text">Text</a></li>
 <li><a href="#index-strings_002c-an-overview-19">strings, an overview</a>: <a href="#Text-Objects">Text Objects</a></li>
-<li><a href="#index-Sun-840">Sun</a>: <a href="#Sun">Sun</a></li>
-<li><a href="#index-symbols-429">symbols</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-Sun-857">Sun</a>: <a href="#Sun">Sun</a></li>
+<li><a href="#index-symbols-446">symbols</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-symbols_002c-an-overview-4">symbols, an overview</a>: <a href="#Symbol-Objects">Symbol Objects</a></li>
-<li><a href="#index-Syntax_002c-file-815">Syntax, file</a>: <a href="#File-Syntax">File Syntax</a></li>
-<li><a href="#index-temporary-files-533">temporary files</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-Syntax_002c-file-832">Syntax, file</a>: <a href="#File-Syntax">File Syntax</a></li>
+<li><a href="#index-temporary-files-550">temporary files</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-temporary-files-123">temporary files</a>: <a href="#Loading-and-Saving">Loading and Saving</a></li>
-<li><a href="#index-terminology-890">terminology</a>: <a href="#Glossary">Glossary</a></li>
-<li><a href="#index-TeX_002c-problems-859">TeX, problems</a>: <a href="#TeX-and-Manuals">TeX and Manuals</a></li>
+<li><a href="#index-terminology-909">terminology</a>: <a href="#Glossary">Glossary</a></li>
+<li><a href="#index-TeX_002c-problems-876">TeX, problems</a>: <a href="#TeX-and-Manuals">TeX and Manuals</a></li>
 <li><a href="#index-text_002c-an-example-88">text, an example</a>: <a href="#Text">Text</a></li>
 <li><a href="#index-text_002c-an-overview-18">text, an overview</a>: <a href="#Text-Objects">Text Objects</a></li>
-<li><a href="#index-text_002c-default-scaling-549">text, default scaling</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-thermal-flag_002c-changing-601">thermal flag, changing</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-thermal-flag_002c-clearing-629">thermal flag, clearing</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-thermal-flag_002c-setting-738">thermal flag, setting</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-thickness-of-lines-472">thickness of lines</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-text_002c-default-scaling-566">text, default scaling</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-thermal-flag_002c-changing-618">thermal flag, changing</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-thermal-flag_002c-clearing-646">thermal flag, clearing</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-thermal-flag_002c-setting-755">thermal flag, setting</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-thickness-of-lines-489">thickness of lines</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-thickness-of-objects-79">thickness of objects</a>: <a href="#Common">Common</a></li>
-<li><a href="#index-thickness-of-vias-562">thickness of vias</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-thickness_002c-changing-of-objects-619">thickness, changing of objects</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-toggle-layer-visibility-760">toggle layer visibility</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-thickness-of-vias-579">thickness of vias</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-thickness_002c-changing-of-objects-636">thickness, changing of objects</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-toggle-layer-visibility-777">toggle layer visibility</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-tool-selection-64">tool selection</a>: <a href="#Tool-Selectors">Tool Selectors</a></li>
 <li><a href="#index-tool_002c-arrow-160">tool, arrow</a>: <a href="#Arrow-Tool">Arrow Tool</a></li>
 <li><a href="#index-trace-optimizer-168">trace optimizer</a>: <a href="#Trace-Optimizer">Trace Optimizer</a></li>
-<li><a href="#index-translations-771">translations</a>: <a href="#Translations">Translations</a></li>
-<li><a href="#index-translations-572">translations</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-troubleshooting-835">troubleshooting</a>: <a href="#problems">problems</a></li>
+<li><a href="#index-translations-788">translations</a>: <a href="#Translations">Translations</a></li>
+<li><a href="#index-translations-589">translations</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-troubleshooting-852">troubleshooting</a>: <a href="#problems">problems</a></li>
 <li><a href="#index-two-line-mode-14">two line mode</a>: <a href="#Line-Objects">Line Objects</a></li>
-<li><a href="#index-undo-763">undo</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-undo-780">undo</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-undo-27">undo</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-undo_002c-multi_002daction-resources-584">undo, multi-action resources</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-undo_002c-multi_002daction-resources-601">undo, multi-action resources</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-unique-names-38">unique names</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-unix-command-400">unix command</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-unselect-objects-770">unselect objects</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-unix-command-417">unix command</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-unselect-objects-787">unselect objects</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-user-commands-179">user commands</a>: <a href="#User-Commands">User Commands</a></li>
-<li><a href="#index-user-input-780">user input</a>: <a href="#Translations">Translations</a></li>
-<li><a href="#index-vendor-drill-table-887">vendor drill table</a>: <a href="#UnloadVendor-Action">UnloadVendor Action</a></li>
-<li><a href="#index-vendor-drill-table-884">vendor drill table</a>: <a href="#ToggleVendor-Action">ToggleVendor Action</a></li>
-<li><a href="#index-vendor-drill-table-881">vendor drill table</a>: <a href="#LoadVendorFrom-Action">LoadVendorFrom Action</a></li>
-<li><a href="#index-vendor-drill-table-878">vendor drill table</a>: <a href="#EnableVendor-Action">EnableVendor Action</a></li>
-<li><a href="#index-vendor-drill-table-875">vendor drill table</a>: <a href="#DisableVendor-Action">DisableVendor Action</a></li>
-<li><a href="#index-vendor-drill-table-872">vendor drill table</a>: <a href="#ApplyVendor-Action">ApplyVendor Action</a></li>
-<li><a href="#index-vendor-drill-table-582">vendor drill table</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-user-input-797">user input</a>: <a href="#Translations">Translations</a></li>
+<li><a href="#index-vendor-drill-table-906">vendor drill table</a>: <a href="#UnloadVendor-Action">UnloadVendor Action</a></li>
+<li><a href="#index-vendor-drill-table-903">vendor drill table</a>: <a href="#ToggleVendor-Action">ToggleVendor Action</a></li>
+<li><a href="#index-vendor-drill-table-900">vendor drill table</a>: <a href="#LoadVendorFrom-Action">LoadVendorFrom Action</a></li>
+<li><a href="#index-vendor-drill-table-897">vendor drill table</a>: <a href="#EnableVendor-Action">EnableVendor Action</a></li>
+<li><a href="#index-vendor-drill-table-894">vendor drill table</a>: <a href="#DisableVendor-Action">DisableVendor Action</a></li>
+<li><a href="#index-vendor-drill-table-891">vendor drill table</a>: <a href="#ApplyVendor-Action">ApplyVendor Action</a></li>
+<li><a href="#index-vendor-drill-table-599">vendor drill table</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-Vendor-drill-table-177">Vendor drill table</a>: <a href="#Vendor-drill-mapping">Vendor drill mapping</a></li>
-<li><a href="#index-vendor-drill-table_002c-disabling-646">vendor drill table, disabling</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-vendor-drill-table_002c-enabling-677">vendor drill table, enabling</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-vendor-drill-table_002c-loading-682">vendor drill table, loading</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-vendor-drill-table_002c-toggling-758">vendor drill table, toggling</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-vendor-drill-table_002c-unloading-767">vendor drill table, unloading</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-vendor-map-886">vendor map</a>: <a href="#UnloadVendor-Action">UnloadVendor Action</a></li>
-<li><a href="#index-vendor-map-883">vendor map</a>: <a href="#ToggleVendor-Action">ToggleVendor Action</a></li>
-<li><a href="#index-vendor-map-880">vendor map</a>: <a href="#LoadVendorFrom-Action">LoadVendorFrom Action</a></li>
-<li><a href="#index-vendor-map-877">vendor map</a>: <a href="#EnableVendor-Action">EnableVendor Action</a></li>
-<li><a href="#index-vendor-map-874">vendor map</a>: <a href="#DisableVendor-Action">DisableVendor Action</a></li>
-<li><a href="#index-vendor-map-871">vendor map</a>: <a href="#ApplyVendor-Action">ApplyVendor Action</a></li>
-<li><a href="#index-vendor-map-581">vendor map</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-vendor-map_002c-disabling-645">vendor map, disabling</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-vendor-map_002c-enabling-676">vendor map, enabling</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-vendor-map_002c-loading-681">vendor map, loading</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-vendor-map_002c-toggling-757">vendor map, toggling</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-vendor-map_002c-unloading-766">vendor map, unloading</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-vendor-drill-table_002c-disabling-663">vendor drill table, disabling</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-vendor-drill-table_002c-enabling-694">vendor drill table, enabling</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-vendor-drill-table_002c-loading-699">vendor drill table, loading</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-vendor-drill-table_002c-toggling-775">vendor drill table, toggling</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-vendor-drill-table_002c-unloading-784">vendor drill table, unloading</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-vendor-map-905">vendor map</a>: <a href="#UnloadVendor-Action">UnloadVendor Action</a></li>
+<li><a href="#index-vendor-map-902">vendor map</a>: <a href="#ToggleVendor-Action">ToggleVendor Action</a></li>
+<li><a href="#index-vendor-map-899">vendor map</a>: <a href="#LoadVendorFrom-Action">LoadVendorFrom Action</a></li>
+<li><a href="#index-vendor-map-896">vendor map</a>: <a href="#EnableVendor-Action">EnableVendor Action</a></li>
+<li><a href="#index-vendor-map-893">vendor map</a>: <a href="#DisableVendor-Action">DisableVendor Action</a></li>
+<li><a href="#index-vendor-map-890">vendor map</a>: <a href="#ApplyVendor-Action">ApplyVendor Action</a></li>
+<li><a href="#index-vendor-map-598">vendor map</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-vendor-map_002c-disabling-662">vendor map, disabling</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-vendor-map_002c-enabling-693">vendor map, enabling</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-vendor-map_002c-loading-698">vendor map, loading</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-vendor-map_002c-toggling-774">vendor map, toggling</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-vendor-map_002c-unloading-783">vendor map, unloading</a>: <a href="#Actions">Actions</a></li>
 <li><a href="#index-Vendor-mapping-175">Vendor mapping</a>: <a href="#Vendor-drill-mapping">Vendor drill mapping</a></li>
 <li><a href="#index-Vendor-rules-174">Vendor rules</a>: <a href="#Vendor-drill-mapping">Vendor drill mapping</a></li>
 <li><a href="#index-vias_002c-an-example-91">vias, an example</a>: <a href="#Vias">Vias</a></li>
 <li><a href="#index-vias_002c-an-overview-6">vias, an overview</a>: <a href="#Via-Objects">Via Objects</a></li>
-<li><a href="#index-vias_002c-changing-shape-of-611">vias, changing shape of</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-vias_002c-color-557">vias, color</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-vias_002c-converting-to-mounting-hole-603">vias, converting to mounting hole</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-vias_002c-setting-of-initial-size-744">vias, setting of initial size</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-vias_002c-size-560">vias, size</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-viewing-side_002c-changing-of-748">viewing side, changing of</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-volume-of-speaker-565">volume of speaker</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-vias_002c-changing-shape-of-628">vias, changing shape of</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-vias_002c-color-574">vias, color</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-vias_002c-converting-to-mounting-hole-620">vias, converting to mounting hole</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-vias_002c-setting-of-initial-size-761">vias, setting of initial size</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-vias_002c-size-577">vias, size</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-View_002c-popup-menu-30">View, popup menu</a>: <a href="#Menu">Menu</a></li>
+<li><a href="#index-viewing-side_002c-changing-of-765">viewing side, changing of</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-volume-of-speaker-582">volume of speaker</a>: <a href="#Resources">Resources</a></li>
 <li><a href="#index-Window_002c-popup-menu-55">Window, popup menu</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-x_002dy-file-format-867">x-y file format</a>: <a href="#Centroid-File-Format">Centroid File Format</a></li>
-<li><a href="#index-x_002dy-file_002c-algorithms-869">x-y file, algorithms</a>: <a href="#Centroid-File-Format">Centroid File Format</a></li>
-<li><a href="#index-X11-368">X11</a>: <a href="#X11-Interface">X11 Interface</a></li>
-<li><a href="#index-X11-default-translations-773">X11 default translations</a>: <a href="#Translations">Translations</a></li>
-<li><a href="#index-X11-resources-370">X11 resources</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-X11-translations-575">X11 translations</a>: <a href="#Actions">Actions</a></li>
-<li><a href="#index-X11_002c-problems-858">X11, problems</a>: <a href="#X11">X11</a></li>
-<li><a href="#index-xcircuit_002c-how-to-interface-with-821">xcircuit, how to interface with</a>: <a href="#xcircuit">xcircuit</a></li>
-<li><a href="#index-zoom-of-Layout-area-570">zoom of Layout area</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-zoom-of-pinout-window-499">zoom of pinout window</a>: <a href="#Resources">Resources</a></li>
-<li><a href="#index-zoom_002c-setting-34">zoom, setting</a>: <a href="#Menu">Menu</a></li>
-<li><a href="#index-zoom_002c-setting-of-741">zoom, setting of</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-x_002dy-file-format-884">x-y file format</a>: <a href="#Centroid-File-Format">Centroid File Format</a></li>
+<li><a href="#index-x_002dy-file_002c-algorithms-886">x-y file, algorithms</a>: <a href="#Centroid-File-Format">Centroid File Format</a></li>
+<li><a href="#index-X11-385">X11</a>: <a href="#X11-Interface">X11 Interface</a></li>
+<li><a href="#index-X11-default-translations-790">X11 default translations</a>: <a href="#Translations">Translations</a></li>
+<li><a href="#index-X11-resources-387">X11 resources</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-X11-translations-592">X11 translations</a>: <a href="#Actions">Actions</a></li>
+<li><a href="#index-X11_002c-problems-875">X11, problems</a>: <a href="#X11">X11</a></li>
+<li><a href="#index-xcircuit_002c-how-to-interface-with-838">xcircuit, how to interface with</a>: <a href="#xcircuit">xcircuit</a></li>
+<li><a href="#index-zoom-of-Layout-area-587">zoom of Layout area</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-zoom-of-pinout-window-516">zoom of pinout window</a>: <a href="#Resources">Resources</a></li>
+<li><a href="#index-zoom_002c-setting-35">zoom, setting</a>: <a href="#Menu">Menu</a></li>
+<li><a href="#index-zoom_002c-setting-of-758">zoom, setting of</a>: <a href="#Actions">Actions</a></li>
    </ul>
 <div class="contents">
 <h2>Table of Contents</h2>
@@ -12905,163 +13215,173 @@ Up: <a rel="up" accesskey="u" href="#Top">Top</a>
 <li><a href="#Centroid-File-Format">E.2 File Format</a>
 <li><a href="#Centroid-File-Format">E.3 Computation of Centroid and Rotation</a>
 </li></ul>
-<li><a name="toc_Action-Reference" href="#Action-Reference">Appendix F Action Reference</a>
+<li><a name="toc_Annotation-File-Format" href="#Annotation-File-Format">Appendix F Annotation File Format</a>
+<ul>
+<li><a href="#Annotation-File-Format">F.1 Overview</a>
+<li><a href="#Annotation-File-Format">F.2 File Format</a>
+<ul>
+<li><a href="#Annotation-File-Format">F.2.1 *COMMENT*</a>
+<li><a href="#Annotation-File-Format">F.2.2 *FILEVERSION*</a>
+<li><a href="#Annotation-File-Format">F.2.3 *RENAME*</a>
+</li></ul>
+</li></ul>
+<li><a name="toc_Action-Reference" href="#Action-Reference">Appendix G Action Reference</a>
 <ul>
-<li><a href="#core-actions">F.1 Core actions</a>
+<li><a href="#core-actions">G.1 Core actions</a>
 <ul>
-<li><a href="#AddRats-Action">F.1.1 AddRats</a>
-<li><a href="#ApplyVendor-Action">F.1.2 ApplyVendor</a>
-<li><a href="#Atomic-Action">F.1.3 Atomic</a>
-<li><a href="#Attributes-Action">F.1.4 Attributes</a>
-<li><a href="#AutoPlaceSelected-Action">F.1.5 AutoPlaceSelected</a>
-<li><a href="#AutoRoute-Action">F.1.6 AutoRoute</a>
-<li><a href="#ChangeClearSize-Action">F.1.7 ChangeClearSize</a>
-<li><a href="#ChangeDrillSize-Action">F.1.8 ChangeDrillSize</a>
-<li><a href="#ChangeFlag-Action">F.1.9 ChangeFlag</a>
-<li><a href="#ChangeHole-Action">F.1.10 ChangeHole</a>
-<li><a href="#ChangeJoin-Action">F.1.11 ChangeJoin</a>
-<li><a href="#ChangeName-Action">F.1.12 ChangeName</a>
-<li><a href="#ChangeOctagon-Action">F.1.13 ChangeOctagon</a>
-<li><a href="#ChangePaste-Action">F.1.14 ChangePaste</a>
-<li><a href="#ChangePinName-Action">F.1.15 ChangePinName</a>
-<li><a href="#ChangeSize-Action">F.1.16 ChangeSize</a>
-<li><a href="#ChangeSquare-Action">F.1.17 ChangeSquare</a>
-<li><a href="#ClearOctagon-Action">F.1.18 ClearOctagon</a>
-<li><a href="#ClearSquare-Action">F.1.19 ClearSquare</a>
-<li><a href="#ClrFlag-Action">F.1.20 ClrFlag</a>
-<li><a href="#Connection-Action">F.1.21 Connection</a>
-<li><a href="#Delete-Action">F.1.22 Delete</a>
-<li><a href="#DeleteRats-Action">F.1.23 DeleteRats</a>
-<li><a href="#DisableVendor-Action">F.1.24 DisableVendor</a>
-<li><a href="#DisperseElements-Action">F.1.25 DisperseElements</a>
-<li><a href="#Display-Action">F.1.26 Display</a>
-<li><a href="#djopt-Action">F.1.27 djopt</a>
-<li><a href="#DRC-Action">F.1.28 DRC</a>
-<li><a href="#DumpLibrary-Action">F.1.29 DumpLibrary</a>
-<li><a href="#elementlist-Action">F.1.30 elementlist</a>
-<li><a href="#elementsetattr-Action">F.1.31 elementsetattr</a>
-<li><a href="#EnableVendor-Action">F.1.32 EnableVendor</a>
-<li><a href="#execcommand-Action">F.1.33 execcommand</a>
-<li><a href="#ExecuteFile-Action">F.1.34 ExecuteFile</a>
-<li><a href="#Flip-Action">F.1.35 Flip</a>
-<li><a href="#FontEdit-Action">F.1.36 FontEdit</a>
-<li><a href="#FontSave-Action">F.1.37 FontSave</a>
-<li><a href="#FreeRotateBuffer-Action">F.1.38 FreeRotateBuffer</a>
-<li><a href="#GlobalPuller-Action">F.1.39 GlobalPuller</a>
-<li><a href="#h-Action">F.1.40 h</a>
-<li><a href="#Import-Action">F.1.41 Import</a>
-<li><a href="#l-Action">F.1.42 l</a>
-<li><a href="#le-Action">F.1.43 le</a>
-<li><a href="#LoadFootprint-Action">F.1.44 LoadFootprint</a>
-<li><a href="#LoadFrom-Action">F.1.45 LoadFrom</a>
-<li><a href="#LoadVendorFrom-Action">F.1.46 LoadVendorFrom</a>
-<li><a href="#m-Action">F.1.47 m</a>
-<li><a href="#MarkCrosshair-Action">F.1.48 MarkCrosshair</a>
-<li><a href="#Message-Action">F.1.49 Message</a>
-<li><a href="#MinClearGap-Action">F.1.50 MinClearGap</a>
-<li><a href="#MinMaskGap-Action">F.1.51 MinMaskGap</a>
-<li><a href="#Mode-Action">F.1.52 Mode</a>
-<li><a href="#MorphPolygon-Action">F.1.53 MorphPolygon</a>
-<li><a href="#MoveLayer-Action">F.1.54 MoveLayer</a>
-<li><a href="#MoveObject-Action">F.1.55 MoveObject</a>
-<li><a href="#MoveToCurrentLayer-Action">F.1.56 MoveToCurrentLayer</a>
-<li><a href="#Netlist-Action">F.1.57 Netlist</a>
-<li><a href="#New-Action">F.1.58 New</a>
-<li><a href="#OptAutoOnly-Action">F.1.59 OptAutoOnly</a>
-<li><a href="#PasteBuffer-Action">F.1.60 PasteBuffer</a>
-<li><a href="#Polygon-Action">F.1.61 Polygon</a>
-<li><a href="#Puller-Action">F.1.62 Puller</a>
-<li><a href="#q-Action">F.1.63 q</a>
-<li><a href="#q_0021-Action">F.1.64 q!</a>
-<li><a href="#Quit-Action">F.1.65 Quit</a>
-<li><a href="#Redo-Action">F.1.66 Redo</a>
-<li><a href="#RemoveSelected-Action">F.1.67 RemoveSelected</a>
-<li><a href="#Renumber-Action">F.1.68 Renumber</a>
-<li><a href="#Report-Action">F.1.69 Report</a>
-<li><a href="#ReportDialog-Action">F.1.70 ReportDialog</a>
-<li><a href="#RipUp-Action">F.1.71 RipUp</a>
-<li><a href="#rn-Action">F.1.72 rn</a>
-<li><a href="#RouteStyle-Action">F.1.73 RouteStyle</a>
-<li><a href="#s-Action">F.1.74 s</a>
-<li><a href="#SaveSettings-Action">F.1.75 SaveSettings</a>
-<li><a href="#SaveTo-Action">F.1.76 SaveTo</a>
-<li><a href="#Select-Action">F.1.77 Select</a>
-<li><a href="#SetFlag-Action">F.1.78 SetFlag</a>
-<li><a href="#SetOctagon-Action">F.1.79 SetOctagon</a>
-<li><a href="#SetSame-Action">F.1.80 SetSame</a>
-<li><a href="#SetSquare-Action">F.1.81 SetSquare</a>
-<li><a href="#SetThermal-Action">F.1.82 SetThermal</a>
-<li><a href="#SetValue-Action">F.1.83 SetValue</a>
-<li><a href="#ToggleHideName-Action">F.1.84 ToggleHideName</a>
-<li><a href="#ToggleVendor-Action">F.1.85 ToggleVendor</a>
-<li><a href="#Undo-Action">F.1.86 Undo</a>
-<li><a href="#UnloadVendor-Action">F.1.87 UnloadVendor</a>
-<li><a href="#Unselect-Action">F.1.88 Unselect</a>
-<li><a href="#w-Action">F.1.89 w</a>
-<li><a href="#wq-Action">F.1.90 wq</a>
+<li><a href="#AddRats-Action">G.1.1 AddRats</a>
+<li><a href="#ApplyVendor-Action">G.1.2 ApplyVendor</a>
+<li><a href="#Atomic-Action">G.1.3 Atomic</a>
+<li><a href="#Attributes-Action">G.1.4 Attributes</a>
+<li><a href="#AutoPlaceSelected-Action">G.1.5 AutoPlaceSelected</a>
+<li><a href="#AutoRoute-Action">G.1.6 AutoRoute</a>
+<li><a href="#ChangeClearSize-Action">G.1.7 ChangeClearSize</a>
+<li><a href="#ChangeDrillSize-Action">G.1.8 ChangeDrillSize</a>
+<li><a href="#ChangeFlag-Action">G.1.9 ChangeFlag</a>
+<li><a href="#ChangeHole-Action">G.1.10 ChangeHole</a>
+<li><a href="#ChangeJoin-Action">G.1.11 ChangeJoin</a>
+<li><a href="#ChangeName-Action">G.1.12 ChangeName</a>
+<li><a href="#ChangeOctagon-Action">G.1.13 ChangeOctagon</a>
+<li><a href="#ChangePaste-Action">G.1.14 ChangePaste</a>
+<li><a href="#ChangePinName-Action">G.1.15 ChangePinName</a>
+<li><a href="#ChangeSize-Action">G.1.16 ChangeSize</a>
+<li><a href="#ChangeSquare-Action">G.1.17 ChangeSquare</a>
+<li><a href="#ClearOctagon-Action">G.1.18 ClearOctagon</a>
+<li><a href="#ClearSquare-Action">G.1.19 ClearSquare</a>
+<li><a href="#ClrFlag-Action">G.1.20 ClrFlag</a>
+<li><a href="#Connection-Action">G.1.21 Connection</a>
+<li><a href="#Delete-Action">G.1.22 Delete</a>
+<li><a href="#DeleteRats-Action">G.1.23 DeleteRats</a>
+<li><a href="#DisableVendor-Action">G.1.24 DisableVendor</a>
+<li><a href="#DisperseElements-Action">G.1.25 DisperseElements</a>
+<li><a href="#Display-Action">G.1.26 Display</a>
+<li><a href="#djopt-Action">G.1.27 djopt</a>
+<li><a href="#DRC-Action">G.1.28 DRC</a>
+<li><a href="#DumpLibrary-Action">G.1.29 DumpLibrary</a>
+<li><a href="#elementlist-Action">G.1.30 elementlist</a>
+<li><a href="#elementsetattr-Action">G.1.31 elementsetattr</a>
+<li><a href="#EnableVendor-Action">G.1.32 EnableVendor</a>
+<li><a href="#execcommand-Action">G.1.33 execcommand</a>
+<li><a href="#ExecuteFile-Action">G.1.34 ExecuteFile</a>
+<li><a href="#Flip-Action">G.1.35 Flip</a>
+<li><a href="#FontEdit-Action">G.1.36 FontEdit</a>
+<li><a href="#FontSave-Action">G.1.37 FontSave</a>
+<li><a href="#FreeRotateBuffer-Action">G.1.38 FreeRotateBuffer</a>
+<li><a href="#GlobalPuller-Action">G.1.39 GlobalPuller</a>
+<li><a href="#h-Action">G.1.40 h</a>
+<li><a href="#Import-Action">G.1.41 Import</a>
+<li><a href="#l-Action">G.1.42 l</a>
+<li><a href="#le-Action">G.1.43 le</a>
+<li><a href="#LoadFootprint-Action">G.1.44 LoadFootprint</a>
+<li><a href="#LoadFrom-Action">G.1.45 LoadFrom</a>
+<li><a href="#LoadVendorFrom-Action">G.1.46 LoadVendorFrom</a>
+<li><a href="#m-Action">G.1.47 m</a>
+<li><a href="#MarkCrosshair-Action">G.1.48 MarkCrosshair</a>
+<li><a href="#Message-Action">G.1.49 Message</a>
+<li><a href="#MinClearGap-Action">G.1.50 MinClearGap</a>
+<li><a href="#MinMaskGap-Action">G.1.51 MinMaskGap</a>
+<li><a href="#Mode-Action">G.1.52 Mode</a>
+<li><a href="#MorphPolygon-Action">G.1.53 MorphPolygon</a>
+<li><a href="#MoveLayer-Action">G.1.54 MoveLayer</a>
+<li><a href="#MoveObject-Action">G.1.55 MoveObject</a>
+<li><a href="#MoveToCurrentLayer-Action">G.1.56 MoveToCurrentLayer</a>
+<li><a href="#Netlist-Action">G.1.57 Netlist</a>
+<li><a href="#New-Action">G.1.58 New</a>
+<li><a href="#OptAutoOnly-Action">G.1.59 OptAutoOnly</a>
+<li><a href="#PasteBuffer-Action">G.1.60 PasteBuffer</a>
+<li><a href="#Polygon-Action">G.1.61 Polygon</a>
+<li><a href="#Puller-Action">G.1.62 Puller</a>
+<li><a href="#q-Action">G.1.63 q</a>
+<li><a href="#q_0021-Action">G.1.64 q!</a>
+<li><a href="#Quit-Action">G.1.65 Quit</a>
+<li><a href="#Redo-Action">G.1.66 Redo</a>
+<li><a href="#RemoveSelected-Action">G.1.67 RemoveSelected</a>
+<li><a href="#Renumber-Action">G.1.68 Renumber</a>
+<li><a href="#Report-Action">G.1.69 Report</a>
+<li><a href="#ReportDialog-Action">G.1.70 ReportDialog</a>
+<li><a href="#RipUp-Action">G.1.71 RipUp</a>
+<li><a href="#rn-Action">G.1.72 rn</a>
+<li><a href="#RouteStyle-Action">G.1.73 RouteStyle</a>
+<li><a href="#s-Action">G.1.74 s</a>
+<li><a href="#SaveSettings-Action">G.1.75 SaveSettings</a>
+<li><a href="#SaveTo-Action">G.1.76 SaveTo</a>
+<li><a href="#Select-Action">G.1.77 Select</a>
+<li><a href="#SetFlag-Action">G.1.78 SetFlag</a>
+<li><a href="#SetOctagon-Action">G.1.79 SetOctagon</a>
+<li><a href="#SetSame-Action">G.1.80 SetSame</a>
+<li><a href="#SetSquare-Action">G.1.81 SetSquare</a>
+<li><a href="#SetThermal-Action">G.1.82 SetThermal</a>
+<li><a href="#SetValue-Action">G.1.83 SetValue</a>
+<li><a href="#ToggleHideName-Action">G.1.84 ToggleHideName</a>
+<li><a href="#ToggleVendor-Action">G.1.85 ToggleVendor</a>
+<li><a href="#Undo-Action">G.1.86 Undo</a>
+<li><a href="#UnloadVendor-Action">G.1.87 UnloadVendor</a>
+<li><a href="#Unselect-Action">G.1.88 Unselect</a>
+<li><a href="#w-Action">G.1.89 w</a>
+<li><a href="#wq-Action">G.1.90 wq</a>
 </li></ul>
-<li><a href="#common-actions">F.2 common actions</a>
+<li><a href="#common-actions">G.2 common actions</a>
 <ul>
-<li><a href="#LayersChanged-Action">F.2.1 LayersChanged</a>
-<li><a href="#LibraryChanged-Action">F.2.2 LibraryChanged</a>
-<li><a href="#NetlistChanged-Action">F.2.3 NetlistChanged</a>
-<li><a href="#PCBChanged-Action">F.2.4 PCBChanged</a>
-<li><a href="#RouteStylesChanged-Action">F.2.5 RouteStylesChanged</a>
+<li><a href="#LayersChanged-Action">G.2.1 LayersChanged</a>
+<li><a href="#LibraryChanged-Action">G.2.2 LibraryChanged</a>
+<li><a href="#NetlistChanged-Action">G.2.3 NetlistChanged</a>
+<li><a href="#PCBChanged-Action">G.2.4 PCBChanged</a>
+<li><a href="#RouteStylesChanged-Action">G.2.5 RouteStylesChanged</a>
 </li></ul>
-<li><a href="#gtk-actions">F.3 gtk actions</a>
+<li><a href="#gtk-actions">G.3 gtk actions</a>
 <ul>
-<li><a href="#gtk-About-Action">F.3.1 gtk About</a>
-<li><a href="#gtk-AdjustStyle-Action">F.3.2 gtk AdjustStyle</a>
-<li><a href="#gtk-Center-Action">F.3.3 gtk Center</a>
-<li><a href="#gtk-Cursor-Action">F.3.4 gtk Cursor</a>
-<li><a href="#gtk-DoWindows-Action">F.3.5 gtk DoWindows</a>
-<li><a href="#gtk-EditLayerGroups-Action">F.3.6 gtk EditLayerGroups</a>
-<li><a href="#gtk-GetXY-Action">F.3.7 gtk GetXY</a>
-<li><a href="#gtk-ImportGUI-Action">F.3.8 gtk ImportGUI</a>
-<li><a href="#gtk-Pan-Action">F.3.9 gtk Pan</a>
-<li><a href="#gtk-Popup-Action">F.3.10 gtk Popup</a>
-<li><a href="#gtk-Print-Action">F.3.11 gtk Print</a>
-<li><a href="#gtk-PrintCalibrate-Action">F.3.12 gtk PrintCalibrate</a>
-<li><a href="#gtk-Save-Action">F.3.13 gtk Save</a>
-<li><a href="#gtk-SelectLayer-Action">F.3.14 gtk SelectLayer</a>
-<li><a href="#gtk-SetUnits-Action">F.3.15 gtk SetUnits</a>
-<li><a href="#gtk-SwapSides-Action">F.3.16 gtk SwapSides</a>
-<li><a href="#gtk-ToggleView-Action">F.3.17 gtk ToggleView</a>
-<li><a href="#gtk-Zoom-Action">F.3.18 gtk Zoom</a>
+<li><a href="#gtk-About-Action">G.3.1 gtk About</a>
+<li><a href="#gtk-AdjustStyle-Action">G.3.2 gtk AdjustStyle</a>
+<li><a href="#gtk-Center-Action">G.3.3 gtk Center</a>
+<li><a href="#gtk-Cursor-Action">G.3.4 gtk Cursor</a>
+<li><a href="#gtk-DoWindows-Action">G.3.5 gtk DoWindows</a>
+<li><a href="#gtk-EditLayerGroups-Action">G.3.6 gtk EditLayerGroups</a>
+<li><a href="#gtk-GetXY-Action">G.3.7 gtk GetXY</a>
+<li><a href="#gtk-ImportGUI-Action">G.3.8 gtk ImportGUI</a>
+<li><a href="#gtk-Pan-Action">G.3.9 gtk Pan</a>
+<li><a href="#gtk-Popup-Action">G.3.10 gtk Popup</a>
+<li><a href="#gtk-Print-Action">G.3.11 gtk Print</a>
+<li><a href="#gtk-PrintCalibrate-Action">G.3.12 gtk PrintCalibrate</a>
+<li><a href="#gtk-Save-Action">G.3.13 gtk Save</a>
+<li><a href="#gtk-SelectLayer-Action">G.3.14 gtk SelectLayer</a>
+<li><a href="#gtk-SetUnits-Action">G.3.15 gtk SetUnits</a>
+<li><a href="#gtk-SwapSides-Action">G.3.16 gtk SwapSides</a>
+<li><a href="#gtk-ToggleView-Action">G.3.17 gtk ToggleView</a>
+<li><a href="#gtk-Zoom-Action">G.3.18 gtk Zoom</a>
 </li></ul>
-<li><a href="#lesstif-actions">F.4 lesstif actions</a>
+<li><a href="#lesstif-actions">G.4 lesstif actions</a>
 <ul>
-<li><a href="#lesstif-About-Action">F.4.1 lesstif About</a>
-<li><a href="#lesstif-AdjustSizes-Action">F.4.2 lesstif AdjustSizes</a>
-<li><a href="#lesstif-AdjustStyle-Action">F.4.3 lesstif AdjustStyle</a>
-<li><a href="#lesstif-Benchmark-Action">F.4.4 lesstif Benchmark</a>
-<li><a href="#lesstif-Command-Action">F.4.5 lesstif Command</a>
-<li><a href="#lesstif-Cursor-Action">F.4.6 lesstif Cursor</a>
-<li><a href="#lesstif-Debug-Action">F.4.7 lesstif Debug</a>
-<li><a href="#lesstif-DebugXY-Action">F.4.8 lesstif DebugXY</a>
-<li><a href="#lesstif-DoWindows-Action">F.4.9 lesstif DoWindows</a>
-<li><a href="#lesstif-DumpKeys-Action">F.4.10 lesstif DumpKeys</a>
-<li><a href="#lesstif-EditLayerGroups-Action">F.4.11 lesstif EditLayerGroups</a>
-<li><a href="#lesstif-Export-Action">F.4.12 lesstif Export</a>
-<li><a href="#lesstif-GetXY-Action">F.4.13 lesstif GetXY</a>
-<li><a href="#lesstif-ImportGUI-Action">F.4.14 lesstif ImportGUI</a>
-<li><a href="#lesstif-LibraryShow-Action">F.4.15 lesstif LibraryShow</a>
-<li><a href="#lesstif-Load-Action">F.4.16 lesstif Load</a>
-<li><a href="#lesstif-LoadVendor-Action">F.4.17 lesstif LoadVendor</a>
-<li><a href="#lesstif-NetlistShow-Action">F.4.18 lesstif NetlistShow</a>
-<li><a href="#lesstif-Print-Action">F.4.19 lesstif Print</a>
-<li><a href="#lesstif-PrintCalibrate-Action">F.4.20 lesstif PrintCalibrate</a>
-<li><a href="#lesstif-PromptFor-Action">F.4.21 lesstif PromptFor</a>
-<li><a href="#lesstif-Return-Action">F.4.22 lesstif Return</a>
-<li><a href="#lesstif-Save-Action">F.4.23 lesstif Save</a>
-<li><a href="#lesstif-SelectLayer-Action">F.4.24 lesstif SelectLayer</a>
-<li><a href="#lesstif-SetUnits-Action">F.4.25 lesstif SetUnits</a>
-<li><a href="#lesstif-SwapSides-Action">F.4.26 lesstif SwapSides</a>
-<li><a href="#lesstif-ToggleView-Action">F.4.27 lesstif ToggleView</a>
-<li><a href="#lesstif-Zoom-Action">F.4.28 lesstif Zoom</a>
+<li><a href="#lesstif-About-Action">G.4.1 lesstif About</a>
+<li><a href="#lesstif-AdjustSizes-Action">G.4.2 lesstif AdjustSizes</a>
+<li><a href="#lesstif-AdjustStyle-Action">G.4.3 lesstif AdjustStyle</a>
+<li><a href="#lesstif-Benchmark-Action">G.4.4 lesstif Benchmark</a>
+<li><a href="#lesstif-Command-Action">G.4.5 lesstif Command</a>
+<li><a href="#lesstif-Cursor-Action">G.4.6 lesstif Cursor</a>
+<li><a href="#lesstif-Debug-Action">G.4.7 lesstif Debug</a>
+<li><a href="#lesstif-DebugXY-Action">G.4.8 lesstif DebugXY</a>
+<li><a href="#lesstif-DoWindows-Action">G.4.9 lesstif DoWindows</a>
+<li><a href="#lesstif-DumpKeys-Action">G.4.10 lesstif DumpKeys</a>
+<li><a href="#lesstif-EditLayerGroups-Action">G.4.11 lesstif EditLayerGroups</a>
+<li><a href="#lesstif-Export-Action">G.4.12 lesstif Export</a>
+<li><a href="#lesstif-GetXY-Action">G.4.13 lesstif GetXY</a>
+<li><a href="#lesstif-ImportGUI-Action">G.4.14 lesstif ImportGUI</a>
+<li><a href="#lesstif-LibraryShow-Action">G.4.15 lesstif LibraryShow</a>
+<li><a href="#lesstif-Load-Action">G.4.16 lesstif Load</a>
+<li><a href="#lesstif-LoadVendor-Action">G.4.17 lesstif LoadVendor</a>
+<li><a href="#lesstif-NetlistShow-Action">G.4.18 lesstif NetlistShow</a>
+<li><a href="#lesstif-Print-Action">G.4.19 lesstif Print</a>
+<li><a href="#lesstif-PrintCalibrate-Action">G.4.20 lesstif PrintCalibrate</a>
+<li><a href="#lesstif-PromptFor-Action">G.4.21 lesstif PromptFor</a>
+<li><a href="#lesstif-Return-Action">G.4.22 lesstif Return</a>
+<li><a href="#lesstif-Save-Action">G.4.23 lesstif Save</a>
+<li><a href="#lesstif-SelectLayer-Action">G.4.24 lesstif SelectLayer</a>
+<li><a href="#lesstif-SetUnits-Action">G.4.25 lesstif SetUnits</a>
+<li><a href="#lesstif-SwapSides-Action">G.4.26 lesstif SwapSides</a>
+<li><a href="#lesstif-ToggleView-Action">G.4.27 lesstif ToggleView</a>
+<li><a href="#lesstif-Zoom-Action">G.4.28 lesstif Zoom</a>
 </li></ul>
 </li></ul>
-<li><a name="toc_Glossary" href="#Glossary">Appendix G Glossary</a>
+<li><a name="toc_Glossary" href="#Glossary">Appendix H Glossary</a>
 <li><a name="toc_Index" href="#Index">Index of Resources</a>
 <li><a name="toc_Index" href="#Index">Index of Actions, Commands and Options</a>
 <li><a name="toc_Index" href="#Index">Index of Concepts</a>
diff --git a/doc/pcb.info b/doc/pcb.info
index 8250233..394b332 100644
--- a/doc/pcb.info
+++ b/doc/pcb.info
@@ -29,298 +29,299 @@ General Public License for more details.
 
 Indirect:
 pcb.info-1: 1021
-pcb.info-2: 300750
+pcb.info-2: 297807
 
 Tag Table:
 (Indirect)
 Node: Top1021
-Node: Copying2396
-Node: History3068
-Node: Overview7954
-Node: Intro8775
-Node: Symbol Objects10256
-Node: Via Objects10836
-Node: Element Objects11854
-Node: Layer Objects18737
-Node: Line Objects21889
-Node: Arc Objects24857
-Node: Polygon Objects26305
-Node: Text Objects28934
-Node: Net Objects29749
-Node: Getting Started30679
-Node: Application Window32927
-Node: Menu33576
-Node: Status-line and Input-field42616
-Node: Layer Controls45891
-Node: Tool Selectors49569
-Node: Layout Area56271
-Node: Log Window57139
-Node: Library Window57973
-Node: Netlist Window59217
-Node: Drawing and Removing60811
-Node: Common62955
-Node: Lines64804
-Node: Arcs66368
-Node: Polygons67551
-Node: Text69438
-Node: Vias70423
-Node: Elements71799
-Node: Pastebuffer77269
-Node: Moving and Copying79091
-Node: Loading and Saving80502
-Node: Printing82110
-Node: Exporting86518
-Node: bom86973
-Node: gcode87161
-Node: gerber90012
-Node: nelma90212
-Node: png90364
-Node: ps90508
-Node: eps90677
-Node: Connection Lists90914
-Node: Arrow Tool92720
-Node: Rats Nest94951
-Node: Design Rule Checking100036
-Node: Trace Optimizer102401
-Node: Searching for elements103945
-Node: Measuring distances104446
-Node: Vendor drill mapping105169
-Node: Autorouter108407
-Node: User Commands111745
-Node: Command-Line Options115952
-Node: General Options117224
-Node: General GUI Options119187
-Node: GTK+ GUI Options120305
-Node: lesstif GUI Options120881
-Node: Colors121452
-Node: Layer Names123460
-Node: Paths124209
-Node: Sizes125057
-Node: Commands126692
-Node: DRC Options128043
-Node: BOM Creation128812
-Node: Gerber Export129132
-Node: Postscript Export129494
-Node: Encapsulated Postscript Export131251
-Node: PNG Options131805
-Node: lpr Printing Options133335
-Node: nelma Options133771
-Node: X11 Interface134197
-Node: Resources134665
-Node: Actions150194
-Node: Translations177398
-Node: File Formats178937
-Node: Pad and Line Representation180586
-Node: Layout File181568
-Node: Element File183083
-Node: Font File184124
-Node: Netlist File184505
-Node: Library Contents File185786
-Node: Library File186841
-Node: File Syntax189295
-Node: Arc syntax190661
-Node: Attribute syntax191870
-Node: Connect syntax192381
-Node: Cursor syntax192734
-Node: DRC syntax193207
-Node: Element syntax193698
-Node: ElementArc syntax195640
-Node: ElementLine syntax196598
-Node: FileVersion syntax197051
-Node: Flags syntax197549
-Node: Grid syntax197844
-Node: Groups syntax198336
-Node: Layer syntax198925
-Node: Line syntax199448
-Node: Mark syntax200109
-Node: Net syntax200372
-Node: Netlist syntax200649
-Node: Pad syntax200810
-Node: PCB syntax201766
-Node: Pin syntax202100
-Node: PolyArea syntax202899
-Node: Polygon syntax203253
-Node: Rat syntax203744
-Node: Styles syntax204125
-Node: Symbol syntax205071
-Node: SymbolLine syntax205457
-Node: Text syntax205755
-Node: Thermal syntax206463
-Node: Via syntax206875
-Node: Object Flags207549
-Node: PCBFlags210352
-Node: Library Creation211816
-Node: Schematic Frontends230358
-Node: gEDA231140
-Node: xcircuit239834
-Node: Installation240128
-Node: compiling240659
-Node: quickstart240981
-Node: running configure241377
-Node: problems242549
-Node: HP243984
-Node: Sun244645
-Node: SGI245002
-Node: DEC Alpha245317
-Node: SCO245488
-Node: Linux245969
-Node: BSD246164
-Node: X11246547
-Node: TeX and Manuals247359
-Node: Custom Menus247863
-Node: Resource Syntax248429
-Node: Menu Definitions250770
-Node: Menu Files and Defaults253429
-Node: Regular Expressions254235
-Node: Standard Drill Sizes258031
-Node: Centroid File Format268079
-Node: Action Reference270931
-Node: core actions272542
-Node: AddRats Action278476
-Node: ApplyVendor Action278945
-Node: Atomic Action279277
-Node: Attributes Action280430
-Node: AutoPlaceSelected Action280843
-Node: AutoRoute Action281201
-Node: ChangeClearSize Action281951
-Node: ChangeDrillSize Action282518
-Node: ChangeFlag Action282839
-Node: ChangeHole Action283565
-Node: ChangeJoin Action283926
-Node: ChangeName Action284520
-Node: ChangeOctagon Action284965
-Node: ChangePaste Action285822
-Node: ChangePinName Action286296
-Node: ChangeSize Action286734
-Node: ChangeSquare Action287479
-Node: ClearOctagon Action288372
-Node: ClearSquare Action289225
-Node: ClrFlag Action290052
-Node: Connection Action290573
-Node: Delete Action291236
-Node: DeleteRats Action291445
-Node: DisableVendor Action291658
-Node: DisperseElements Action292071
-Node: Display Action292575
-Node: djopt Action297281
-Node: DRC Action299027
-Node: DumpLibrary Action299290
-Node: elementlist Action299501
-Node: elementsetattr Action300299
-Node: EnableVendor Action300750
-Node: execcommand Action301253
-Node: ExecuteFile Action301508
-Node: Flip Action301756
-Node: FontEdit Action302305
-Node: FontSave Action302503
-Node: FreeRotateBuffer Action302706
-Node: GlobalPuller Action303175
-Node: h Action303370
-Node: Import Action303773
-Node: l Action307425
-Node: le Action308057
-Node: LoadFootprint Action308640
-Node: LoadFrom Action309082
-Node: LoadVendorFrom Action310064
-Node: m Action310399
-Node: MarkCrosshair Action310983
-Node: Message Action311681
-Node: MinClearGap Action312120
-Node: MinMaskGap Action312533
-Node: Mode Action312939
-Node: MorphPolygon Action314180
-Node: MoveLayer Action314706
-Node: MoveObject Action315408
-Node: MoveToCurrentLayer Action315895
-Node: Netlist Action316318
-Node: New Action318068
-Node: OptAutoOnly Action318281
-Node: PasteBuffer Action318940
-Node: Polygon Action320762
-Node: Puller Action321345
-Node: q Action322053
-Node: q! Action322543
-Node: Quit Action323025
-Node: Redo Action323286
-Node: RemoveSelected Action324092
-Node: Renumber Action324297
-Node: Report Action324598
-Node: ReportDialog Action325457
-Node: RipUp Action325709
-Node: rn Action326243
-Node: RouteStyle Action326975
-Node: s Action327191
-Node: SaveSettings Action327844
-Node: SaveTo Action328187
-Node: Select Action328910
-Node: SetFlag Action330064
-Node: SetOctagon Action330579
-Node: SetSame Action331351
-Node: SetSquare Action331765
-Node: SetThermal Action332574
-Node: SetValue Action333855
-Node: ToggleHideName Action334413
-Node: ToggleVendor Action334787
-Node: Undo Action335296
-Node: UnloadVendor Action335975
-Node: Unselect Action336190
-Node: w Action337131
-Node: wq Action337623
-Node: common actions338118
-Node: LayersChanged Action338783
-Node: LibraryChanged Action339342
-Node: NetlistChanged Action339865
-Node: PCBChanged Action340382
-Node: RouteStylesChanged Action341049
-Node: gtk actions341560
-Node: gtk About Action343137
-Node: gtk AdjustStyle Action343408
-Node: gtk Center Action343708
-Node: gtk Cursor Action344031
-Node: gtk DoWindows Action345156
-Node: gtk EditLayerGroups Action345781
-Node: gtk GetXY Action346222
-Node: gtk ImportGUI Action346486
-Node: gtk Pan Action346761
-Node: gtk Popup Action347126
-Node: gtk Print Action347610
-Node: gtk PrintCalibrate Action347900
-Node: gtk Save Action348262
-Node: gtk SelectLayer Action348861
-Node: gtk SetUnits Action349214
-Node: gtk SwapSides Action349549
-Node: gtk ToggleView Action350615
-Node: gtk Zoom Action351395
-Node: lesstif actions352831
-Node: lesstif About Action354739
-Node: lesstif AdjustSizes Action355023
-Node: lesstif AdjustStyle Action355446
-Node: lesstif Benchmark Action355702
-Node: lesstif Command Action356134
-Node: lesstif Cursor Action357551
-Node: lesstif Debug Action358690
-Node: lesstif DebugXY Action358980
-Node: lesstif DoWindows Action359351
-Node: lesstif DumpKeys Action359866
-Node: lesstif EditLayerGroups Action360283
-Node: lesstif Export Action360854
-Node: lesstif GetXY Action361189
-Node: lesstif ImportGUI Action361463
-Node: lesstif LibraryShow Action361872
-Node: lesstif Load Action362108
-Node: lesstif LoadVendor Action362682
-Node: lesstif NetlistShow Action363070
-Node: lesstif Print Action363354
-Node: lesstif PrintCalibrate Action363667
-Node: lesstif PromptFor Action364051
-Node: lesstif Return Action364521
-Node: lesstif Save Action364868
-Node: lesstif SelectLayer Action365461
-Node: lesstif SetUnits Action365838
-Node: lesstif SwapSides Action366190
-Node: lesstif ToggleView Action367273
-Node: lesstif Zoom Action368077
-Node: Glossary369531
-Node: Index371140
+Node: Copying2466
+Node: History3138
+Node: Overview8023
+Node: Intro8844
+Node: Symbol Objects10325
+Node: Via Objects10905
+Node: Element Objects11923
+Node: Layer Objects18806
+Node: Line Objects21958
+Node: Arc Objects24903
+Node: Polygon Objects26352
+Node: Text Objects28981
+Node: Net Objects29796
+Node: Getting Started30726
+Node: Application Window32974
+Node: Menu33623
+Node: Status-line and Input-field42492
+Node: Layer Controls45767
+Node: Tool Selectors49445
+Node: Layout Area56147
+Node: Log Window57015
+Node: Library Window57849
+Node: Netlist Window59093
+Node: Drawing and Removing60677
+Node: Common62821
+Node: Lines64670
+Node: Arcs66234
+Node: Polygons67417
+Node: Text69304
+Node: Vias70289
+Node: Elements71665
+Node: Pastebuffer77125
+Node: Moving and Copying78947
+Node: Loading and Saving80358
+Node: Printing81956
+Node: Exporting86364
+Node: bom86825
+Node: gcode87013
+Node: gerber89864
+Node: nelma90064
+Node: png90216
+Node: ps90360
+Node: eps90529
+Node: Connection Lists90766
+Node: Arrow Tool92580
+Node: Rats Nest94818
+Node: Design Rule Checking99903
+Node: Trace Optimizer102268
+Node: Searching for elements103812
+Node: Measuring distances104313
+Node: Vendor drill mapping105036
+Node: Autorouter108249
+Node: User Commands111591
+Node: Command-Line Options115798
+Node: General Options117070
+Node: General GUI Options120266
+Node: GTK+ GUI Options121384
+Node: lesstif GUI Options121960
+Node: Colors122531
+Node: Layer Names124637
+Node: Paths125386
+Node: Sizes126234
+Node: Commands128031
+Node: DRC Options129382
+Node: BOM Creation130151
+Node: Gerber Export130471
+Node: Postscript Export130889
+Node: Encapsulated Postscript Export132646
+Node: PNG Options133200
+Node: lpr Printing Options135320
+Node: nelma Options135756
+Node: X11 Interface136182
+Node: Resources136650
+Node: Actions152175
+Node: Translations179379
+Node: File Formats180918
+Node: Pad and Line Representation182567
+Node: Layout File183549
+Node: Element File185065
+Node: Font File186106
+Node: Netlist File186487
+Node: Library Contents File187768
+Node: Library File188823
+Node: File Syntax191277
+Node: Arc syntax192643
+Node: Attribute syntax193852
+Node: Connect syntax194363
+Node: Cursor syntax194716
+Node: DRC syntax195380
+Node: Element syntax195871
+Node: ElementArc syntax197813
+Node: ElementLine syntax198771
+Node: FileVersion syntax199224
+Node: Flags syntax199722
+Node: Grid syntax200017
+Node: Groups syntax200509
+Node: Layer syntax201098
+Node: Line syntax201621
+Node: Mark syntax202282
+Node: Net syntax202545
+Node: Netlist syntax202822
+Node: Pad syntax202983
+Node: PCB syntax203939
+Node: Pin syntax204273
+Node: PolyArea syntax205072
+Node: Polygon syntax205426
+Node: Rat syntax205917
+Node: Styles syntax206298
+Node: Symbol syntax207244
+Node: SymbolLine syntax207630
+Node: Text syntax207928
+Node: Thermal syntax208636
+Node: Via syntax209048
+Node: Object Flags209722
+Node: PCBFlags212631
+Node: Library Creation214095
+Node: Schematic Frontends232627
+Node: gEDA233409
+Node: xcircuit242103
+Node: Installation242403
+Node: compiling242934
+Node: quickstart243256
+Node: running configure243652
+Node: problems244824
+Node: HP246259
+Node: Sun246920
+Node: SGI247277
+Node: DEC Alpha247592
+Node: SCO247763
+Node: Linux248244
+Node: BSD248439
+Node: X11248822
+Node: TeX and Manuals249635
+Node: Custom Menus250139
+Node: Resource Syntax250705
+Node: Menu Definitions253046
+Node: Menu Files and Defaults255738
+Node: Regular Expressions256544
+Node: Standard Drill Sizes260340
+Node: Centroid File Format270388
+Node: Annotation File Format273146
+Node: Action Reference275153
+Node: core actions276766
+Node: AddRats Action283315
+Node: ApplyVendor Action283799
+Node: Atomic Action284145
+Node: Attributes Action285313
+Node: AutoPlaceSelected Action285742
+Node: AutoRoute Action286115
+Node: ChangeClearSize Action286880
+Node: ChangeDrillSize Action287463
+Node: ChangeFlag Action287800
+Node: ChangeHole Action288542
+Node: ChangeJoin Action288919
+Node: ChangeName Action289529
+Node: ChangeOctagon Action289990
+Node: ChangePaste Action290863
+Node: ChangePinName Action291353
+Node: ChangeSize Action291807
+Node: ChangeSquare Action292568
+Node: ClearOctagon Action293477
+Node: ClearSquare Action294346
+Node: ClrFlag Action295189
+Node: Connection Action295726
+Node: Delete Action296405
+Node: DeleteRats Action296630
+Node: DisableVendor Action296859
+Node: DisperseElements Action297287
+Node: Display Action297807
+Node: djopt Action302529
+Node: DRC Action304286
+Node: DumpLibrary Action304564
+Node: elementlist Action304790
+Node: elementsetattr Action305604
+Node: EnableVendor Action306071
+Node: execcommand Action306589
+Node: ExecuteFile Action306859
+Node: Flip Action307122
+Node: FontEdit Action307686
+Node: FontSave Action307884
+Node: FreeRotateBuffer Action308087
+Node: GlobalPuller Action308573
+Node: h Action308768
+Node: Import Action309171
+Node: l Action312840
+Node: le Action313472
+Node: LoadFootprint Action314055
+Node: LoadFrom Action314513
+Node: LoadVendorFrom Action315511
+Node: m Action315861
+Node: MarkCrosshair Action316445
+Node: Message Action317159
+Node: MinClearGap Action317613
+Node: MinMaskGap Action318042
+Node: Mode Action318464
+Node: MorphPolygon Action319721
+Node: MoveLayer Action320262
+Node: MoveObject Action320964
+Node: MoveToCurrentLayer Action321466
+Node: Netlist Action321905
+Node: New Action323655
+Node: OptAutoOnly Action323883
+Node: PasteBuffer Action324542
+Node: Polygon Action326380
+Node: Puller Action326978
+Node: q Action327686
+Node: q! Action328176
+Node: Quit Action328658
+Node: Redo Action328934
+Node: RemoveSelected Action329755
+Node: Renumber Action329975
+Node: Report Action330291
+Node: ReportDialog Action331166
+Node: RipUp Action331433
+Node: rn Action331982
+Node: RouteStyle Action332714
+Node: s Action332945
+Node: SaveSettings Action333598
+Node: SaveTo Action333957
+Node: Select Action334696
+Node: SetFlag Action335935
+Node: SetOctagon Action336466
+Node: SetSame Action337254
+Node: SetSquare Action337683
+Node: SetThermal Action338508
+Node: SetValue Action339798
+Node: ToggleHideName Action340372
+Node: ToggleVendor Action340762
+Node: Undo Action341286
+Node: UnloadVendor Action341980
+Node: Unselect Action342210
+Node: w Action343168
+Node: wq Action343660
+Node: common actions344155
+Node: LayersChanged Action344820
+Node: LibraryChanged Action345379
+Node: NetlistChanged Action345902
+Node: PCBChanged Action346419
+Node: RouteStylesChanged Action347086
+Node: gtk actions347597
+Node: gtk About Action349218
+Node: gtk AdjustStyle Action349489
+Node: gtk Center Action349808
+Node: gtk Cursor Action350131
+Node: gtk DoWindows Action351256
+Node: gtk EditLayerGroups Action351881
+Node: gtk GetXY Action352341
+Node: gtk ImportGUI Action352605
+Node: gtk Pan Action352880
+Node: gtk Popup Action353245
+Node: gtk Print Action353839
+Node: gtk PrintCalibrate Action354129
+Node: gtk Save Action354491
+Node: gtk SelectLayer Action355090
+Node: gtk SetUnits Action355461
+Node: gtk SwapSides Action355796
+Node: gtk ToggleView Action356862
+Node: gtk Zoom Action357660
+Node: lesstif actions359096
+Node: lesstif About Action361004
+Node: lesstif AdjustSizes Action361288
+Node: lesstif AdjustStyle Action361711
+Node: lesstif Benchmark Action361967
+Node: lesstif Command Action362399
+Node: lesstif Cursor Action363810
+Node: lesstif Debug Action364949
+Node: lesstif DebugXY Action365239
+Node: lesstif DoWindows Action365610
+Node: lesstif DumpKeys Action366125
+Node: lesstif EditLayerGroups Action366542
+Node: lesstif Export Action367113
+Node: lesstif GetXY Action367448
+Node: lesstif ImportGUI Action367722
+Node: lesstif LibraryShow Action368131
+Node: lesstif Load Action368367
+Node: lesstif LoadVendor Action368941
+Node: lesstif NetlistShow Action369329
+Node: lesstif Print Action369613
+Node: lesstif PrintCalibrate Action369926
+Node: lesstif PromptFor Action370310
+Node: lesstif Return Action370780
+Node: lesstif Save Action371127
+Node: lesstif SelectLayer Action371720
+Node: lesstif SetUnits Action372097
+Node: lesstif SwapSides Action372449
+Node: lesstif ToggleView Action373532
+Node: lesstif Zoom Action374336
+Node: Glossary375790
+Node: Index377401
 
 End Tag Table
diff --git a/doc/pcb.info-1 b/doc/pcb.info-1
index 8ca5743..7d9cedc 100644
--- a/doc/pcb.info-1
+++ b/doc/pcb.info-1
@@ -54,6 +54,7 @@ printed circuit board layout system.
 * Regular Expressions::    Searching for elements with regular expressions
 * Standard Drill Sizes::   Tables of standard drill sizes
 * Centroid File Format::   Details of the centroid (x-y) output file
+* Annotation File Format:: Details of the back annotation output file
 * Action Reference::       Documentation for all available actions
 * Glossary::               Glossary
 * Index::                  The Index.
@@ -113,7 +114,7 @@ a polygon.  A variety of other enhancements including a Gerber RS-274X
 driver and NC drill file generation have also been added.
 
    Release 1.6 provides automatic screen updates of changed regions.
-This should eliminate most of the need for the redraw ((_R_ key).  Also
+This should eliminate most of the need for the redraw (_R_ key).  Also
 some changes to what order items under the cursor are selected were
 made for better consistency - it is no longer possible to accidentally
 move a line or line point that is completely obscured by a polygon
@@ -464,8 +465,8 @@ each _Btn1_ press establishes one end of a line.  Once the second point
 is defined, the line is drawn and a new line started where the first
 one ended.  You can abandon the new starting point in favor of another
 by pressing _Ctrl-Btn1_, or _Btn3_, but don't use _Btn2_.  The undo
-function (_U_ key or `undo last operation' from the Edit menu) will
-take you back point by point if you use it while in the line mode.
+function (_U_ key or `Undo' from the Edit menu) will take you back
+point by point if you use it while in the line mode.
 
    New lines can be restricted to 45 degree angles if desired. You can
 toggle this restriction on and off while creating lines by pressing the
@@ -496,10 +497,10 @@ polygon creating a clearance, or touch the polygon. This behavior is
 selectable in the Settings menu for new lines. To change the behavior
 of an existing line, hit the _J_ key with the cross hair over the line.
 You can increase the size of the clearance by 2 mils on each edge with
-the with the _K_ key. _Shift-K_ will decrease the clearance by 2 mils.
-The increment may be changed from 2 mils through the application
-resource file.  The clearance can be also increased, decreased and set
-by the _ChangeClearSize_ action.
+the _K_ key. _Shift-K_ will decrease the clearance by 2 mils.  The
+increment may be changed from 2 mils through the application resource
+file.  The clearance can be also increased, decreased and set by the
+_ChangeClearSize_ action.
 
    Lines do not need to intersect the center of a pin, pad, via, or
 other line for `Pcb' to understand that they make electrical connection.
@@ -530,7 +531,7 @@ end point.
 
    Whenever a starting point is established by either the Line or Arc
 tools it will be retained if you switch directly between the tools
-(e.g. _F2_ key for Lines, _F8_ key for Arcs. Arcs can either touch or
+(e.g. _F2_ key for Lines, _F8_ key for Arcs). Arcs can either touch or
 clear polygons just like lines do. Of course connection searches, undo
 and all the other features you'd expect work with arcs too.
 
@@ -662,6 +663,7 @@ works, then `Pcb' hasn't been installed properly.
 * Loading and Saving::
 * Printing::               Creating Gerber files or postscript files
 * Exporting::              Exporting a layout.
+* Connection Lists::       How to get a list of all or some connections.
 * Arrow Tool::             Selecting/Moving objects.
 * Rats Nest::		   Helps you place and route tracks against a netlist.
 * Design Rule Checking::   Check for manufactureability
@@ -669,7 +671,6 @@ works, then `Pcb' hasn't been installed properly.
 * Searching for elements:: Searching for elements
 * Measuring distances::    Measuring distances
 * Vendor drill mapping::   Mapping drills to a vendor specified list
-* Connection Lists::       How to get a list of all or some connections.
 
 
 File: pcb.info,  Node: Application Window,  Next: Log Window,  Up: Getting Started
@@ -721,11 +722,11 @@ File
      This menu offers a choice of loading, saving and printing data,
      saving connection information to a file or quitting the
      application. Most of the entries in the File menu are self
-     explanatory.  Selecting `print layout' pops up a printer control
-     dialog.  A selection of several device drivers is available from
-     the printer control dialog. Presently _PostScript_, _encapsulated
-     PostScript_, and _GerberX_ are supported. The _GerberX_ driver
-     produces all of the files necessary to have the board
+     explanatory.  Selecting `Print...' pops up a printer control
+     dialog.  Several output formats are available from the `Export...'
+     menu item.  Presently _PostScript_, _encapsulated PostScript_, and
+     _GerberX_ are some of the supported filetypes.  The _GerberX_
+     driver produces all of the files necessary to have the board
      professionally manufactured.  The connection saving features in
      the File menu produce outputs in an arcane format that is not too
      useful. They do _not_ produce netlist files.
@@ -739,27 +740,8 @@ Edit
      change the names of: the layout, the active layer, or text objects
      on the layout.
 
-Screen
-     The Screen menu supports most functions related to the whole
-     Layout area. There are various entries to change the grid to some
-     popular values, the zoom factor, and which kind of element name is
-     displayed.  You can also re-align the grid origin and turn on and
-     off the display of the grid.  Before changing the grid alignment,
-     I recommend that you zoom in as close as possible so that you're
-     sure the grid points appear exactly where you want them.
-
-     The Screen menu also allows you to turn on and off the visibility
-     of the solder-mask layer. When the solder-mask layer is made
-     visible it obscures most of the layout, so only turn this on when
-     you really want to know what the solder-mask will look like. The
-     solder-mask that you see belongs to the side of the board you are
-     viewing, which can be changed with the `view solder side' option,
-     also found in the Screen menu.  When the solder-mask is displayed,
-     the pin and pad clearance adjustments (*note Line Objects::) alter
-     the size of mask cut-outs.
-
-Sizes
-     The Sizes menu allows you to select a group of line thickness, via
+Routes Style
+     The Edit menu allows you to select a group of line thickness, via
      diameter, via drill size, and clearance (keepaway) (collectively
      called a "routing style") to be copied to the "active" sizes.  You
      can also change the names given to the routing styles and adjust
@@ -769,24 +751,41 @@ Sizes
      holes, lines, clearances, text-objects and also the maximum
      dimensions of the board layout.
 
+View
+     The View menu supports most functions related to the whole Layout
+     area. There are various entries to change the grid to some popular
+     values, the zoom factor, and which kind of element name is
+     displayed.  You can also re-align the grid origin and turn on and
+     off the display of the grid.  Before changing the grid alignment,
+     I recommend that you zoom in as close as possible so that you're
+     sure the grid points appear exactly where you want them.
+
+     The View menu also allows you to turn on and off the visibility of
+     the solder-mask layer. When the solder-mask layer is made visible
+     it obscures most of the layout, so only turn this on when you
+     really want to know what the solder-mask will look like. The
+     solder-mask that you see belongs to the side of the board you are
+     viewing, which can be changed with the `Flip up/down' option, also
+     found in the View menu.  When the solder-mask is displayed, the
+     pin and pad clearance adjustments (*note Line Objects::) alter the
+     size of mask cut-outs.
+
 Settings
      The Settings menu controls several operating configuration
-     parameters. The `edit layer groups' entry brings up a dialog that
-     allows you to change the way layers are grouped. Layer grouping is
-     described in *note Layer Objects::. The `all-direction lines'
-     entry controls the clipping of lines to 45-degree angles. You can
-     also control whether moving individual objects causes the attached
-     lines to "rubber band" with the move or not from the Settings
-     menu. Another entry controls whether the starting clip angle for
-     the two-line mode (*note Line Objects::) alternates every other
-     line. You can also control whether element names must be unique
-     from the Settings menu.  When unique element names are enforced,
-     copying a new element will automatically create a unique
-     `layout-name' name for it provided that the name originally ended
-     with a digit (_e.g._ U7 or R6). The Settings menu allows you to
-     control whether the cross hair will snap to pins and pads even
-     when they are off-grid. Finally you can control whether new lines
-     and arcs touch or clear intersecting polygons from this menu.
+     parameters. The `all-direction lines' entry controls the clipping
+     of lines to 45-degree angles. You can also control whether moving
+     individual objects causes the attached lines to "rubber band" with
+     the move or not from the Settings menu. Another entry controls
+     whether the starting clip angle for the two-line mode (*note Line
+     Objects::) alternates every other line. You can also control
+     whether element names must be unique from the Settings menu.  When
+     unique element names are enforced, copying a new element will
+     automatically create a unique `layout-name' name for it provided
+     that the name originally ended with a digit (_e.g._ U7 or R6). The
+     Settings menu allows you to control whether the cross hair will
+     snap to pins and pads even when they are off-grid. Finally you can
+     control whether new lines and arcs touch or clear intersecting
+     polygons from this menu.
 
 Select
      This menu covers most of the operations that work with selected
@@ -802,7 +801,7 @@ Select
 Buffer
      From the Buffer menu you may select one out of five buffers to
      use, rotate or clear its contents or save the buffer contents to a
-     file. You can also use the `break buffer element to pieces' entry
+     file. You can also use the `break buffer elements to pieces' entry
      to de-compose an element into pieces for editing.  Note: only
      objects with visibility turned on are pasted to the layout. If you
      have something in a buffer, then change which side of the board you
@@ -850,8 +849,8 @@ Window
 
 
    Now that you're familiar with the various menus, it's time to try
-some things out. From the File menu choose `load layout', navigate to
-the tutorial folder, then load the file `tut1.pcb'.
+some things out. From the File menu choose `Open...', navigate to the
+tutorial folder, then load the file `tut1.pcb'.
 
 
 File: pcb.info,  Node: Status-line and Input-field,  Next: Layer Controls,  Prev: Menu,  Up: Application Window
@@ -1177,9 +1176,9 @@ layout) everything that is connected (or is supposed to be connected)
 to the net. If you click on a connection in the connection list, it
 will select/deselect the corresponding pin or pad in the layout and
 also center the layout window where it is located. If you "Find"
-(`lookup connection to object' in the Connects menu [also _F_ key]), a
-pin or pad it will also choose the net and connection in the netlist
-window if it exists in the netlist.
+(`lookup connection' in the Connects menu [also _F_ key]), a pin or pad
+it will also choose the net and connection in the netlist window if it
+exists in the netlist.
 
    If no netlist exists for the layout, then the netlist window does not
 appear. You can load a netlist from a file from the File menu. The
@@ -1483,11 +1482,11 @@ to measure the location of the other pins.  Next make a solder-side
 layer the active layer from the _active-layer_ popup menu.  Now draw
 the outline of the element using lines and arcs.  When you're done,
 select everything that makes up the element with a box selection
-(_<Btn3Down> drag, <Btn3Up>_). Now select "cut selection to buffer"
-from the _Buffer_ menu. Position the cursor over the center of pin 1
-and press the left button to load the data into the buffer.  Finally
-select "convert buffer to element" from the _Buffer_ menu.  You'll only
-want to create elements this way if they aren't already in the library.
+(_<Btn3Down> drag, <Btn3Up>_). Now select "cut to buffer" from the
+_Buffer_ menu. Position the cursor over the center of pin 1 and press
+the left button to load the data into the buffer.  Finally select
+"convert buffer to element" from the _Buffer_ menu.  You'll only want
+to create elements this way if they aren't already in the library.
 It's also probably a good idea to do this before starting any of the
 other aspects of a layout, but it isn't necessary.
 
@@ -1588,9 +1587,9 @@ Resources::.  Saving also is available from the _File_ menu, either
 with or without supplying a filename. `Pcb' reuses the last filename if
 you do not pass a new one to the save routine.
 
-   To load an existing layout either select _load layout data_ from the
-_File_ menu or use `:l filename'. A file select box pops up if you
-don't specify a filename. Merging existing layouts into the new one is
+   To load an existing layout either select _Open..._ from the _File_
+menu or use `:l filename'. A file select box pops up if you don't
+specify a filename. Merging existing layouts into the new one is
 supported either by the _File_ menu or by `:m filename'.
 
    `Pcb' saves a backup of the current layout at a user specified
@@ -1601,7 +1600,7 @@ the `.pcb' filename.  For example, if you are editing the layout in
 yet, then the backup file name is `PCB.####.backup' where the "####"
 will be replaced by the process ID of the currenting running copy of
 `Pcb'.  This default backup file name may be changed at compilation
-time via the `BACKUP_NAME' variable in `globalconfig.h').  During
+time via the `BACKUP_NAME' variable in `globalconfig.h'.  During
 critical sections of the program or when data would be lost it is saved
 as `PCB.%i.save'.  This file name may be changed at compile time with
 the `SAVE_NAME' variable in `globalconfig.h'.
@@ -1625,7 +1624,7 @@ driver.  See the page about the _Print()_ action for additional
 information about the filenames.  The control panel offers a number of
 options. Most of them are not available for Gerber output because it
 wouldn't make sense, for example,  to scale the gerber output (you'd
-get an incorrectly made board!)  The options are:
+get an incorrectly made board!). The options are:
 
 `device'
      The top menu button selects from the available device drivers.
@@ -1719,7 +1718,7 @@ unchanged
      units are 1/72 inch.
 
 
-File: pcb.info,  Node: Exporting,  Next: Arrow Tool,  Prev: Printing,  Up: Getting Started
+File: pcb.info,  Node: Exporting,  Next: Connection Lists,  Prev: Printing,  Up: Getting Started
 
 3.9 Exporting a layout
 ======================
@@ -1865,7 +1864,7 @@ Export as eps (encapsulated postscript) for inclusion in other
 documents.  Can be later converted to pdf.
 
 
-File: pcb.info,  Node: Connection Lists,  Prev: Vendor drill mapping,  Up: Getting Started
+File: pcb.info,  Node: Connection Lists,  Next: Arrow Tool,  Prev: Exporting,  Up: Getting Started
 
 3.10 Connection Lists
 =====================
@@ -1903,7 +1902,7 @@ reason.
    To scan for unconnected pins select _unused pins_ from the same menu.
 
 
-File: pcb.info,  Node: Arrow Tool,  Next: Rats Nest,  Prev: Exporting,  Up: Getting Started
+File: pcb.info,  Node: Arrow Tool,  Next: Rats Nest,  Prev: Connection Lists,  Up: Getting Started
 
 3.11 Arrow Tool
 ===============
@@ -2147,7 +2146,7 @@ from the mark.  If a mark is already present, the mark is removed and
 the cursor display stops displaying relative cursor coordinates.
 
 
-File: pcb.info,  Node: Vendor drill mapping,  Next: Connection Lists,  Prev: Measuring distances,  Up: Getting Started
+File: pcb.info,  Node: Vendor drill mapping,  Prev: Measuring distances,  Up: Getting Started
 
 3.17 Vendor Drill Mapping
 =========================
@@ -2257,8 +2256,8 @@ steps will autoroute your design.
   1. Turn off visibility of any layers that you don't want the router
      to use.
 
-  2. Turn of via visibility if you don't want the router to use any new
-     vias.
+  2. Turn off via visibility if you don't want the router to use any
+     new vias.
 
   3. Use only plain rectangles for power/ground planes that you want
      the router to use [use the rectangle tool!]
@@ -2280,7 +2279,7 @@ steps will autoroute your design.
        use for any nets not having a defined route style in the netlist.
 
   8. Disable any nets that you don't want the autorouter to route
-     (double-click them in the  netlist window to add/remove the *)
+     (double-click them in the  netlist window to add/remove the *).
 
      NOTE: If you will be manually routing these later not using
      planes, it is usually better to let the autorouter route them then
@@ -2288,10 +2287,10 @@ steps will autoroute your design.
      ground/power plane    manually, consider making it from one or
      more pure rectangles and    letting the autorouter have a go at it.
 
-  9. Create a fresh rat's nest. ('E' the 'W')
+  9. Create a fresh rat's nest. (_E_ then _W_)
 
  10. Select "show autorouter trials" in the settings menu if you want
-     to watch what's happening
+     to watch what's happening.
 
  11. Choose "autoroute all rats" in the connection menu.
 
@@ -2501,6 +2500,38 @@ File: pcb.info,  Node: General Options,  Next: General GUI Options,  Up: Command
 `--grid-units-mm <string>'
      Set default grid units. Can be mm or mil. Defaults to mil.
 
+`--clear-increment-mm <string>'
+     Set default clear increment (amount to change when user presses k
+     or K) when user is using a metric grid unit.
+
+`--grid-increment-mm <string>'
+     Set default grid increment (amount to change when user presses g
+     or G) when user is using a metric grid unit.
+
+`--line-increment-mm <string>'
+     Set default line increment (amount to change when user presses l
+     or L) when user is using a metric grid unit.
+
+`--size-increment-mm <string>'
+     Set default size increment (amount to change when user presses s
+     or S) when user is using a metric grid unit.
+
+`--clear-increment-mil <string>'
+     Set default clear increment (amount to change when user presses k
+     or K) when user is using an imperial grid unit.
+
+`--grid-increment-mil <string>'
+     Set default grid increment (amount to change when user presses g
+     or G) when user is using a imperial grid unit.
+
+`--line-increment-mil <string>'
+     Set default line increment (amount to change when user presses l
+     or L) when user is using a imperial grid unit.
+
+`--size-increment-mil <string>'
+     Set default size increment (amount to change when user presses s
+     or S) when user is using a imperial grid unit.
+
 `--backup-interval'
      Time between automatic backups in seconds. Set to `0' to disable.
      The default value is `60'.
@@ -2680,7 +2711,10 @@ File: pcb.info,  Node: Colors,  Next: Layer Names,  Prev: lesstif GUI Options,
      Color of selected rats. Default: `#00ffff'
 
 `--connected-color <string>'
-     Color to indicate connections. Default: `#00ff00'
+     Color to indicate physical connections. Default: `#00ff00'
+
+`--found-color <string>'
+     Color to indicate logical connections. Default: `#ff00ff'
 
 `--off-limit-color <string>'
      Color of off-canvas area. Default: `#cccccc'
@@ -2805,10 +2839,12 @@ mil (cmil) will be used. Write units without space to the number like
 `--line-thickness <num>'
      Default thickness of new lines. Default value is `10mil'.
 
-`--rat-thickness <num>'
-     Thickness of rats. Values from 1 to 19 are fixed width in screen
-     pixels.  Anything larger means PCB units (i.e. 100 means "1 mil").
-     Default value is `10mil'.
+`--rat-thickness <num><unit>'
+     Thickness of rats. If no unit is given, PCB units are assumed
+     (i.e. 100 means "1 nm"). This option allows for a special unit
+     `px' which sets the rat thickness to a fixed value in terms of
+     screen pixels.  Maximum fixed thickness is 100px. Minimum saling
+     rat thickness is 101nm.  Default value is `10mil'.
 
 `--keepaway <num>'
      Default minimum distance between a track and adjacent copper.
@@ -2934,6 +2970,9 @@ File: pcb.info,  Node: Gerber Export,  Next: Postscript Export,  Prev: BOM Creat
 `--verbose'
      Print file names and aperture counts on stdout.
 
+`--metric'
+     generate metric Gerber and drill files
+
 
 File: pcb.info,  Node: Postscript Export,  Next: Encapsulated Postscript Export,  Prev: Gerber Export,  Up: Command-Line Options
 
@@ -3052,12 +3091,15 @@ File: pcb.info,  Node: PNG Options,  Next: lpr Printing Options,  Prev: Encapsul
 `--monochrome'
      Convert output to monochrome.
 
-`--only-vivible'
+`--only-visible'
      Limit the bounds of the exported PNG image to the visible items.
 
 `--use-alpha'
      Make the background and any holes transparent.
 
+`--fill-holes'
+     Drill holes in pins/pads are filled, not hollow.
+
 `--format <string>'
      File format to be exported. Parameter `<string>' can be `PNG',
      `GIF', or `JPEG'.
@@ -3079,6 +3121,19 @@ File: pcb.info,  Node: PNG Options,  Next: lpr Printing Options,  Prev: Encapsul
      In photo-realistic mode, export the reverse side of the layout.
      Up-down flip.
 
+`--photo-mask-colour <colour>'
+     In photo-realistic mode, export the solder mask as this colour.
+     Parameter `<colour>' can be `green', `red', `blue', or `purple'.
+
+`--photo-plating'
+     In photo-realistic mode, export the exposed copper as though it
+     has this type of plating. Parameter `<colour>' can be `tinned',
+     `gold', `silver', or `copper'.
+
+`--photo-silk-colour'
+     In photo-realistic mode, export the silk screen as this colour.
+     Parameter `<colour>' can be `white', `black', or `yellow'.
+
 
 File: pcb.info,  Node: lpr Printing Options,  Next: nelma Options,  Prev: PNG Options,  Up: Command-Line Options
 
@@ -3203,8 +3258,8 @@ resources:
 
 `elementCommand (string)'
      `Pcb' uses a user defined command to read element files. This
-     resources is used to set the command which is executed by the
-     users default shell.  Two escape sequences are defined to pass the
+     resource is used to set the command which is executed by the users
+     default shell.  Two escape sequences are defined to pass the
      selected filename (%f) and the current search path (%p). The
      command must write the element data to its standard output. The
      default value is
@@ -3256,7 +3311,7 @@ resources:
      searchpath for font files. See also, the resource _fontFile_.
 
 `grid (int)'
-     This resources defines the initial value of one cursor step. It
+     This resource defines the initial value of one cursor step. It
      defaults to _100 mil_ and any changes are saved together with the
      layout data.
 
@@ -3292,7 +3347,7 @@ resources:
 
 `libraryCommand (string)'
      `Pcb' uses a command to read element data from libraries.  The
-     resources is used to set the command which is executed by the users
+     resource is used to set the command which is executed by the users
      default shell.  Three escape sequences are defined to pass the
      selected filename (%f), the current search path (%p) as well (%a)
      as the three parameters _template_, _value_ and _package_ to the
@@ -3471,7 +3526,7 @@ resources:
      the maximum volume of _100_.
 
 `warnColor (color)'
-     This resources defines the color to be used for drawing pins and
+     This resource defines the color to be used for drawing pins and
      pads when a warning has been issued about them.
 
 `zoom (int)'
@@ -3500,7 +3555,7 @@ command using a ":" command (see *note User Commands::).
    Take special care about translations related to the functions keys
 and the pointer buttons because most of the window managers use them
 too.  Change the file according to your hardware/software environment.
-You may have to replace all occurances of _baseTranslations_ to
+You may have to replace all occurrences of _baseTranslations_ to
 _translations_ if you use a `X11R4' server.
 
    Passing _Object_ as an argument to an action routine causes the
@@ -3864,7 +3919,7 @@ _SelectedObjects_ will handle all selected and visible objects.
           !Shift<Key>5:      PasteBuffer(5)
           None<Key>F3:       Mode(PasteBuffer)
 
-`Polygon((Close|PreviousPoint)'
+`Polygon(Close|PreviousPoint)'
      Polygons need a special action routine to make life easier. Calling
      _Polygon(PreviousPoint)_ resets the newly entered corner to the
      previous one. The Undo action will call Polygon(PreviousPoint)
@@ -4168,7 +4223,7 @@ examine the file `src/parse_y.y' which is the definitive definition of
 the file format.
 
    The PCB layout file contains the following contents, in this order
-(individual items are defined in *note File Syntax:::
+(individual items are defined in *note File Syntax::):
 
 `PCB'
      This names the board and sets its size
@@ -4491,7 +4546,9 @@ Cursor [X Y Zoom]
 Cursor (X Y Zoom)
 
 X Y
-     Location of the cursor when the board was saved.
+     Location of the cursor when the board was saved.  As of November
+     2012 the cursor position is not written to file anymore.  Older
+     versions of pcb ignore the absence of this line in the pcb file.
 
 ZOOM
      The current zoom factor.  Note that a zoom factor of "0" means 1
@@ -4499,6 +4556,8 @@ ZOOM
      first variant accepts floating point numbers.  The special value
      "1000" means "zoom to fit"
 
+     This field is ignored by PCB.
+
 
 File: pcb.info,  Node: DRC syntax,  Next: Element syntax,  Prev: Cursor syntax,  Up: File Syntax
 
@@ -5018,8 +5077,8 @@ File: pcb.info,  Node: SymbolLine syntax,  Next: Text syntax,  Prev: Symbol synt
 8.8.26 SymbolLine
 -----------------
 
-SymbolLine [X1 Y1 X2 Y1 Thickness]
-SymbolLine (X1 Y1 X2 Y1 Thickness)
+SymbolLine [X1 Y1 X2 Y2 Thickness]
+SymbolLine (X1 Y1 X2 Y2 Thickness)
 
 X1 Y1 X2 Y2
      The endpoints of this line.
@@ -5132,6 +5191,10 @@ value followed by the symbolic name.
      For pins and vias, this flag means that the pin or via is a hole
      without a copper annulus.
 
+`0x0008 nopaste'
+     For pads, set to prevent a solderpaste stencil opening for the
+     pad.  Primarily used for pads used as fiducials.
+
 `0x0010 rat'
      If set for a line, indicates that this line is a rat line instead
      of a copper trace.
@@ -5203,9 +5266,9 @@ value followed by the symbolic name.
 `0x8000 marker'
      Marker used internally to avoid revisiting an object.
 
-`0x10000 nopaste'
-     For pads, set to prevent a solderpaste stencil opening for the
-     pad.  Primarily used for pads used as fiducials.
+`0x10000 connected'
+     If set, this object has been as physically connected by
+     `FindConnection()'.
 
 
 File: pcb.info,  Node: PCBFlags,  Prev: Object Flags,  Up: File Formats
@@ -5700,7 +5763,7 @@ To create
   2. Using the selection tool, select the footprint.
 
   3. Now left-click on the selected element, this brings up a popup
-     menu, choose "Cut Selection to Buffer" from the popup menu.
+     menu, choose "Cut to Buffer" from the popup menu.
 
   4. Under the buffer menu, choose "break buffer element to pieces",
      and then left-click to place the broken apart footprint to an open
@@ -5952,7 +6015,7 @@ File: pcb.info,  Node: xcircuit,  Prev: gEDA,  Up: Schematic Frontends
 
 If anyone cares to contribute this section, it will get added.  Please
 submit changes to the bug tracking system for PCB which can be found
-from the PCB homepage at `http://pcb.gpleda.org'.
+from the PCB homepage at `http://pcb.geda-project.org'.
 
 
 File: pcb.info,  Node: Installation,  Next: Custom Menus,  Prev: Schematic Frontends,  Up: Top
@@ -6164,7 +6227,7 @@ A.2.8 Problems related to X11
 
 There are a some problems related to `X11R4' or systems derived from
 `X11' such as `OpenWindows'. *Note Sun::. You at least have to change
-all occurances of _baseTranslations_ in the resource files to
+all occurrences of _baseTranslations_ in the resource files to
 _translations_ if you are using a `X11R4' server. Look at the `X11R5'
 _Intrinsics_ manual for details.
 
@@ -6316,17 +6379,18 @@ buttons.  As a convenience, "fg" can be used as an abbreviation for
 "foreground".
 
    Within the menu's resource file, Pcb will look for a few key named
-subresources.  At the moment, the only one it looks for is one called
-`MainMenu'.  This will be used for the main menu bar.  In the future,
-other named subresources will be used for popup resources.
+subresources.  At the moment, there are just two key named subresources.
+`MainMenu' will be used for the main menu bar and `Mouse' will be used
+to define mouse actions.  In the future, other named subresources will
+be used for popup resources.
 
    Given all this, a small sample `pcb-menu.res' would be:
 
      MainMenu = {
        {File
-         {"Load layout" Load(Layout)}
+         {"Open..." Load(Layout)}
          -
-         {"Quit Program" Quit() fg=red font=10x20}
+         {"Quit" Quit() fg=red font=10x20}
        }
      }
 
@@ -6415,14 +6479,14 @@ but some are special:
      range of digits is "0-9" .  The range of letters from C to K is
      "C-K" .
 
-`\^ inside square brackets'
+`^ inside square brackets'
      Inside square brackets the caret is an anti operator. Its presence
-     makes the square prackets match anything except the contents of
+     makes the square brackets match anything except the contents of
      the brackets.
 
 `( )'
      Round parenthesis group parts of a regular expression. This is
-     very much like they do in math formulars.
+     very much like they do in math formulas.
 
 
    If you need a special character literally, you can escape it with a
@@ -6474,11 +6538,11 @@ used to specify element names (reference designators) to search for.
 
 `.*N{2}.*'
      Select all items, whose name contains two "N" in a row such as
-     CONN23, or connA, but not CON5
+     CONN23, or connA, but not CON5.
 
 `[^D].*'
      Select all items that do not start with the letter "D", such as
-     C2, or R34, but not D34
+     C2, or R34, but not D34.
 
 
 
@@ -6639,7 +6703,7 @@ Size         (inches)     Size         (inches)     Size         (inches)
 24.50 mm     .9646        25.00 mm     .9843                     
 
 
-File: pcb.info,  Node: Centroid File Format,  Next: Action Reference,  Prev: Standard Drill Sizes,  Up: Top
+File: pcb.info,  Node: Centroid File Format,  Next: Annotation File Format,  Prev: Standard Drill Sizes,  Up: Top
 
 Appendix E Centroid (X-Y) File Format
 *************************************
@@ -6652,15 +6716,13 @@ E.2 File Format
 
 The centroid output file is in a standard comma seperated values (CSV)
 format.  Comment lines begin with a "#".  The output file contains a
-header with an RCS Id tag (useful for those who will check the file
-into a version control system), a version number for the file format,
-some comments containing the author and title of the board, and a
-comment describing the remainder of the file format.
+header with a version number for the file format, some comments
+containing the author and title of the board, and a comment describing
+the remainder of the file format.
 
    An example centroid file is shown below.
 
 
-     # $Id$
      # PcbXY Version 1.0
      # Date: Fri Jul 22 03:40:08 2005 UTC
      # Author: PCB User
@@ -6706,9 +6768,72 @@ centroid of the part and pin #2 is in the upper left quadrant, the
 rotation is declared to be zero degrees.
 
 
-File: pcb.info,  Node: Action Reference,  Next: Glossary,  Prev: Centroid File Format,  Up: Top
+File: pcb.info,  Node: Annotation File Format,  Next: Action Reference,  Prev: Centroid File Format,  Up: Top
+
+Appendix F Annotation File Format
+*********************************
+
+F.1 Overview
+============
+
+F.2 File Format
+===============
+
+The annotation output file an ASCII file that can be used to communicate
+layout changes that affect the netlist back to a schematic tool.
+Currently the only place this file is used is if when the Renumber()
+action is called within Pcb.  Renumber() will renumber all the
+reference designators (instance names) in the layout.  The result of
+the renumbering will be written out to an annotation file which can be
+used to propagate the changes to the schematic sources.  See *note
+Renumber Action:: for details on the Renumber() action.  If you are
+using gschem (part of gEDA/gaf) as your schematic entry tool then refer
+to pcb_backannotate(1) for details on how to use the annotation file to
+make the changes to the schematics.
+
+   The annotation file format is fairly simple.  Each line consists of
+a command followed by arguments.  Blank lines and lines consisting of
+only whitespace are ignored.  There are no line continuations.
+
+   An example annotation file is shown below.
+
+     *COMMENT* PCB Annotation File
+     *FILEVERSION* 20061031
+     *RENAME* "C17" "C1"
+     *RENAME* "U5" "U1"
+     *RENAME* "U6" "U2"
+     *RENAME* "C21" "C2"
+     *RENAME* "R14" "R1"
+     *RENAME* "C7" "C3"
+     *RENAME* "C8" "C4"
+     *RENAME* "C6" "C5"
+
+F.2.1 *COMMENT*
+---------------
+
+Command for a comment.  The text of a comment is ignored by tools which
+process the annotation file.
+*COMMENT* text
+
+F.2.2 *FILEVERSION*
+-------------------
+
+Indicates what version of the annotation file is in use.  The date code
+corresponds to the date when the current version was added to the Pcb
+sources.
+*FILEVERSION* datecode
 
-Appendix F Action Reference
+F.2.3 *RENAME*
+--------------
+
+Renames an element.  The arguments are enclosed in double quotes and
+are the original name and the new name.
+*RENAME* "old" "new"
+
+
+File: pcb.info,  Node: Action Reference,  Next: Glossary,  Prev: Annotation File Format,  Up: Top
+
+Appendix G Action Reference
 ***************************
 
 Many actions take a `delta' parameter as the last parameter, which is
@@ -6760,122 +6885,122 @@ are defined as follows:
 
 File: pcb.info,  Node: core actions,  Next: common actions,  Up: Action Reference
 
-F.1 Core actions
+G.1 Core actions
 ================
 
 * Menu:
 
-* AddRats Action:: Add one or more rat lines to the board.
-* ApplyVendor Action:: Applies the currently loaded vendor drill table to the current design.
-* Atomic Action:: Save or restore the undo serial number.
-* Attributes Action:: Let the user edit the attributes of the layout, current or given
-layer, or selected element.
-* AutoPlaceSelected Action:: Auto-place selected components.
-* AutoRoute Action:: Auto-route some or all rat lines.
-* ChangeClearSize Action:: Changes the clearance size of objects.
-* ChangeDrillSize Action:: Changes the drilling hole size of objects.
-* ChangeFlag Action:: Sets or clears flags on objects.
-* ChangeHole Action:: Changes the hole flag of objects.
-* ChangeJoin Action:: Changes the join (clearance through polygons) of objects.
-* ChangeName Action:: Sets the name of objects.
-* ChangeOctagon Action:: Changes the octagon-flag of pins and vias.
-* ChangePaste Action:: Changes the no paste flag of objects.
-* ChangePinName Action:: Sets the name of a specific pin on a specific element.
-* ChangeSize Action:: Changes the size of objects.
-* ChangeSquare Action:: Changes the square flag of pins and pads.
-* ClearOctagon Action:: Clears the octagon-flag of pins and vias.
-* ClearSquare Action:: Clears the square-flag of pins and pads.
-* ClrFlag Action:: Clears flags on objects.
-* Connection Action:: Searches connections of the object at the cursor position.
-* Delete Action:: Delete stuff.
-* DeleteRats Action:: Delete rat lines.
-* DisableVendor Action:: Disables automatic drill size mapping.
-* DisperseElements Action:: Disperses elements.
-* Display Action:: Several display-related actions.
+* AddRats Action::   N_("Add one or more rat lines to the board.");
+* ApplyVendor Action::   N_("Applies the currently loaded vendor drill table to the current design.");
+* Atomic Action::  N_("Save or restore the undo serial number.");
+* Attributes Action::   N_("Let the user edit the attributes of the layout, current or given
+layer, or selected element.");
+* AutoPlaceSelected Action::  N_("Auto-place selected components.");
+* AutoRoute Action::  N_("Auto-route some or all rat lines.");
+* ChangeClearSize Action::   N_("Changes the clearance size of objects.");
+* ChangeDrillSize Action::   N_("Changes the drilling hole size of objects.");
+* ChangeFlag Action::  N_("Sets or clears flags on objects.");
+* ChangeHole Action::  N_("Changes the hole flag of objects.");
+* ChangeJoin Action::   N_("Changes the join (clearance through polygons) of objects.");
+* ChangeName Action::  N_("Sets the name of objects.");
+* ChangeOctagon Action::   N_("Changes the octagon-flag of pins and vias.");
+* ChangePaste Action::   N_("Changes the no paste flag of objects.");
+* ChangePinName Action::   N_("Sets the name of a specific pin on a specific element.");
+* ChangeSize Action::  N_("Changes the size of objects.");
+* ChangeSquare Action::   N_("Changes the square flag of pins and pads.");
+* ClearOctagon Action::   N_("Clears the octagon-flag of pins and vias.");
+* ClearSquare Action::   N_("Clears the square-flag of pins and pads.");
+* ClrFlag Action::  N_("Clears flags on objects.");
+* Connection Action::   N_("Searches connections of the object at the cursor position.");
+* Delete Action::  N_("Delete stuff.");
+* DeleteRats Action::  N_("Delete rat lines.");
+* DisableVendor Action::   N_("Disables automatic drill size mapping.");
+* DisperseElements Action::  N_("Disperses elements.");
+* Display Action::  N_("Several display-related actions.");
 * djopt Action:: Perform various optimizations on the current board.
-* DRC Action:: Invoke the DRC check.
-* DumpLibrary Action:: Display the entire contents of the libraries.
-* elementlist Action:: Adds the given element if it doesn't already exist.
-* elementsetattr Action:: Sets or clears an element-specific attribute.
-* EnableVendor Action:: Enables automatic drill size mapping.
-* execcommand Action:: Runs a command.
-* ExecuteFile Action:: Run actions from the given file.
-* Flip Action:: Flip an element to the opposite side of the board.
+* DRC Action::  N_("Invoke the DRC check.");
+* DumpLibrary Action::   N_("Display the entire contents of the libraries.");
+* elementlist Action::   N_("Adds the given element if it doesn't already exist.");
+* elementsetattr Action::   N_("Sets or clears an element-specific attribute.");
+* EnableVendor Action::   N_("Enables automatic drill size mapping.");
+* execcommand Action::  N_("Runs a command.");
+* ExecuteFile Action::  N_("Run actions from the given file.");
+* Flip Action::   N_("Flip an element to the opposite side of the board.");
 * FontEdit Action:: Convert the current font to a PCB for editing.
 * FontSave Action:: Convert the current PCB back to a font.
-* FreeRotateBuffer Action:: Rotates the current paste buffer contents by the specified angle.  The
+* FreeRotateBuffer Action::   N_("Rotates the current paste buffer contents by the specified angle.  The
 angle is given in degrees.  If no angle is given, the user is prompted
 for one.
-
+");
 * GlobalPuller Action:: Pull all traces tight.
 * h Action:: Print a help message for commands.
-* Import Action:: Import schematics.
+* Import Action::  N_("Import schematics.");
 * l Action:: Loads layout data.
 * le Action:: Loads an element into the current buffer.
-* LoadFootprint Action:: Loads a single footprint by name.
-* LoadFrom Action:: Load layout data from a file.
-* LoadVendorFrom Action:: Loads the specified vendor resource file.
+* LoadFootprint Action::   N_("Loads a single footprint by name.");
+* LoadFrom Action::  N_("Load layout data from a file.");
+* LoadVendorFrom Action::   N_("Loads the specified vendor resource file.");
 * m Action:: Loads a layout into the current buffer.
-* MarkCrosshair Action:: Set/Reset the Crosshair mark.
-* Message Action:: Writes a message to the log window.
-* MinClearGap Action:: Ensures that polygons are a minimum distance from objects.
-* MinMaskGap Action:: Ensures the mask is a minimum distance from pins and pads.
-* Mode Action:: Change or use the tool mode.
-* MorphPolygon Action:: Converts dead polygon islands into separate polygons.
+* MarkCrosshair Action::  N_("Set/Reset the Crosshair mark.");
+* Message Action::  N_("Writes a message to the log window.");
+* MinClearGap Action::   N_("Ensures that polygons are a minimum distance from objects.");
+* MinMaskGap Action::   N_("Ensures the mask is a minimum distance from pins and pads.");
+* Mode Action::  N_("Change or use the tool mode.");
+* MorphPolygon Action::   N_("Converts dead polygon islands into separate polygons.");
 * MoveLayer Action:: Moves/Creates/Deletes Layers.
-* MoveObject Action:: Moves the object under the crosshair.
-* MoveToCurrentLayer Action:: Moves objects to the current layer.
+* MoveObject Action::   N_("Moves the object under the crosshair.");
+* MoveToCurrentLayer Action::   N_("Moves objects to the current layer.");
 * Netlist Action:: Perform various actions on netlists.
-* New Action:: Starts a new layout.
+* New Action::  N_("Starts a new layout.");
 * OptAutoOnly Action:: Toggles the optimize-only-autorouted flag.
-* PasteBuffer Action:: Various operations on the paste buffer.
-* Polygon Action:: Some polygon related stuff.
+* PasteBuffer Action::   N_("Various operations on the paste buffer.");
+* Polygon Action::  N_("Some polygon related stuff.");
 * Puller Action:: Pull an arc-line junction tight.
 * q Action:: Quits the application after confirming.
 * q! Action:: Quits the application without confirming.
-* Quit Action:: Quits the application after confirming.
-* Redo Action:: Redo recent``undo''operations.
-* RemoveSelected Action:: Removes any selected objects.
-* Renumber Action:: Renumber all elements.  The changes will be recorded to filename
-for use in backannotating these changes to the schematic.
-* Report Action:: Produce various report.
-* ReportDialog Action:: Report on the object under the crosshair
-* RipUp Action:: Ripup auto-routed tracks, or convert an element to parts.
+* Quit Action::  N_("Quits the application after confirming.");
+* Redo Action::  N_("Redo recent``undo''operations.");
+* RemoveSelected Action::  N_("Removes any selected objects.");
+* Renumber Action::   N_("Renumber all elements.  The changes will be recorded to filename
+for use in backannotating these changes to the schematic.");
+* Report Action::  N_("Produce various report.");
+* ReportDialog Action::   N_("Report on the object under the crosshair");
+* RipUp Action::   N_("Ripup auto-routed tracks, or convert an element to parts.");
 * rn Action:: Reads netlist.
-* RouteStyle Action:: Copies the indicated routing style into the current sizes.
+* RouteStyle Action::   N_("Copies the indicated routing style into the current sizes.");
 * s Action:: Saves layout data.
-* SaveSettings Action:: Saves settings.
-* SaveTo Action:: Saves data to a file.
-* Select Action:: Toggles or sets the selection.
-* SetFlag Action:: Sets flags on objects.
-* SetOctagon Action:: Sets the octagon-flag of objects.
-* SetSame Action:: Sets current layer and sizes to match indicated item.
-* SetSquare Action:: sets the square-flag of objects.
-* SetThermal Action:: Set the thermal (on the current layer) of pins or vias to the given style.
+* SaveSettings Action::  N_("Saves settings.");
+* SaveTo Action::  N_("Saves data to a file.");
+* Select Action::  N_("Toggles or sets the selection.");
+* SetFlag Action::  N_("Sets flags on objects.");
+* SetOctagon Action::  N_("Sets the octagon-flag of objects.");
+* SetSame Action::   N_("Sets current layer and sizes to match indicated item.");
+* SetSquare Action::  N_("sets the square-flag of objects.");
+* SetThermal Action::   N_("Set the thermal (on the current layer) of pins or vias to the given style.
 Style = 0 means no thermal.
 Style = 1 has diagonal fingers with sharp edges.
 Style = 2 has horizontal and vertical fingers with sharp edges.
 Style = 3 is a solid connection to the plane.Style = 4 has diagonal fingers with rounded edges.
 Style = 5 has horizontal and vertical fingers with rounded edges.
-
-* SetValue Action:: Change various board-wide values and sizes.
-* ToggleHideName Action:: Toggles the visibility of element names.
-* ToggleVendor Action:: Toggles the state of automatic drill size mapping.
-* Undo Action:: Undo recent changes.
-* UnloadVendor Action:: Unloads the current vendor drill mapping table.
-* Unselect Action:: Unselects the object at the pointer location or the specified objects.
+");
+* SetValue Action::   N_("Change various board-wide values and sizes.");
+* ToggleHideName Action::   N_("Toggles the visibility of element names.");
+* ToggleVendor Action::   N_("Toggles the state of automatic drill size mapping.");
+* Undo Action::  N_("Undo recent changes.");
+* UnloadVendor Action::   N_("Unloads the current vendor drill mapping table.");
+* Unselect Action::   N_("Unselects the object at the pointer location or the specified objects.");
 * w Action:: Saves layout data.
 * wq Action:: Saves the layout data and quits.
 
 
 File: pcb.info,  Node: AddRats Action,  Next: ApplyVendor Action,  Up: core actions
 
-F.1.1 AddRats
+G.1.1 AddRats
 -------------
 
-AddRats(AllRats|SelectedRats|Close)
+ N_("AddRats(AllRats|SelectedRats|Close)");
 
-Add one or more rat lines to the board.
+N_("Add one or more rat lines to the board.");
 
 `AllRats'
      Create rat lines for all loaded nets that aren't already connected
@@ -6892,12 +7017,13 @@ Add one or more rat lines to the board.
 
 File: pcb.info,  Node: ApplyVendor Action,  Next: Atomic Action,  Prev: AddRats Action,  Up: core actions
 
-F.1.2 ApplyVendor
+G.1.2 ApplyVendor
 -----------------
 
-ApplyVendor()
+ N_("ApplyVendor()");
 
-Applies the currently loaded vendor drill table to the current design.  
+N_("Applies the currently loaded vendor drill table to the current
+design."); 
 
    This will modify all of your drill holes to match the list of allowed
 sizes for your vendor.
@@ -6905,12 +7031,12 @@ sizes for your vendor.
 
 File: pcb.info,  Node: Atomic Action,  Next: Attributes Action,  Prev: ApplyVendor Action,  Up: core actions
 
-F.1.3 Atomic
+G.1.3 Atomic
 ------------
 
-Atomic(Save|Restore|Close|Block)
+ N_("Atomic(Save|Restore|Close|Block)");
 
-Save or restore the undo serial number.
+N_("Save or restore the undo serial number.");
 
    This action allows making multiple-action bindings into an atomic
 operation that will be undone by a single Undo command.  For example,
@@ -6940,14 +7066,14 @@ single undo step.
 
 File: pcb.info,  Node: Attributes Action,  Next: AutoPlaceSelected Action,  Prev: Atomic Action,  Up: core actions
 
-F.1.4 Attributes
+G.1.4 Attributes
 ----------------
 
-Attributes(Layout|Layer|Element)
-Attributes(Layer,layername)
+  N_("Attributes(Layout|Layer|Element)
+Attributes(Layer,layername)");
 
-Let the user edit the attributes of the layout, current or given layer,
-or selected element.
+N_("Let the user edit the attributes of the layout, current or given
+layer, or selected element.");
 
    This just pops up a dialog letting the user edit the attributes of
 the pcb, an element, or a layer.
@@ -6955,12 +7081,12 @@ the pcb, an element, or a layer.
 
 File: pcb.info,  Node: AutoPlaceSelected Action,  Next: AutoRoute Action,  Prev: Attributes Action,  Up: core actions
 
-F.1.5 AutoPlaceSelected
+G.1.5 AutoPlaceSelected
 -----------------------
 
-AutoPlaceSelected()
+ N_("AutoPlaceSelected()");
 
-Auto-place selected components.
+N_("Auto-place selected components.");
 
    Attempts to re-arrange the selected components such that the nets
 connecting them are minimized.  Note that you cannot undo this.
@@ -6968,12 +7094,12 @@ connecting them are minimized.  Note that you cannot undo this.
 
 File: pcb.info,  Node: AutoRoute Action,  Next: ChangeClearSize Action,  Prev: AutoPlaceSelected Action,  Up: core actions
 
-F.1.6 AutoRoute
+G.1.6 AutoRoute
 ---------------
 
-AutoRoute(AllRats|SelectedRats)
+ N_("AutoRoute(AllRats|SelectedRats)");
 
-Auto-route some or all rat lines.
+N_("Auto-route some or all rat lines.");
 
 `AllRats'
      Attempt to autoroute all rats.
@@ -6994,15 +7120,15 @@ responsive.
 
 File: pcb.info,  Node: ChangeClearSize Action,  Next: ChangeDrillSize Action,  Prev: AutoRoute Action,  Up: core actions
 
-F.1.7 ChangeClearSize
+G.1.7 ChangeClearSize
 ---------------------
 
-ChangeClearSize(Object, delta)
+  N_("ChangeClearSize(Object, delta)
 ChangeClearSize(SelectedPins|SelectedPads|SelectedVias, delta)
 ChangeClearSize(SelectedLines|SelectedArcs, delta
-ChangeClearSize(Selected|SelectedObjects, delta)
+ChangeClearSize(Selected|SelectedObjects, delta)");
 
-Changes the clearance size of objects.
+N_("Changes the clearance size of objects.");
 
    If the solder mask is currently showing, this action changes the
 solder mask clearance.  If the mask is not showing, this action changes
@@ -7011,28 +7137,28 @@ the polygon clearance.
 
 File: pcb.info,  Node: ChangeDrillSize Action,  Next: ChangeFlag Action,  Prev: ChangeClearSize Action,  Up: core actions
 
-F.1.8 ChangeDrillSize
+G.1.8 ChangeDrillSize
 ---------------------
 
-ChangeDrillSize(Object, delta)
-ChangeDrillSize(SelectedPins|SelectedVias|Selected|SelectedObjects, delta)
+  N_("ChangeDrillSize(Object, delta)
+ChangeDrillSize(SelectedPins|SelectedVias|Selected|SelectedObjects, delta)");
 
-Changes the drilling hole size of objects.
+N_("Changes the drilling hole size of objects.");
 
 
 File: pcb.info,  Node: ChangeFlag Action,  Next: ChangeHole Action,  Prev: ChangeDrillSize Action,  Up: core actions
 
-F.1.9 ChangeFlag
+G.1.9 ChangeFlag
 ----------------
 
-ChangeFlag(Object|Selected|SelectedObjects, flag, value)
+  N_("ChangeFlag(Object|Selected|SelectedObjects, flag, value)
 ChangeFlag(SelectedLines|SelectedPins|SelectedVias, flag, value)
 ChangeFlag(SelectedPads|SelectedTexts|SelectedNames, flag, value)
 ChangeFlag(SelectedElements, flag, value)
 flag = square | octagon | thermal | join
-value = 0 | 1
+value = 0 | 1");
 
-Sets or clears flags on objects.
+N_("Sets or clears flags on objects.");
 
    Toggles the given flag on the indicated object(s).  The flag may be
 one of the flags listed above (square, octagon, thermal, join).  The
@@ -7042,12 +7168,12 @@ cleared.  If the value is 1, the flag is set.
 
 File: pcb.info,  Node: ChangeHole Action,  Next: ChangeJoin Action,  Prev: ChangeFlag Action,  Up: core actions
 
-F.1.10 ChangeHole
+G.1.10 ChangeHole
 -----------------
 
-ChangeHole(ToggleObject|Object|SelectedVias|Selected)
+  N_("ChangeHole(ToggleObject|Object|SelectedVias|Selected)");
 
-Changes the hole flag of objects.
+N_("Changes the hole flag of objects.");
 
    The "hole flag" of a via determines whether the via is a
 plated-through hole (not set), or an unplated hole (set).
@@ -7055,12 +7181,12 @@ plated-through hole (not set), or an unplated hole (set).
 
 File: pcb.info,  Node: ChangeJoin Action,  Next: ChangeName Action,  Prev: ChangeHole Action,  Up: core actions
 
-F.1.11 ChangeJoin
+G.1.11 ChangeJoin
 -----------------
 
-ChangeJoin(ToggleObject|SelectedLines|SelectedArcs|Selected)
+  N_("ChangeJoin(ToggleObject|SelectedLines|SelectedArcs|Selected)");
 
-Changes the join (clearance through polygons) of objects.
+N_("Changes the join (clearance through polygons) of objects.");
 
    The join flag determines whether a line or arc, drawn to intersect a
 polygon, electrically connects to the polygon or not.  When joined, the
@@ -7071,13 +7197,13 @@ polygon, insulating them from each other.
 
 File: pcb.info,  Node: ChangeName Action,  Next: ChangeOctagon Action,  Prev: ChangeJoin Action,  Up: core actions
 
-F.1.12 ChangeName
+G.1.12 ChangeName
 -----------------
 
-ChangeName(Object)
-ChangeName(Layout|Layer)
+  N_("ChangeName(Object)
+ChangeName(Layout|Layer)");
 
-Sets the name of objects.
+N_("Sets the name of objects.");
 
 `Object'
      Changes the name of the element under the cursor.
@@ -7093,13 +7219,13 @@ Sets the name of objects.
 
 File: pcb.info,  Node: ChangeOctagon Action,  Next: ChangePaste Action,  Prev: ChangeName Action,  Up: core actions
 
-F.1.13 ChangeOctagon
+G.1.13 ChangeOctagon
 --------------------
 
-ChangeOctagon(Object|ToggleObject|SelectedObjects|Selected)
-ChangeOctagon(SelectedElements|SelectedPins|SelectedVias)
+  N_("ChangeOctagon(Object|ToggleObject|SelectedObjects|Selected)
+ChangeOctagon(SelectedElements|SelectedPins|SelectedVias)");
 
-Changes the octagon-flag of pins and vias.
+N_("Changes the octagon-flag of pins and vias.");
 
    Pins, pads, and vias can have various shapes.  All may be round.
 Pins and pads may be square (obviously "square" pads are usually
@@ -7114,12 +7240,12 @@ either round or, if the octagon flag is set, octagonal.
 
 File: pcb.info,  Node: ChangePaste Action,  Next: ChangePinName Action,  Prev: ChangeOctagon Action,  Up: core actions
 
-F.1.14 ChangePaste
+G.1.14 ChangePaste
 ------------------
 
-ChangePaste(ToggleObject|Object|SelectedPads|Selected)
+  N_("ChangePaste(ToggleObject|Object|SelectedPads|Selected)");
 
-Changes the no paste flag of objects.
+N_("Changes the no paste flag of objects.");
 
    The "no paste flag" of a pad determines whether the solderpaste
 stencil will have an opening for the pad (no set) or if there wil be
@@ -7129,12 +7255,12 @@ fiducial pads.
 
 File: pcb.info,  Node: ChangePinName Action,  Next: ChangeSize Action,  Prev: ChangePaste Action,  Up: core actions
 
-F.1.15 ChangePinName
+G.1.15 ChangePinName
 --------------------
 
-ChangePinName(ElementName,PinNumber,PinName)
+  N_("ChangePinName(ElementName,PinNumber,PinName)");
 
-Sets the name of a specific pin on a specific element.
+N_("Sets the name of a specific pin on a specific element.");
 
    This can be especially useful for annotating pin names from a
 schematic to the layout without requiring knowledge of the pcb file
@@ -7145,16 +7271,16 @@ format.
 
 File: pcb.info,  Node: ChangeSize Action,  Next: ChangeSquare Action,  Prev: ChangePinName Action,  Up: core actions
 
-F.1.16 ChangeSize
+G.1.16 ChangeSize
 -----------------
 
-ChangeSize(Object, delta)
+  N_("ChangeSize(Object, delta)
 ChangeSize(SelectedObjects|Selected, delta)
 ChangeSize(SelectedLines|SelectedPins|SelectedVias, delta)
 ChangeSize(SelectedPads|SelectedTexts|SelectedNames, delta)
-ChangeSize(SelectedElements, delta)
+ChangeSize(SelectedElements, delta)");
 
-Changes the size of objects.
+N_("Changes the size of objects.");
 
    For lines and arcs, this changes the width.  For pins and vias, this
 changes the overall diameter of the copper annulus.  For pads, this
@@ -7165,14 +7291,14 @@ of the silk layer lines and arcs for this element.
 
 File: pcb.info,  Node: ChangeSquare Action,  Next: ClearOctagon Action,  Prev: ChangeSize Action,  Up: core actions
 
-F.1.17 ChangeSquare
+G.1.17 ChangeSquare
 -------------------
 
-ChangeSquare(ToggleObject)
+  N_("ChangeSquare(ToggleObject)
 ChangeSquare(SelectedElements|SelectedPins)
-ChangeSquare(Selected|SelectedObjects)
+ChangeSquare(Selected|SelectedObjects)");
 
-Changes the square flag of pins and pads.
+N_("Changes the square flag of pins and pads.");
 
    Note that `Pins' means both pins and pads.
 
@@ -7189,13 +7315,13 @@ either round or, if the octagon flag is set, octagonal.
 
 File: pcb.info,  Node: ClearOctagon Action,  Next: ClearSquare Action,  Prev: ChangeSquare Action,  Up: core actions
 
-F.1.18 ClearOctagon
+G.1.18 ClearOctagon
 -------------------
 
-ClearOctagon(ToggleObject|Object|SelectedObjects|Selected)
-ClearOctagon(SelectedElements|SelectedPins|SelectedVias)
+  N_("ClearOctagon(ToggleObject|Object|SelectedObjects|Selected)
+ClearOctagon(SelectedElements|SelectedPins|SelectedVias)");
 
-Clears the octagon-flag of pins and vias.
+N_("Clears the octagon-flag of pins and vias.");
 
    Pins, pads, and vias can have various shapes.  All may be round.
 Pins and pads may be square (obviously "square" pads are usually
@@ -7210,12 +7336,12 @@ either round or, if the octagon flag is set, octagonal.
 
 File: pcb.info,  Node: ClearSquare Action,  Next: ClrFlag Action,  Prev: ClearOctagon Action,  Up: core actions
 
-F.1.19 ClearSquare
+G.1.19 ClearSquare
 ------------------
 
-ClearSquare(ToggleObject|SelectedElements|SelectedPins)
+  N_("ClearSquare(ToggleObject|SelectedElements|SelectedPins)");
 
-Clears the square-flag of pins and pads.
+N_("Clears the square-flag of pins and pads.");
 
    Note that `Pins' means pins and pads.
 
@@ -7232,16 +7358,16 @@ either round or, if the octagon flag is set, octagonal.
 
 File: pcb.info,  Node: ClrFlag Action,  Next: Connection Action,  Prev: ClearSquare Action,  Up: core actions
 
-F.1.20 ClrFlag
+G.1.20 ClrFlag
 --------------
 
-ClrFlag(Object|Selected|SelectedObjects, flag)
+  N_("ClrFlag(Object|Selected|SelectedObjects, flag)
 ClrFlag(SelectedLines|SelectedPins|SelectedVias, flag)
 ClrFlag(SelectedPads|SelectedTexts|SelectedNames, flag)
 ClrFlag(SelectedElements, flag)
-flag = square | octagon | thermal | join
+flag = square | octagon | thermal | join");
 
-Clears flags on objects.
+N_("Clears flags on objects.");
 
    Turns the given flag off, regardless of its previous setting.  See
 `ChangeFlag'.
@@ -7251,12 +7377,12 @@ Clears flags on objects.
 
 File: pcb.info,  Node: Connection Action,  Next: Delete Action,  Prev: ClrFlag Action,  Up: core actions
 
-F.1.21 Connection
+G.1.21 Connection
 -----------------
 
-Connection(Find|ResetLinesAndPolygons|ResetPinsAndVias|Reset)
+  N_("Connection(Find|ResetLinesAndPolygons|ResetPinsAndVias|Reset)");
 
-Searches connections of the object at the cursor position.
+N_("Searches connections of the object at the cursor position.");
 
    Connections found with this action will be highlighted in the
 "connected-color" color and will have the "found" flag set.
@@ -7277,33 +7403,33 @@ Searches connections of the object at the cursor position.
 
 File: pcb.info,  Node: Delete Action,  Next: DeleteRats Action,  Prev: Connection Action,  Up: core actions
 
-F.1.22 Delete
+G.1.22 Delete
 -------------
 
-Delete(Object|Selected)
-Delete(AllRats|SelectedRats)
+  N_("Delete(Object|Selected)
+Delete(AllRats|SelectedRats)");
 
-Delete stuff.
+N_("Delete stuff.");
 
 
 File: pcb.info,  Node: DeleteRats Action,  Next: DisableVendor Action,  Prev: Delete Action,  Up: core actions
 
-F.1.23 DeleteRats
+G.1.23 DeleteRats
 -----------------
 
-DeleteRats(AllRats|Selected|SelectedRats)
+  N_("DeleteRats(AllRats|Selected|SelectedRats)");
 
-Delete rat lines.
+N_("Delete rat lines.");
 
 
 File: pcb.info,  Node: DisableVendor Action,  Next: DisperseElements Action,  Prev: DeleteRats Action,  Up: core actions
 
-F.1.24 DisableVendor
+G.1.24 DisableVendor
 --------------------
 
-DisableVendor()
+ N_("DisableVendor()");
 
-Disables automatic drill size mapping.
+N_("Disables automatic drill size mapping.");
 
    When drill mapping is enabled, new instances of pins and vias will
 have their drill holes mapped to one of the allowed drill sizes
@@ -7312,274 +7438,15 @@ specified in the currently loaded vendor drill table.
 
 File: pcb.info,  Node: DisperseElements Action,  Next: Display Action,  Prev: DisableVendor Action,  Up: core actions
 
-F.1.25 DisperseElements
+G.1.25 DisperseElements
 -----------------------
 
-DisperseElements(All|Selected)
+  N_("DisperseElements(All|Selected)");
 
-Disperses elements.
+N_("Disperses elements.");
 
    Normally this is used when starting a board, by selecting all
 elements and then dispersing them.  This scatters the elements around
 the board so that you can pick individual ones, rather than have all the
 elements at the same 0,0 coordinate and thus impossible to choose from.
 
-
-File: pcb.info,  Node: Display Action,  Next: djopt Action,  Prev: DisperseElements Action,  Up: core actions
-
-F.1.26 Display
---------------
-
-Display(NameOnPCB|Description|Value)
-Display(Grid|Redraw)
-Display(CycleClip|CycleCrosshair|Toggle45Degree|ToggleStartDirection)
-Display(ToggleGrid|ToggleRubberBandMode|ToggleUniqueNames)
-Display(ToggleMask|ToggleName|ToggleClearLine|ToggleFullPoly|ToggleSnapPin)
-Display(ToggleThindraw|ToggleThindrawPoly|ToggleOrthoMove|ToggleLocalRef)
-Display(ToggleCheckPlanes|ToggleShowDRC|ToggleAutoDRC)
-Display(ToggleLiveRoute|LockNames|OnlyNames)
-Display(Pinout|PinOrPadName)
-
-Several display-related actions.
-
-`NameOnPCB'
-
-`Description'
-
-`Value'
-     Specify whether all elements show their name, description, or
-     value.
-
-`Redraw'
-     Redraw the whole board.
-
-`Toggle45Degree'
-     When clear, lines can be drawn at any angle.  When set, lines are
-     restricted to multiples of 45 degrees and requested lines may be
-     broken up according to the clip setting.
-
-`CycleClip'
-     Changes the way lines are restricted to 45 degree increments.  The
-     various settings are: straight only, orthogonal then angled, and
-     angled then orthogonal.  If AllDirections is set, this action
-     disables it.
-
-`CycleCrosshair'
-     Changes crosshair drawing.  Crosshair may accept form of 4-ray,
-     8-ray and 12-ray cross.
-
-`ToggleRubberBandMode'
-     If set, moving an object moves all the lines attached to it too.
-
-`ToggleStartDirection'
-     If set, each time you set a point in a line, the Clip toggles
-     between orth-angle and angle-ortho.
-
-`ToggleUniqueNames'
-     If set, you will not be permitted to change the name of an element
-     to match that of another element.
-
-`ToggleSnapPin'
-     If set, pin centers and pad end points are treated as additional
-     grid points that the cursor can snap to.
-
-`ToggleLocalRef'
-     If set, the mark is automatically set to the beginning of any
-     move, so you can see the relative distance you've moved.
-
-`ToggleThindraw'
-     If set, objects on the screen are drawn as outlines (lines are
-     drawn as center-lines).  This lets you see line endpoints hidden
-     under pins, for example.
-
-`ToggleThindrawPoly'
-     If set, polygons on the screen are drawn as outlines.
-
-`ToggleShowDRC'
-     If set, pending objects (i.e. lines you're in the process of
-     drawing) will be drawn with an outline showing how far away from
-     other copper you need to be.
-
-`ToggleLiveRoute'
-     If set, the progress of the autorouter will be visible on the
-     screen.
-
-`ToggleAutoDRC'
-     If set, you will not be permitted to make connections which violate
-     the current DRC and netlist settings.
-
-`ToggleCheckPlanes'
-     If set, lines and arcs aren't drawn, which usually leaves just the
-     polygons.  If you also disable all but the layer you're interested
-     in, this allows you to check for isolated regions.
-
-`ToggleOrthoMove'
-     If set, the crosshair is only allowed to move orthogonally from its
-     previous position.  I.e. you can move an element or line up, down,
-     left, or right, but not up+left or down+right.
-
-`ToggleName'
-     Selects whether the pinouts show the pin names or the pin numbers.
-
-`ToggleLockNames'
-     If set, text will ignore left mouse clicks and actions that work on
-     objects under the mouse. You can still select text with a lasso
-     (left mouse drag) and perform actions on the selection.
-
-`ToggleOnlyNames'
-     If set, only text will be sensitive for mouse clicks and actions
-     that work on objects under the mouse. You can still select other
-     objects with a lasso (left mouse drag) and perform actions on the
-     selection.
-
-`ToggleMask'
-     Turns the solder mask on or off.
-
-`ToggleClearLine'
-     When set, the clear-line flag causes new lines and arcs to have
-     their "clear polygons" flag set, so they won't be electrically
-     connected to any polygons they overlap.
-
-`ToggleFullPoly'
-     When set, the full-poly flag causes new polygons to have their
-     "full polygon" flag set, so all parts of them will be displayed
-     instead of only the biggest one.
-
-`ToggleGrid'
-     Resets the origin of the current grid to be wherever the mouse
-     pointer is (not where the crosshair currently is).  If you provide
-     two numbers after this, the origin is set to that coordinate.
-
-`Grid'
-     Toggles whether the grid is displayed or not.
-
-`Pinout'
-     Causes the pinout of the element indicated by the cursor to be
-     displayed, usually in a separate window.
-
-`PinOrPadName'
-     Toggles whether the names of pins, pads, or (yes) vias will be
-     displayed.  If the cursor is over an element, all of its pins and
-     pads are affected.
-
-
-
-File: pcb.info,  Node: djopt Action,  Next: DRC Action,  Prev: Display Action,  Up: core actions
-
-F.1.27 djopt
-------------
-
-djopt(debumpify|unjaggy|simple|vianudge|viatrim|orthopull)
-djopt(auto) - all of the above
-djopt(miter)
-
-Perform various optimizations on the current board.
-
-   The different types of optimizations change your board in order to
-reduce the total trace length and via count.
-
-`debumpify'
-     Looks for U-shaped traces that can be shortened or eliminated.
-
-`unjaggy'
-     Looks for corners which could be flipped to eliminate one or more
-     corners (i.e. jaggy lines become simpler).
-
-`simple'
-     Removing uneeded vias, replacing two or more trace segments in a
-     row with a single segment.  This is usually performed
-     automatically after other optimizations.
-
-`vianudge'
-     Looks for vias where all traces leave in the same direction.
-     Tries to move via in that direction to eliminate one of the traces
-     (and thus a corner).
-
-`viatrim'
-     Looks for traces that go from via to via, where moving that trace
-     to a different layer eliminates one or both vias.
-
-`orthopull'
-     Looks for chains of traces all going in one direction, with more
-     traces orthogonal on one side than on the other.  Moves the chain
-     in that direction, causing a net reduction in trace length,
-     possibly eliminating traces and/or corners.
-
-`splitlines'
-     Looks for lines that pass through vias, pins, or pads, and splits
-     them into separate lines so they can be managed separately.
-
-`auto'
-     Performs the above options, repeating until no further
-     optimizations can be made.
-
-`miter'
-     Replaces 90 degree corners with a pair of 45 degree corners, to
-     reduce RF losses and trace length.
-
-
-
-File: pcb.info,  Node: DRC Action,  Next: DumpLibrary Action,  Prev: djopt Action,  Up: core actions
-
-F.1.28 DRC
-----------
-
-DRC()
-
-Invoke the DRC check.
-
-   Note that the design rule check uses the current board rule settings,
-not the current style settings.
-
-
-File: pcb.info,  Node: DumpLibrary Action,  Next: elementlist Action,  Prev: DRC Action,  Up: core actions
-
-F.1.29 DumpLibrary
-------------------
-
-DumpLibrary()
-
-Display the entire contents of the libraries.
-
-
-File: pcb.info,  Node: elementlist Action,  Next: elementsetattr Action,  Prev: DumpLibrary Action,  Up: core actions
-
-F.1.30 elementlist
-------------------
-
-ElementList(Start|Done|Need,<refdes>,<footprint>,<value>)
-
-Adds the given element if it doesn't already exist.
-
-`Start'
-     Indicates the start of an element list; call this before any Need
-     actions.
-
-`Need'
-     Searches the board for an element with a matching refdes.
-
-     If found, the value and footprint are updated.
-
-     If not found, a new element is created with the given footprint
-     and value.
-
-`Done'
-     Compares the list of elements needed since the most recent `start'
-     with the list of elements actually on the board.  Any elements
-     that weren't listed are selected, so that the user may delete them.
-
-
-
-File: pcb.info,  Node: elementsetattr Action,  Next: EnableVendor Action,  Prev: elementlist Action,  Up: core actions
-
-F.1.31 elementsetattr
----------------------
-
-ElementSetAttr(refdes,name[,value])
-
-Sets or clears an element-specific attribute.
-
-   If a value is specified, the named attribute is added (if not already
-present) or changed (if it is) to the given value.  If the value is not
-specified, the given attribute is removed if present.
-
diff --git a/doc/pcb.info-2 b/doc/pcb.info-2
index 8b236a2..5e6c16d 100644
--- a/doc/pcb.info-2
+++ b/doc/pcb.info-2
@@ -27,14 +27,273 @@ MERCHANT-ABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 General Public License for more details.
 
 
+File: pcb.info,  Node: Display Action,  Next: djopt Action,  Prev: DisperseElements Action,  Up: core actions
+
+G.1.26 Display
+--------------
+
+  N_("Display(NameOnPCB|Description|Value)
+Display(Grid|Redraw)
+Display(CycleClip|CycleCrosshair|Toggle45Degree|ToggleStartDirection)
+Display(ToggleGrid|ToggleRubberBandMode|ToggleUniqueNames)
+Display(ToggleMask|ToggleName|ToggleClearLine|ToggleFullPoly|ToggleSnapPin)
+Display(ToggleThindraw|ToggleThindrawPoly|ToggleOrthoMove|ToggleLocalRef)
+Display(ToggleCheckPlanes|ToggleShowDRC|ToggleAutoDRC)
+Display(ToggleLiveRoute|LockNames|OnlyNames)
+Display(Pinout|PinOrPadName)");
+
+N_("Several display-related actions.");
+
+`NameOnPCB'
+
+`Description'
+
+`Value'
+     Specify whether all elements show their name, description, or
+     value.
+
+`Redraw'
+     Redraw the whole board.
+
+`Toggle45Degree'
+     When clear, lines can be drawn at any angle.  When set, lines are
+     restricted to multiples of 45 degrees and requested lines may be
+     broken up according to the clip setting.
+
+`CycleClip'
+     Changes the way lines are restricted to 45 degree increments.  The
+     various settings are: straight only, orthogonal then angled, and
+     angled then orthogonal.  If AllDirections is set, this action
+     disables it.
+
+`CycleCrosshair'
+     Changes crosshair drawing.  Crosshair may accept form of 4-ray,
+     8-ray and 12-ray cross.
+
+`ToggleRubberBandMode'
+     If set, moving an object moves all the lines attached to it too.
+
+`ToggleStartDirection'
+     If set, each time you set a point in a line, the Clip toggles
+     between orth-angle and angle-ortho.
+
+`ToggleUniqueNames'
+     If set, you will not be permitted to change the name of an element
+     to match that of another element.
+
+`ToggleSnapPin'
+     If set, pin centers and pad end points are treated as additional
+     grid points that the cursor can snap to.
+
+`ToggleLocalRef'
+     If set, the mark is automatically set to the beginning of any
+     move, so you can see the relative distance you've moved.
+
+`ToggleThindraw'
+     If set, objects on the screen are drawn as outlines (lines are
+     drawn as center-lines).  This lets you see line endpoints hidden
+     under pins, for example.
+
+`ToggleThindrawPoly'
+     If set, polygons on the screen are drawn as outlines.
+
+`ToggleShowDRC'
+     If set, pending objects (i.e. lines you're in the process of
+     drawing) will be drawn with an outline showing how far away from
+     other copper you need to be.
+
+`ToggleLiveRoute'
+     If set, the progress of the autorouter will be visible on the
+     screen.
+
+`ToggleAutoDRC'
+     If set, you will not be permitted to make connections which violate
+     the current DRC and netlist settings.
+
+`ToggleCheckPlanes'
+     If set, lines and arcs aren't drawn, which usually leaves just the
+     polygons.  If you also disable all but the layer you're interested
+     in, this allows you to check for isolated regions.
+
+`ToggleOrthoMove'
+     If set, the crosshair is only allowed to move orthogonally from its
+     previous position.  I.e. you can move an element or line up, down,
+     left, or right, but not up+left or down+right.
+
+`ToggleName'
+     Selects whether the pinouts show the pin names or the pin numbers.
+
+`ToggleLockNames'
+     If set, text will ignore left mouse clicks and actions that work on
+     objects under the mouse. You can still select text with a lasso
+     (left mouse drag) and perform actions on the selection.
+
+`ToggleOnlyNames'
+     If set, only text will be sensitive for mouse clicks and actions
+     that work on objects under the mouse. You can still select other
+     objects with a lasso (left mouse drag) and perform actions on the
+     selection.
+
+`ToggleMask'
+     Turns the solder mask on or off.
+
+`ToggleClearLine'
+     When set, the clear-line flag causes new lines and arcs to have
+     their "clear polygons" flag set, so they won't be electrically
+     connected to any polygons they overlap.
+
+`ToggleFullPoly'
+     When set, the full-poly flag causes new polygons to have their
+     "full polygon" flag set, so all parts of them will be displayed
+     instead of only the biggest one.
+
+`ToggleGrid'
+     Resets the origin of the current grid to be wherever the mouse
+     pointer is (not where the crosshair currently is).  If you provide
+     two numbers after this, the origin is set to that coordinate.
+
+`Grid'
+     Toggles whether the grid is displayed or not.
+
+`Pinout'
+     Causes the pinout of the element indicated by the cursor to be
+     displayed, usually in a separate window.
+
+`PinOrPadName'
+     Toggles whether the names of pins, pads, or (yes) vias will be
+     displayed.  If the cursor is over an element, all of its pins and
+     pads are affected.
+
+
+
+File: pcb.info,  Node: djopt Action,  Next: DRC Action,  Prev: Display Action,  Up: core actions
+
+G.1.27 djopt
+------------
+
+djopt(debumpify|unjaggy|simple|vianudge|viatrim|orthopull|splitlines)
+djopt(auto) - all of the above
+djopt(miter)
+
+Perform various optimizations on the current board.
+
+   The different types of optimizations change your board in order to
+reduce the total trace length and via count.
+
+`debumpify'
+     Looks for U-shaped traces that can be shortened or eliminated.
+
+`unjaggy'
+     Looks for corners which could be flipped to eliminate one or more
+     corners (i.e. jaggy lines become simpler).
+
+`simple'
+     Removing uneeded vias, replacing two or more trace segments in a
+     row with a single segment.  This is usually performed
+     automatically after other optimizations.
+
+`vianudge'
+     Looks for vias where all traces leave in the same direction.
+     Tries to move via in that direction to eliminate one of the traces
+     (and thus a corner).
+
+`viatrim'
+     Looks for traces that go from via to via, where moving that trace
+     to a different layer eliminates one or both vias.
+
+`orthopull'
+     Looks for chains of traces all going in one direction, with more
+     traces orthogonal on one side than on the other.  Moves the chain
+     in that direction, causing a net reduction in trace length,
+     possibly eliminating traces and/or corners.
+
+`splitlines'
+     Looks for lines that pass through vias, pins, or pads, and splits
+     them into separate lines so they can be managed separately.
+
+`auto'
+     Performs the above options, repeating until no further
+     optimizations can be made.
+
+`miter'
+     Replaces 90 degree corners with a pair of 45 degree corners, to
+     reduce RF losses and trace length.
+
+
+
+File: pcb.info,  Node: DRC Action,  Next: DumpLibrary Action,  Prev: djopt Action,  Up: core actions
+
+G.1.28 DRC
+----------
+
+ N_("DRC()");
+
+N_("Invoke the DRC check.");
+
+   Note that the design rule check uses the current board rule settings,
+not the current style settings.
+
+
+File: pcb.info,  Node: DumpLibrary Action,  Next: elementlist Action,  Prev: DRC Action,  Up: core actions
+
+G.1.29 DumpLibrary
+------------------
+
+ N_("DumpLibrary()");
+
+N_("Display the entire contents of the libraries.");
+
+
+File: pcb.info,  Node: elementlist Action,  Next: elementsetattr Action,  Prev: DumpLibrary Action,  Up: core actions
+
+G.1.30 elementlist
+------------------
+
+  N_("ElementList(Start|Done|Need,<refdes>,<footprint>,<value>)");
+
+N_("Adds the given element if it doesn't already exist.");
+
+`Start'
+     Indicates the start of an element list; call this before any Need
+     actions.
+
+`Need'
+     Searches the board for an element with a matching refdes.
+
+     If found, the value and footprint are updated.
+
+     If not found, a new element is created with the given footprint
+     and value.
+
+`Done'
+     Compares the list of elements needed since the most recent `start'
+     with the list of elements actually on the board.  Any elements
+     that weren't listed are selected, so that the user may delete them.
+
+
+
+File: pcb.info,  Node: elementsetattr Action,  Next: EnableVendor Action,  Prev: elementlist Action,  Up: core actions
+
+G.1.31 elementsetattr
+---------------------
+
+  N_("ElementSetAttr(refdes,name[,value])");
+
+N_("Sets or clears an element-specific attribute.");
+
+   If a value is specified, the named attribute is added (if not already
+present) or changed (if it is) to the given value.  If the value is not
+specified, the given attribute is removed if present.
+
+
 File: pcb.info,  Node: EnableVendor Action,  Next: execcommand Action,  Prev: elementsetattr Action,  Up: core actions
 
-F.1.32 EnableVendor
+G.1.32 EnableVendor
 -------------------
 
-EnableVendor()
+ N_("EnableVendor()");
 
-Enables automatic drill size mapping.
+N_("Enables automatic drill size mapping.");
 
    When drill mapping is enabled, new instances of pins and vias will
 have their drill holes mapped to one of the allowed drill sizes
@@ -45,36 +304,36 @@ first.
 
 File: pcb.info,  Node: execcommand Action,  Next: ExecuteFile Action,  Prev: EnableVendor Action,  Up: core actions
 
-F.1.33 execcommand
+G.1.33 execcommand
 ------------------
 
-ExecCommand(command)
+ N_("ExecCommand(command)");
 
-Runs a command.
+N_("Runs a command.");
 
    Runs the given command, which is a system executable.
 
 
 File: pcb.info,  Node: ExecuteFile Action,  Next: Flip Action,  Prev: execcommand Action,  Up: core actions
 
-F.1.34 ExecuteFile
+G.1.34 ExecuteFile
 ------------------
 
-ExecuteFile(filename)
+ N_("ExecuteFile(filename)");
 
-Run actions from the given file.
+N_("Run actions from the given file.");
 
    Lines starting with `#' are ignored.
 
 
 File: pcb.info,  Node: Flip Action,  Next: FontEdit Action,  Prev: ExecuteFile Action,  Up: core actions
 
-F.1.35 Flip
+G.1.35 Flip
 -----------
 
-Flip(Object|Selected|SelectedElements)
+ N_("Flip(Object|Selected|SelectedElements)");
 
-Flip an element to the opposite side of the board.
+N_("Flip an element to the opposite side of the board.");
 
    Note that the location of the element will be symmetric about the
 cursor location; i.e. if the part you are pointing at will still be at
@@ -85,7 +344,7 @@ not their absolute positions on the board.
 
 File: pcb.info,  Node: FontEdit Action,  Next: FontSave Action,  Prev: Flip Action,  Up: core actions
 
-F.1.36 FontEdit
+G.1.36 FontEdit
 ---------------
 
 FontEdit()
@@ -95,7 +354,7 @@ Convert the current font to a PCB for editing.
 
 File: pcb.info,  Node: FontSave Action,  Next: FreeRotateBuffer Action,  Prev: FontEdit Action,  Up: core actions
 
-F.1.37 FontSave
+G.1.37 FontSave
 ---------------
 
 FontSave()
@@ -105,14 +364,14 @@ Convert the current PCB back to a font.
 
 File: pcb.info,  Node: FreeRotateBuffer Action,  Next: GlobalPuller Action,  Prev: FontSave Action,  Up: core actions
 
-F.1.38 FreeRotateBuffer
+G.1.38 FreeRotateBuffer
 -----------------------
 
-FreeRotateBuffer([Angle])
+  N_("FreeRotateBuffer([Angle])");
 
-Rotates the current paste buffer contents by the specified angle.  The
-angle is given in degrees.  If no angle is given, the user is prompted
-for one.
+N_("Rotates the current paste buffer contents by the specified angle.
+The angle is given in degrees.  If no angle is given, the user is
+prompted for one.  ");
 
    Rotates the contents of the pastebuffer by an arbitrary angle.  If no
 angle is given, the user is prompted for one.
@@ -120,7 +379,7 @@ angle is given, the user is prompted for one.
 
 File: pcb.info,  Node: GlobalPuller Action,  Next: h Action,  Prev: FreeRotateBuffer Action,  Up: core actions
 
-F.1.39 GlobalPuller
+G.1.39 GlobalPuller
 -------------------
 
 GlobalPuller()
@@ -130,7 +389,7 @@ Pull all traces tight.
 
 File: pcb.info,  Node: h Action,  Next: Import Action,  Prev: GlobalPuller Action,  Up: core actions
 
-F.1.40 h
+G.1.40 h
 --------
 
 h
@@ -145,15 +404,16 @@ documented for that purpose.
 
 File: pcb.info,  Node: Import Action,  Next: l Action,  Prev: h Action,  Up: core actions
 
-F.1.41 Import
+G.1.41 Import
 -------------
 
-Import()
+  N_("Import()
 Import([gnetlist|make[,source,source,...]])
 Import(setnewpoint[,(mark|center|X,Y)])
 Import(setdisperse,D,units)
+");
 
-Import schematics.
+N_("Import schematics.");
 
    Imports element and netlist data from the schematics (or some other
 source).  The first parameter, which is optional, is the mode.  If not
@@ -245,7 +505,7 @@ attribute.
 
 File: pcb.info,  Node: l Action,  Next: le Action,  Prev: Import Action,  Up: core actions
 
-F.1.42 l
+G.1.42 l
 --------
 
 l [name]
@@ -265,7 +525,7 @@ documented for that purpose.
 
 File: pcb.info,  Node: le Action,  Next: LoadFootprint Action,  Prev: l Action,  Up: core actions
 
-F.1.43 le
+G.1.43 le
 ---------
 
 le [name]
@@ -284,12 +544,12 @@ documented for that purpose.
 
 File: pcb.info,  Node: LoadFootprint Action,  Next: LoadFrom Action,  Prev: le Action,  Up: core actions
 
-F.1.44 LoadFootprint
+G.1.44 LoadFootprint
 --------------------
 
-LoadFootprint(filename[,refdes,value])
+  N_("LoadFootprint(filename[,refdes,value])");
 
-Loads a single footprint by name.
+N_("Loads a single footprint by name.");
 
    Loads a single footprint by name, rather than by reference or through
 the library.  If a refdes and value are specified, those are inserted
@@ -298,12 +558,12 @@ into the footprint as well.  The footprint remains in the paste buffer.
 
 File: pcb.info,  Node: LoadFrom Action,  Next: LoadVendorFrom Action,  Prev: LoadFootprint Action,  Up: core actions
 
-F.1.45 LoadFrom
+G.1.45 LoadFrom
 ---------------
 
-LoadFrom(Layout|LayoutToBuffer|ElementToBuffer|Netlist|Revert,filename)
+  N_("LoadFrom(Layout|LayoutToBuffer|ElementToBuffer|Netlist|Revert,filename)");
 
-Load layout data from a file.
+N_("Load layout data from a file.");
 
    This action assumes you know what the filename is.  The various GUIs
 should have a similar `Load' action where the filename is optional, and
@@ -332,12 +592,12 @@ file name.
 
 File: pcb.info,  Node: LoadVendorFrom Action,  Next: m Action,  Prev: LoadFrom Action,  Up: core actions
 
-F.1.46 LoadVendorFrom
+G.1.46 LoadVendorFrom
 ---------------------
 
-LoadVendorFrom(filename)
+ N_("LoadVendorFrom(filename)");
 
-Loads the specified vendor resource file.
+N_("Loads the specified vendor resource file.");
 
 FILENAME
      Name of the vendor resource file.  If not specified, the user will
@@ -346,7 +606,7 @@ FILENAME
 
 File: pcb.info,  Node: m Action,  Next: MarkCrosshair Action,  Prev: LoadVendorFrom Action,  Up: core actions
 
-F.1.47 m
+G.1.47 m
 --------
 
 m [name]
@@ -365,13 +625,13 @@ documented for that purpose.
 
 File: pcb.info,  Node: MarkCrosshair Action,  Next: Message Action,  Prev: m Action,  Up: core actions
 
-F.1.48 MarkCrosshair
+G.1.48 MarkCrosshair
 --------------------
 
-MarkCrosshair()
-MarkCrosshair(Center)
+  N_("MarkCrosshair()
+MarkCrosshair(Center)");
 
-Set/Reset the Crosshair mark.
+N_("Set/Reset the Crosshair mark.");
 
    The "mark" is a small X-shaped target on the display which is
 treated like a second origin (the normal origin is the upper let corner
@@ -386,12 +646,12 @@ location.
 
 File: pcb.info,  Node: Message Action,  Next: MinClearGap Action,  Prev: MarkCrosshair Action,  Up: core actions
 
-F.1.49 Message
+G.1.49 Message
 --------------
 
-Message(message)
+ N_("Message(message)");
 
-Writes a message to the log window.
+N_("Writes a message to the log window.");
 
    This action displays a message to the log window.  This action is
 primarily provided for use by other programs which may interface with
@@ -401,13 +661,13 @@ window followed by a newline.
 
 File: pcb.info,  Node: MinClearGap Action,  Next: MinMaskGap Action,  Prev: Message Action,  Up: core actions
 
-F.1.50 MinClearGap
+G.1.50 MinClearGap
 ------------------
 
-MinClearGap(delta)
-MinClearGap(Selected, delta)
+  N_("MinClearGap(delta)
+MinClearGap(Selected, delta)");
 
-Ensures that polygons are a minimum distance from objects.
+N_("Ensures that polygons are a minimum distance from objects.");
 
    Checks all specified objects, and increases the polygon clearance if
 needed to ensure a minimum distance between their edges and the polygon
@@ -416,13 +676,13 @@ edges.
 
 File: pcb.info,  Node: MinMaskGap Action,  Next: Mode Action,  Prev: MinClearGap Action,  Up: core actions
 
-F.1.51 MinMaskGap
+G.1.51 MinMaskGap
 -----------------
 
-MinMaskGap(delta)
-MinMaskGap(Selected, delta)
+  N_("MinMaskGap(delta)
+MinMaskGap(Selected, delta)");
 
-Ensures the mask is a minimum distance from pins and pads.
+N_("Ensures the mask is a minimum distance from pins and pads.");
 
    Checks all specified pins and/or pads, and increases the mask if
 needed to ensure a minimum distance between the pin or pad edge and the
@@ -431,15 +691,15 @@ mask edge.
 
 File: pcb.info,  Node: Mode Action,  Next: MorphPolygon Action,  Prev: MinMaskGap Action,  Up: core actions
 
-F.1.52 Mode
+G.1.52 Mode
 -----------
 
-Mode(Arc|Arrow|Copy|InsertPoint|Line|Lock|Move|None|PasteBuffer)
+  N_("Mode(Arc|Arrow|Copy|InsertPoint|Line|Lock|Move|None|PasteBuffer)
 Mode(Polygon|Rectangle|Remove|Rotate|Text|Thermal|Via)
 Mode(Notify|Release|Cancel|Stroke)
-Mode(Save|Restore)
+Mode(Save|Restore)");
 
-Change or use the tool mode.
+N_("Change or use the tool mode.");
 
 `Arc'
 `Arrow'
@@ -489,12 +749,12 @@ Change or use the tool mode.
 
 File: pcb.info,  Node: MorphPolygon Action,  Next: MoveLayer Action,  Prev: Mode Action,  Up: core actions
 
-F.1.53 MorphPolygon
+G.1.53 MorphPolygon
 -------------------
 
-MorphPolygon(Object|Selected)
+ N_("MorphPolygon(Object|Selected)");
 
-Converts dead polygon islands into separate polygons.
+N_("Converts dead polygon islands into separate polygons.");
 
    If a polygon is divided into unconnected "islands", you can use this
 command to convert the otherwise disappeared islands into separate
@@ -505,7 +765,7 @@ automatically deleted.
 
 File: pcb.info,  Node: MoveLayer Action,  Next: MoveObject Action,  Prev: MorphPolygon Action,  Up: core actions
 
-F.1.54 MoveLayer
+G.1.54 MoveLayer
 ----------------
 
 MoveLayer(old,new)
@@ -545,12 +805,12 @@ Moves/Creates/Deletes Layers.
 
 File: pcb.info,  Node: MoveObject Action,  Next: MoveToCurrentLayer Action,  Prev: MoveLayer Action,  Up: core actions
 
-F.1.55 MoveObject
+G.1.55 MoveObject
 -----------------
 
-MoveObject(X,Y,dim)
+ N_("MoveObject(X,Y,dim)");
 
-Moves the object under the crosshair.
+N_("Moves the object under the crosshair.");
 
    The `X' and `Y' are treated like `delta' is for many other objects.
 For each, if it's prefixed by `+' or `-', then that amount is relative.
@@ -560,12 +820,12 @@ units are PCB's internal units, currently 1/100 mil.
 
 File: pcb.info,  Node: MoveToCurrentLayer Action,  Next: Netlist Action,  Prev: MoveObject Action,  Up: core actions
 
-F.1.56 MoveToCurrentLayer
+G.1.56 MoveToCurrentLayer
 -------------------------
 
-MoveToCurrentLayer(Object|SelectedObjects)
+  N_("MoveToCurrentLayer(Object|SelectedObjects)");
 
-Moves objects to the current layer.
+N_("Moves objects to the current layer.");
 
    Note that moving an element from a component layer to a solder layer,
 or from solder to component, won't automatically flip it.  Use the
@@ -574,7 +834,7 @@ or from solder to component, won't automatically flip it.  Use the
 
 File: pcb.info,  Node: Netlist Action,  Next: New Action,  Prev: MoveToCurrentLayer Action,  Up: core actions
 
-F.1.57 Netlist
+G.1.57 Netlist
 --------------
 
 Net(find|select|rats|norats|clear[,net[,pin]])
@@ -630,19 +890,19 @@ specified, nets which match NET and contain a pin matching PIN apply.
 
 File: pcb.info,  Node: New Action,  Next: OptAutoOnly Action,  Prev: Netlist Action,  Up: core actions
 
-F.1.58 New
+G.1.58 New
 ----------
 
-New([name])
+ N_("New([name])");
 
-Starts a new layout.
+N_("Starts a new layout.");
 
    If a name is not given, one is prompted for.
 
 
 File: pcb.info,  Node: OptAutoOnly Action,  Next: PasteBuffer Action,  Prev: New Action,  Up: core actions
 
-F.1.59 OptAutoOnly
+G.1.59 OptAutoOnly
 ------------------
 
 OptAutoOnly()
@@ -660,15 +920,15 @@ optimize hand-routed traces also.
 
 File: pcb.info,  Node: PasteBuffer Action,  Next: Polygon Action,  Prev: OptAutoOnly Action,  Up: core actions
 
-F.1.60 PasteBuffer
+G.1.60 PasteBuffer
 ------------------
 
-PasteBuffer(AddSelected|Clear|1..MAX_BUFFER)
+  N_("PasteBuffer(AddSelected|Clear|1..MAX_BUFFER)
 PasteBuffer(Rotate, 1..3)
 PasteBuffer(Convert|Save|Restore|Mirror)
-PasteBuffer(ToLayout, X, Y, units)
+PasteBuffer(ToLayout, X, Y, units)");
 
-Various operations on the paste buffer.
+N_("Various operations on the paste buffer.");
 
    There are a number of paste buffers; the actual limit is a
 compile-time constant `MAX_BUFFER' in `globalconst.h'.  It is currently
@@ -715,12 +975,12 @@ compile-time constant `MAX_BUFFER' in `globalconst.h'.  It is currently
 
 File: pcb.info,  Node: Polygon Action,  Next: Puller Action,  Prev: PasteBuffer Action,  Up: core actions
 
-F.1.61 Polygon
+G.1.61 Polygon
 --------------
 
-Polygon(Close|PreviousPoint)
+ N_("Polygon(Close|PreviousPoint)");
 
-Some polygon related stuff.
+N_("Some polygon related stuff.");
 
    Polygons need a special action routine to make life easier.
 
@@ -737,7 +997,7 @@ Some polygon related stuff.
 
 File: pcb.info,  Node: Puller Action,  Next: q Action,  Prev: Polygon Action,  Up: core actions
 
-F.1.62 Puller
+G.1.62 Puller
 -------------
 
 Puller()
@@ -759,7 +1019,7 @@ arc-line intersection was moved to.
 
 File: pcb.info,  Node: q Action,  Next: q! Action,  Prev: Puller Action,  Up: core actions
 
-F.1.63 q
+G.1.63 q
 --------
 
 q
@@ -777,7 +1037,7 @@ documented for that purpose.
 
 File: pcb.info,  Node: q! Action,  Next: Quit Action,  Prev: q Action,  Up: core actions
 
-F.1.64 q!
+G.1.64 q!
 ---------
 
 q!
@@ -795,12 +1055,12 @@ documented for that purpose.
 
 File: pcb.info,  Node: Quit Action,  Next: Redo Action,  Prev: q! Action,  Up: core actions
 
-F.1.65 Quit
+G.1.65 Quit
 -----------
 
-Quit()
+ N_("Quit()");
 
-Quits the application after confirming.
+N_("Quits the application after confirming.");
 
    If you have unsaved changes, you will be prompted to confirm (or
 save) before quitting.
@@ -808,12 +1068,12 @@ save) before quitting.
 
 File: pcb.info,  Node: Redo Action,  Next: RemoveSelected Action,  Prev: Quit Action,  Up: core actions
 
-F.1.66 Redo
+G.1.66 Redo
 -----------
 
-Redo()
+ N_("Redo()");
 
-Redo recent"undo"operations.
+N_("Redo recent"undo"operations.");
 
    This routine allows you to recover from the last undo command.  You
 might want to do this if you thought that undo was going to revert
@@ -829,34 +1089,34 @@ performing the redo, you will lose the ability to "redo" the three
 
 File: pcb.info,  Node: RemoveSelected Action,  Next: Renumber Action,  Prev: Redo Action,  Up: core actions
 
-F.1.67 RemoveSelected
+G.1.67 RemoveSelected
 ---------------------
 
-RemoveSelected()
+ N_("RemoveSelected()");
 
-Removes any selected objects.
+N_("Removes any selected objects.");
 
 
 File: pcb.info,  Node: Renumber Action,  Next: Report Action,  Prev: RemoveSelected Action,  Up: core actions
 
-F.1.68 Renumber
+G.1.68 Renumber
 ---------------
 
-Renumber()
-Renumber(filename)
+ N_("Renumber()
+Renumber(filename)");
 
-Renumber all elements.  The changes will be recorded to filename for
-use in backannotating these changes to the schematic.
+N_("Renumber all elements.  The changes will be recorded to filename
+for use in backannotating these changes to the schematic.");
 
 
 File: pcb.info,  Node: Report Action,  Next: ReportDialog Action,  Prev: Renumber Action,  Up: core actions
 
-F.1.69 Report
+G.1.69 Report
 -------------
 
-Report(Object|DrillReport|FoundPins|NetLength|AllNetLengths|[,name])
+  N_("Report(Object|DrillReport|FoundPins|NetLength|AllNetLengths|[,name])");
 
-Produce various report.
+N_("Produce various report.");
 
 `Object'
      The object under the crosshair will be reported, describing various
@@ -883,24 +1143,24 @@ Produce various report.
 
 File: pcb.info,  Node: ReportDialog Action,  Next: RipUp Action,  Prev: Report Action,  Up: core actions
 
-F.1.70 ReportDialog
+G.1.70 ReportDialog
 -------------------
 
-ReportDialog()
+ N_("ReportDialog()");
 
-Report on the object under the crosshair
+N_("Report on the object under the crosshair");
 
    This is a shortcut for `Report(Object)'.
 
 
 File: pcb.info,  Node: RipUp Action,  Next: rn Action,  Prev: ReportDialog Action,  Up: core actions
 
-F.1.71 RipUp
+G.1.71 RipUp
 ------------
 
-RipUp(All|Selected|Element)
+ N_("RipUp(All|Selected|Element)");
 
-Ripup auto-routed tracks, or convert an element to parts.
+N_("Ripup auto-routed tracks, or convert an element to parts.");
 
 `All'
      Removes all lines and vias which were created by the autorouter.
@@ -917,7 +1177,7 @@ Ripup auto-routed tracks, or convert an element to parts.
 
 File: pcb.info,  Node: rn Action,  Next: RouteStyle Action,  Prev: RipUp Action,  Up: core actions
 
-F.1.72 rn
+G.1.72 rn
 ---------
 
 rn [name]
@@ -940,17 +1200,17 @@ documented for that purpose.
 
 File: pcb.info,  Node: RouteStyle Action,  Next: s Action,  Prev: rn Action,  Up: core actions
 
-F.1.73 RouteStyle
+G.1.73 RouteStyle
 -----------------
 
-RouteStyle(1|2|3|4)
+ N_("RouteStyle(1|2|3|4)");
 
-Copies the indicated routing style into the current sizes.
+N_("Copies the indicated routing style into the current sizes.");
 
 
 File: pcb.info,  Node: s Action,  Next: SaveSettings Action,  Prev: RouteStyle Action,  Up: core actions
 
-F.1.74 s
+G.1.74 s
 --------
 
 s [name]
@@ -970,13 +1230,13 @@ documented for that purpose.
 
 File: pcb.info,  Node: SaveSettings Action,  Next: SaveTo Action,  Prev: s Action,  Up: core actions
 
-F.1.75 SaveSettings
+G.1.75 SaveSettings
 -------------------
 
-SaveSettings()
-SaveSettings(local)
+  N_("SaveSettings()
+SaveSettings(local)");
 
-Saves settings.
+N_("Saves settings.");
 
    If you pass no arguments, the settings are stored in
 `$HOME/.pcb/settings'.  If you pass the word `local' they're saved in
@@ -985,14 +1245,14 @@ Saves settings.
 
 File: pcb.info,  Node: SaveTo Action,  Next: Select Action,  Prev: SaveSettings Action,  Up: core actions
 
-F.1.76 SaveTo
+G.1.76 SaveTo
 -------------
 
-SaveTo(Layout|LayoutAs,filename)
+  N_("SaveTo(Layout|LayoutAs,filename)
 SaveTo(AllConnections|AllUnusedPins|ElementConnections,filename)
-SaveTo(PasteBuffer,filename)
+SaveTo(PasteBuffer,filename)");
 
-Saves data to a file.
+N_("Saves data to a file.");
 
 `Layout'
      Saves the current layout.
@@ -1017,18 +1277,18 @@ Saves data to a file.
 
 File: pcb.info,  Node: Select Action,  Next: SetFlag Action,  Prev: SaveTo Action,  Up: core actions
 
-F.1.77 Select
+G.1.77 Select
 -------------
 
-Select(Object|ToggleObject)
+  N_("Select(Object|ToggleObject)
 Select(All|Block|Connection)
 Select(ElementByName|ObjectByName|PadByName|PinByName)
 Select(ElementByName|ObjectByName|PadByName|PinByName, Name)
 Select(TextByName|ViaByName|NetByName)
 Select(TextByName|ViaByName|NetByName, Name)
-Select(Convert)
+Select(Convert)");
 
-Toggles or sets the selection.
+N_("Toggles or sets the selection.");
 
 `ElementByName'
 
@@ -1059,9 +1319,12 @@ Toggles or sets the selection.
 `All'
      Selects all objects on the board.
 
-`Connection'
+`Found'
      Selects all connections with the "found" flag set.
 
+`Connection'
+     Selects all connections with the "connected" flag set.
+
 `Convert'
      Converts the selected objects to an element.  This uses the highest
      numbered paste buffer.
@@ -1070,16 +1333,16 @@ Toggles or sets the selection.
 
 File: pcb.info,  Node: SetFlag Action,  Next: SetOctagon Action,  Prev: Select Action,  Up: core actions
 
-F.1.78 SetFlag
+G.1.78 SetFlag
 --------------
 
-SetFlag(Object|Selected|SelectedObjects, flag)
+  N_("SetFlag(Object|Selected|SelectedObjects, flag)
 SetFlag(SelectedLines|SelectedPins|SelectedVias, flag)
 SetFlag(SelectedPads|SelectedTexts|SelectedNames, flag)
 SetFlag(SelectedElements, flag)
-flag = square | octagon | thermal | join
+flag = square | octagon | thermal | join");
 
-Sets flags on objects.
+N_("Sets flags on objects.");
 
    Turns the given flag on, regardless of its previous setting.  See
 `ChangeFlag'.
@@ -1089,12 +1352,12 @@ Sets flags on objects.
 
 File: pcb.info,  Node: SetOctagon Action,  Next: SetSame Action,  Prev: SetFlag Action,  Up: core actions
 
-F.1.79 SetOctagon
+G.1.79 SetOctagon
 -----------------
 
-SetOctagon(Object|ToggleObject|SelectedElements|Selected)
+  N_("SetOctagon(Object|ToggleObject|SelectedElements|Selected)");
 
-Sets the octagon-flag of objects.
+N_("Sets the octagon-flag of objects.");
 
    Pins, pads, and vias can have various shapes.  All may be round.
 Pins and pads may be square (obviously "square" pads are usually
@@ -1109,12 +1372,12 @@ either round or, if the octagon flag is set, octagonal.
 
 File: pcb.info,  Node: SetSame Action,  Next: SetSquare Action,  Prev: SetOctagon Action,  Up: core actions
 
-F.1.80 SetSame
+G.1.80 SetSame
 --------------
 
-SetSame()
+ N_("SetSame()");
 
-Sets current layer and sizes to match indicated item.
+N_("Sets current layer and sizes to match indicated item.");
 
    When invoked over any line, arc, polygon, or via, this changes the
 current layer to be the layer that item is on, and changes the current
@@ -1123,12 +1386,12 @@ sizes (thickness, keepaway, drill, etc) according to that item.
 
 File: pcb.info,  Node: SetSquare Action,  Next: SetThermal Action,  Prev: SetSame Action,  Up: core actions
 
-F.1.81 SetSquare
+G.1.81 SetSquare
 ----------------
 
-SetSquare(ToggleObject|SelectedElements|SelectedPins)
+  N_("SetSquare(ToggleObject|SelectedElements|SelectedPins)");
 
-sets the square-flag of objects.
+N_("sets the square-flag of objects.");
 
    Note that `Pins' means pins and pads.
 
@@ -1145,17 +1408,17 @@ either round or, if the octagon flag is set, octagonal.
 
 File: pcb.info,  Node: SetThermal Action,  Next: SetValue Action,  Prev: SetSquare Action,  Up: core actions
 
-F.1.82 SetThermal
+G.1.82 SetThermal
 -----------------
 
 SetThermal(Object|SelectedPins|SelectedVias|Selected, Style)
 
-Set the thermal (on the current layer) of pins or vias to the given
+N_("Set the thermal (on the current layer) of pins or vias to the given
 style.  Style = 0 means no thermal.  Style = 1 has diagonal fingers
 with sharp edges.  Style = 2 has horizontal and vertical fingers with
 sharp edges.  Style = 3 is a solid connection to the plane.Style = 4
 has diagonal fingers with rounded edges.  Style = 5 has horizontal and
-vertical fingers with rounded edges.
+vertical fingers with rounded edges.  ");
 
    This changes how/whether pins or vias connect to any rectangle or
 polygon on the current layer. The first argument can specify one
@@ -1173,12 +1436,12 @@ the polygon.
 
 File: pcb.info,  Node: SetValue Action,  Next: ToggleHideName Action,  Prev: SetThermal Action,  Up: core actions
 
-F.1.83 SetValue
+G.1.83 SetValue
 ---------------
 
-SetValue(Grid|Line|LineSize|Text|TextScale|ViaDrillingHole|Via|ViaSize, delta)
+  N_("SetValue(Grid|Line|LineSize|Text|TextScale|ViaDrillingHole|Via|ViaSize, delta)");
 
-Change various board-wide values and sizes.
+N_("Change various board-wide values and sizes.");
 
 `ViaDrillingHole'
      Changes the diameter of the drill for new vias.
@@ -1205,12 +1468,12 @@ Change various board-wide values and sizes.
 
 File: pcb.info,  Node: ToggleHideName Action,  Next: ToggleVendor Action,  Prev: SetValue Action,  Up: core actions
 
-F.1.84 ToggleHideName
+G.1.84 ToggleHideName
 ---------------------
 
-ToggleHideName(Object|SelectedElements)
+  N_("ToggleHideName(Object|SelectedElements)");
 
-Toggles the visibility of element names.
+N_("Toggles the visibility of element names.");
 
    If names are hidden you won't see them on the screen and they will
 not appear on the silk layer when you print the layout.
@@ -1218,12 +1481,12 @@ not appear on the silk layer when you print the layout.
 
 File: pcb.info,  Node: ToggleVendor Action,  Next: Undo Action,  Prev: ToggleHideName Action,  Up: core actions
 
-F.1.85 ToggleVendor
+G.1.85 ToggleVendor
 -------------------
 
-ToggleVendor()
+ N_("ToggleVendor()");
 
-Toggles the state of automatic drill size mapping.
+N_("Toggles the state of automatic drill size mapping.");
 
    When drill mapping is enabled, new instances of pins and vias will
 have their drill holes mapped to one of the allowed drill sizes
@@ -1234,13 +1497,13 @@ first.
 
 File: pcb.info,  Node: Undo Action,  Next: UnloadVendor Action,  Prev: ToggleVendor Action,  Up: core actions
 
-F.1.86 Undo
+G.1.86 Undo
 -----------
 
-Undo()
-Undo(ClearList)
+ N_("Undo()
+Undo(ClearList)");
 
-Undo recent changes.
+N_("Undo recent changes.");
 
    The unlimited undo feature of `Pcb' allows you to recover from most
 operations that materially affect you work.  Calling `Undo()' without
@@ -1254,26 +1517,28 @@ same serial number will be undone (or redone) as a group.  See `Atomic'.
 
 File: pcb.info,  Node: UnloadVendor Action,  Next: Unselect Action,  Prev: Undo Action,  Up: core actions
 
-F.1.87 UnloadVendor
+G.1.87 UnloadVendor
 -------------------
 
-UnloadVendor()
+ N_("UnloadVendor()");
 
-Unloads the current vendor drill mapping table.
+N_("Unloads the current vendor drill mapping table.");
 
 
 File: pcb.info,  Node: Unselect Action,  Next: w Action,  Prev: UnloadVendor Action,  Up: core actions
 
-F.1.88 Unselect
+G.1.88 Unselect
 ---------------
 
-Unselect(All|Block|Connection)
+  N_("Unselect(All|Block|Connection)
 Unselect(ElementByName|ObjectByName|PadByName|PinByName)
 Unselect(ElementByName|ObjectByName|PadByName|PinByName, Name)
 Unselect(TextByName|ViaByName)
 Unselect(TextByName|ViaByName, Name)
+");
 
-Unselects the object at the pointer location or the specified objects.
+N_("Unselects the object at the pointer location or the specified
+objects.");
 
 `All'
      Unselect all objects.
@@ -1304,7 +1569,7 @@ Unselects the object at the pointer location or the specified objects.
 
 File: pcb.info,  Node: w Action,  Next: wq Action,  Prev: Unselect Action,  Up: core actions
 
-F.1.89 w
+G.1.89 w
 --------
 
 w [name]
@@ -1322,7 +1587,7 @@ documented for that purpose.
 
 File: pcb.info,  Node: wq Action,  Prev: w Action,  Up: core actions
 
-F.1.90 wq
+G.1.90 wq
 ---------
 
 wq
@@ -1340,7 +1605,7 @@ documented for that purpose.
 
 File: pcb.info,  Node: common actions,  Next: gtk actions,  Prev: core actions,  Up: Action Reference
 
-F.2 common actions
+G.2 common actions
 ==================
 
 * Menu:
@@ -1354,7 +1619,7 @@ F.2 common actions
 
 File: pcb.info,  Node: LayersChanged Action,  Next: LibraryChanged Action,  Up: common actions
 
-F.2.1 LayersChanged
+G.2.1 LayersChanged
 -------------------
 
 LayersChanged()
@@ -1372,7 +1637,7 @@ these directly.
 
 File: pcb.info,  Node: LibraryChanged Action,  Next: NetlistChanged Action,  Prev: LayersChanged Action,  Up: common actions
 
-F.2.2 LibraryChanged
+G.2.2 LibraryChanged
 --------------------
 
 LibraryChanged()
@@ -1388,7 +1653,7 @@ these directly.
 
 File: pcb.info,  Node: NetlistChanged Action,  Next: PCBChanged Action,  Prev: LibraryChanged Action,  Up: common actions
 
-F.2.3 NetlistChanged
+G.2.3 NetlistChanged
 --------------------
 
 NetlistChanged()
@@ -1404,7 +1669,7 @@ these directly.
 
 File: pcb.info,  Node: PCBChanged Action,  Next: RouteStylesChanged Action,  Prev: NetlistChanged Action,  Up: common actions
 
-F.2.4 PCBChanged
+G.2.4 PCBChanged
 ----------------
 
 PCBChanged([revert])
@@ -1423,7 +1688,7 @@ these directly.
 
 File: pcb.info,  Node: RouteStylesChanged Action,  Prev: PCBChanged Action,  Up: common actions
 
-F.2.5 RouteStylesChanged
+G.2.5 RouteStylesChanged
 ------------------------
 
 RouteStylesChanged()
@@ -1439,17 +1704,17 @@ these directly.
 
 File: pcb.info,  Node: gtk actions,  Next: lesstif actions,  Prev: common actions,  Up: Action Reference
 
-F.3 gtk actions
+G.3 gtk actions
 ===============
 
 * Menu:
 
 * gtk About Action:: N_("Tell the user about this version of PCB.");
-* gtk AdjustStyle Action:: Open the window which allows editing of the route styles.
+* gtk AdjustStyle Action::     N_("Open the window which allows editing of the route styles.");
 * gtk Center Action:: N_("Moves the pointer to the center of the window.");
 * gtk Cursor Action:: N_("Move the cursor.");
 * gtk DoWindows Action:: N_("Open various GUI windows.");
-* gtk EditLayerGroups Action:: Open the preferences window which allows editing of the layer groups.
+* gtk EditLayerGroups Action::     N_("Open the preferences window which allows editing of the layer groups.");
 * gtk GetXY Action:: N_("Get a coordinate.");
 * gtk ImportGUI Action:: N_("Asks user which schematics to import into PCB.
 ");
@@ -1462,16 +1727,16 @@ must be specified as the optional second argument.");
 * gtk Print Action:: N_("Print the layout.");
 * gtk PrintCalibrate Action:: N_("Calibrate the printer.");
 * gtk Save Action:: N_("Save layout and/or element data to a user-selected file.");
-* gtk SelectLayer Action:: Select which layer is the current layer.
+* gtk SelectLayer Action::     N_("Select which layer is the current layer.");
 * gtk SetUnits Action:: N_("Set the default measurement units.");
 * gtk SwapSides Action:: N_("Swaps the side of the board you're looking at.");
-* gtk ToggleView Action:: Toggle the visibility of the specified layer or layer group.
+* gtk ToggleView Action::     N_("Toggle the visibility of the specified layer or layer group.");
 * gtk Zoom Action:: N_("Various zoom factor changes.");
 
 
 File: pcb.info,  Node: gtk About Action,  Next: gtk AdjustStyle Action,  Up: gtk actions
 
-F.3.1 gtk About
+G.3.1 gtk About
 ---------------
 
 About()
@@ -1484,19 +1749,20 @@ they're running.
 
 File: pcb.info,  Node: gtk AdjustStyle Action,  Next: gtk Center Action,  Prev: gtk About Action,  Up: gtk actions
 
-F.3.2 gtk AdjustStyle
+G.3.2 gtk AdjustStyle
 ---------------------
 
-AdjustStyle()
+    N_("AdjustStyle()
+");
 
-Open the window which allows editing of the route styles.
+N_("Open the window which allows editing of the route styles.");
 
    Opens the window which allows editing of the route styles.
 
 
 File: pcb.info,  Node: gtk Center Action,  Next: gtk Cursor Action,  Prev: gtk AdjustStyle Action,  Up: gtk actions
 
-F.3.3 gtk Center
+G.3.3 gtk Center
 ----------------
 
 Center()
@@ -1509,7 +1775,7 @@ currently within the window already.
 
 File: pcb.info,  Node: gtk Cursor Action,  Next: gtk DoWindows Action,  Prev: gtk Center Action,  Up: gtk actions
 
-F.3.4 gtk Cursor
+G.3.4 gtk Cursor
 ----------------
 
 Cursor(Type,DeltaUp,DeltaRight,Units)
@@ -1547,7 +1813,7 @@ mouse cursor to move to be above the crosshair.
 
 File: pcb.info,  Node: gtk DoWindows Action,  Next: gtk EditLayerGroups Action,  Prev: gtk Cursor Action,  Up: gtk actions
 
-F.3.5 gtk DoWindows
+G.3.5 gtk DoWindows
 -------------------
 
 DoWindows(1|2|3|4|5|6)
@@ -1584,12 +1850,14 @@ N_("Open various GUI windows.");
 
 File: pcb.info,  Node: gtk EditLayerGroups Action,  Next: gtk GetXY Action,  Prev: gtk DoWindows Action,  Up: gtk actions
 
-F.3.6 gtk EditLayerGroups
+G.3.6 gtk EditLayerGroups
 -------------------------
 
-EditLayerGroups()
+    N_("EditLayerGroups()
+");
 
-Open the preferences window which allows editing of the layer groups.
+N_("Open the preferences window which allows editing of the layer
+groups.");
 
    Opens the preferences window which is where the layer groups are
 edited.  This action is primarily provides to provide menu resource
@@ -1598,7 +1866,7 @@ compatibility with the lesstif HID.
 
 File: pcb.info,  Node: gtk GetXY Action,  Next: gtk ImportGUI Action,  Prev: gtk EditLayerGroups Action,  Up: gtk actions
 
-F.3.7 gtk GetXY
+G.3.7 gtk GetXY
 ---------------
 
 GetXY()
@@ -1610,7 +1878,7 @@ N_("Get a coordinate.");
 
 File: pcb.info,  Node: gtk ImportGUI Action,  Next: gtk Pan Action,  Prev: gtk GetXY Action,  Up: gtk actions
 
-F.3.8 gtk ImportGUI
+G.3.8 gtk ImportGUI
 -------------------
 
 ImportGUI()
@@ -1622,7 +1890,7 @@ N_("Asks user which schematics to import into PCB.  ");
 
 File: pcb.info,  Node: gtk Pan Action,  Next: gtk Popup Action,  Prev: gtk ImportGUI Action,  Up: gtk actions
 
-F.3.9 gtk Pan
+G.3.9 gtk Pan
 -------------
 
 Pan([thumb], Mode)
@@ -1636,7 +1904,7 @@ with Mode = 0.
 
 File: pcb.info,  Node: gtk Popup Action,  Next: gtk Print Action,  Prev: gtk Pan Action,  Up: gtk actions
 
-F.3.10 gtk Popup
+G.3.10 gtk Popup
 ----------------
 
 Popup(MenuName, [Button])
@@ -1647,12 +1915,13 @@ optional second argument.");
 
    This just pops up the specified menu.  The menu must have been
 defined as a named subresource of the Popups resource in the menu
-resource file.
+resource file. The second, optional (and ignored) argument represents
+the mouse button number which is triggering the popup.
 
 
 File: pcb.info,  Node: gtk Print Action,  Next: gtk PrintCalibrate Action,  Prev: gtk Popup Action,  Up: gtk actions
 
-F.3.11 gtk Print
+G.3.11 gtk Print
 ----------------
 
 Print()
@@ -1665,7 +1934,7 @@ options, and print the layout.
 
 File: pcb.info,  Node: gtk PrintCalibrate Action,  Next: gtk Save Action,  Prev: gtk Print Action,  Up: gtk actions
 
-F.3.12 gtk PrintCalibrate
+G.3.12 gtk PrintCalibrate
 -------------------------
 
 PrintCalibrate()
@@ -1678,7 +1947,7 @@ the measurements in, so that future printouts will be more precise.
 
 File: pcb.info,  Node: gtk Save Action,  Next: gtk SelectLayer Action,  Prev: gtk PrintCalibrate Action,  Up: gtk actions
 
-F.3.13 gtk Save
+G.3.13 gtk Save
 ---------------
 
 Save()
@@ -1696,12 +1965,12 @@ filename to save, and then `SaveTo' is called with that filename.
 
 File: pcb.info,  Node: gtk SelectLayer Action,  Next: gtk SetUnits Action,  Prev: gtk Save Action,  Up: gtk actions
 
-F.3.14 gtk SelectLayer
+G.3.14 gtk SelectLayer
 ----------------------
 
-SelectLayer(1..MAXLAYER|Silk|Rats)
+    N_("SelectLayer(1..MAXLAYER|Silk|Rats)");
 
-Select which layer is the current layer.
+N_("Select which layer is the current layer.");
 
    The specified layer becomes the currently active layer.  It is made
 visible if it is not already visible
@@ -1709,7 +1978,7 @@ visible if it is not already visible
 
 File: pcb.info,  Node: gtk SetUnits Action,  Next: gtk SwapSides Action,  Prev: gtk SelectLayer Action,  Up: gtk actions
 
-F.3.15 gtk SetUnits
+G.3.15 gtk SetUnits
 -------------------
 
 SetUnits(mm|mil)
@@ -1726,7 +1995,7 @@ N_("Set the default measurement units.");
 
 File: pcb.info,  Node: gtk SwapSides Action,  Next: gtk ToggleView Action,  Prev: gtk SetUnits Action,  Up: gtk actions
 
-F.3.16 gtk SwapSides
+G.3.16 gtk SwapSides
 --------------------
 
 SwapSides(|v|h|r)
@@ -1762,14 +2031,14 @@ side" of the board.
 
 File: pcb.info,  Node: gtk ToggleView Action,  Next: gtk Zoom Action,  Prev: gtk SwapSides Action,  Up: gtk actions
 
-F.3.17 gtk ToggleView
+G.3.17 gtk ToggleView
 ---------------------
 
-ToggleView(1..MAXLAYER)
+    N_("ToggleView(1..MAXLAYER)
 ToggleView(layername)
-ToggleView(Silk|Rats|Pins|Vias|Mask|BackSide)
+ToggleView(Silk|Rats|Pins|Vias|Mask|BackSide)");
 
-Toggle the visibility of the specified layer or layer group.
+N_("Toggle the visibility of the specified layer or layer group.");
 
    If you pass an integer, that layer is specified by index (the first
 layer is `1', etc).  If you pass a layer name, that layer is specified
@@ -1783,7 +2052,7 @@ same as a special layer, the layer is chosen over the special layer.
 
 File: pcb.info,  Node: gtk Zoom Action,  Prev: gtk ToggleView Action,  Up: gtk actions
 
-F.3.18 gtk Zoom
+G.3.18 gtk Zoom
 ---------------
 
 Zoom()
@@ -1820,7 +2089,7 @@ The FACTOR is a floating point number, such as `1.5' or `0.75'.
 
 File: pcb.info,  Node: lesstif actions,  Prev: gtk actions,  Up: Action Reference
 
-F.4 lesstif actions
+G.4 lesstif actions
 ===================
 
 * Menu:
@@ -1857,7 +2126,7 @@ F.4 lesstif actions
 
 File: pcb.info,  Node: lesstif About Action,  Next: lesstif AdjustSizes Action,  Up: lesstif actions
 
-F.4.1 lesstif About
+G.4.1 lesstif About
 -------------------
 
 About()
@@ -1870,7 +2139,7 @@ they're running.
 
 File: pcb.info,  Node: lesstif AdjustSizes Action,  Next: lesstif AdjustStyle Action,  Prev: lesstif About Action,  Up: lesstif actions
 
-F.4.2 lesstif AdjustSizes
+G.4.2 lesstif AdjustSizes
 -------------------------
 
 AdjustSizes()
@@ -1885,7 +2154,7 @@ parameters, and text scale.
 
 File: pcb.info,  Node: lesstif AdjustStyle Action,  Next: lesstif Benchmark Action,  Prev: lesstif AdjustSizes Action,  Up: lesstif actions
 
-F.4.3 lesstif AdjustStyle
+G.4.3 lesstif AdjustStyle
 -------------------------
 
 AdjustStyle()
@@ -1895,7 +2164,7 @@ Displays the route style adjustment window.
 
 File: pcb.info,  Node: lesstif Benchmark Action,  Next: lesstif Command Action,  Prev: lesstif AdjustStyle Action,  Up: lesstif actions
 
-F.4.4 lesstif Benchmark
+G.4.4 lesstif Benchmark
 -----------------------
 
 Benchmark()
@@ -1909,7 +2178,7 @@ It reports the amount of time needed to draw the screen once.
 
 File: pcb.info,  Node: lesstif Command Action,  Next: lesstif Cursor Action,  Prev: lesstif Benchmark Action,  Up: lesstif actions
 
-F.4.5 lesstif Command
+G.4.5 lesstif Command
 ---------------------
 
 Command()
@@ -1919,12 +2188,10 @@ Displays the command line input window.
    The command window allows the user to manually enter actions to be
 executed.  Action syntax can be done one of two ways:
 
-`'
-     Follow the action name by an open parenthesis, arguments separated
+   * Follow the action name by an open parenthesis, arguments separated
      by commas, end with a close parenthesis.  Example: `Abc(1,2,3)'
 
-`'
-     Separate the action name and arguments by spaces.  Example: `Abc 1
+   * Separate the action name and arguments by spaces.  Example: `Abc 1
      2 3'.
 
 
@@ -1947,7 +2214,7 @@ entering the command you were entering before.
 
 File: pcb.info,  Node: lesstif Cursor Action,  Next: lesstif Debug Action,  Prev: lesstif Command Action,  Up: lesstif actions
 
-F.4.6 lesstif Cursor
+G.4.6 lesstif Cursor
 --------------------
 
 Cursor(Type,DeltaUp,DeltaRight,Units)
@@ -1985,7 +2252,7 @@ mouse cursor to move to be above the crosshair.
 
 File: pcb.info,  Node: lesstif Debug Action,  Next: lesstif DebugXY Action,  Prev: lesstif Cursor Action,  Up: lesstif actions
 
-F.4.7 lesstif Debug
+G.4.7 lesstif Debug
 -------------------
 
 Debug(...)
@@ -1998,7 +2265,7 @@ arguments to stdout.
 
 File: pcb.info,  Node: lesstif DebugXY Action,  Next: lesstif DoWindows Action,  Prev: lesstif Debug Action,  Up: lesstif actions
 
-F.4.8 lesstif DebugXY
+G.4.8 lesstif DebugXY
 ---------------------
 
 DebugXY(...)
@@ -2012,7 +2279,7 @@ on one.
 
 File: pcb.info,  Node: lesstif DoWindows Action,  Next: lesstif DumpKeys Action,  Prev: lesstif DebugXY Action,  Up: lesstif actions
 
-F.4.9 lesstif DoWindows
+G.4.9 lesstif DoWindows
 -----------------------
 
 DoWindows(1|2|3|4)
@@ -2041,7 +2308,7 @@ Open various GUI windows.
 
 File: pcb.info,  Node: lesstif DumpKeys Action,  Next: lesstif EditLayerGroups Action,  Prev: lesstif DoWindows Action,  Up: lesstif actions
 
-F.4.10 lesstif DumpKeys
+G.4.10 lesstif DumpKeys
 -----------------------
 
 DumpKeys()
@@ -2057,7 +2324,7 @@ this:
 
 File: pcb.info,  Node: lesstif EditLayerGroups Action,  Next: lesstif Export Action,  Prev: lesstif DumpKeys Action,  Up: lesstif actions
 
-F.4.11 lesstif EditLayerGroups
+G.4.11 lesstif EditLayerGroups
 ------------------------------
 
 EditLayerGroups()
@@ -2074,7 +2341,7 @@ to specify which groups represent the top and bottom of the board.
 
 File: pcb.info,  Node: lesstif Export Action,  Next: lesstif GetXY Action,  Prev: lesstif EditLayerGroups Action,  Up: lesstif actions
 
-F.4.12 lesstif Export
+G.4.12 lesstif Export
 ---------------------
 
 Export()
@@ -2087,7 +2354,7 @@ that exporter's options, and exports the layout.
 
 File: pcb.info,  Node: lesstif GetXY Action,  Next: lesstif ImportGUI Action,  Prev: lesstif Export Action,  Up: lesstif actions
 
-F.4.13 lesstif GetXY
+G.4.13 lesstif GetXY
 --------------------
 
 GetXY()
@@ -2099,7 +2366,7 @@ Get a coordinate.
 
 File: pcb.info,  Node: lesstif ImportGUI Action,  Next: lesstif LibraryShow Action,  Prev: lesstif GetXY Action,  Up: lesstif actions
 
-F.4.14 lesstif ImportGUI
+G.4.14 lesstif ImportGUI
 ------------------------
 
 ImportGUI()
@@ -2113,7 +2380,7 @@ future imports.
 
 File: pcb.info,  Node: lesstif LibraryShow Action,  Next: lesstif Load Action,  Prev: lesstif ImportGUI Action,  Up: lesstif actions
 
-F.4.15 lesstif LibraryShow
+G.4.15 lesstif LibraryShow
 --------------------------
 
 LibraryShow()
@@ -2123,7 +2390,7 @@ Displays the library window.
 
 File: pcb.info,  Node: lesstif Load Action,  Next: lesstif LoadVendor Action,  Prev: lesstif LibraryShow Action,  Up: lesstif actions
 
-F.4.16 lesstif Load
+G.4.16 lesstif Load
 -------------------
 
 Load()
@@ -2140,7 +2407,7 @@ that filename.
 
 File: pcb.info,  Node: lesstif LoadVendor Action,  Next: lesstif NetlistShow Action,  Prev: lesstif Load Action,  Up: lesstif actions
 
-F.4.17 lesstif LoadVendor
+G.4.17 lesstif LoadVendor
 -------------------------
 
 LoadVendor()
@@ -2153,7 +2420,7 @@ is called (*note LoadVendorFrom Action::) to load that vendor file.
 
 File: pcb.info,  Node: lesstif NetlistShow Action,  Next: lesstif Print Action,  Prev: lesstif LoadVendor Action,  Up: lesstif actions
 
-F.4.18 lesstif NetlistShow
+G.4.18 lesstif NetlistShow
 --------------------------
 
 NetlistShow(pinname|netname)
@@ -2163,7 +2430,7 @@ Selects the given pinname or netname in the netlist window.
 
 File: pcb.info,  Node: lesstif Print Action,  Next: lesstif PrintCalibrate Action,  Prev: lesstif NetlistShow Action,  Up: lesstif actions
 
-F.4.19 lesstif Print
+G.4.19 lesstif Print
 --------------------
 
 Print()
@@ -2176,7 +2443,7 @@ options, and print the layout.
 
 File: pcb.info,  Node: lesstif PrintCalibrate Action,  Next: lesstif PromptFor Action,  Prev: lesstif Print Action,  Up: lesstif actions
 
-F.4.20 lesstif PrintCalibrate
+G.4.20 lesstif PrintCalibrate
 -----------------------------
 
 PrintCalibrate()
@@ -2189,7 +2456,7 @@ the measurements in, so that future printouts will be more precise.
 
 File: pcb.info,  Node: lesstif PromptFor Action,  Next: lesstif Return Action,  Prev: lesstif PrintCalibrate Action,  Up: lesstif actions
 
-F.4.21 lesstif PromptFor
+G.4.21 lesstif PromptFor
 ------------------------
 
 PromptFor([message[,default]])
@@ -2204,7 +2471,7 @@ stdout.
 
 File: pcb.info,  Node: lesstif Return Action,  Next: lesstif Save Action,  Prev: lesstif PromptFor Action,  Up: lesstif actions
 
-F.4.22 lesstif Return
+G.4.22 lesstif Return
 ---------------------
 
 Return(0|1)
@@ -2217,7 +2484,7 @@ passed a 1, does nothing but pretends to fail.
 
 File: pcb.info,  Node: lesstif Save Action,  Next: lesstif SelectLayer Action,  Prev: lesstif Return Action,  Up: lesstif actions
 
-F.4.23 lesstif Save
+G.4.23 lesstif Save
 -------------------
 
 Save()
@@ -2235,7 +2502,7 @@ filename to save, and then `SaveTo' is called with that filename.
 
 File: pcb.info,  Node: lesstif SelectLayer Action,  Next: lesstif SetUnits Action,  Prev: lesstif Save Action,  Up: lesstif actions
 
-F.4.24 lesstif SelectLayer
+G.4.24 lesstif SelectLayer
 --------------------------
 
 SelectLayer(1..MAXLAYER|Silk|Rats)
@@ -2248,7 +2515,7 @@ visible if it is not already visible
 
 File: pcb.info,  Node: lesstif SetUnits Action,  Next: lesstif SwapSides Action,  Prev: lesstif SelectLayer Action,  Up: lesstif actions
 
-F.4.25 lesstif SetUnits
+G.4.25 lesstif SetUnits
 -----------------------
 
 SetUnits(mm|mil)
@@ -2265,7 +2532,7 @@ Set the default measurement units.
 
 File: pcb.info,  Node: lesstif SwapSides Action,  Next: lesstif ToggleView Action,  Prev: lesstif SetUnits Action,  Up: lesstif actions
 
-F.4.26 lesstif SwapSides
+G.4.26 lesstif SwapSides
 ------------------------
 
 SwapSides(|v|h|r)
@@ -2301,7 +2568,7 @@ side" of the board.
 
 File: pcb.info,  Node: lesstif ToggleView Action,  Next: lesstif Zoom Action,  Prev: lesstif SwapSides Action,  Up: lesstif actions
 
-F.4.27 lesstif ToggleView
+G.4.27 lesstif ToggleView
 -------------------------
 
 ToggleView(1..MAXLAYER)
@@ -2322,7 +2589,7 @@ same as a special layer, the layer is chosen over the special layer.
 
 File: pcb.info,  Node: lesstif Zoom Action,  Prev: lesstif ToggleView Action,  Up: lesstif actions
 
-F.4.28 lesstif Zoom
+G.4.28 lesstif Zoom
 -------------------
 
 Zoom()
@@ -2361,7 +2628,7 @@ floating point number, such as `1.5' or `0.75'.
 
 File: pcb.info,  Node: Glossary,  Next: Index,  Prev: Action Reference,  Up: Top
 
-Appendix G Glossary
+Appendix H Glossary
 *******************
 
 Footprint
@@ -2387,7 +2654,7 @@ Thermal, Thermal Relief
      pin on the left is connected to the polygon using a solid
      connection with no thermal relief, the middle pin is connected
      using a thermal, while the pin on the right has no connection to
-     the polygon.  In PCB, the "Thermal" Tool is used to make both a
+     the polygon.  In `Pcb', the "Thermal" Tool is used to make both a
      solid connection and one with thermal relief (see *note Polygon
      Objects::).
 
@@ -2491,10 +2758,10 @@ Index of Actions, Commands and Options
 * Menu:
 
 * -- basename <string>:                  nelma Options.       (line   6)
-* --action-script <string>:              General Options.     (line  47)
-* --action-string <string>:              General Options.     (line  50)
+* --action-script <string>:              General Options.     (line  79)
+* --action-string <string>:              General Options.     (line  82)
 * --align-marks:                         Postscript Export.   (line  12)
-* --alignment-distance <num>:            Sizes.               (line  64)
+* --alignment-distance <num>:            Sizes.               (line  66)
 * --all-direction-lines:                 General GUI Options. (line  35)
 * --all-layers:                          Gerber Export.       (line   9)
 * --as-shown <1>:                        PNG Options.         (line  23)
@@ -2502,12 +2769,14 @@ Index of Actions, Commands and Options
                                                               (line  13)
 * --auto-mirror:                         Postscript Export.   (line  25)
 * --background-color <string>:           Colors.              (line  12)
-* --backup-interval:                     General Options.     (line  30)
+* --backup-interval:                     General Options.     (line  62)
 * --bg-image <string> <1>:               lesstif GUI Options. (line   9)
 * --bg-image <string>:                   GTK+ GUI Options.    (line   9)
 * --black-color <string>:                Colors.              (line   6)
 * --bloat <num>:                         DRC Options.         (line   9)
 * --bomfile <string>:                    BOM Creation.        (line   6)
+* --clear-increment-mil <string>:        General Options.     (line  46)
+* --clear-increment-mm <string>:         General Options.     (line  30)
 * --clear-line:                          General GUI Options. (line  21)
 * --connected-color <string>:            Colors.              (line  54)
 * --copper-height <num>:                 nelma Options.       (line  12)
@@ -2515,8 +2784,8 @@ Index of Actions, Commands and Options
 * --cross-color <string>:                Colors.              (line  18)
 * --crosshair-color <string>:            Colors.              (line  15)
 * --default-font <string>:               Paths.               (line  12)
-* --default-PCB-height <num>:            Sizes.               (line  57)
-* --default-PCB-width <num>:             Sizes.               (line  54)
+* --default-PCB-height <num>:            Sizes.               (line  59)
+* --default-PCB-width <num>:             Sizes.               (line  56)
 * --dpi:                                 PNG Options.         (line   9)
 * --dpi <num>:                           nelma Options.       (line   9)
 * --draw-grid:                           General GUI Options. (line  18)
@@ -2525,30 +2794,34 @@ Index of Actions, Commands and Options
 * --dump-actions:                        General Options.     (line  24)
 * --element-color <string>:              Colors.              (line  36)
 * --element-command <string>:            Commands.            (line  17)
-* --element-path <string>:               General Options.     (line  42)
+* --element-path <string>:               General Options.     (line  74)
 * --element-selected-color <string>:     Colors.              (line  48)
 * --eps-file <string>:                   Encapsulated Postscript Export.
                                                               (line   6)
 * --eps-scale <num>:                     Encapsulated Postscript Export.
                                                               (line  10)
-* --fab-author <string>:                 General Options.     (line  53)
+* --fab-author <string>:                 General Options.     (line  85)
 * --file-command <string>:               Commands.            (line  14)
 * --file-path <string>:                  Paths.               (line  15)
+* --fill-holes:                          PNG Options.         (line  35)
 * --fill-page:                           Postscript Export.   (line  22)
 * --font-command <string>:               Commands.            (line  11)
 * --font-path <string>:                  Paths.               (line  20)
-* --format <string>:                     PNG Options.         (line  35)
+* --format <string>:                     PNG Options.         (line  38)
+* --found-color <string>:                Colors.              (line  57)
 * --full-poly:                           General GUI Options. (line  24)
 * --gerberfile <string>:                 Gerber Export.       (line   6)
-* --grid <num>:                          Sizes.               (line  68)
-* --grid-color <string>:                 Colors.              (line  60)
+* --grid <num>:                          Sizes.               (line  70)
+* --grid-color <string>:                 Colors.              (line  63)
+* --grid-increment-mil <string>:         General Options.     (line  50)
+* --grid-increment-mm <string>:          General Options.     (line  34)
 * --grid-units-mm <string>:              General Options.     (line  27)
-* --groups <string>:                     General Options.     (line  34)
+* --groups <string>:                     General Options.     (line  66)
 * --help:                                General Options.     (line   6)
 * --invisible-mark-color <string>:       Colors.              (line  45)
 * --invisible-objects-color <string>:    Colors.              (line  42)
-* --keepaway <num>:                      Sizes.               (line  50)
-* --layer-color-<n> <string>:            Colors.              (line  63)
+* --keepaway <num>:                      Sizes.               (line  52)
+* --layer-color-<n> <string>:            Colors.              (line  66)
 * --layer-name-1 <string>:               Layer Names.         (line   6)
 * --layer-name-2 <string>:               Layer Names.         (line   9)
 * --layer-name-3 <string>:               Layer Names.         (line  12)
@@ -2557,42 +2830,48 @@ Index of Actions, Commands and Options
 * --layer-name-6 <string>:               Layer Names.         (line  21)
 * --layer-name-7 <string>:               Layer Names.         (line  24)
 * --layer-name-8 <string>:               Layer Names.         (line  27)
-* --layer-selected-color-<n> <string>:   Colors.              (line  66)
-* --layer-stack <string>:                General Options.     (line  56)
+* --layer-selected-color-<n> <string>:   Colors.              (line  69)
+* --layer-stack <string>:                General Options.     (line  88)
 * --lib-command <string>:                Commands.            (line  27)
 * --lib-command-dir <string>:            Commands.            (line  24)
 * --lib-contents-command <string>:       Commands.            (line  31)
 * --lib-name <string>:                   Paths.               (line   9)
 * --lib-newlib <string>:                 Paths.               (line   6)
 * --lib-path <string>:                   Paths.               (line  24)
+* --line-increment-mil <string>:         General Options.     (line  54)
+* --line-increment-mm <string>:          General Options.     (line  38)
 * --line-thickness <num>:                Sizes.               (line  42)
 * --listen <1>:                          lesstif GUI Options. (line   6)
 * --listen:                              GTK+ GUI Options.    (line   6)
 * --lprcommand <string>:                 lpr Printing Options.
                                                               (line   6)
-* --mask-color <string>:                 Colors.              (line  73)
+* --mask-color <string>:                 Colors.              (line  76)
 * --media <media-name>:                  Postscript Export.   (line  37)
+* --metric:                              Gerber Export.       (line  15)
 * --min-drill <num>:                     DRC Options.         (line  21)
 * --min-ring <num>:                      DRC Options.         (line  24)
 * --min-silk <num>:                      DRC Options.         (line  18)
 * --min-width <num>:                     DRC Options.         (line  15)
-* --minimum polygon area <num>:          Sizes.               (line  71)
+* --minimum polygon area <num>:          Sizes.               (line  73)
 * --mirror:                              Postscript Export.   (line  19)
 * --monochrome <1>:                      PNG Options.         (line  26)
 * --monochrome:                          Encapsulated Postscript Export.
                                                               (line  16)
 * --multi-file:                          Postscript Export.   (line  51)
-* --off-limit-color <string>:            Colors.              (line  57)
+* --off-limit-color <string>:            Colors.              (line  60)
+* --only-visible <1>:                    PNG Options.         (line  29)
 * --only-visible:                        Encapsulated Postscript Export.
                                                               (line  19)
-* --only-vivible:                        PNG Options.         (line  29)
 * --outfile <string>:                    PNG Options.         (line   6)
 * --outline:                             Postscript Export.   (line  16)
 * --pcb-menu <string> <1>:               lesstif GUI Options. (line  15)
 * --pcb-menu <string>:                   GTK+ GUI Options.    (line  15)
-* --photo-flip-x:                        PNG Options.         (line  48)
-* --photo-flip-y:                        PNG Options.         (line  52)
-* --photo-mode:                          PNG Options.         (line  45)
+* --photo-flip-x:                        PNG Options.         (line  51)
+* --photo-flip-y:                        PNG Options.         (line  55)
+* --photo-mask-colour <colour>:          PNG Options.         (line  59)
+* --photo-mode:                          PNG Options.         (line  48)
+* --photo-plating:                       PNG Options.         (line  63)
+* --photo-silk-colour:                   PNG Options.         (line  68)
 * --pin-color <string>:                  Colors.              (line  27)
 * --pin-name-color <string>:             Colors.              (line  33)
 * --pin-selected-color <string>:         Colors.              (line  30)
@@ -2600,7 +2879,7 @@ Index of Actions, Commands and Options
 * --pinout-offset-y <num>:               General GUI Options. (line   9)
 * --pinout-text-offset-x <num>:          General GUI Options. (line  12)
 * --pinout-text-offset-y <num>:          General GUI Options. (line  15)
-* --png-bloat <num><dim>:                PNG Options.         (line  39)
+* --png-bloat <num><dim>:                PNG Options.         (line  42)
 * --print-file <string>:                 Commands.            (line  21)
 * --ps-bloat <num>:                      Postscript Export.   (line  31)
 * --ps-color:                            Postscript Export.   (line  28)
@@ -2610,23 +2889,25 @@ Index of Actions, Commands and Options
 * --rat-color <string>:                  Colors.              (line  39)
 * --rat-command <string>:                Commands.            (line  39)
 * --rat-selected-color <string>:         Colors.              (line  51)
-* --rat-thickness <num>:                 Sizes.               (line  45)
-* --reset-after-element:                 General Options.     (line  68)
-* --ring-bell-finished:                  General Options.     (line  72)
-* --route-styles <string>:               General Options.     (line  37)
+* --rat-thickness <num><unit>:           Sizes.               (line  45)
+* --reset-after-element:                 General Options.     (line 100)
+* --ring-bell-finished:                  General Options.     (line 104)
+* --route-styles <string>:               General Options.     (line  69)
 * --save-command <string>:               Commands.            (line  36)
-* --save-in-tmp:                         General Options.     (line  63)
-* --save-last-command:                   General Options.     (line  60)
+* --save-in-tmp:                         General Options.     (line  95)
+* --save-last-command:                   General Options.     (line  92)
 * --scale <num>:                         Postscript Export.   (line  47)
 * --show-actions:                        General Options.     (line  21)
 * --show-defaults:                       General Options.     (line  18)
 * --show-legend:                         Postscript Export.   (line  64)
 * --show-number:                         General GUI Options. (line  38)
 * --shrink <num>:                        DRC Options.         (line  12)
+* --size-increment-mil <string>:         General Options.     (line  58)
+* --size-increment-mm <string>:          General Options.     (line  42)
 * --snap-pin:                            General GUI Options. (line  31)
 * --substrate-epsilon <num>:             nelma Options.       (line  18)
 * --substrate-height <num>:              nelma Options.       (line  15)
-* --text-scale <num>:                    Sizes.               (line  60)
+* --text-scale <num>:                    Sizes.               (line  62)
 * --unique-names:                        General GUI Options. (line  27)
 * --use-alpha:                           PNG Options.         (line  32)
 * --verbose <1>:                         Gerber Export.       (line  12)
@@ -2636,7 +2917,7 @@ Index of Actions, Commands and Options
 * --via-drilling-hole <num>:             Sizes.               (line  39)
 * --via-selected-color <string>:         Colors.              (line  24)
 * --via-thickness <num>:                 Sizes.               (line  36)
-* --warn-color <string>:                 Colors.              (line  70)
+* --warn-color <string>:                 Colors.              (line  73)
 * --x-max:                               PNG Options.         (line  13)
 * --xcalib <num>:                        Postscript Export.   (line  55)
 * --xy-max:                              PNG Options.         (line  19)
@@ -2653,7 +2934,7 @@ Index of Actions, Commands and Options
 * :s:                                    User Commands.       (line  55)
 * :w[q]:                                 User Commands.       (line  71)
 * AddRats():                             Actions.             (line  27)
-* ApplyVendor() <1>:                     ApplyVendor Action.  (line   8)
+* ApplyVendor() <1>:                     ApplyVendor Action.  (line   9)
 * ApplyVendor():                         Actions.             (line  54)
 * Atomic():                              Actions.             (line  58)
 * Bell():                                Actions.             (line  68)
@@ -2729,6 +3010,8 @@ Index of Concepts
 * alignment:                             Resources.           (line  13)
 * alignment targets:                     Printing.            (line  47)
 * Alpha:                                 DEC Alpha.           (line   6)
+* annotation file format:                Annotation File Format.
+                                                              (line   6)
 * arc:                                   Arc Objects.         (line   6)
 * arc, an example:                       Arcs.                (line   6)
 * architecture <1>:                      Linux.               (line   6)
@@ -2743,8 +3026,10 @@ Index of Concepts
 * ASCII files, format of:                File Formats.        (line   6)
 * Atari version:                         History.             (line   6)
 * atomic:                                Actions.             (line  58)
-* auto-router:                           Menu.                (line 121)
+* auto-router:                           Menu.                (line 119)
 * autorouter:                            Autorouter.          (line   6)
+* backannotation file format:            Annotation File Format.
+                                                              (line   6)
 * background:                            Resources.           (line  21)
 * backup <1>:                            Resources.           (line  43)
 * backup:                                Loading and Saving.  (line  18)
@@ -2754,7 +3039,7 @@ Index of Concepts
 * bom:                                   bom.                 (line   6)
 * buffer, an example:                    Pastebuffer.         (line   6)
 * buffer, convert contents to element:   Elements.            (line  59)
-* Buffer, popup menu:                    Menu.                (line 109)
+* Buffer, popup menu:                    Menu.                (line 107)
 * buffer, selecting a:                   Actions.             (line 355)
 * button translations:                   Actions.             (line   6)
 * cat:                                   Resources.           (line  93)
@@ -2762,7 +3047,7 @@ Index of Concepts
 * centroid file format:                  Centroid File Format.
                                                               (line   6)
 * centroid file, algorithms:             Centroid File Format.
-                                                              (line  37)
+                                                              (line  35)
 * change active layer:                   Layer Controls.      (line   6)
 * change drawing layer:                  Actions.             (line 503)
 * change object name:                    Actions.             (line 107)
@@ -2792,7 +3077,7 @@ Index of Concepts
 * connections, reseting:                 Actions.             (line 167)
 * connections, reseting after element:   Resources.           (line 255)
 * connections, searching for:            Actions.             (line 167)
-* Connects, popup menu:                  Menu.                (line 121)
+* Connects, popup menu:                  Menu.                (line 119)
 * copy an object:                        Translations.        (line  40)
 * copying objects:                       Actions.             (line 355)
 * copying, an example:                   Moving and Copying.  (line   6)
@@ -2808,7 +3093,7 @@ Index of Concepts
 * default library:                       Resources.           (line 179)
 * default text scaling:                  Resources.           (line 313)
 * default translations:                  Translations.        (line   6)
-* design rule checker, invoking:         Menu.                (line 121)
+* design rule checker, invoking:         Menu.                (line 119)
 * design rule checking <1>:              Actions.             (line 234)
 * design rule checking:                  Design Rule Checking.
                                                               (line   6)
@@ -2818,7 +3103,7 @@ Index of Concepts
 * dispersing elements:                   Actions.             (line 193)
 * display:                               Resources.           (line 307)
 * displaying element names <1>:          Actions.             (line 199)
-* displaying element names:              Menu.                (line  49)
+* displaying element names:              Menu.                (line  60)
 * displaying pinout:                     Actions.             (line 199)
 * displaying status information:         Status-line and Input-field.
                                                               (line   6)
@@ -2831,7 +3116,7 @@ Index of Concepts
 * drc:                                   Design Rule Checking.
                                                               (line   6)
 * drill:                                 Actions.             (line 434)
-* drill report:                          Menu.                (line 143)
+* drill report:                          Menu.                (line 141)
 * drill sizes, list of standard:         Standard Drill Sizes.
                                                               (line   6)
 * Drill table:                           Vendor drill mapping.
@@ -2849,8 +3134,8 @@ Index of Concepts
 * element, command:                      Resources.           (line  74)
 * element, creating a new package:       Elements.            (line  59)
 * element, display names of <1>:         Actions.             (line 199)
-* element, display names of:             Menu.                (line  49)
-* element, editing:                      Menu.                (line 109)
+* element, display names of:             Menu.                (line  60)
+* element, editing:                      Menu.                (line 107)
 * element, file format:                  Element File.        (line   6)
 * element, files:                        Resources.           (line  74)
 * element, loading to buffer:            User Commands.       (line  39)
@@ -2894,7 +3179,7 @@ Index of Concepts
                                                               (line   6)
 * file load command:                     Resources.           (line  93)
 * file save command:                     Resources.           (line 278)
-* File sytax:                            File Syntax.         (line   6)
+* File syntax:                           File Syntax.         (line   6)
 * File, popup menu:                      Menu.                (line  27)
 * flags, changing:                       Actions.             (line  93)
 * flags, clearing:                       Actions.             (line 154)
@@ -2922,9 +3207,9 @@ Index of Concepts
 * grid:                                  Layout Area.         (line   6)
 * grid color:                            Resources.           (line 133)
 * grid, absolute and relative:           Actions.             (line 199)
-* grid, alignment:                       Menu.                (line  49)
+* grid, alignment:                       Menu.                (line  60)
 * grid, display <1>:                     Actions.             (line 199)
-* grid, display:                         Menu.                (line  49)
+* grid, display:                         Menu.                (line  60)
 * grid, setting of:                      Actions.             (line 477)
 * groups:                                Resources.           (line 151)
 * groups, editing of:                    Actions.             (line 250)
@@ -2935,7 +3220,7 @@ Index of Concepts
 * HP:                                    HP.                  (line   6)
 * image export:                          png.                 (line   6)
 * index of terms:                        Glossary.            (line   6)
-* Info, popup menu:                      Menu.                (line 143)
+* Info, popup menu:                      Menu.                (line 141)
 * information about objects:             Actions.             (line 434)
 * input-field, position of:              Status-line and Input-field.
                                                               (line   6)
@@ -3031,7 +3316,7 @@ Index of Concepts
 * Netlist Window:                        Netlist Window.      (line   6)
 * netlist, file format:                  Netlist File.        (line   6)
 * netlist, reading:                      Netlist File.        (line   6)
-* object report:                         Menu.                (line 143)
+* object report:                         Menu.                (line 141)
 * object, change name of:                Actions.             (line 107)
 * object, changing the size of an:       Common.              (line   6)
 * object, copy an:                       Translations.        (line  40)
@@ -3064,7 +3349,7 @@ Index of Concepts
                                                               (line   6)
 * pastebuffer, an example:               Pastebuffer.         (line   6)
 * pastebuffer, convert contents to element: Elements.         (line  59)
-* pastebuffer, popup menu:               Menu.                (line 109)
+* pastebuffer, popup menu:               Menu.                (line 107)
 * pastebuffer, selecting a:              Actions.             (line 355)
 * path for element files:                Resources.           (line  85)
 * path for font files:                   Resources.           (line 124)
@@ -3074,7 +3359,10 @@ Index of Concepts
 * PC UNIX <2>:                           Linux.               (line   6)
 * PC UNIX:                               SCO.                 (line   6)
 * PCB, an overview:                      Overview.            (line   6)
-* photo-mode:                            PNG Options.         (line  45)
+* photo-mask-colour:                     PNG Options.         (line  59)
+* photo-mode:                            PNG Options.         (line  48)
+* photo-plating:                         PNG Options.         (line  63)
+* photo-silk-colour:                     PNG Options.         (line  68)
 * pin color:                             Resources.           (line 208)
 * pin, name of:                          Resources.           (line 217)
 * pin/pad names, changing:               Actions.             (line 123)
@@ -3133,13 +3421,14 @@ Index of Concepts
                                                               (line   6)
 * removing selected objects:             Actions.             (line 430)
 * report <1>:                            Actions.             (line 434)
-* report:                                Menu.                (line 143)
+* report:                                Menu.                (line 141)
 * reseting found connections <1>:        Actions.             (line 167)
 * reseting found connections:            Resources.           (line 255)
 * resources:                             Resources.           (line   6)
 * rotate:                                Resources.           (line 274)
 * rotating a buffer:                     Actions.             (line 355)
 * rotating printout:                     Printing.            (line  24)
+* Route Styles, popup menu:              Menu.                (line  49)
 * routing style <1>:                     Actions.             (line 440)
 * routing style:                         Resources.           (line 267)
 * rubber band:                           Menu.                (line  79)
@@ -3158,7 +3447,6 @@ Index of Concepts
 * schematic capture:                     Schematic Frontends. (line   6)
 * schematic frontend:                    Schematic Frontends. (line   6)
 * SCO:                                   SCO.                 (line   6)
-* Screen, popup menu:                    Menu.                (line  49)
 * script file, executing:                Actions.             (line 238)
 * scrolling:                             Translations.        (line  21)
 * searching connections:                 Actions.             (line 167)
@@ -3168,10 +3456,10 @@ Index of Concepts
 * searchpath for font files:             Resources.           (line 124)
 * searchpath for layout files:           Resources.           (line 102)
 * searchpath for libraries:              Resources.           (line 184)
-* Select, popup menu:                    Menu.                (line  98)
+* Select, popup menu:                    Menu.                (line  96)
 * selected object, removing an:          Actions.             (line 430)
-* selected objects, changing sizes:      Menu.                (line  98)
-* selected objects, removing:            Menu.                (line  98)
+* selected objects, changing sizes:      Menu.                (line  96)
+* selected objects, removing:            Menu.                (line  96)
 * selecting a buffer:                    Actions.             (line 355)
 * selecting a new tool:                  Tool Selectors.      (line   6)
 * selecting objects:                     Actions.             (line 459)
@@ -3187,10 +3475,9 @@ Index of Concepts
 * size of lines and vias:                Actions.             (line 440)
 * size of vias:                          Resources.           (line 330)
 * sizes, changing of objects:            Actions.             (line  72)
-* Sizes, popup menu:                     Menu.                (line  68)
 * snap to pins:                          Menu.                (line  79)
 * Solaris:                               Sun.                 (line   6)
-* solder mask, viewing and editing:      Menu.                (line  58)
+* solder mask, viewing and editing:      Menu.                (line  69)
 * spacing, minimum:                      Design Rule Checking.
                                                               (line   6)
 * speaker volume:                        Resources.           (line 338)
@@ -3249,7 +3536,7 @@ Index of Concepts
 * vendor drill table <4>:                EnableVendor Action. (line  10)
 * vendor drill table <5>:                DisableVendor Action.
                                                               (line  10)
-* vendor drill table <6>:                ApplyVendor Action.  (line   8)
+* vendor drill table <6>:                ApplyVendor Action.  (line   9)
 * vendor drill table:                    Actions.             (line  54)
 * Vendor drill table:                    Vendor drill mapping.
                                                               (line   6)
@@ -3265,7 +3552,7 @@ Index of Concepts
 * vendor map <4>:                        EnableVendor Action. (line  10)
 * vendor map <5>:                        DisableVendor Action.
                                                               (line  10)
-* vendor map <6>:                        ApplyVendor Action.  (line   8)
+* vendor map <6>:                        ApplyVendor Action.  (line   9)
 * vendor map:                            Actions.             (line  54)
 * vendor map, disabling:                 Actions.             (line 188)
 * vendor map, enabling:                  Actions.             (line 254)
@@ -3283,13 +3570,14 @@ Index of Concepts
 * vias, converting to mounting hole:     Actions.             (line 101)
 * vias, setting of initial size:         Actions.             (line 477)
 * vias, size:                            Resources.           (line 330)
+* View, popup menu:                      Menu.                (line  60)
 * viewing side, changing of:             Actions.             (line 499)
 * volume of speaker:                     Resources.           (line 338)
-* Window, popup menu:                    Menu.                (line 151)
+* Window, popup menu:                    Menu.                (line 149)
 * x-y file format:                       Centroid File Format.
                                                               (line   6)
 * x-y file, algorithms:                  Centroid File Format.
-                                                              (line  37)
+                                                              (line  35)
 * X11:                                   X11 Interface.       (line   6)
 * X11 default translations:              Translations.        (line   6)
 * X11 resources:                         Resources.           (line   6)
@@ -3298,7 +3586,7 @@ Index of Concepts
 * xcircuit, how to interface with:       xcircuit.            (line   6)
 * zoom of Layout area:                   Resources.           (line 347)
 * zoom of pinout window:                 Resources.           (line 234)
-* zoom, setting:                         Menu.                (line  49)
+* zoom, setting:                         Menu.                (line  60)
 * zoom, setting of:                      Actions.             (line 477)
 
 
diff --git a/doc/pcb.pdf b/doc/pcb.pdf
index 9576cc9..aa82dd9 100644
Binary files a/doc/pcb.pdf and b/doc/pcb.pdf differ
diff --git a/doc/pcb.texi b/doc/pcb.texi
index d543a2c..0baf54f 100644
--- a/doc/pcb.texi
+++ b/doc/pcb.texi
@@ -1,5 +1,4 @@
 \input texinfo    @c -*-texinfo-*-
- at comment RCS: $Id$
 @comment %**start of header
 @setfilename pcb.info
 @settitle Pcb
@@ -85,6 +84,7 @@ board layout system.
 * Regular Expressions::    Searching for elements with regular expressions
 * Standard Drill Sizes::   Tables of standard drill sizes
 * Centroid File Format::   Details of the centroid (x-y) output file
+* Annotation File Format:: Details of the back annotation output file
 * Action Reference::       Documentation for all available actions
 * Glossary::               Glossary
 * Index::                  The Index.
@@ -146,7 +146,7 @@ a polygon.  A variety of other enhancements including a Gerber RS-274X
 driver and NC drill file generation have also been added.
 
 Release 1.6 provides automatic screen updates of changed regions.
-This should eliminate most of the need for the redraw ((@emph{R} key).
+This should eliminate most of the need for the redraw (@emph{R} key).
 Also some changes to what order items under the cursor are selected
 were made for better consistency - it is no longer possible to
 accidentally move a line or line point that is completely obscured
@@ -520,7 +520,7 @@ and a new line started where the first one ended.
 You can abandon the new starting point in favor
 of another by pressing @emph{Ctrl-Btn1}, or
 @emph{Btn3}, but don't use @emph{Btn2}.
-The undo function (@emph{U} key or @samp{undo last operation}
+The undo function (@emph{U} key or @samp{Undo}
 from the @b{Edit} menu) will take you back
 point by point if you use it while in the line mode.
 
@@ -553,7 +553,7 @@ polygon creating a clearance, or touch the polygon. This behavior is
 selectable in the @b{Settings} menu for new lines. To change the
 behavior of an existing line, hit the @emph{J} key with the cross hair
 over the line. You can increase the size of the clearance by 2 mils on
-each edge with the with the
+each edge with the
 @emph{K} key. @emph{Shift-K} will decrease the clearance by 2 mils.
 The increment may be changed from 2 mils through the application
 resource file.
@@ -587,7 +587,7 @@ starting point is established at the end point.
 
 Whenever a starting point is established
 by either the Line or Arc tools it will be retained if you switch directly between the
-tools (e.g. @emph{F2} key for Lines, @emph{F8} key for Arcs. Arcs can either touch or
+tools (e.g. @emph{F2} key for Lines, @emph{F8} key for Arcs). Arcs can either touch or
 clear polygons just like lines do. Of course connection
 searches, undo and all the other features you'd expect work with arcs too.
 
@@ -723,6 +723,7 @@ if that works, then @pcb{} hasn't been installed properly.
 * Loading and Saving::
 * Printing::               Creating Gerber files or postscript files
 * Exporting::              Exporting a layout.
+* Connection Lists::       How to get a list of all or some connections.
 * Arrow Tool::             Selecting/Moving objects.
 * Rats Nest::		   Helps you place and route tracks against a netlist.
 * Design Rule Checking::   Check for manufactureability
@@ -730,7 +731,6 @@ if that works, then @pcb{} hasn't been installed properly.
 * Searching for elements:: Searching for elements
 * Measuring distances::    Measuring distances
 * Vendor drill mapping::   Mapping drills to a vendor specified list
-* Connection Lists::       How to get a list of all or some connections.
 @end menu
 
 
@@ -784,10 +784,11 @@ This menu offers a choice of loading, saving and printing data, saving
 connection information to a file or quitting the application. Most
 of the entries in the @b{File} menu are self explanatory.
 Selecting
- at samp{print layout} pops up a printer control dialog.
-A selection of several device drivers is available from the printer control
-dialog. Presently @emph{PostScript}, @emph{encapsulated PostScript},
-and @emph{GerberX} are supported. The @emph{GerberX} driver produces
+ at samp{Print...} pops up a printer control dialog.
+Several output formats are available from the @samp{Export...} menu item.
+Presently @emph{PostScript}, @emph{encapsulated PostScript},
+and @emph{GerberX} are some of the supported filetypes.
+The @emph{GerberX} driver produces
 all of the files necessary to have the board professionally manufactured.
 The connection saving features in the @b{File} menu produce outputs in an
 arcane format that is not too useful. They do @emph{not} produce netlist
@@ -806,14 +807,24 @@ can also be accomplished with the @emph{U} key and @emph{Shift-R}
 key.  Finally, the @b{Edit} menu allows you to change the names
 of: the layout, the active layer, or text objects on the layout.
 
- at cindex Screen, popup menu
+ at cindex Route Styles, popup menu
+ at item Routes Style
+The @b{Edit} menu allows you to select a group of line thickness, via diameter, via drill
+size, and clearance (keepaway) (collectively called a "routing style") to be copied to the "active" sizes.
+You can also change the names given to the routing styles and adjust their values from
+this menu.  The "active" sizes are also adjustable from this menu.
+The "active" sizes are shown in the status-line and control the initial size of new vias,
+drilling holes, lines, clearances, text-objects and also the maximum dimensions of the
+board layout.
+
+ at cindex View, popup menu
 @cindex displaying element names
 @cindex element, display names of
 @cindex grid, display
 @cindex grid, alignment
 @cindex zoom, setting
- at item Screen
-The @b{Screen} menu supports most functions related to
+ at item View
+The @b{View} menu supports most functions related to
 the whole Layout area. There are various entries to change the grid to some popular
 values, the zoom factor, and which kind of element name is displayed.
 You can also re-align the grid origin and turn on and off the display
@@ -823,26 +834,16 @@ possible so that you're sure the grid
 points appear exactly where you want them.
 
 @cindex solder mask, viewing and editing
-The @b{Screen} menu also allows you to turn on and off the
+The @b{View} menu also allows you to turn on and off the
 visibility of the solder-mask layer. When the solder-mask layer
 is made visible it obscures most of the layout, so only turn
 this on when you really want to know what the solder-mask will
 look like. The solder-mask that you see belongs to the
 side of the board you are viewing, which can be changed with
-the @samp{view solder side} option, also found in the @b{Screen} menu.
+the @samp{Flip up/down} option, also found in the @b{View} menu.
 When the solder-mask is displayed, the pin and pad clearance adjustments
 (@pxref{Line Objects}) alter the size of mask cut-outs.
 
- at cindex Sizes, popup menu
- at item Sizes
-The @b{Sizes} menu allows you to select a group of line thickness, via diameter, via drill
-size, and clearance (keepaway) (collectively called a "routing style") to be copied to the "active" sizes.
-You can also change the names given to the routing styles and adjust their values from
-this menu.  The "active" sizes are also adjustable from this menu.
-The "active" sizes are shown in the status-line and control the initial size of new vias,
-drilling holes, lines, clearances, text-objects and also the maximum dimensions of the
-board layout.
-
 @cindex Settings, popup menu
 @cindex unique names
 @cindex rubber band
@@ -850,10 +851,7 @@ board layout.
 @cindex clearance, for new lines
 @item Settings
 The @b{Settings} menu controls several operating configuration
-parameters. The @samp{edit layer groups} entry brings up a dialog
-that allows you to change the way layers are grouped. Layer grouping
-is described in @ref{Layer Objects}. The @samp{all-direction lines}
-entry controls
+parameters. The @samp{all-direction lines} entry controls
 the clipping of lines to 45-degree angles. You can also control
 whether moving individual objects causes the attached lines to
 "rubber band" with the move or not from the @b{Settings} menu. Another
@@ -891,7 +889,7 @@ by name using unix @ref{Regular Expressions}.
 @item Buffer
 From the @b{Buffer} menu you may select one out of five
 buffers to use, rotate or clear its contents or save the buffer contents
-to a file. You can also use the @samp{break buffer element to pieces} entry
+to a file. You can also use the @samp{break buffer elements to pieces} entry
 to de-compose an element into pieces for editing.
 Note: only objects with visibility turned on are pasted to the layout. If
 you have something in a buffer, then change which side of the board you
@@ -953,7 +951,7 @@ the list of connections desired.
 
 Now that you're familiar with the various menus, it's time
 to try some things out. From the @b{File} menu choose
- at samp{load layout}, navigate to the tutorial folder, then
+ at samp{Open...}, navigate to the tutorial folder, then
 load the file @samp{tut1.pcb}.
 
 
@@ -1293,8 +1291,7 @@ can be used to select (on the layout) everything that is connected
 (or is supposed to be connected) to the net. If you click on a
 connection in the connection list, it will select/deselect
 the corresponding pin or pad in the layout and also center the layout
-window where it is located. If you "Find" (@samp{lookup connection
-to object} in the @b{Connects} menu [also @emph{F} key]), a pin
+window where it is located. If you "Find" (@samp{lookup connection} in the @b{Connects} menu [also @emph{F} key]), a pin
 or pad it will also choose the net and connection in the netlist window
 if it exists in the netlist.
 
@@ -1626,7 +1623,7 @@ the location of the other pins.  Next make a solder-side layer the active
 layer from the @emph{active-layer} popup menu.  Now draw the outline of
 the element using lines and arcs.  When you're done, select everything that
 makes up the element with a box selection (@emph{<Btn3Down> drag,
-<Btn3Up>}). Now select "cut selection to buffer" from the @emph{Buffer}
+<Btn3Up>}). Now select "cut to buffer" from the @emph{Buffer}
 menu. Position the cursor over the center of pin 1 and press the left
 button to load the data into the buffer.
 Finally select "convert buffer to element" from the @emph{Buffer} menu.
@@ -1742,7 +1739,7 @@ Saving also is available from the @emph{File} menu, either with or
 without supplying a filename. @pcb{} reuses the last
 filename if you do not pass a new one to the save routine.
 
-To load an existing layout either select @emph{load layout data} from the
+To load an existing layout either select @emph{Open...} from the
 @emph{File} menu or use @kbd{:l filename}. A file select box pops up if you
 don't specify a filename. Merging existing layouts into the new one is
 supported either by the @emph{File} menu or by @kbd{:m filename}.
@@ -1761,7 +1758,7 @@ has not been saved yet, then the backup file name is @file{PCB.####.backup} wher
 will be replaced by the process ID of the currenting running copy of @pcb{}.
 This default backup file name may be changed at compilation time via the
 @code{BACKUP_NAME}
-variable in @file{globalconfig.h}).  During critical
+variable in @file{globalconfig.h}.  During critical
 sections of the program or when data would be lost it is saved as
 @file{PCB.%i.save}.  This file name may be changed at compile time
 with the @code{SAVE_NAME} variable in @file{globalconfig.h}.
@@ -1790,7 +1787,7 @@ See the page about
 the @emph{Print()} action for additional information about the filenames.
 The control panel offers a number of options. Most of them are not available
 for Gerber output because it wouldn't make sense, for example,  to scale the gerber output
-(you'd get an incorrectly made board!)  The options are:
+(you'd get an incorrectly made board!). The options are:
 
 @table @samp
 @cindex device, selecting an output
@@ -2437,7 +2434,7 @@ steps will autoroute your design.
 @item Turn off visibility of any layers that you don't want the router
 to use.
 
- at item Turn of via visibility if you don't want the router to use any
+ at item Turn off via visibility if you don't want the router to use any
 new vias. 
 
 @item Use only plain rectangles for power/ground planes that you want
@@ -2460,7 +2457,7 @@ new vias.
    use for any nets not having a defined route style in the netlist.
 
 @item Disable any nets that you don't want the autorouter to route
-   (double-click them in the  netlist window to add/remove the *)
+   (double-click them in the  netlist window to add/remove the *).
 
          NOTE: If you will be manually routing these later not using
    planes, it is usually better to let the autorouter route them then rip
@@ -2468,10 +2465,10 @@ new vias.
    manually, consider making it from one or more pure rectangles and
    letting the autorouter have a go at it.
 
- at item Create a fresh rat's nest. ('E' the 'W')
+ at item Create a fresh rat's nest. (@emph{E} then @emph{W})
 
 @item Select ``show autorouter trials'' in the settings menu if you want
-   to watch what's happening
+   to watch what's happening.
 
 @item Choose ``autoroute all rats'' in the connection menu.
 
@@ -2780,7 +2777,7 @@ mode, respectively, which both default to @emph{XtDefaultForeground}.
 @cindex unix command
 @cindex m4
 @item elementCommand (string)
- at pcb{} uses a user defined command to read element files. This resources
+ at pcb{} uses a user defined command to read element files. This resource
 is used to set the command which is executed by the users default shell.
 Two escape sequences are defined to pass the selected filename (%f) and the
 current search path (%p). The command must write the element data
@@ -2876,7 +2873,7 @@ for font files. See also, the resource @emph{fontFile}.
 @cindex grid
 @cindex cursor steps
 @item grid (int)
-This resources defines the initial value of one cursor step. It defaults
+This resource defines the initial value of one cursor step. It defaults
 to @emph{100 mil} and any changes are saved together with the layout data.
 
 @vindex gridColor
@@ -2927,7 +2924,7 @@ resources. The defaults are empty strings.
 @cindex unix command
 @item libraryCommand (string)
 @pcb{} uses a command to read element data from libraries.
-The resources is used to set the command which is executed by the users
+The resource is used to set the command which is executed by the users
 default shell.  Three escape sequences are defined to pass the selected
 filename (%f), the current search path (%p) as well (%a) as the three
 parameters @emph{template}, @emph{value} and @emph{package} to the command.
@@ -3224,7 +3221,7 @@ The value lies in the range -100..100 and it defaults to the maximum volume of
 @cindex colors
 @cindex color, warning
 @item warnColor (color)
-This resources defines the color to be used for drawing pins and pads when
+This resource defines the color to be used for drawing pins and pads when
 a warning has been issued about them.
 
 @vindex zoom
@@ -3258,7 +3255,7 @@ an X11 event, you can also execute any action command using a ":" command
 Take special care about translations related to the functions keys and the
 pointer buttons because most of the window managers use them too.
 Change the file according to your hardware/software environment.
-You may have to replace all occurances of @emph{baseTranslations} to
+You may have to replace all occurrences of @emph{baseTranslations} to
 @emph{translations} if you use a @code{X11R4} server.
 
 Passing @emph{Object} as an argument to an action routine causes the object
@@ -3369,7 +3366,7 @@ Default:
 @cindex octagonal flag, changing
 @cindex square flag, changing
 @cindex thermal flag, changing
- at itemx ChangeFlag(Object|SelectElements|SelectedPins|SelectedVias|Selected,thermal|octagon|square,0|1)
+ at item ChangeFlag(Object|SelectElements|SelectedPins|SelectedVias|Selected,thermal|octagon|square,0|1)
 Sets/clears the indicated flag.  This adds/removes thermals, adds/removes the flag
 which indicates a pin/pad should be square, or adds/removes the flag which
 indicates a pin/pad should be octagonal.
@@ -3410,7 +3407,7 @@ None<Key>n: ChangeName(Object)
 @cindex pins, changing shape of
 @cindex vias, changing shape of
 @cindex octagonal pins and vias
- at itemx ChangeOctagon(Object|SelectElements|SelectedPins|SelectedVias|Selected)
+ at item ChangeOctagon(Object|SelectElements|SelectedPins|SelectedVias|Selected)
 Toggles what shape the affected pin(s) or via(s) will be drawn when they
 are not square. The shape will either be round or octagonal.
 Default:
@@ -3474,7 +3471,7 @@ None<Key>q:   ChangeSquare(Object)
 @cindex octagonal flag, clearing
 @cindex square flag, clearing
 @cindex thermal flag, clearing
- at itemx ClrFlag(Object|SelectElements|SelectedPins|SelectedVias|Selected,thermal|octagon|square)
+ at item ClrFlag(Object|SelectElements|SelectedPins|SelectedVias|Selected,thermal|octagon|square)
 Clears the indicated flag.  This removes thermals, removes the flag
 which indicates a pin/pad should be square, or removes the flag which
 indicates a pin/pad should be octagonal.
@@ -3617,7 +3614,7 @@ until no errors are found.
 @findex ExecuteFile()
 @cindex actions file, executing
 @cindex script file, executing
- at itemx ExecuteFile(filename)
+ at item ExecuteFile(filename)
 Executes the PCB actions contained in the specified file.
 This can be used to automate a complex sequence of operations.
 @example
@@ -3822,7 +3819,7 @@ None<Key>F3:       Mode(PasteBuffer)
 @cindex polygon, closing a
 @cindex polygon point, go back to previous
 @cindex closing a polygon
- at item Polygon((Close|PreviousPoint)
+ at item Polygon(Close|PreviousPoint)
 Polygons need a special action routine to make life easier. Calling
 @emph{Polygon(PreviousPoint)} resets the newly entered corner to the
 previous one. The Undo action will call Polygon(PreviousPoint)
@@ -3957,7 +3954,7 @@ None<Btn3Down>,None<Btn3Motion>: See resource file - this is complex
 @cindex octagonal flag, setting
 @cindex square flag, setting
 @cindex thermal flag, setting
- at itemx SetFlag(Object|SelectElements|SelectedPins|SelectedVias|Selected,thermal|octagon|square)
+ at item SetFlag(Object|SelectElements|SelectedPins|SelectedVias|Selected,thermal|octagon|square)
 Sets the indicated flag.  This adds thermals, sets the flag
 which indicates a pin/pad should be square, or sets the flag which
 indicates a pin/pad should be octagonal.
@@ -4252,7 +4249,7 @@ is to examine the file @file{src/parse_y.y} which is the definitive
 definition of the file format.
 
 The PCB layout file contains the following contents, in this order (individual items
-are defined in @ref{File Syntax}:
+are defined in @ref{File Syntax}):
 
 @table @code
 
@@ -4464,7 +4461,7 @@ look at the comments and follow the macros step by step.
 
 @node File Syntax
 @section File Syntax
- at cindex File sytax
+ at cindex File syntax
 @cindex Syntax, file
 
 @include pcbfile.texi
@@ -4892,7 +4889,7 @@ save the new footprint to a file.
 @item In the @pcb{} program, instantiate the footprint you wish to modify.
 @item Using the selection tool, select the footprint.
 @item Now left-click on the selected element, this brings up a popup menu, choose
-"Cut Selection to Buffer" from the popup menu.
+"Cut to Buffer" from the popup menu.
 @item Under the buffer menu, choose "break buffer element to pieces",
 and then left-click to place the broken apart footprint to an open area of
 the layout.  Note that you must use the items under the buffer menu, the
@@ -5127,7 +5124,7 @@ Centroid (X-Y) data for driving automated assembly equipment.
 
 If anyone cares to contribute this section, it will get added.  Please
 submit changes to the bug tracking system for PCB which can be found from
-the PCB homepage at @url{http://pcb.gpleda.org}.
+the PCB homepage at @url{http://pcb.geda-project.org}.
 
 @c --------------------------- Appendix A -------------------------------
 
@@ -5354,7 +5351,7 @@ FreeBSD port at
 
 There are a some problems related to @code{X11R4} or systems derived from
 @code{X11} such as @code{OpenWindows}. @xref{Sun}. You at least have to change
-all occurances of @emph{baseTranslations} in the resource files to
+all occurrences of @emph{baseTranslations} in the resource files to
 @emph{translations} if you are using a @code{X11R4} server. Look at the
 @code{X11R5} @emph{Intrinsics} manual for details.
 
@@ -5515,18 +5512,19 @@ resources can be used to set the font, color, and spacing of buttons.
 As a convenience, ``fg'' can be used as an abbreviation for ``foreground''.
 
 Within the menu's resource file, Pcb will look for a few key named
-subresources.  At the moment, the only one it looks for is one called
- at code{MainMenu}.  This will be used for the main menu bar.  In the
-future, other named subresources will be used for popup resources.
+subresources.  At the moment, there are just two key named subresources.
+ at code{MainMenu} will be used for the main menu bar and @code{Mouse} will be
+used to define mouse actions.  In the future, other named subresources will
+be used for popup resources.
 
 Given all this, a small sample @file{pcb-menu.res} would be:
 
 @example
 MainMenu = @{
   @{File
-    @{"Load layout" Load(Layout)@}
+    @{"Open..." Load(Layout)@}
     -
-    @{"Quit Program" Quit() fg=red font=10x20@}
+    @{"Quit" Quit() fg=red font=10x20@}
   @}
 @}
 @end example
@@ -5615,13 +5613,13 @@ A hyphen in the context of square brackets denotes the range between the
 preceding and the following character.  E.g., the range of digits is
 ``0-9'' .  The range of letters from C to K is ``C-K'' .
 
- at item \^ inside square brackets
+ at item ^ inside square brackets
 Inside square brackets the caret is an anti operator. Its presence makes
-the square prackets match anything except the contents of the brackets.
+the square brackets match anything except the contents of the brackets.
 
 @item ( )
 Round parenthesis group parts of a regular expression. This is very much
-like they do in math formulars.
+like they do in math formulas.
 
 @end table
 
@@ -5675,11 +5673,11 @@ Select all items, whose name starts with ``A'', ``B'', ``C'', or ``D''.
 
 @item .*N@{2@}.*
 Select all items, whose name contains two ``N'' in a row such as
-CONN23, or connA, but not CON5
+CONN23, or connA, but not CON5.
 
 @item [^D].*
 Select all items that do not start with the letter ``D'', such as C2, or
-R34, but not D34
+R34, but not D34.
 
 @end table
 
@@ -5713,16 +5711,14 @@ R34, but not D34
 @section File Format
 The centroid output file is in a standard comma seperated values (CSV)
 format.  Comment lines begin with a ``#''.  The output file contains a
-header with an RCS Id tag (useful for those who will check the file
-into a version control system), a version number for the file format,
-some comments containing the author and title of the board, and a
-comment describing the remainder of the file format.
+header with a version number for the file format, some comments
+containing the author and title of the board, and a comment describing
+the remainder of the file format.
 
 An example centroid file is shown below.
 
 @example
 
-# @verb{ $ }Id at verb{ $ }
 # PcbXY Version 1.0
 # Date: Fri Jul 22 03:40:08 2005 UTC
 # Author: PCB User
@@ -5769,6 +5765,73 @@ for the definitions of rotation.  In other words, when pin #1 is at
 the centroid of the part and pin #2 is in the upper left quadrant, the
 rotation is declared to be zero degrees.
 
+ at c --------------------------- Appendix -- Annotation File Format ----------------------
+ at node Annotation File Format
+ at appendix Annotation File Format
+ at cindex annotation file format
+ at cindex backannotation file format
+
+ at section Overview
+
+ at section File Format
+The annotation output file an ASCII file that can be used to communicate 
+layout changes that affect the netlist back to a schematic tool.  Currently
+the only place this file is used is if when the Renumber() action is called
+within Pcb.  Renumber() will renumber all the reference designators (instance
+names) in the layout.  The result of the renumbering will be written out to 
+an annotation file which can be used to propagate the changes to the schematic
+sources.  See @ref{Renumber Action} for details on the Renumber() action.  If you
+are using gschem (part of gEDA/gaf) as your schematic entry tool then refer
+to pcb_backannotate(1) for details on how to use the annotation file to make
+the changes to the schematics.
+
+The annotation file format is fairly simple.  Each line consists of a command followed
+by arguments.  Blank lines and lines consisting of only whitespace are ignored.
+There are no line continuations.
+
+An example annotation file is shown below.
+ at example
+
+*COMMENT* PCB Annotation File
+*FILEVERSION* 20061031
+*RENAME* "C17" "C1"
+*RENAME* "U5" "U1"
+*RENAME* "U6" "U2"
+*RENAME* "C21" "C2"
+*RENAME* "R14" "R1"
+*RENAME* "C7" "C3"
+*RENAME* "C8" "C4"
+*RENAME* "C6" "C5"
+
+ at end example
+
+ at subsection *COMMENT*
+Command for a comment.  The text of a comment is ignored by tools which process
+the annotation file.
+ at cartouche
+ at format
+*COMMENT* text
+ at end format
+ at end cartouche
+
+ at subsection *FILEVERSION*
+Indicates what version of the annotation file is in use.  The date code corresponds to the 
+date when the current version was added to the Pcb sources.  
+ at cartouche
+ at format
+*FILEVERSION* datecode
+ at end format
+ at end cartouche
+
+ at subsection *RENAME*
+Renames an element.  The arguments are enclosed in double quotes and are the original name
+and the new name.
+ at cartouche
+ at format
+*RENAME* ``old'' ``new''
+ at end format
+ at end cartouche
+
 @c --------------------------- Appendix -- Actions ----------------------
 @node Action Reference
 @appendix Action Reference
@@ -5807,7 +5870,7 @@ the thermal resistance to the plane, it becomes easier to solder to the
 pin.  In the drawing below, the pin on the left is connected to the
 polygon using a solid connection with no thermal relief, the middle
 pin is connected using a thermal, while the pin on the right has no
-connection to the polygon.  In PCB, the ``Thermal'' Tool is used to
+connection to the polygon.  In @pcb{}, the ``Thermal'' Tool is used to
 make both a solid connection and one with thermal relief (see @ref{Polygon Objects}).
 
 @center @image{thermal,,,Example of a thermal relief,png}
diff --git a/doc/pcbfile.texi b/doc/pcbfile.texi
index e4f79ff..5a68b0e 100644
--- a/doc/pcbfile.texi
+++ b/doc/pcbfile.texi
@@ -1,5 +1,5 @@
 @c key pcbfile
- at c ./../src/parse_y.y 143
+ at c ./../src/parse_y.y 140
 
 A special note about units: Older versions of @code{pcb} used mils
 (1/1000 inch) as the base unit; a value of 500 in the file meant
@@ -49,7 +49,7 @@ Symbolic and numeric flags (SFlags and NFlags) are described in
 @c pcbfile Arc
 @node Arc syntax
 @subsection Arc
- at c ./../src/parse_y.y 660
+ at c ./../src/parse_y.y 650
 
 @cartouche
 @format
@@ -89,7 +89,7 @@ Numeric flags.
 @c pcbfile Attribute
 @node Attribute syntax
 @subsection Attribute
- at c ./../src/parse_y.y 1268
+ at c ./../src/parse_y.y 1259
 
 @cartouche
 @format
@@ -114,7 +114,7 @@ if the value is interpreted as, for example, a number.
 @c pcbfile Connect
 @node Connect syntax
 @subsection Connect
- at c ./../src/parse_y.y 1258
+ at c ./../src/parse_y.y 1249
 
 @cartouche
 @format
@@ -132,7 +132,7 @@ pin 7 of U14, or @code{"T4-E"} for pin E of T4.
 @c pcbfile Cursor
 @node Cursor syntax
 @subsection Cursor
- at c ./../src/parse_y.y 335
+ at c ./../src/parse_y.y 332
 
 @cartouche
 @format
@@ -144,17 +144,21 @@ Cursor (X Y Zoom)
 @table @var
 @item X Y
 Location of the cursor when the board was saved.
+As of November 2012 the cursor position is not written to file anymore.
+Older versions of pcb ignore the absence of this line in the pcb file.
 @item Zoom
 The current zoom factor.  Note that a zoom factor of "0" means 1 mil
 per screen pixel, N means @math{2^N} mils per screen pixel, etc.  The
 first variant accepts floating point numbers.  The special value
 "1000" means "zoom to fit"
+
+This field is ignored by PCB.
 @end table
 
 @c pcbfile DRC
 @node DRC syntax
 @subsection DRC
- at c ./../src/parse_y.y 376
+ at c ./../src/parse_y.y 371
 
 @cartouche
 @format
@@ -182,7 +186,7 @@ Minimum width of the annular ring around pins and vias.
 @c pcbfile Element
 @node Element syntax
 @subsection Element
- at c ./../src/parse_y.y 816
+ at c ./../src/parse_y.y 807
 
 @cartouche
 @format
@@ -238,7 +242,7 @@ definitions which use absolute coordinates.
 @c pcbfile ElementArc
 @node ElementArc syntax
 @subsection ElementArc
- at c ./../src/parse_y.y 927
+ at c ./../src/parse_y.y 918
 
 @cartouche
 @format
@@ -270,7 +274,7 @@ The width of the silk line which forms the arc.
 @c pcbfile ElementLine
 @node ElementLine syntax
 @subsection ElementLine
- at c ./../src/parse_y.y 925
+ at c ./../src/parse_y.y 916
 
 @cartouche
 @format
@@ -291,7 +295,7 @@ The width of the silk for this line.
 @c pcbfile FileVersion
 @node FileVersion syntax
 @subsection FileVersion
- at c ./../src/parse_y.y 258
+ at c ./../src/parse_y.y 255
 
 @cartouche
 @format
@@ -313,7 +317,7 @@ in the input file then file format compatibility is not checked.
 @c pcbfile Flags
 @node Flags syntax
 @subsection Flags
- at c ./../src/parse_y.y 418
+ at c ./../src/parse_y.y 413
 
 @cartouche
 @format
@@ -331,7 +335,7 @@ represent pcb-wide flags as defined in @ref{PCBFlags}.
 @c pcbfile Grid
 @node Grid syntax
 @subsection Grid
- at c ./../src/parse_y.y 294
+ at c ./../src/parse_y.y 291
 
 @cartouche
 @format
@@ -354,7 +358,7 @@ If non-zero, the grid will be visible on the screen.
 @c pcbfile Groups
 @node Groups syntax
 @subsection Groups
- at c ./../src/parse_y.y 432
+ at c ./../src/parse_y.y 427
 
 @cartouche
 @format
@@ -381,7 +385,7 @@ Groups("1,2,c:3:4:5,6,s:7,8")
 @c pcbfile Layer
 @node Layer syntax
 @subsection Layer
- at c ./../src/parse_y.y 573
+ at c ./../src/parse_y.y 561
 
 @cartouche
 @format
@@ -406,7 +410,7 @@ text, and polygons.
 @c pcbfile Line
 @node Line syntax
 @subsection Line
- at c ./../src/parse_y.y 629
+ at c ./../src/parse_y.y 619
 
 @cartouche
 @format
@@ -435,7 +439,7 @@ Numeric flags.
 @c pcbfile Mark
 @node Mark syntax
 @subsection Mark
- at c ./../src/parse_y.y 929
+ at c ./../src/parse_y.y 920
 
 @cartouche
 @format
@@ -453,7 +457,7 @@ the mark as part of the Element line.
 @c pcbfile Net
 @node Net syntax
 @subsection Net
- at c ./../src/parse_y.y 1235
+ at c ./../src/parse_y.y 1226
 
 @cartouche
 @format
@@ -473,7 +477,7 @@ The routing style that should be used when autorouting this net.
 @c pcbfile Netlist
 @node Netlist syntax
 @subsection Netlist
- at c ./../src/parse_y.y 1214
+ at c ./../src/parse_y.y 1205
 
 @cartouche
 @format
@@ -486,7 +490,7 @@ Netlist ( ) (
 @c pcbfile Pad
 @node Pad syntax
 @subsection Pad
- at c ./../src/parse_y.y 1086
+ at c ./../src/parse_y.y 1077
 
 @cartouche
 @format
@@ -524,7 +528,7 @@ numerical flags only
 @c pcbfile PCB
 @node PCB syntax
 @subsection PCB
- at c ./../src/parse_y.y 271
+ at c ./../src/parse_y.y 268
 
 @cartouche
 @format
@@ -547,7 +551,7 @@ chosen.
 @c pcbfile Pin
 @node Pin syntax
 @subsection Pin
- at c ./../src/parse_y.y 1013
+ at c ./../src/parse_y.y 1004
 
 @cartouche
 @format
@@ -585,7 +589,7 @@ numerical flags only
 @c pcbfile PolyArea
 @node PolyArea syntax
 @subsection PolyArea
- at c ./../src/parse_y.y 353
+ at c ./../src/parse_y.y 348
 
 @cartouche
 @format
@@ -601,7 +605,7 @@ Minimum area of polygon island to retain. If a polygon has clearances that cause
 @c pcbfile Polygon
 @node Polygon syntax
 @subsection Polygon
- at c ./../src/parse_y.y 743
+ at c ./../src/parse_y.y 733
 
 @cartouche
 @format
@@ -629,7 +633,7 @@ Defines a hole within the polygon's outer contour. There may be zero or more suc
 @c pcbfile Rat
 @node Rat syntax
 @subsection Rat
- at c ./../src/parse_y.y 558
+ at c ./../src/parse_y.y 546
 
 @cartouche
 @format
@@ -652,7 +656,7 @@ Numeric flags.
 @c pcbfile Styles
 @node Styles syntax
 @subsection Styles
- at c ./../src/parse_y.y 442
+ at c ./../src/parse_y.y 437
 
 @cartouche
 @format
@@ -695,7 +699,7 @@ is split across lines only to make it readable.
 @c pcbfile Symbol
 @node Symbol syntax
 @subsection Symbol
- at c ./../src/parse_y.y 1148
+ at c ./../src/parse_y.y 1139
 
 @cartouche
 @format
@@ -717,12 +721,12 @@ Additional space to allow after this character.
 @c pcbfile SymbolLine
 @node SymbolLine syntax
 @subsection SymbolLine
- at c ./../src/parse_y.y 1197
+ at c ./../src/parse_y.y 1188
 
 @cartouche
 @format
-SymbolLine [X1 Y1 X2 Y1 Thickness]
-SymbolLine (X1 Y1 X2 Y1 Thickness)
+SymbolLine [X1 Y1 X2 Y2 Thickness]
+SymbolLine (X1 Y1 X2 Y2 Thickness)
 @end format
 @end cartouche
 
@@ -736,7 +740,7 @@ The width of this line.
 @c pcbfile Text
 @node Text syntax
 @subsection Text
- at c ./../src/parse_y.y 689
+ at c ./../src/parse_y.y 679
 
 @cartouche
 @format
@@ -767,7 +771,7 @@ Numeric flags.
 @c pcbfile Thermal
 @node Thermal syntax
 @subsection Thermal
- at c ./../src/parse_y.y 365
+ at c ./../src/parse_y.y 360
 
 @cartouche
 @format
@@ -786,7 +790,7 @@ the same as the clearance gap width.
 @c pcbfile Via
 @node Via syntax
 @subsection Via
- at c ./../src/parse_y.y 498
+ at c ./../src/parse_y.y 486
 
 @cartouche
 @format
@@ -818,7 +822,7 @@ numerical flags only
 @end table
 
 @c pcbfile ~objectflags
- at c ./../src/const.h 110
+ at c ./../src/const.h 109
 @node Object Flags
 @section Object Flags
 
@@ -837,6 +841,9 @@ If set, this object has been found by @code{FindConnection()}.
 @item 0x0008 hole
 For pins and vias, this flag means that the pin or via is a hole
 without a copper annulus.
+ at item 0x0008 nopaste
+For pads, set to prevent a solderpaste stencil opening for the
+pad.  Primarily used for pads used as fiducials.
 @item 0x0010 rat
 If set for a line, indicates that this line is a rat line instead of a
 copper trace.
@@ -887,12 +894,11 @@ pins, indicates that the pin is closer to a horizontal edge and thus
 pinout text should be vertical.
 @item 0x8000 marker
 Marker used internally to avoid revisiting an object.
- at item 0x10000 nopaste
-For pads, set to prevent a solderpaste stencil opening for the
-pad.  Primarily used for pads used as fiducials.
+ at item 0x10000 connected
+If set, this object has been as physically connected by @code{FindConnection()}.
 @end table
 @c pcbfile ~pcbflags
- at c ./../src/const.h 149
+ at c ./../src/const.h 153
 @node PCBFlags
 @section PCBFlags
 @table @code
diff --git a/doc/puller.pdf b/doc/puller.pdf
index dab6555..932edd3 100644
Binary files a/doc/puller.pdf and b/doc/puller.pdf differ
diff --git a/doc/puller.png b/doc/puller.png
index 2ab3302..20a1c32 100644
Binary files a/doc/puller.png and b/doc/puller.png differ
diff --git a/doc/refcard.pdf b/doc/refcard.pdf
index fd5fbf4..2b57082 100644
Binary files a/doc/refcard.pdf and b/doc/refcard.pdf differ
diff --git a/doc/refcard.tex b/doc/refcard.tex
index 8072351..e06ce0a 100644
--- a/doc/refcard.tex
+++ b/doc/refcard.tex
@@ -1,4 +1,3 @@
-% $Id$
 %
 %                            COPYRIGHT
 %
@@ -87,7 +86,7 @@
 
 \begin{center}
   \Large{\textbf{PCB Command reference}}
-  \footnote{http://pcb.gpleda.org/index.html}
+  \footnote{http://pcb.geda-project.org/}
   \footnote{Obviously \Shift, \Ctrl, \Mod, \Fun \space and \Btn \space mean the shift,
     control, modifier1 (BTNMOD for buttons), function key and mouse button.} \\
 \end{center}
diff --git a/doc/stamp-vti b/doc/stamp-vti
index 29c2357..83b7281 100644
--- a/doc/stamp-vti
+++ b/doc/stamp-vti
@@ -1,4 +1,4 @@
- at set UPDATED 17 September 2011
- at set UPDATED-MONTH September 2011
- at set EDITION 20110918
- at set VERSION 20110918
+ at set UPDATED 10 March 2014
+ at set UPDATED-MONTH March 2014
+ at set EDITION 20140316
+ at set VERSION 20140316
diff --git a/doc/thermal.pdf b/doc/thermal.pdf
index 548acf0..3eb590a 100644
Binary files a/doc/thermal.pdf and b/doc/thermal.pdf differ
diff --git a/doc/thermal.png b/doc/thermal.png
index 6223d78..c8d9516 100644
Binary files a/doc/thermal.png and b/doc/thermal.png differ
diff --git a/doc/version.texi b/doc/version.texi
index 29c2357..83b7281 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,4 +1,4 @@
- at set UPDATED 17 September 2011
- at set UPDATED-MONTH September 2011
- at set EDITION 20110918
- at set VERSION 20110918
+ at set UPDATED 10 March 2014
+ at set UPDATED-MONTH March 2014
+ at set EDITION 20140316
+ at set VERSION 20140316
diff --git a/doc/wire_size.tab b/doc/wire_size.tab
index d72997f..8f57752 100644
--- a/doc/wire_size.tab
+++ b/doc/wire_size.tab
@@ -1,6 +1,3 @@
-# $Id$
-#
-
 97		.0059
 96		.0063
 95		.0067
diff --git a/doc/wire_size.texi b/doc/wire_size.texi
index c0ba307..986121e 100644
--- a/doc/wire_size.texi
+++ b/doc/wire_size.texi
@@ -1,5 +1,4 @@
 @c Generated file.  Do not edit directly
- at c $Id$
 @multitable @columnfractions 0.167 0.167 0.167 0.167 0.167 0.167 
 @item Drill @tab Diameter @tab Drill @tab Diameter @tab Drill @tab Diameter 
 @item Size @tab (inches) @tab Size @tab (inches) @tab Size @tab (inches) 
diff --git a/example/Makefile.am b/example/Makefile.am
index 9f7b034..6a14876 100644
--- a/example/Makefile.am
+++ b/example/Makefile.am
@@ -1,5 +1,3 @@
-## $Id$
-
 examplesdir=	@docdir@/examples
 examples_DATA=	${EXAMPLES}
 
diff --git a/example/Makefile.in b/example/Makefile.in
index b443d6b..b8c7dff 100644
--- a/example/Makefile.in
+++ b/example/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,6 +16,23 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -72,6 +89,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	install-pdf-recursive install-ps-recursive install-recursive \
 	installcheck-recursive installdirs-recursive pdf-recursive \
 	ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -93,6 +115,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(examplesdir)"
 DATA = $(examples_DATA)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
@@ -133,6 +161,7 @@ ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -145,7 +174,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -211,6 +239,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -319,6 +351,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -382,8 +416,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 install-examplesDATA: $(examples_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)"
 	@list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(examplesdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(examplesdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -397,9 +434,7 @@ uninstall-examplesDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(examplesdir)" && rm -f $$files
+	dir='$(DESTDIR)$(examplesdir)'; $(am__uninstall_files_from_dir)
 
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
@@ -568,13 +603,10 @@ distdir: $(DISTFILES)
 	done
 	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(MKDIR_P) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
+	    $(am__make_dryrun) \
+	      || test -d "$(distdir)/$$subdir" \
+	      || $(MKDIR_P) "$(distdir)/$$subdir" \
+	      || exit 1; \
 	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
 	    $(am__relativize); \
 	    new_distdir=$$reldir; \
@@ -612,10 +644,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/example/libraries/Makefile.am b/example/libraries/Makefile.am
index 21392aa..9a33712 100644
--- a/example/libraries/Makefile.am
+++ b/example/libraries/Makefile.am
@@ -1,5 +1,3 @@
-## $Id$
-
 examplesdir=	@docdir@/examples/libraries
 examples_DATA=	${EXAMPLES}
 
diff --git a/example/libraries/Makefile.in b/example/libraries/Makefile.in
index 495a03b..1a96bde 100644
--- a/example/libraries/Makefile.in
+++ b/example/libraries/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,6 +16,23 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -65,6 +82,11 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -86,6 +108,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(examplesdir)"
 DATA = $(examples_DATA)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -93,6 +121,7 @@ ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -105,7 +134,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -171,6 +199,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -279,6 +311,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -341,8 +375,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 install-examplesDATA: $(examples_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)"
 	@list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(examplesdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(examplesdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -356,9 +393,7 @@ uninstall-examplesDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(examplesdir)" && rm -f $$files
+	dir='$(DESTDIR)$(examplesdir)'; $(am__uninstall_files_from_dir)
 tags: TAGS
 TAGS:
 
@@ -413,10 +448,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/example/libraries/example.inc b/example/libraries/example.inc
index 2ee0ec6..32c43b4 100644
--- a/example/libraries/example.inc
+++ b/example/libraries/example.inc
@@ -1,5 +1,4 @@
 # -*- m4 -*-
-# $Id$
 #
 # Example .inc file
 
diff --git a/example/libraries/example.m4 b/example/libraries/example.m4
index 2253a3c..ff2641d 100644
--- a/example/libraries/example.m4
+++ b/example/libraries/example.m4
@@ -1,6 +1,5 @@
 divert(-1)
 # -*- m4 -*-
-# $Id$
 #
 define(`Description_my_RC0402', 
   ``Standard SMT resistor/capacitor (0402)'')
diff --git a/globalconst.h b/globalconst.h
index e8966ff..e0779d5 100755
--- a/globalconst.h
+++ b/globalconst.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* global constants
@@ -123,6 +122,8 @@
 						/* line points */
 #define	MAX_POLYGON_POINT_DISTANCE	0	/* maximum distance when searching */
 						/* polygon points */
+#define	MAX_ARC_POINT_DISTANCE		0	/* maximum distance when searching */
+						/* arc points */
 #define	MAX_ELEMENTNAMES		3	/* number of supported names of */
 						/* an element */
 #define	MAX_LIBRARY_LINE_LENGTH		255	/* maximum line length in the */
diff --git a/gts/Makefile.am b/gts/Makefile.am
index ad7c938..85af464 100644
--- a/gts/Makefile.am
+++ b/gts/Makefile.am
@@ -1,8 +1,8 @@
 ## Process this file with automake to produce Makefile.in
 
-INCLUDES = -I$(srcdir) -DG_LOG_DOMAIN=\"Gts\"
+AM_CPPFLAGS = -I$(srcdir) -DG_LOG_DOMAIN=\"Gts\"
 
-lib_LIBRARIES = libgts.a
+noinst_LIBRARIES = libgts.a
 
 libgts_a_SOURCES = \
 	object.c \
@@ -44,5 +44,5 @@ libgts_a_SOURCES = \
 	curvature.c \
 	tribox3.c
 
-include_HEADERS = \
+noinst_HEADERS = \
 	gts.h
diff --git a/gts/Makefile.in b/gts/Makefile.in
index 73c4fca..f783f95 100644
--- a/gts/Makefile.in
+++ b/gts/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,6 +17,23 @@
 
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -36,7 +53,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = gts
-DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_gl.m4 \
@@ -65,29 +82,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
-LIBRARIES = $(lib_LIBRARIES)
+LIBRARIES = $(noinst_LIBRARIES)
 AR = ar
 ARFLAGS = cru
 libgts_a_AR = $(AR) $(ARFLAGS)
@@ -114,7 +109,12 @@ CCLD = $(CC)
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 SOURCES = $(libgts_a_SOURCES)
 DIST_SOURCES = $(libgts_a_SOURCES)
-HEADERS = $(include_HEADERS)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+HEADERS = $(noinst_HEADERS)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -122,6 +122,7 @@ ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -134,7 +135,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -200,6 +200,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -308,6 +312,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -327,8 +333,8 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-INCLUDES = -I$(srcdir) -DG_LOG_DOMAIN=\"Gts\"
-lib_LIBRARIES = libgts.a
+AM_CPPFLAGS = -I$(srcdir) -DG_LOG_DOMAIN=\"Gts\"
+noinst_LIBRARIES = libgts.a
 libgts_a_SOURCES = \
 	object.c \
 	point.c \
@@ -369,7 +375,7 @@ libgts_a_SOURCES = \
 	curvature.c \
 	tribox3.c
 
-include_HEADERS = \
+noinst_HEADERS = \
 	gts.h
 
 all: all-am
@@ -406,39 +412,10 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
-install-libLIBRARIES: $(lib_LIBRARIES)
-	@$(NORMAL_INSTALL)
-	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
-	@list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
-	list2=; for p in $$list; do \
-	  if test -f $$p; then \
-	    list2="$$list2 $$p"; \
-	  else :; fi; \
-	done; \
-	test -z "$$list2" || { \
-	  echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \
-	  $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; }
-	@$(POST_INSTALL)
-	@list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
-	for p in $$list; do \
-	  if test -f $$p; then \
-	    $(am__strip_dir) \
-	    echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \
-	    ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \
-	  else :; fi; \
-	done
 
-uninstall-libLIBRARIES:
-	@$(NORMAL_UNINSTALL)
-	@list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
-	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(libdir)' && rm -f "$$files" )"; \
-	cd "$(DESTDIR)$(libdir)" && rm -f $$files
-
-clean-libLIBRARIES:
-	-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
-libgts.a: $(libgts_a_OBJECTS) $(libgts_a_DEPENDENCIES) 
+clean-noinstLIBRARIES:
+	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+libgts.a: $(libgts_a_OBJECTS) $(libgts_a_DEPENDENCIES) $(EXTRA_libgts_a_DEPENDENCIES) 
 	-rm -f libgts.a
 	$(libgts_a_AR) libgts.a $(libgts_a_OBJECTS) $(libgts_a_LIBADD)
 	$(RANLIB) libgts.a
@@ -497,26 +474,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
-install-includeHEADERS: $(include_HEADERS)
-	@$(NORMAL_INSTALL)
-	test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
-	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
-	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
-	done
-
-uninstall-includeHEADERS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
-	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(includedir)" && rm -f $$files
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -604,9 +561,6 @@ check-am: all-am
 check: check-am
 all-am: Makefile $(LIBRARIES) $(HEADERS)
 installdirs:
-	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
@@ -617,10 +571,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
@@ -634,7 +593,7 @@ maintainer-clean-generic:
 	@echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-generic clean-libLIBRARIES mostlyclean-am
+clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
 
 distclean: distclean-am
 	-rm -rf ./$(DEPDIR)
@@ -654,13 +613,13 @@ info: info-am
 
 info-am:
 
-install-data-am: install-includeHEADERS
+install-data-am:
 
 install-dvi: install-dvi-am
 
 install-dvi-am:
 
-install-exec-am: install-libLIBRARIES
+install-exec-am:
 
 install-html: install-html-am
 
@@ -699,23 +658,22 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-includeHEADERS uninstall-libLIBRARIES
+uninstall-am:
 
 .MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-	clean-libLIBRARIES ctags distclean distclean-compile \
+	clean-noinstLIBRARIES ctags distclean distclean-compile \
 	distclean-generic distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-data \
 	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am \
-	install-includeHEADERS install-info install-info-am \
-	install-libLIBRARIES install-man install-pdf install-pdf-am \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
 	install-ps install-ps-am install-strip installcheck \
 	installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-compile \
 	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
-	uninstall-am uninstall-includeHEADERS uninstall-libLIBRARIES
+	uninstall-am
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/gts/matrix.c b/gts/matrix.c
index 7ada15d..eb0b1f8 100644
--- a/gts/matrix.c
+++ b/gts/matrix.c
@@ -126,11 +126,14 @@ GtsMatrix * gts_matrix_projection (GtsTriangle * t)
   x3 = y1*z2 - z1*y2; y3 = z1*x2 - x1*z2; z3 = x1*y2 - y1*x2;
   x2 = y3*z1 - z3*y1; y2 = z3*x1 - x3*z1; z2 = x3*y1 - y3*x1;
 
-  g_assert ((l = sqrt (x1*x1 + y1*y1 + z1*z1)) > 0.0);
+  l = sqrt (x1*x1 + y1*y1 + z1*z1);
+  g_assert (l > 0.0);
   m[0][0] = x1/l; m[1][0] = y1/l; m[2][0] = z1/l; m[3][0] = 0.;
-  g_assert ((l = sqrt (x2*x2 + y2*y2 + z2*z2)) > 0.0);
+  l = sqrt (x2*x2 + y2*y2 + z2*z2);
+  g_assert (l > 0.0);
   m[0][1] = x2/l; m[1][1] = y2/l; m[2][1] = z2/l; m[3][1] = 0.;
-  g_assert ((l = sqrt (x3*x3 + y3*y3 + z3*z3)) > 0.0);
+  l = sqrt (x3*x3 + y3*y3 + z3*z3);
+  g_assert (l > 0.0);
   m[0][2] = x3/l; m[1][2] = y3/l; m[2][2] = z3/l; m[3][2] = 0.;
   m[0][3] = 0; m[1][3] = 0.; m[2][3] = 0.; m[3][3] = 1.;
 
diff --git a/gts/refine.c b/gts/refine.c
index 293eb11..eab585d 100644
--- a/gts/refine.c
+++ b/gts/refine.c
@@ -191,6 +191,7 @@ static gint split_encroached (GtsSurface * surface,
   GtsSegment * s;
 
   while (steiner_max-- != 0 && (s = gts_fifo_pop (encroached))) {
+    GtsVertex *add_vertex_returned;
     GtsVertex * v = split_edge (GTS_EDGE (s), surface);
     GtsFace * boundary = gts_edge_is_boundary (GTS_EDGE (s), surface);
     GtsFace * f = boundary;
@@ -217,8 +218,10 @@ static gint split_encroached (GtsSurface * surface,
     GTS_OBJECT (s)->klass = GTS_OBJECT_CLASS (surface->edge_class);
 
     if (f == NULL)
-      g_assert ((f = gts_edge_has_parent_surface (GTS_EDGE (s), surface)));
-    g_assert (gts_delaunay_add_vertex_to_face (surface, v, f) == NULL);
+      f = gts_edge_has_parent_surface (GTS_EDGE (s), surface);
+    g_assert (f != NULL);
+    add_vertex_returned = gts_delaunay_add_vertex_to_face (surface, v, f);
+    g_assert (add_vertex_returned == NULL);
 
     if (boundary)
       gts_object_destroy (GTS_OBJECT (s));
@@ -385,12 +388,14 @@ guint gts_delaunay_refine (GtsSurface * surface,
   GTS_OBJECT (surface)->reserved = heap;
 
   while (steiner_max-- != 0 && (f = gts_eheap_remove_top (heap, NULL))) {
+    GtsVertex *add_vertex_returned;
     GtsVertex * c = 
       GTS_VERTEX (gts_triangle_circumcircle_center (GTS_TRIANGLE (f),
 		  GTS_POINT_CLASS (surface->vertex_class)));
     EHEAP_PAIR (f) = NULL;
     g_assert (c != NULL);
-    g_assert (gts_delaunay_add_vertex (surface, c, f) == NULL);
+    add_vertex_returned = gts_delaunay_add_vertex (surface, c, f);
+    g_assert (add_vertex_returned == NULL);
 
     vertex_encroaches (c, surface, encroached, encroaches, encroach_data);
     if (!gts_fifo_is_empty (encroached)) {
diff --git a/gts/split.c b/gts/split.c
index 43fea3a..b7bee77 100644
--- a/gts/split.c
+++ b/gts/split.c
@@ -253,9 +253,10 @@ static CFace * cface_new (GtsFace * f,
   v = GTS_SEGMENT (e1)->v1 == v1 ?
     GTS_SEGMENT (e1)->v2 : GTS_SEGMENT (e1)->v1;
 #ifdef NEW
-  if ((cf->flags & CFACE_E1) || (cf->flags & CFACE_E2))
-    g_assert ((vvs = GTS_EDGE (gts_vertices_are_connected (vs->v, v))));
-  else
+  if ((cf->flags & CFACE_E1) || (cf->flags & CFACE_E2)) {
+    vvs = GTS_EDGE (gts_vertices_are_connected (vs->v, v));
+    g_assert (vvs != NULL);
+  } else
 #endif
   vvs = gts_edge_new (klass, v, vs->v);
 
@@ -591,7 +592,8 @@ void gts_split_collapse (GtsSplit * vs,
 
   v1 = GTS_SPLIT_V1 (vs);
   v2 = GTS_SPLIT_V2 (vs);
-  g_assert ((e = GTS_EDGE (gts_vertices_are_connected (v1, v2))));
+  e = GTS_EDGE (gts_vertices_are_connected (v1, v2));
+  g_assert (e != NULL);
 
 #ifdef DEBUG
   fprintf (stderr, "collapsing %p: v1: %p v2: %p v: %p\n", vs, v1, v2, v);
@@ -945,7 +947,8 @@ GtsSplit * gts_split_new (GtsSplitClass * klass,
 #else
   v1 = GTS_SPLIT_V1 (vs);
   v2 = GTS_SPLIT_V2 (vs);
-  g_assert ((e = GTS_EDGE (gts_vertices_are_connected (v1, v2))));
+  e = GTS_EDGE (gts_vertices_are_connected (v1, v2));
+  g_assert (e != NULL);
   i = e->triangles;
   vs->ncf = g_slist_length (i);
   g_assert (vs->ncf > 0);
diff --git a/gts/vopt.c b/gts/vopt.c
index d772af9..4bc448e 100644
--- a/gts/vopt.c
+++ b/gts/vopt.c
@@ -475,7 +475,8 @@ GtsVertex * gts_volume_optimized_vertex (GtsEdge * edge,
 #endif /* Weighted average of volume, boundary and shape optimization */
 
   g_assert (n == 3);
-  g_assert ((Ai = gts_matrix3_inverse (A)));
+  Ai = gts_matrix3_inverse (A);
+  g_assert (Ai != NULL);
 
   v = gts_vertex_new (klass,
 		      Ai[0][0]*b[0] + Ai[0][1]*b[1] + Ai[0][2]*b[2],
diff --git a/intl/plural.c b/intl/plural.c
index 72494f9..a04978b 100644
--- a/intl/plural.c
+++ b/intl/plural.c
@@ -1,21 +1,79 @@
-/* A Bison parser, made from plural.y
-   by GNU bison 1.35.  */
-
-#define YYBISON 1  /* Identify Bison output.  */
-
-#define yyparse __gettextparse
-#define yylex __gettextlex
-#define yyerror __gettexterror
-#define yylval __gettextlval
-#define yychar __gettextchar
-#define yydebug __gettextdebug
-#define yynerrs __gettextnerrs
-# define	EQUOP2	257
-# define	CMPOP2	258
-# define	ADDOP2	259
-# define	MULOP2	260
-# define	NUMBER	261
+/* A Bison parser, made by GNU Bison 2.5.  */
 
+/* Bison implementation for Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
+   
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+   
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+   simplifying the original so-called "semantic" parser.  */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+   infringing on user name space.  This should be done even for local
+   variables, as they might otherwise be expanded by user macros.
+   There are some unavoidable exceptions within include files to
+   define necessary library symbols; they are noted "INFRINGES ON
+   USER NAME SPACE" below.  */
+
+/* Identify Bison output.  */
+#define YYBISON 1
+
+/* Bison version.  */
+#define YYBISON_VERSION "2.5"
+
+/* Skeleton name.  */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers.  */
+#define YYPURE 1
+
+/* Push parsers.  */
+#define YYPUSH 0
+
+/* Pull parsers.  */
+#define YYPULL 1
+
+/* Using locations.  */
+#define YYLSP_NEEDED 0
+
+/* Substitute the variable and function names.  */
+#define yyparse         __gettextparse
+#define yylex           __gettextlex
+#define yyerror         __gettexterror
+#define yylval          __gettextlval
+#define yychar          __gettextchar
+#define yydebug         __gettextdebug
+#define yynerrs         __gettextnerrs
+
+
+/* Copy the first part of user declarations.  */
+
+/* Line 268 of yacc.c  */
 #line 1 "plural.y"
 
 /* Expression parsing for plural form selection.
@@ -62,16 +120,77 @@
 #define YYLEX_PARAM	&((struct parse_args *) arg)->cp
 #define YYPARSE_PARAM	arg
 
+
+/* Line 268 of yacc.c  */
+#line 126 "plural.c"
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     EQUOP2 = 258,
+     CMPOP2 = 259,
+     ADDOP2 = 260,
+     MULOP2 = 261,
+     NUMBER = 262
+   };
+#endif
+/* Tokens.  */
+#define EQUOP2 258
+#define CMPOP2 259
+#define ADDOP2 260
+#define MULOP2 261
+#define NUMBER 262
+
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+{
+
+/* Line 293 of yacc.c  */
 #line 49 "plural.y"
-#ifndef YYSTYPE
-typedef union {
+
   unsigned long int num;
   enum operator op;
   struct expression *exp;
-} yystype;
-# define YYSTYPE yystype
+
+
+
+/* Line 293 of yacc.c  */
+#line 184 "plural.c"
+} YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
 #endif
+
+
+/* Copy the second part of user declarations.  */
+
+/* Line 343 of yacc.c  */
 #line 55 "plural.y"
 
 /* Prototypes for local functions.  */
@@ -146,21 +265,248 @@ new_exp_3 (enum operator op, struct expression *bexp,
   return new_exp (3, op, args);
 }
 
-#ifndef YYDEBUG
-# define YYDEBUG 0
+
+
+/* Line 343 of yacc.c  */
+#line 272 "plural.c"
+
+#ifdef short
+# undef short
 #endif
 
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
 
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
 
-#define	YYFINAL		27
-#define	YYFLAG		-32768
-#define	YYNTBASE	16
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+#  define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+#  define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYSIZE_T size_t
+# else
+#  define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+#  if ENABLE_NLS
+#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#  endif
+# endif
+# ifndef YY_
+#  define YY_(msgid) msgid
+# endif
+#endif
 
-/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
-#define YYTRANSLATE(x) ((unsigned)(x) <= 261 ? yytranslate[x] : 18)
+/* Suppress unused-variable warnings by "using" E.  */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
 
-/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
-static const char yytranslate[] =
+/* Identity function, used to suppress warnings about constant conditions.  */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int yyi)
+#else
+static int
+YYID (yyi)
+    int yyi;
+#endif
+{
+  return yyi;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols.  */
+
+# ifdef YYSTACK_USE_ALLOCA
+#  if YYSTACK_USE_ALLOCA
+#   ifdef __GNUC__
+#    define YYSTACK_ALLOC __builtin_alloca
+#   elif defined __BUILTIN_VA_ARG_INCR
+#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+#   elif defined _AIX
+#    define YYSTACK_ALLOC __alloca
+#   elif defined _MSC_VER
+#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+#    define alloca _alloca
+#   else
+#    define YYSTACK_ALLOC alloca
+#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#     ifndef EXIT_SUCCESS
+#      define EXIT_SUCCESS 0
+#     endif
+#    endif
+#   endif
+#  endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+   /* Pacify GCC's `empty if-body' warning.  */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+    /* The OS might guarantee only one guard page at the bottom of the stack,
+       and a page size can be as small as 4096 bytes.  So we cannot safely
+       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
+       to allow for a few compiler-allocated temporary stack slots.  */
+#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+#  endif
+# else
+#  define YYSTACK_ALLOC YYMALLOC
+#  define YYSTACK_FREE YYFREE
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+#  endif
+#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
+       && ! ((defined YYMALLOC || defined malloc) \
+	     && (defined YYFREE || defined free)))
+#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#   ifndef EXIT_SUCCESS
+#    define EXIT_SUCCESS 0
+#   endif
+#  endif
+#  ifndef YYMALLOC
+#   define YYMALLOC malloc
+#   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+#  ifndef YYFREE
+#   define YYFREE free
+#   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+     && (! defined __cplusplus \
+	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member.  */
+union yyalloc
+{
+  yytype_int16 yyss_alloc;
+  YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next.  */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+   N elements.  */
+# define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+      + YYSTACK_GAP_MAXIMUM)
+
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one.  The
+   local variables YYSIZE and YYSTACKSIZE give the old and new number of
+   elements in the stack, and YYPTR gives the new location of the
+   stack.  Advance YYPTR to a properly aligned location for the next
+   stack.  */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
+    do									\
+      {									\
+	YYSIZE_T yynewbytes;						\
+	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
+	Stack = &yyptr->Stack_alloc;					\
+	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+	yyptr += yynewbytes / sizeof (*yyptr);				\
+      }									\
+    while (YYID (0))
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)		\
+      do					\
+	{					\
+	  YYSIZE_T yyi;				\
+	  for (yyi = 0; yyi < (Count); yyi++)	\
+	    (To)[yyi] = (From)[yyi];		\
+	}					\
+      while (YYID (0))
+#  endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
+/* YYFINAL -- State number of the termination state.  */
+#define YYFINAL  9
+/* YYLAST -- Last index in YYTABLE.  */
+#define YYLAST   54
+
+/* YYNTOKENS -- Number of terminals.  */
+#define YYNTOKENS  16
+/* YYNNTS -- Number of nonterminals.  */
+#define YYNNTS  3
+/* YYNRULES -- Number of rules.  */
+#define YYNRULES  13
+/* YYNRULES -- Number of states.  */
+#define YYNSTATES  27
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+#define YYUNDEFTOK  2
+#define YYMAXUTOK   262
+
+#define YYTRANSLATE(YYX)						\
+  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
+static const yytype_uint8 yytranslate[] =
 {
        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -187,335 +533,231 @@ static const char yytranslate[] =
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     1,     6,     7,     8,
-       9,    11
+       2,     2,     2,     2,     2,     2,     1,     2,     6,     7,
+       8,     9,    11
 };
 
 #if YYDEBUG
-static const short yyprhs[] =
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+   YYRHS.  */
+static const yytype_uint8 yyprhs[] =
 {
-       0,     0,     2,     8,    12,    16,    20,    24,    28,    32,
-      35,    37,    39
+       0,     0,     3,     5,    11,    15,    19,    23,    27,    31,
+      35,    38,    40,    42
 };
-static const short yyrhs[] =
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
+static const yytype_int8 yyrhs[] =
 {
-      17,     0,    17,     3,    17,    12,    17,     0,    17,     4,
-      17,     0,    17,     5,    17,     0,    17,     6,    17,     0,
-      17,     7,    17,     0,    17,     8,    17,     0,    17,     9,
-      17,     0,    10,    17,     0,    13,     0,    11,     0,    14,
-      17,    15,     0
+      17,     0,    -1,    18,    -1,    18,     3,    18,    12,    18,
+      -1,    18,     4,    18,    -1,    18,     5,    18,    -1,    18,
+       6,    18,    -1,    18,     7,    18,    -1,    18,     8,    18,
+      -1,    18,     9,    18,    -1,    10,    18,    -1,    13,    -1,
+      11,    -1,    14,    18,    15,    -1
 };
 
-#endif
-
-#if YYDEBUG
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const short yyrline[] =
+/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
+static const yytype_uint8 yyrline[] =
 {
-       0,   150,   158,   162,   166,   170,   174,   178,   182,   186,
-     190,   194,   199
+       0,   150,   150,   158,   162,   166,   170,   174,   178,   182,
+     186,   190,   194,   199
 };
 #endif
 
-
-#if (YYDEBUG) || defined YYERROR_VERBOSE
-
-/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
 static const char *const yytname[] =
 {
-  "$", "error", "$undefined.", "'?'", "'|'", "'&'", "EQUOP2", "CMPOP2", 
-  "ADDOP2", "MULOP2", "'!'", "NUMBER", "':'", "'n'", "'('", "')'", 
-  "start", "exp", 0
+  "$end", "error", "$undefined", "'?'", "'|'", "'&'", "EQUOP2", "CMPOP2",
+  "ADDOP2", "MULOP2", "'!'", "NUMBER", "':'", "'n'", "'('", "')'",
+  "$accept", "start", "exp", 0
 };
 #endif
 
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const short yyr1[] =
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+   token YYLEX-NUM.  */
+static const yytype_uint16 yytoknum[] =
 {
-       0,    16,    17,    17,    17,    17,    17,    17,    17,    17,
-      17,    17,    17
+       0,   256,   257,    63,   124,    38,   258,   259,   260,   261,
+      33,   262,    58,   110,    40,    41
 };
+# endif
 
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const short yyr2[] =
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const yytype_uint8 yyr1[] =
 {
-       0,     1,     5,     3,     3,     3,     3,     3,     3,     2,
-       1,     1,     3
+       0,    16,    17,    18,    18,    18,    18,    18,    18,    18,
+      18,    18,    18,    18
 };
 
-/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
-   doesn't specify something else to do.  Zero means the default is an
-   error. */
-static const short yydefact[] =
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
+static const yytype_uint8 yyr2[] =
 {
-       0,     0,    11,    10,     0,     1,     9,     0,     0,     0,
-       0,     0,     0,     0,     0,    12,     0,     3,     4,     5,
-       6,     7,     8,     0,     2,     0,     0,     0
+       0,     2,     1,     5,     3,     3,     3,     3,     3,     3,
+       2,     1,     1,     3
 };
 
-static const short yydefgoto[] =
+/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
+   Performed when YYTABLE doesn't specify something else to do.  Zero
+   means the default is an error.  */
+static const yytype_uint8 yydefact[] =
 {
-      25,     5
+       0,     0,    12,    11,     0,     0,     2,    10,     0,     1,
+       0,     0,     0,     0,     0,     0,     0,    13,     0,     4,
+       5,     6,     7,     8,     9,     0,     3
 };
 
-static const short yypact[] =
+/* YYDEFGOTO[NTERM-NUM].  */
+static const yytype_int8 yydefgoto[] =
 {
-      -9,    -9,-32768,-32768,    -9,    34,-32768,    11,    -9,    -9,
-      -9,    -9,    -9,    -9,    -9,-32768,    24,    39,    43,    16,
-      26,    -3,-32768,    -9,    34,    21,    53,-32768
+      -1,     5,     6
 };
 
-static const short yypgoto[] =
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+   STATE-NUM.  */
+#define YYPACT_NINF -10
+static const yytype_int8 yypact[] =
 {
-  -32768,    -1
+      -9,    -9,   -10,   -10,    -9,     8,    36,   -10,    13,   -10,
+      -9,    -9,    -9,    -9,    -9,    -9,    -9,   -10,    26,    41,
+      45,    18,    -2,    14,   -10,    -9,    36
 };
 
-
-#define	YYLAST		53
-
-
-static const short yytable[] =
+/* YYPGOTO[NTERM-NUM].  */
+static const yytype_int8 yypgoto[] =
 {
-       6,     1,     2,     7,     3,     4,    14,    16,    17,    18,
-      19,    20,    21,    22,     8,     9,    10,    11,    12,    13,
-      14,    26,    24,    12,    13,    14,    15,     8,     9,    10,
-      11,    12,    13,    14,    13,    14,    23,     8,     9,    10,
-      11,    12,    13,    14,    10,    11,    12,    13,    14,    11,
-      12,    13,    14,    27
+     -10,   -10,    -1
 };
 
-static const short yycheck[] =
+/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
+   positive, shift that token.  If negative, reduce the rule which
+   number is the opposite.  If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF -1
+static const yytype_uint8 yytable[] =
 {
-       1,    10,    11,     4,    13,    14,     9,     8,     9,    10,
-      11,    12,    13,    14,     3,     4,     5,     6,     7,     8,
-       9,     0,    23,     7,     8,     9,    15,     3,     4,     5,
-       6,     7,     8,     9,     8,     9,    12,     3,     4,     5,
-       6,     7,     8,     9,     5,     6,     7,     8,     9,     6,
-       7,     8,     9,     0
+       7,     1,     2,     8,     3,     4,    15,    16,     9,    18,
+      19,    20,    21,    22,    23,    24,    10,    11,    12,    13,
+      14,    15,    16,    16,    26,    14,    15,    16,    17,    10,
+      11,    12,    13,    14,    15,    16,     0,     0,    25,    10,
+      11,    12,    13,    14,    15,    16,    12,    13,    14,    15,
+      16,    13,    14,    15,    16
 };
-#define YYPURE 1
-
-/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
-#line 3 "/usr/local/share/bison/bison.simple"
-
-/* Skeleton output parser for bison,
-
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
-   Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-/* As a special exception, when this file is copied by Bison into a
-   Bison output file, you may use that output file without restriction.
-   This special exception was added by the Free Software Foundation
-   in version 1.24 of Bison.  */
-
-/* This is the parser code that is written into each bison parser when
-   the %semantic_parser declaration is not specified in the grammar.
-   It was written by Richard Stallman by simplifying the hairy parser
-   used when %semantic_parser is specified.  */
-
-/* All symbols defined below should begin with yy or YY, to avoid
-   infringing on user name space.  This should be done even for local
-   variables, as they might otherwise be expanded by user macros.
-   There are some unavoidable exceptions within include files to
-   define necessary library symbols; they are noted "INFRINGES ON
-   USER NAME SPACE" below.  */
-
-#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
-
-/* The parser invokes alloca or malloc; define the necessary symbols.  */
-
-# if YYSTACK_USE_ALLOCA
-#  define YYSTACK_ALLOC alloca
-# else
-#  ifndef YYSTACK_USE_ALLOCA
-#   if defined (alloca) || defined (_ALLOCA_H)
-#    define YYSTACK_ALLOC alloca
-#   else
-#    ifdef __GNUC__
-#     define YYSTACK_ALLOC __builtin_alloca
-#    endif
-#   endif
-#  endif
-# endif
-
-# ifdef YYSTACK_ALLOC
-   /* Pacify GCC's `empty if-body' warning. */
-#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
-# else
-#  if defined (__STDC__) || defined (__cplusplus)
-#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   define YYSIZE_T size_t
-#  endif
-#  define YYSTACK_ALLOC malloc
-#  define YYSTACK_FREE free
-# endif
-#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
 
+#define yypact_value_is_default(yystate) \
+  ((yystate) == (-10))
 
-#if (! defined (yyoverflow) \
-     && (! defined (__cplusplus) \
-	 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+#define yytable_value_is_error(yytable_value) \
+  YYID (0)
 
-/* A type that is properly aligned for any stack member.  */
-union yyalloc
+static const yytype_int8 yycheck[] =
 {
-  short yyss;
-  YYSTYPE yyvs;
-# if YYLSP_NEEDED
-  YYLTYPE yyls;
-# endif
+       1,    10,    11,     4,    13,    14,     8,     9,     0,    10,
+      11,    12,    13,    14,    15,    16,     3,     4,     5,     6,
+       7,     8,     9,     9,    25,     7,     8,     9,    15,     3,
+       4,     5,     6,     7,     8,     9,    -1,    -1,    12,     3,
+       4,     5,     6,     7,     8,     9,     5,     6,     7,     8,
+       9,     6,     7,     8,     9
 };
 
-/* The size of the maximum gap between one aligned stack and the next.  */
-# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
-   N elements.  */
-# if YYLSP_NEEDED
-#  define YYSTACK_BYTES(N) \
-     ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE))	\
-      + 2 * YYSTACK_GAP_MAX)
-# else
-#  define YYSTACK_BYTES(N) \
-     ((N) * (sizeof (short) + sizeof (YYSTYPE))				\
-      + YYSTACK_GAP_MAX)
-# endif
-
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count)		\
-      do					\
-	{					\
-	  register YYSIZE_T yyi;		\
-	  for (yyi = 0; yyi < (Count); yyi++)	\
-	    (To)[yyi] = (From)[yyi];		\
-	}					\
-      while (0)
-#  endif
-# endif
-
-/* Relocate STACK from its old location to the new one.  The
-   local variables YYSIZE and YYSTACKSIZE give the old and new number of
-   elements in the stack, and YYPTR gives the new location of the
-   stack.  Advance YYPTR to a properly aligned location for the next
-   stack.  */
-# define YYSTACK_RELOCATE(Stack)					\
-    do									\
-      {									\
-	YYSIZE_T yynewbytes;						\
-	YYCOPY (&yyptr->Stack, Stack, yysize);				\
-	Stack = &yyptr->Stack;						\
-	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX;	\
-	yyptr += yynewbytes / sizeof (*yyptr);				\
-      }									\
-    while (0)
-
-#endif
-
-
-#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
-# define YYSIZE_T __SIZE_TYPE__
-#endif
-#if ! defined (YYSIZE_T) && defined (size_t)
-# define YYSIZE_T size_t
-#endif
-#if ! defined (YYSIZE_T)
-# if defined (__STDC__) || defined (__cplusplus)
-#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYSIZE_T size_t
-# endif
-#endif
-#if ! defined (YYSIZE_T)
-# define YYSIZE_T unsigned int
-#endif
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+   symbol of state STATE-NUM.  */
+static const yytype_uint8 yystos[] =
+{
+       0,    10,    11,    13,    14,    17,    18,    18,    18,     0,
+       3,     4,     5,     6,     7,     8,     9,    15,    18,    18,
+      18,    18,    18,    18,    18,    12,    18
+};
 
 #define yyerrok		(yyerrstatus = 0)
 #define yyclearin	(yychar = YYEMPTY)
-#define YYEMPTY		-2
+#define YYEMPTY		(-2)
 #define YYEOF		0
+
 #define YYACCEPT	goto yyacceptlab
-#define YYABORT 	goto yyabortlab
-#define YYERROR		goto yyerrlab1
+#define YYABORT		goto yyabortlab
+#define YYERROR		goto yyerrorlab
+
+
 /* Like YYERROR except do call yyerror.  This remains here temporarily
    to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
+   Once GCC version 2 has supplanted version 1, this can go.  However,
+   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
+   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+   discussed.  */
+
 #define YYFAIL		goto yyerrlab
+#if defined YYFAIL
+  /* This is here to suppress warnings from the GCC cpp's
+     -Wunused-macros.  Normally we don't worry about that warning, but
+     some users do, and we want to make it easy for users to remove
+     YYFAIL uses, which will produce warnings from Bison 2.5.  */
+#endif
+
 #define YYRECOVERING()  (!!yyerrstatus)
+
 #define YYBACKUP(Token, Value)					\
 do								\
   if (yychar == YYEMPTY && yylen == 1)				\
     {								\
       yychar = (Token);						\
       yylval = (Value);						\
-      yychar1 = YYTRANSLATE (yychar);				\
-      YYPOPSTACK;						\
+      YYPOPSTACK (1);						\
       goto yybackup;						\
     }								\
   else								\
-    { 								\
-      yyerror ("syntax error: cannot back up");			\
+    {								\
+      yyerror (YY_("syntax error: cannot back up")); \
       YYERROR;							\
     }								\
-while (0)
+while (YYID (0))
+
 
 #define YYTERROR	1
 #define YYERRCODE	256
 
 
-/* YYLLOC_DEFAULT -- Compute the default location (before the actions
-   are run).
-
-   When YYLLOC_DEFAULT is run, CURRENT is set the location of the
-   first token.  By default, to implement support for ranges, extend
-   its range to the last symbol.  */
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+   If N is 0, then set CURRENT to the empty location which ends
+   the previous symbol: RHS[0] (always defined).  */
 
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
 #ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)       	\
-   Current.last_line   = Rhs[N].last_line;	\
-   Current.last_column = Rhs[N].last_column;
+# define YYLLOC_DEFAULT(Current, Rhs, N)				\
+    do									\
+      if (YYID (N))                                                    \
+	{								\
+	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
+	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
+	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
+	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
+	}								\
+      else								\
+	{								\
+	  (Current).first_line   = (Current).last_line   =		\
+	    YYRHSLOC (Rhs, 0).last_line;				\
+	  (Current).first_column = (Current).last_column =		\
+	    YYRHSLOC (Rhs, 0).last_column;				\
+	}								\
+    while (YYID (0))
 #endif
 
 
-/* YYLEX -- calling `yylex' with the right arguments.  */
+/* This macro is provided for backward compatibility. */
 
-#if YYPURE
-# if YYLSP_NEEDED
-#  ifdef YYLEX_PARAM
-#   define YYLEX		yylex (&yylval, &yylloc, YYLEX_PARAM)
-#  else
-#   define YYLEX		yylex (&yylval, &yylloc)
-#  endif
-# else /* !YYLSP_NEEDED */
-#  ifdef YYLEX_PARAM
-#   define YYLEX		yylex (&yylval, YYLEX_PARAM)
-#  else
-#   define YYLEX		yylex (&yylval)
-#  endif
-# endif /* !YYLSP_NEEDED */
-#else /* !YYPURE */
-# define YYLEX			yylex ()
-#endif /* !YYPURE */
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments.  */
 
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (&yylval, YYLEX_PARAM)
+#else
+# define YYLEX yylex (&yylval)
+#endif
 
 /* Enable debugging if requested.  */
 #if YYDEBUG
@@ -525,18 +767,162 @@ while (0)
 #  define YYFPRINTF fprintf
 # endif
 
-# define YYDPRINTF(Args)			\
-do {						\
-  if (yydebug)					\
-    YYFPRINTF Args;				\
-} while (0)
+# define YYDPRINTF(Args)			\
+do {						\
+  if (yydebug)					\
+    YYFPRINTF Args;				\
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
+do {									  \
+  if (yydebug)								  \
+    {									  \
+      YYFPRINTF (stderr, "%s ", Title);					  \
+      yy_symbol_print (stderr,						  \
+		  Type, Value); \
+      YYFPRINTF (stderr, "\n");						  \
+    }									  \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+#endif
+{
+  if (!yyvaluep)
+    return;
+# ifdef YYPRINT
+  if (yytype < YYNTOKENS)
+    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+  YYUSE (yyoutput);
+# endif
+  switch (yytype)
+    {
+      default:
+	break;
+    }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+#endif
+{
+  if (yytype < YYNTOKENS)
+    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+  else
+    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+  YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included).                                                   |
+`------------------------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+#else
+static void
+yy_stack_print (yybottom, yytop)
+    yytype_int16 *yybottom;
+    yytype_int16 *yytop;
+#endif
+{
+  YYFPRINTF (stderr, "Stack now");
+  for (; yybottom <= yytop; yybottom++)
+    {
+      int yybot = *yybottom;
+      YYFPRINTF (stderr, " %d", yybot);
+    }
+  YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top)				\
+do {								\
+  if (yydebug)							\
+    yy_stack_print ((Bottom), (Top));				\
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced.  |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
+#else
+static void
+yy_reduce_print (yyvsp, yyrule)
+    YYSTYPE *yyvsp;
+    int yyrule;
+#endif
+{
+  int yynrhs = yyr2[yyrule];
+  int yyi;
+  unsigned long int yylno = yyrline[yyrule];
+  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+	     yyrule - 1, yylno);
+  /* The symbols being reduced.  */
+  for (yyi = 0; yyi < yynrhs; yyi++)
+    {
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
+      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+		       &(yyvsp[(yyi + 1) - (yynrhs)])
+		       		       );
+      YYFPRINTF (stderr, "\n");
+    }
+}
+
+# define YY_REDUCE_PRINT(Rule)		\
+do {					\
+  if (yydebug)				\
+    yy_reduce_print (yyvsp, Rule); \
+} while (YYID (0))
+
 /* Nonzero means print parse trace.  It is left uninitialized so that
    multiple parsers can coexist.  */
 int yydebug;
 #else /* !YYDEBUG */
 # define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
 #endif /* !YYDEBUG */
 
+
 /* YYINITDEPTH -- initial size of the parser's stacks.  */
 #ifndef	YYINITDEPTH
 # define YYINITDEPTH 200
@@ -546,59 +932,58 @@ int yydebug;
    if the built-in stack extension method is used).
 
    Do not make this value too large; the results are undefined if
-   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
    evaluated with infinite-precision integer arithmetic.  */
 
-#if YYMAXDEPTH == 0
-# undef YYMAXDEPTH
-#endif
-
 #ifndef YYMAXDEPTH
 # define YYMAXDEPTH 10000
 #endif
-

-#ifdef YYERROR_VERBOSE
+
+
+#if YYERROR_VERBOSE
 
 # ifndef yystrlen
-#  if defined (__GLIBC__) && defined (_STRING_H)
+#  if defined __GLIBC__ && defined _STRING_H
 #   define yystrlen strlen
 #  else
 /* Return the length of YYSTR.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
 static YYSIZE_T
-#   if defined (__STDC__) || defined (__cplusplus)
 yystrlen (const char *yystr)
-#   else
+#else
+static YYSIZE_T
 yystrlen (yystr)
-     const char *yystr;
-#   endif
+    const char *yystr;
+#endif
 {
-  register const char *yys = yystr;
-
-  while (*yys++ != '\0')
+  YYSIZE_T yylen;
+  for (yylen = 0; yystr[yylen]; yylen++)
     continue;
-
-  return yys - yystr - 1;
+  return yylen;
 }
 #  endif
 # endif
 
 # ifndef yystpcpy
-#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
+#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
 #   define yystpcpy stpcpy
 #  else
 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
    YYDEST.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
 static char *
-#   if defined (__STDC__) || defined (__cplusplus)
 yystpcpy (char *yydest, const char *yysrc)
-#   else
+#else
+static char *
 yystpcpy (yydest, yysrc)
-     char *yydest;
-     const char *yysrc;
-#   endif
+    char *yydest;
+    const char *yysrc;
+#endif
 {
-  register char *yyd = yydest;
-  register const char *yys = yysrc;
+  char *yyd = yydest;
+  const char *yys = yysrc;
 
   while ((*yyd++ = *yys++) != '\0')
     continue;
@@ -607,149 +992,338 @@ yystpcpy (yydest, yysrc)
 }
 #  endif
 # endif
-#endif
-

-#line 315 "/usr/local/share/bison/bison.simple"
 
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+   quotes and backslashes, so that it's suitable for yyerror.  The
+   heuristic is that double-quoting is unnecessary unless the string
+   contains an apostrophe, a comma, or backslash (other than
+   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
+   null, do not copy; instead, return the length of what the result
+   would have been.  */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+  if (*yystr == '"')
+    {
+      YYSIZE_T yyn = 0;
+      char const *yyp = yystr;
 
-/* The user can define YYPARSE_PARAM as the name of an argument to be passed
-   into yyparse.  The argument should have type void *.
-   It should actually point to an object.
-   Grammar actions can access the variable by casting it
-   to the proper pointer type.  */
+      for (;;)
+	switch (*++yyp)
+	  {
+	  case '\'':
+	  case ',':
+	    goto do_not_strip_quotes;
+
+	  case '\\':
+	    if (*++yyp != '\\')
+	      goto do_not_strip_quotes;
+	    /* Fall through.  */
+	  default:
+	    if (yyres)
+	      yyres[yyn] = *yyp;
+	    yyn++;
+	    break;
+
+	  case '"':
+	    if (yyres)
+	      yyres[yyn] = '\0';
+	    return yyn;
+	  }
+    do_not_strip_quotes: ;
+    }
 
-#ifdef YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
-#  define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
-#  define YYPARSE_PARAM_DECL
-# else
-#  define YYPARSE_PARAM_ARG YYPARSE_PARAM
-#  define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
-# endif
-#else /* !YYPARSE_PARAM */
-# define YYPARSE_PARAM_ARG
-# define YYPARSE_PARAM_DECL
-#endif /* !YYPARSE_PARAM */
-
-/* Prevent warning if -Wstrict-prototypes.  */
-#ifdef __GNUC__
-# ifdef YYPARSE_PARAM
-int yyparse (void *);
-# else
-int yyparse (void);
+  if (! yyres)
+    return yystrlen (yystr);
+
+  return yystpcpy (yyres, yystr) - yyres;
+}
 # endif
-#endif
 
-/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
-   variables are global, or local to YYPARSE.  */
-
-#define YY_DECL_NON_LSP_VARIABLES			\
-/* The lookahead symbol.  */				\
-int yychar;						\
-							\
-/* The semantic value of the lookahead symbol. */	\
-YYSTYPE yylval;						\
-							\
-/* Number of parse errors so far.  */			\
-int yynerrs;
-
-#if YYLSP_NEEDED
-# define YY_DECL_VARIABLES			\
-YY_DECL_NON_LSP_VARIABLES			\
-						\
-/* Location data for the lookahead symbol.  */	\
-YYLTYPE yylloc;
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+   about the unexpected token YYTOKEN for the state stack whose top is
+   YYSSP.
+
+   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
+   not large enough to hold the message.  In that case, also set
+   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
+   required number of bytes is too large to store.  */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+                yytype_int16 *yyssp, int yytoken)
+{
+  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
+  YYSIZE_T yysize = yysize0;
+  YYSIZE_T yysize1;
+  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+  /* Internationalized format string. */
+  const char *yyformat = 0;
+  /* Arguments of yyformat. */
+  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+  /* Number of reported tokens (one for the "unexpected", one per
+     "expected"). */
+  int yycount = 0;
+
+  /* There are many possibilities here to consider:
+     - Assume YYFAIL is not used.  It's too flawed to consider.  See
+       <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
+       for details.  YYERROR is fine as it does not invoke this
+       function.
+     - If this state is a consistent state with a default action, then
+       the only way this function was invoked is if the default action
+       is an error action.  In that case, don't check for expected
+       tokens because there are none.
+     - The only way there can be no lookahead present (in yychar) is if
+       this state is a consistent state with a default action.  Thus,
+       detecting the absence of a lookahead is sufficient to determine
+       that there is no unexpected or expected token to report.  In that
+       case, just report a simple "syntax error".
+     - Don't assume there isn't a lookahead just because this state is a
+       consistent state with a default action.  There might have been a
+       previous inconsistent state, consistent state with a non-default
+       action, or user semantic action that manipulated yychar.
+     - Of course, the expected token list depends on states to have
+       correct lookahead information, and it depends on the parser not
+       to perform extra reductions after fetching a lookahead from the
+       scanner and before detecting a syntax error.  Thus, state merging
+       (from LALR or IELR) and default reductions corrupt the expected
+       token list.  However, the list is correct for canonical LR with
+       one exception: it will still contain any token that will not be
+       accepted due to an error action in a later state.
+  */
+  if (yytoken != YYEMPTY)
+    {
+      int yyn = yypact[*yyssp];
+      yyarg[yycount++] = yytname[yytoken];
+      if (!yypact_value_is_default (yyn))
+        {
+          /* Start YYX at -YYN if negative to avoid negative indexes in
+             YYCHECK.  In other words, skip the first -YYN actions for
+             this state because they are default actions.  */
+          int yyxbegin = yyn < 0 ? -yyn : 0;
+          /* Stay within bounds of both yycheck and yytname.  */
+          int yychecklim = YYLAST - yyn + 1;
+          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+          int yyx;
+
+          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+                && !yytable_value_is_error (yytable[yyx + yyn]))
+              {
+                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+                  {
+                    yycount = 1;
+                    yysize = yysize0;
+                    break;
+                  }
+                yyarg[yycount++] = yytname[yyx];
+                yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+                if (! (yysize <= yysize1
+                       && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+                  return 2;
+                yysize = yysize1;
+              }
+        }
+    }
+
+  switch (yycount)
+    {
+# define YYCASE_(N, S)                      \
+      case N:                               \
+        yyformat = S;                       \
+      break
+      YYCASE_(0, YY_("syntax error"));
+      YYCASE_(1, YY_("syntax error, unexpected %s"));
+      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+    }
+
+  yysize1 = yysize + yystrlen (yyformat);
+  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+    return 2;
+  yysize = yysize1;
+
+  if (*yymsg_alloc < yysize)
+    {
+      *yymsg_alloc = 2 * yysize;
+      if (! (yysize <= *yymsg_alloc
+             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+      return 1;
+    }
+
+  /* Avoid sprintf, as that infringes on the user's name space.
+     Don't have undefined behavior even if the translation
+     produced a string with the wrong number of "%s"s.  */
+  {
+    char *yyp = *yymsg;
+    int yyi = 0;
+    while ((*yyp = *yyformat) != '\0')
+      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+        {
+          yyp += yytnamerr (yyp, yyarg[yyi++]);
+          yyformat += 2;
+        }
+      else
+        {
+          yyp++;
+          yyformat++;
+        }
+  }
+  return 0;
+}
+#endif /* YYERROR_VERBOSE */
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol.  |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
 #else
-# define YY_DECL_VARIABLES			\
-YY_DECL_NON_LSP_VARIABLES
+static void
+yydestruct (yymsg, yytype, yyvaluep)
+    const char *yymsg;
+    int yytype;
+    YYSTYPE *yyvaluep;
 #endif
+{
+  YYUSE (yyvaluep);
 
+  if (!yymsg)
+    yymsg = "Deleting";
+  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
 
-/* If nonreentrant, generate the variables here. */
+  switch (yytype)
+    {
 
-#if !YYPURE
-YY_DECL_VARIABLES
-#endif  /* !YYPURE */
+      default:
+	break;
+    }
+}
 
-int
-yyparse (YYPARSE_PARAM_ARG)
-     YYPARSE_PARAM_DECL
-{
-  /* If reentrant, generate the variables here. */
-#if YYPURE
-  YY_DECL_VARIABLES
-#endif  /* !YYPURE */
 
-  register int yystate;
-  register int yyn;
-  int yyresult;
-  /* Number of tokens to shift before error messages enabled.  */
-  int yyerrstatus;
-  /* Lookahead token as an internal (translated) token number.  */
-  int yychar1 = 0;
-
-  /* Three stacks and their tools:
-     `yyss': related to states,
-     `yyvs': related to semantic values,
-     `yyls': related to locations.
-
-     Refer to the stacks thru separate pointers, to allow yyoverflow
-     to reallocate them elsewhere.  */
-
-  /* The state stack. */
-  short	yyssa[YYINITDEPTH];
-  short *yyss = yyssa;
-  register short *yyssp;
-
-  /* The semantic value stack.  */
-  YYSTYPE yyvsa[YYINITDEPTH];
-  YYSTYPE *yyvs = yyvsa;
-  register YYSTYPE *yyvsp;
-
-#if YYLSP_NEEDED
-  /* The location stack.  */
-  YYLTYPE yylsa[YYINITDEPTH];
-  YYLTYPE *yyls = yylsa;
-  YYLTYPE *yylsp;
+/* Prevent warnings from -Wmissing-prototypes.  */
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void *YYPARSE_PARAM);
+#else
+int yyparse ();
 #endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
 
-#if YYLSP_NEEDED
-# define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
+/*----------.
+| yyparse.  |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+    void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void)
 #else
-# define YYPOPSTACK   (yyvsp--, yyssp--)
+int
+yyparse ()
+
+#endif
 #endif
+{
+/* The lookahead symbol.  */
+int yychar;
+
+/* The semantic value of the lookahead symbol.  */
+YYSTYPE yylval;
+
+    /* Number of syntax errors so far.  */
+    int yynerrs;
+
+    int yystate;
+    /* Number of tokens to shift before error messages enabled.  */
+    int yyerrstatus;
+
+    /* The stacks and their tools:
+       `yyss': related to states.
+       `yyvs': related to semantic values.
+
+       Refer to the stacks thru separate pointers, to allow yyoverflow
+       to reallocate them elsewhere.  */
 
-  YYSIZE_T yystacksize = YYINITDEPTH;
+    /* The state stack.  */
+    yytype_int16 yyssa[YYINITDEPTH];
+    yytype_int16 *yyss;
+    yytype_int16 *yyssp;
 
+    /* The semantic value stack.  */
+    YYSTYPE yyvsa[YYINITDEPTH];
+    YYSTYPE *yyvs;
+    YYSTYPE *yyvsp;
 
+    YYSIZE_T yystacksize;
+
+  int yyn;
+  int yyresult;
+  /* Lookahead token as an internal (translated) token number.  */
+  int yytoken;
   /* The variables used to return semantic value and location from the
      action routines.  */
   YYSTYPE yyval;
-#if YYLSP_NEEDED
-  YYLTYPE yyloc;
+
+#if YYERROR_VERBOSE
+  /* Buffer for error messages, and its allocated size.  */
+  char yymsgbuf[128];
+  char *yymsg = yymsgbuf;
+  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
 #endif
 
-  /* When reducing, the number of symbols on the RHS of the reduced
-     rule. */
-  int yylen;
+#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
+
+  /* The number of symbols on the RHS of the reduced rule.
+     Keep to zero when no symbol should be popped.  */
+  int yylen = 0;
+
+  yytoken = 0;
+  yyss = yyssa;
+  yyvs = yyvsa;
+  yystacksize = YYINITDEPTH;
 
   YYDPRINTF ((stderr, "Starting parse\n"));
 
   yystate = 0;
   yyerrstatus = 0;
   yynerrs = 0;
-  yychar = YYEMPTY;		/* Cause a token to be read.  */
+  yychar = YYEMPTY; /* Cause a token to be read.  */
 
   /* Initialize stack pointers.
      Waste one element of value and location stack
      so that they stay on the same level as the state stack.
      The wasted elements are never initialized.  */
-
   yyssp = yyss;
   yyvsp = yyvs;
-#if YYLSP_NEEDED
-  yylsp = yyls;
-#endif
+
   goto yysetstate;
 
 /*------------------------------------------------------------.
@@ -757,70 +1331,57 @@ yyparse (YYPARSE_PARAM_ARG)
 `------------------------------------------------------------*/
  yynewstate:
   /* In all cases, when you get here, the value and location stacks
-     have just been pushed. so pushing a state here evens the stacks.
-     */
+     have just been pushed.  So pushing a state here evens the stacks.  */
   yyssp++;
 
  yysetstate:
   *yyssp = yystate;
 
-  if (yyssp >= yyss + yystacksize - 1)
+  if (yyss + yystacksize - 1 <= yyssp)
     {
       /* Get the current used size of the three stacks, in elements.  */
       YYSIZE_T yysize = yyssp - yyss + 1;
 
 #ifdef yyoverflow
       {
-	/* Give user a chance to reallocate the stack. Use copies of
+	/* Give user a chance to reallocate the stack.  Use copies of
 	   these so that the &'s don't force the real ones into
 	   memory.  */
 	YYSTYPE *yyvs1 = yyvs;
-	short *yyss1 = yyss;
+	yytype_int16 *yyss1 = yyss;
 
 	/* Each stack pointer address is followed by the size of the
-	   data in use in that stack, in bytes.  */
-# if YYLSP_NEEDED
-	YYLTYPE *yyls1 = yyls;
-	/* This used to be a conditional around just the two extra args,
-	   but that might be undefined if yyoverflow is a macro.  */
-	yyoverflow ("parser stack overflow",
-		    &yyss1, yysize * sizeof (*yyssp),
-		    &yyvs1, yysize * sizeof (*yyvsp),
-		    &yyls1, yysize * sizeof (*yylsp),
-		    &yystacksize);
-	yyls = yyls1;
-# else
-	yyoverflow ("parser stack overflow",
+	   data in use in that stack, in bytes.  This used to be a
+	   conditional around just the two extra args, but that might
+	   be undefined if yyoverflow is a macro.  */
+	yyoverflow (YY_("memory exhausted"),
 		    &yyss1, yysize * sizeof (*yyssp),
 		    &yyvs1, yysize * sizeof (*yyvsp),
 		    &yystacksize);
-# endif
+
 	yyss = yyss1;
 	yyvs = yyvs1;
       }
 #else /* no yyoverflow */
 # ifndef YYSTACK_RELOCATE
-      goto yyoverflowlab;
+      goto yyexhaustedlab;
 # else
       /* Extend the stack our own way.  */
-      if (yystacksize >= YYMAXDEPTH)
-	goto yyoverflowlab;
+      if (YYMAXDEPTH <= yystacksize)
+	goto yyexhaustedlab;
       yystacksize *= 2;
-      if (yystacksize > YYMAXDEPTH)
+      if (YYMAXDEPTH < yystacksize)
 	yystacksize = YYMAXDEPTH;
 
       {
-	short *yyss1 = yyss;
+	yytype_int16 *yyss1 = yyss;
 	union yyalloc *yyptr =
 	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
 	if (! yyptr)
-	  goto yyoverflowlab;
-	YYSTACK_RELOCATE (yyss);
-	YYSTACK_RELOCATE (yyvs);
-# if YYLSP_NEEDED
-	YYSTACK_RELOCATE (yyls);
-# endif
-# undef YYSTACK_RELOCATE
+	  goto yyexhaustedlab;
+	YYSTACK_RELOCATE (yyss_alloc, yyss);
+	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+#  undef YYSTACK_RELOCATE
 	if (yyss1 != yyssa)
 	  YYSTACK_FREE (yyss1);
       }
@@ -829,123 +1390,82 @@ yyparse (YYPARSE_PARAM_ARG)
 
       yyssp = yyss + yysize - 1;
       yyvsp = yyvs + yysize - 1;
-#if YYLSP_NEEDED
-      yylsp = yyls + yysize - 1;
-#endif
 
       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
 		  (unsigned long int) yystacksize));
 
-      if (yyssp >= yyss + yystacksize - 1)
+      if (yyss + yystacksize - 1 <= yyssp)
 	YYABORT;
     }
 
   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
 
-  goto yybackup;
+  if (yystate == YYFINAL)
+    YYACCEPT;
 
+  goto yybackup;
 
 /*-----------.
 | yybackup.  |
 `-----------*/
 yybackup:
 
-/* Do appropriate processing given the current state.  */
-/* Read a lookahead token if we need one and don't already have one.  */
-/* yyresume: */
+  /* Do appropriate processing given the current state.  Read a
+     lookahead token if we need one and don't already have one.  */
 
   /* First try to decide what to do without reference to lookahead token.  */
-
   yyn = yypact[yystate];
-  if (yyn == YYFLAG)
+  if (yypact_value_is_default (yyn))
     goto yydefault;
 
   /* Not known => get a lookahead token if don't already have one.  */
 
-  /* yychar is either YYEMPTY or YYEOF
-     or a valid token in external form.  */
-
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
   if (yychar == YYEMPTY)
     {
       YYDPRINTF ((stderr, "Reading a token: "));
       yychar = YYLEX;
     }
 
-  /* Convert token to internal form (in yychar1) for indexing tables with */
-
-  if (yychar <= 0)		/* This means end of input. */
+  if (yychar <= YYEOF)
     {
-      yychar1 = 0;
-      yychar = YYEOF;		/* Don't call YYLEX any more */
-
+      yychar = yytoken = YYEOF;
       YYDPRINTF ((stderr, "Now at end of input.\n"));
     }
   else
     {
-      yychar1 = YYTRANSLATE (yychar);
-
-#if YYDEBUG
-     /* We have to keep this `#if YYDEBUG', since we use variables
-	which are defined only if `YYDEBUG' is set.  */
-      if (yydebug)
-	{
-	  YYFPRINTF (stderr, "Next token is %d (%s",
-		     yychar, yytname[yychar1]);
-	  /* Give the individual parser a way to print the precise
-	     meaning of a token, for further debugging info.  */
-# ifdef YYPRINT
-	  YYPRINT (stderr, yychar, yylval);
-# endif
-	  YYFPRINTF (stderr, ")\n");
-	}
-#endif
+      yytoken = YYTRANSLATE (yychar);
+      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
     }
 
-  yyn += yychar1;
-  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+  /* If the proper action on seeing token YYTOKEN is to reduce or to
+     detect an error, take that action.  */
+  yyn += yytoken;
+  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
     goto yydefault;
-
   yyn = yytable[yyn];
-
-  /* yyn is what to do for this token type in this state.
-     Negative => reduce, -yyn is rule number.
-     Positive => shift, yyn is new state.
-       New state is final state => don't bother to shift,
-       just return success.
-     0, or most negative number => error.  */
-
-  if (yyn < 0)
+  if (yyn <= 0)
     {
-      if (yyn == YYFLAG)
-	goto yyerrlab;
+      if (yytable_value_is_error (yyn))
+        goto yyerrlab;
       yyn = -yyn;
       goto yyreduce;
     }
-  else if (yyn == 0)
-    goto yyerrlab;
-
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
-  /* Shift the lookahead token.  */
-  YYDPRINTF ((stderr, "Shifting token %d (%s), ",
-	      yychar, yytname[yychar1]));
-
-  /* Discard the token being shifted unless it is eof.  */
-  if (yychar != YYEOF)
-    yychar = YYEMPTY;
-
-  *++yyvsp = yylval;
-#if YYLSP_NEEDED
-  *++yylsp = yylloc;
-#endif
 
   /* Count tokens shifted since error; after three, turn off error
      status.  */
   if (yyerrstatus)
     yyerrstatus--;
 
+  /* Shift the lookahead token.  */
+  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+  /* Discard the shifted token.  */
+  yychar = YYEMPTY;
+
   yystate = yyn;
+  *++yyvsp = yylval;
+
   goto yynewstate;
 
 
@@ -969,140 +1489,152 @@ yyreduce:
   /* If YYLEN is nonzero, implement the default value of the action:
      `$$ = $1'.
 
-     Otherwise, the following line sets YYVAL to the semantic value of
-     the lookahead token.  This behavior is undocumented and Bison
+     Otherwise, the following line sets YYVAL to garbage.
+     This behavior is undocumented and Bison
      users should not rely upon it.  Assigning to YYVAL
      unconditionally makes the parser a bit smaller, and it avoids a
      GCC warning that YYVAL may be used uninitialized.  */
   yyval = yyvsp[1-yylen];
 
-#if YYLSP_NEEDED
-  /* Similarly for the default location.  Let the user run additional
-     commands if for instance locations are ranges.  */
-  yyloc = yylsp[1-yylen];
-  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
-#endif
 
-#if YYDEBUG
-  /* We have to keep this `#if YYDEBUG', since we use variables which
-     are defined only if `YYDEBUG' is set.  */
-  if (yydebug)
+  YY_REDUCE_PRINT (yyn);
+  switch (yyn)
     {
-      int yyi;
-
-      YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
-		 yyn, yyrline[yyn]);
-
-      /* Print the symbols being reduced, and their result.  */
-      for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
-	YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
-      YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
-    }
-#endif
+        case 2:
 
-  switch (yyn) {
-
-case 1:
+/* Line 1806 of yacc.c  */
 #line 151 "plural.y"
-{
-	    if (yyvsp[0].exp == NULL)
+    {
+	    if ((yyvsp[(1) - (1)].exp) == NULL)
 	      YYABORT;
-	    ((struct parse_args *) arg)->res = yyvsp[0].exp;
+	    ((struct parse_args *) arg)->res = (yyvsp[(1) - (1)].exp);
 	  }
     break;
-case 2:
+
+  case 3:
+
+/* Line 1806 of yacc.c  */
 #line 159 "plural.y"
-{
-	    yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);
+    {
+	    (yyval.exp) = new_exp_3 (qmop, (yyvsp[(1) - (5)].exp), (yyvsp[(3) - (5)].exp), (yyvsp[(5) - (5)].exp));
 	  }
     break;
-case 3:
+
+  case 4:
+
+/* Line 1806 of yacc.c  */
 #line 163 "plural.y"
-{
-	    yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);
+    {
+	    (yyval.exp) = new_exp_2 (lor, (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp));
 	  }
     break;
-case 4:
+
+  case 5:
+
+/* Line 1806 of yacc.c  */
 #line 167 "plural.y"
-{
-	    yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);
+    {
+	    (yyval.exp) = new_exp_2 (land, (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp));
 	  }
     break;
-case 5:
+
+  case 6:
+
+/* Line 1806 of yacc.c  */
 #line 171 "plural.y"
-{
-	    yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
+    {
+	    (yyval.exp) = new_exp_2 ((yyvsp[(2) - (3)].op), (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp));
 	  }
     break;
-case 6:
+
+  case 7:
+
+/* Line 1806 of yacc.c  */
 #line 175 "plural.y"
-{
-	    yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
+    {
+	    (yyval.exp) = new_exp_2 ((yyvsp[(2) - (3)].op), (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp));
 	  }
     break;
-case 7:
+
+  case 8:
+
+/* Line 1806 of yacc.c  */
 #line 179 "plural.y"
-{
-	    yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
+    {
+	    (yyval.exp) = new_exp_2 ((yyvsp[(2) - (3)].op), (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp));
 	  }
     break;
-case 8:
+
+  case 9:
+
+/* Line 1806 of yacc.c  */
 #line 183 "plural.y"
-{
-	    yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
+    {
+	    (yyval.exp) = new_exp_2 ((yyvsp[(2) - (3)].op), (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp));
 	  }
     break;
-case 9:
+
+  case 10:
+
+/* Line 1806 of yacc.c  */
 #line 187 "plural.y"
-{
-	    yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);
+    {
+	    (yyval.exp) = new_exp_1 (lnot, (yyvsp[(2) - (2)].exp));
 	  }
     break;
-case 10:
+
+  case 11:
+
+/* Line 1806 of yacc.c  */
 #line 191 "plural.y"
-{
-	    yyval.exp = new_exp_0 (var);
+    {
+	    (yyval.exp) = new_exp_0 (var);
 	  }
     break;
-case 11:
+
+  case 12:
+
+/* Line 1806 of yacc.c  */
 #line 195 "plural.y"
-{
-	    if ((yyval.exp = new_exp_0 (num)) != NULL)
-	      yyval.exp->val.num = yyvsp[0].num;
+    {
+	    if (((yyval.exp) = new_exp_0 (num)) != NULL)
+	      (yyval.exp)->val.num = (yyvsp[(1) - (1)].num);
 	  }
     break;
-case 12:
+
+  case 13:
+
+/* Line 1806 of yacc.c  */
 #line 200 "plural.y"
-{
-	    yyval.exp = yyvsp[-1].exp;
+    {
+	    (yyval.exp) = (yyvsp[(2) - (3)].exp);
 	  }
     break;
-}
 
-#line 705 "/usr/local/share/bison/bison.simple"
 
-

-  yyvsp -= yylen;
-  yyssp -= yylen;
-#if YYLSP_NEEDED
-  yylsp -= yylen;
-#endif
 
-#if YYDEBUG
-  if (yydebug)
-    {
-      short *yyssp1 = yyss - 1;
-      YYFPRINTF (stderr, "state stack now");
-      while (yyssp1 != yyssp)
-	YYFPRINTF (stderr, " %d", *++yyssp1);
-      YYFPRINTF (stderr, "\n");
+/* Line 1806 of yacc.c  */
+#line 1618 "plural.c"
+      default: break;
     }
-#endif
+  /* User semantic actions sometimes alter yychar, and that requires
+     that yytoken be updated with the new translation.  We take the
+     approach of translating immediately before every use of yytoken.
+     One alternative is translating here after every semantic action,
+     but that translation would be missed if the semantic action invokes
+     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
+     incorrect destructor might then be invoked immediately.  In the
+     case of YYERROR or YYBACKUP, subsequent parser actions might lead
+     to an incorrect destructor call or verbose syntax error message
+     before the lookahead is translated.  */
+  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
 
   *++yyvsp = yyval;
-#if YYLSP_NEEDED
-  *++yylsp = yyloc;
-#endif
 
   /* Now `shift' the result of the reduction.  Determine what state
      that goes to, based on the state we popped back to and the rule
@@ -1110,11 +1642,11 @@ case 12:
 
   yyn = yyr1[yyn];
 
-  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
-  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
     yystate = yytable[yystate];
   else
-    yystate = yydefgoto[yyn - YYNTBASE];
+    yystate = yydefgoto[yyn - YYNTOKENS];
 
   goto yynewstate;
 
@@ -1123,159 +1655,133 @@ case 12:
 | yyerrlab -- here on detecting error |
 `------------------------------------*/
 yyerrlab:
+  /* Make sure we have latest lookahead translation.  See comments at
+     user semantic actions for why this is necessary.  */
+  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
   /* If not already recovering from an error, report this error.  */
   if (!yyerrstatus)
     {
       ++yynerrs;
-
-#ifdef YYERROR_VERBOSE
-      yyn = yypact[yystate];
-
-      if (yyn > YYFLAG && yyn < YYLAST)
-	{
-	  YYSIZE_T yysize = 0;
-	  char *yymsg;
-	  int yyx, yycount;
-
-	  yycount = 0;
-	  /* Start YYX at -YYN if negative to avoid negative indexes in
-	     YYCHECK.  */
-	  for (yyx = yyn < 0 ? -yyn : 0;
-	       yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
-	    if (yycheck[yyx + yyn] == yyx)
-	      yysize += yystrlen (yytname[yyx]) + 15, yycount++;
-	  yysize += yystrlen ("parse error, unexpected ") + 1;
-	  yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
-	  yymsg = (char *) YYSTACK_ALLOC (yysize);
-	  if (yymsg != 0)
-	    {
-	      char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
-	      yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
-
-	      if (yycount < 5)
-		{
-		  yycount = 0;
-		  for (yyx = yyn < 0 ? -yyn : 0;
-		       yyx < (int) (sizeof (yytname) / sizeof (char *));
-		       yyx++)
-		    if (yycheck[yyx + yyn] == yyx)
-		      {
-			const char *yyq = ! yycount ? ", expecting " : " or ";
-			yyp = yystpcpy (yyp, yyq);
-			yyp = yystpcpy (yyp, yytname[yyx]);
-			yycount++;
-		      }
-		}
-	      yyerror (yymsg);
-	      YYSTACK_FREE (yymsg);
-	    }
-	  else
-	    yyerror ("parse error; also virtual memory exhausted");
-	}
-      else
-#endif /* defined (YYERROR_VERBOSE) */
-	yyerror ("parse error");
+#if ! YYERROR_VERBOSE
+      yyerror (YY_("syntax error"));
+#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+                                        yyssp, yytoken)
+      {
+        char const *yymsgp = YY_("syntax error");
+        int yysyntax_error_status;
+        yysyntax_error_status = YYSYNTAX_ERROR;
+        if (yysyntax_error_status == 0)
+          yymsgp = yymsg;
+        else if (yysyntax_error_status == 1)
+          {
+            if (yymsg != yymsgbuf)
+              YYSTACK_FREE (yymsg);
+            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+            if (!yymsg)
+              {
+                yymsg = yymsgbuf;
+                yymsg_alloc = sizeof yymsgbuf;
+                yysyntax_error_status = 2;
+              }
+            else
+              {
+                yysyntax_error_status = YYSYNTAX_ERROR;
+                yymsgp = yymsg;
+              }
+          }
+        yyerror (yymsgp);
+        if (yysyntax_error_status == 2)
+          goto yyexhaustedlab;
+      }
+# undef YYSYNTAX_ERROR
+#endif
     }
-  goto yyerrlab1;
 
 
-/*--------------------------------------------------.
-| yyerrlab1 -- error raised explicitly by an action |
-`--------------------------------------------------*/
-yyerrlab1:
+
   if (yyerrstatus == 3)
     {
       /* If just tried and failed to reuse lookahead token after an
 	 error, discard it.  */
 
-      /* return failure if at end of input */
-      if (yychar == YYEOF)
-	YYABORT;
-      YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
-		  yychar, yytname[yychar1]));
-      yychar = YYEMPTY;
+      if (yychar <= YYEOF)
+	{
+	  /* Return failure if at end of input.  */
+	  if (yychar == YYEOF)
+	    YYABORT;
+	}
+      else
+	{
+	  yydestruct ("Error: discarding",
+		      yytoken, &yylval);
+	  yychar = YYEMPTY;
+	}
     }
 
   /* Else will try to reuse lookahead token after shifting the error
      token.  */
+  goto yyerrlab1;
 
-  yyerrstatus = 3;		/* Each real token shifted decrements this */
-
-  goto yyerrhandle;
 
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR.  |
+`---------------------------------------------------*/
+yyerrorlab:
 
-/*-------------------------------------------------------------------.
-| yyerrdefault -- current state does not do anything special for the |
-| error token.                                                       |
-`-------------------------------------------------------------------*/
-yyerrdefault:
-#if 0
-  /* This is wrong; only states that explicitly want error tokens
-     should shift them.  */
+  /* Pacify compilers like GCC when the user code never invokes
+     YYERROR and the label yyerrorlab therefore never appears in user
+     code.  */
+  if (/*CONSTCOND*/ 0)
+     goto yyerrorlab;
 
-  /* If its default is to accept any token, ok.  Otherwise pop it.  */
-  yyn = yydefact[yystate];
-  if (yyn)
-    goto yydefault;
-#endif
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYERROR.  */
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+  yystate = *yyssp;
+  goto yyerrlab1;
 
 
-/*---------------------------------------------------------------.
-| yyerrpop -- pop the current state because it cannot handle the |
-| error token                                                    |
-`---------------------------------------------------------------*/
-yyerrpop:
-  if (yyssp == yyss)
-    YYABORT;
-  yyvsp--;
-  yystate = *--yyssp;
-#if YYLSP_NEEDED
-  yylsp--;
-#endif
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR.  |
+`-------------------------------------------------------------*/
+yyerrlab1:
+  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
 
-#if YYDEBUG
-  if (yydebug)
+  for (;;)
     {
-      short *yyssp1 = yyss - 1;
-      YYFPRINTF (stderr, "Error: state stack now");
-      while (yyssp1 != yyssp)
-	YYFPRINTF (stderr, " %d", *++yyssp1);
-      YYFPRINTF (stderr, "\n");
-    }
-#endif
+      yyn = yypact[yystate];
+      if (!yypact_value_is_default (yyn))
+	{
+	  yyn += YYTERROR;
+	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+	    {
+	      yyn = yytable[yyn];
+	      if (0 < yyn)
+		break;
+	    }
+	}
 
-/*--------------.
-| yyerrhandle.  |
-`--------------*/
-yyerrhandle:
-  yyn = yypact[yystate];
-  if (yyn == YYFLAG)
-    goto yyerrdefault;
+      /* Pop the current state because it cannot handle the error token.  */
+      if (yyssp == yyss)
+	YYABORT;
 
-  yyn += YYTERROR;
-  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
-    goto yyerrdefault;
 
-  yyn = yytable[yyn];
-  if (yyn < 0)
-    {
-      if (yyn == YYFLAG)
-	goto yyerrpop;
-      yyn = -yyn;
-      goto yyreduce;
+      yydestruct ("Error: popping",
+		  yystos[yystate], yyvsp);
+      YYPOPSTACK (1);
+      yystate = *yyssp;
+      YY_STACK_PRINT (yyss, yyssp);
     }
-  else if (yyn == 0)
-    goto yyerrpop;
 
-  if (yyn == YYFINAL)
-    YYACCEPT;
+  *++yyvsp = yylval;
 
-  YYDPRINTF ((stderr, "Shifting error token, "));
 
-  *++yyvsp = yylval;
-#if YYLSP_NEEDED
-  *++yylsp = yylloc;
-#endif
+  /* Shift the error token.  */
+  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
 
   yystate = yyn;
   goto yynewstate;
@@ -1295,21 +1801,50 @@ yyabortlab:
   yyresult = 1;
   goto yyreturn;
 
-/*---------------------------------------------.
-| yyoverflowab -- parser overflow comes here.  |
-`---------------------------------------------*/
-yyoverflowlab:
-  yyerror ("parser stack overflow");
+#if !defined(yyoverflow) || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here.  |
+`-------------------------------------------------*/
+yyexhaustedlab:
+  yyerror (YY_("memory exhausted"));
   yyresult = 2;
   /* Fall through.  */
+#endif
 
 yyreturn:
+  if (yychar != YYEMPTY)
+    {
+      /* Make sure we have latest lookahead translation.  See comments at
+         user semantic actions for why this is necessary.  */
+      yytoken = YYTRANSLATE (yychar);
+      yydestruct ("Cleanup: discarding lookahead",
+                  yytoken, &yylval);
+    }
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYABORT or YYACCEPT.  */
+  YYPOPSTACK (yylen);
+  YY_STACK_PRINT (yyss, yyssp);
+  while (yyssp != yyss)
+    {
+      yydestruct ("Cleanup: popping",
+		  yystos[*yyssp], yyvsp);
+      YYPOPSTACK (1);
+    }
 #ifndef yyoverflow
   if (yyss != yyssa)
     YYSTACK_FREE (yyss);
 #endif
-  return yyresult;
+#if YYERROR_VERBOSE
+  if (yymsg != yymsgbuf)
+    YYSTACK_FREE (yymsg);
+#endif
+  /* Make sure YYID is used.  */
+  return YYID (yyresult);
 }
+
+
+
+/* Line 2067 of yacc.c  */
 #line 205 "plural.y"
 
 
@@ -1488,3 +2023,4 @@ yyerror (const char *str)
 {
   /* Do nothing.  We don't print error messages here.  */
 }
+
diff --git a/lib/CreateLibrary.sh.in b/lib/CreateLibrary.sh.in
index 13ffa5e..6dd4f39 100755
--- a/lib/CreateLibrary.sh.in
+++ b/lib/CreateLibrary.sh.in
@@ -23,7 +23,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # creates a library
 #
diff --git a/lib/CreateLibraryContents.sh.in b/lib/CreateLibraryContents.sh.in
index ccba4a3..8f38224 100755
--- a/lib/CreateLibraryContents.sh.in
+++ b/lib/CreateLibraryContents.sh.in
@@ -23,7 +23,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # create all objects as defined in passed list_files
 #
diff --git a/lib/ListLibraryContents.sh b/lib/ListLibraryContents.sh
index cee49df..9e453b7 100755
--- a/lib/ListLibraryContents.sh
+++ b/lib/ListLibraryContents.sh
@@ -23,7 +23,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # list the contents of a library
 #
diff --git a/lib/ListLibraryContents.sh.in b/lib/ListLibraryContents.sh.in
index cee49df..9e453b7 100755
--- a/lib/ListLibraryContents.sh.in
+++ b/lib/ListLibraryContents.sh.in
@@ -23,7 +23,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # list the contents of a library
 #
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 19bc3c5..ceb4330 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,6 +17,23 @@
 
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -90,17 +107,29 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(pcblibdir)" "$(DESTDIR)$(pcblibdir)" \
 	"$(DESTDIR)$(pcblibm4dir)"
 SCRIPTS = $(dist_noinst_SCRIPTS) $(pcblib_SCRIPTS)
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DATA = $(pcblib_DATA) $(pcblibm4_DATA)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -113,7 +142,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -179,6 +207,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -287,6 +319,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -499,8 +533,11 @@ qfp-ui: $(top_builddir)/config.status $(srcdir)/qfp-ui.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 install-pcblibSCRIPTS: $(pcblib_SCRIPTS)
 	@$(NORMAL_INSTALL)
-	test -z "$(pcblibdir)" || $(MKDIR_P) "$(DESTDIR)$(pcblibdir)"
 	@list='$(pcblib_SCRIPTS)'; test -n "$(pcblibdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pcblibdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pcblibdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
@@ -528,13 +565,14 @@ uninstall-pcblibSCRIPTS:
 	@list='$(pcblib_SCRIPTS)'; test -n "$(pcblibdir)" || exit 0; \
 	files=`for p in $$list; do echo "$$p"; done | \
 	       sed -e 's,.*/,,;$(transform)'`; \
-	test -n "$$list" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(pcblibdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(pcblibdir)" && rm -f $$files
+	dir='$(DESTDIR)$(pcblibdir)'; $(am__uninstall_files_from_dir)
 install-pcblibDATA: $(pcblib_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(pcblibdir)" || $(MKDIR_P) "$(DESTDIR)$(pcblibdir)"
 	@list='$(pcblib_DATA)'; test -n "$(pcblibdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pcblibdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pcblibdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -548,13 +586,14 @@ uninstall-pcblibDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(pcblib_DATA)'; test -n "$(pcblibdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(pcblibdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(pcblibdir)" && rm -f $$files
+	dir='$(DESTDIR)$(pcblibdir)'; $(am__uninstall_files_from_dir)
 install-pcblibm4DATA: $(pcblibm4_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(pcblibm4dir)" || $(MKDIR_P) "$(DESTDIR)$(pcblibm4dir)"
 	@list='$(pcblibm4_DATA)'; test -n "$(pcblibm4dir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pcblibm4dir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pcblibm4dir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -568,9 +607,7 @@ uninstall-pcblibm4DATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(pcblibm4_DATA)'; test -n "$(pcblibm4dir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(pcblibm4dir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(pcblibm4dir)" && rm -f $$files
+	dir='$(DESTDIR)$(pcblibm4dir)'; $(am__uninstall_files_from_dir)
 tags: TAGS
 TAGS:
 
@@ -625,10 +662,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/lib/QueryLibrary.sh.in b/lib/QueryLibrary.sh.in
index b5bed20..f053ced 100755
--- a/lib/QueryLibrary.sh.in
+++ b/lib/QueryLibrary.sh.in
@@ -23,7 +23,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # query a library
 #
diff --git a/lib/TTL_74xx_DIL.list b/lib/TTL_74xx_DIL.list
index e51b4bc..7fbaac4 100755
--- a/lib/TTL_74xx_DIL.list
+++ b/lib/TTL_74xx_DIL.list
@@ -22,7 +22,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # mask package values...
 #
diff --git a/lib/TTL_74xx_DIL.m4 b/lib/TTL_74xx_DIL.m4
index df52b7f..ca3fe0f 100755
--- a/lib/TTL_74xx_DIL.m4
+++ b/lib/TTL_74xx_DIL.m4
@@ -23,7 +23,6 @@ divert(-1)
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 define(`Description_7400_dil', ``4 dual-NAND'')
 define(`Param1_7400_dil', 14)
diff --git a/lib/amp.inc b/lib/amp.inc
index cca93b9..e1fcf55 100644
--- a/lib/amp.inc
+++ b/lib/amp.inc
@@ -1,6 +1,5 @@
 # -*- m4 -*-
 #
-# $Id$
 #                            COPYRIGHT
 #
 #   PCB, interactive printed circuit board design
diff --git a/lib/amphenol.inc b/lib/amphenol.inc
index e41f874..b88ed39 100755
--- a/lib/amphenol.inc
+++ b/lib/amphenol.inc
@@ -1,6 +1,5 @@
 # -*- m4 -*-
 #
-# $Id$
 #                            COPYRIGHT
 #
 #   PCB, interactive printed circuit board design
diff --git a/lib/amphenol.list b/lib/amphenol.list
index 1393b15..d2690d2 100755
--- a/lib/amphenol.list
+++ b/lib/amphenol.list
@@ -1,4 +1,3 @@
-# $Id$
 #                            COPYRIGHT
 #
 #   PCB, interactive printed circuit board design
diff --git a/lib/amphenol.m4 b/lib/amphenol.m4
index fb499cf..c2c4f3c 100755
--- a/lib/amphenol.m4
+++ b/lib/amphenol.m4
@@ -1,5 +1,4 @@
 divert(-1)
-# $Id$
 #                            COPYRIGHT
 #
 #   PCB, interactive printed circuit board design
diff --git a/lib/bourns.inc b/lib/bourns.inc
index 0ebc298..23eee32 100644
--- a/lib/bourns.inc
+++ b/lib/bourns.inc
@@ -1,6 +1,5 @@
 # -*- m4 -*-
 #
-# $Id$
 #                            COPYRIGHT
 #
 #   PCB, interactive printed circuit board design
diff --git a/lib/candk.inc b/lib/candk.inc
index 94e59b9..6ad6072 100644
--- a/lib/candk.inc
+++ b/lib/candk.inc
@@ -1,6 +1,5 @@
 # -*- m4 -*-
 #
-# $Id$
 #                            COPYRIGHT
 #
 #   PCB, interactive printed circuit board design
diff --git a/lib/common.m4 b/lib/common.m4
index bc619c8..4c1f494 100644
--- a/lib/common.m4
+++ b/lib/common.m4
@@ -23,7 +23,6 @@ divert(-1)
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # common defines for packages
 #
diff --git a/lib/connector.inc b/lib/connector.inc
index 3bd8195..689f204 100755
--- a/lib/connector.inc
+++ b/lib/connector.inc
@@ -22,7 +22,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # connector packages
 
diff --git a/lib/connector.list b/lib/connector.list
index d38e622..0af58a8 100755
--- a/lib/connector.list
+++ b/lib/connector.list
@@ -22,7 +22,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # mask package values...
 #
diff --git a/lib/connector.m4 b/lib/connector.m4
index a264c19..ae1575c 100755
--- a/lib/connector.m4
+++ b/lib/connector.m4
@@ -23,7 +23,6 @@ divert(-1)
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 define(`Description_connector2', `connector 2x1 pins')
 define(`Param1_connector2', 1)
diff --git a/lib/crystal.list b/lib/crystal.list
index ad9c265..da0c7b4 100755
--- a/lib/crystal.list
+++ b/lib/crystal.list
@@ -22,7 +22,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # mask package values...
 #
diff --git a/lib/crystal.m4 b/lib/crystal.m4
index bf2979d..cf7e4b2 100755
--- a/lib/crystal.m4
+++ b/lib/crystal.m4
@@ -23,7 +23,6 @@ divert(-1)
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 define(`Description_crystal_300', `crystal 300mil')
 define(`Param1_crystal_300', 300)
diff --git a/lib/cts.inc b/lib/cts.inc
index cf0b648..e1f281c 100644
--- a/lib/cts.inc
+++ b/lib/cts.inc
@@ -1,6 +1,5 @@
 # -*- m4 -*-
 #
-# $Id$
 #                            COPYRIGHT
 #
 #   PCB, interactive printed circuit board design
diff --git a/lib/dil.inc b/lib/dil.inc
index d1cde4a..6a75e0a 100755
--- a/lib/dil.inc
+++ b/lib/dil.inc
@@ -22,7 +22,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # DIL packages
 
diff --git a/lib/geda.inc b/lib/geda.inc
index a56b6ea..985c18a 100644
--- a/lib/geda.inc
+++ b/lib/geda.inc
@@ -1,5 +1,4 @@
 # -*- m4 -*-
-#   $Id$
 #
 #   gEDA compatible footprint names
 #
@@ -13,6 +12,7 @@
 ##  Dual in-line package, narrow (300 mil)
 #   DIP6 .. DIP64, DIP24N, DIP28N
 #
+define(`PKG_DIP4',   `PKG_N(`$1', `$2', `$3',   4,  300)');
 define(`PKG_DIP6',   `PKG_N(`$1', `$2', `$3',   6,  300)');
 define(`PKG_DIP8',   `PKG_N(`$1', `$2', `$3',   8,  300)');
 define(`PKG_DIP14',  `PKG_N(`$1', `$2', `$3',  14,  300)');
diff --git a/lib/gen_geda_list.awk b/lib/gen_geda_list.awk
index 0770b47..fc73e5a 100755
--- a/lib/gen_geda_list.awk
+++ b/lib/gen_geda_list.awk
@@ -1,7 +1,5 @@
 #!/usr/bin/awk -f
 #
-# $Id$
-#
 # Script to regenerate geda.list from geda.inc
 #
 # Usage:
diff --git a/lib/gen_geda_m4.awk b/lib/gen_geda_m4.awk
index 88994de..ccbf4d8 100755
--- a/lib/gen_geda_m4.awk
+++ b/lib/gen_geda_m4.awk
@@ -1,7 +1,5 @@
 #!/usr/bin/awk -f
 #
-# $Id$
-#
 # Script to regenerate geda.m4 from geda.inc
 #
 # Usage:
diff --git a/lib/gen_list.awk b/lib/gen_list.awk
index 5a9e8cd..b3d672e 100755
--- a/lib/gen_list.awk
+++ b/lib/gen_list.awk
@@ -1,7 +1,5 @@
 #!/usr/bin/awk -f
 #
-# $Id$
-#
 #                            COPYRIGHT
 #
 #   PCB, interactive printed circuit board design
diff --git a/lib/gen_m4.awk b/lib/gen_m4.awk
index 2b16867..544f686 100755
--- a/lib/gen_m4.awk
+++ b/lib/gen_m4.awk
@@ -1,7 +1,5 @@
 #!/usr/bin/awk -f
 #
-# $Id$
-#
 #                            COPYRIGHT
 #
 #   PCB, interactive printed circuit board design
diff --git a/lib/generic.list b/lib/generic.list
index bc31768..2fc70ab 100755
--- a/lib/generic.list
+++ b/lib/generic.list
@@ -22,7 +22,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # mask package values...
 #
diff --git a/lib/generic.m4 b/lib/generic.m4
index cd19fcd..a08cac0 100755
--- a/lib/generic.m4
+++ b/lib/generic.m4
@@ -23,7 +23,6 @@ divert(-1)
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 define(`Description_generic8_dil', ``generic'')
 define(`Param1_generic8_dil', 8)
diff --git a/lib/jerry.list b/lib/jerry.list
index 903e853..6d03af9 100644
--- a/lib/jerry.list
+++ b/lib/jerry.list
@@ -22,7 +22,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 
 #  Arcade machine parts needed by Scott "Jerry" Lawrence
 #   jsl at absynth.com
diff --git a/lib/jerry.m4 b/lib/jerry.m4
index f3f742c..28dd30f 100644
--- a/lib/jerry.m4
+++ b/lib/jerry.m4
@@ -23,8 +23,6 @@ divert(-1)
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
-#
 
 #  Arcade machine parts needed by Scott "Jerry" Lawrence
 #   jsl at absynth.com
diff --git a/lib/johnstech.inc b/lib/johnstech.inc
index 926a3ad..0a11fee 100644
--- a/lib/johnstech.inc
+++ b/lib/johnstech.inc
@@ -1,5 +1,4 @@
 # -*- m4 -*-
-# $Id$
 #                            COPYRIGHT
 #
 #   PCB, interactive printed circuit board design
diff --git a/lib/linear.list b/lib/linear.list
index 80eabe3..ab120fd 100755
--- a/lib/linear.list
+++ b/lib/linear.list
@@ -22,7 +22,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # mask package values...
 #
diff --git a/lib/linear.m4 b/lib/linear.m4
index ba01501..5b8e695 100755
--- a/lib/linear.m4
+++ b/lib/linear.m4
@@ -23,7 +23,6 @@ divert(-1)
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 define(`Description_MAX222_dil', `high-speed dual RS232 driver w. shutdown')
 define(`Param1_MAX222_dil', 18)
diff --git a/lib/logic.list b/lib/logic.list
index 8777e57..9f59eb5 100755
--- a/lib/logic.list
+++ b/lib/logic.list
@@ -22,7 +22,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # mask package values...
 #
diff --git a/lib/logic.m4 b/lib/logic.m4
index 517767a..15a2cb1 100755
--- a/lib/logic.m4
+++ b/lib/logic.m4
@@ -23,7 +23,6 @@ divert(-1)
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # ------------------------------------------------------------------------
 # based on mail by Olaf Kaluza (olaf at criseis.ruhr.de)
diff --git a/lib/lsi.list b/lib/lsi.list
index d805435..b98afdf 100755
--- a/lib/lsi.list
+++ b/lib/lsi.list
@@ -22,7 +22,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # mask package values...
 #
diff --git a/lib/lsi.m4 b/lib/lsi.m4
index c495f90..99dd15c 100755
--- a/lib/lsi.m4
+++ b/lib/lsi.m4
@@ -23,7 +23,6 @@ divert(-1)
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # ----------------------------------------------------------------------
 # several different microcontrollers from the PIC family
diff --git a/lib/m4lib_to_newlib.sh b/lib/m4lib_to_newlib.sh
index 09499b6..6ca4b81 100644
--- a/lib/m4lib_to_newlib.sh
+++ b/lib/m4lib_to_newlib.sh
@@ -1,7 +1,4 @@
 #!/bin/sh
-#
-# $Id$
-#
 
 # This script is used to extract all elements from an "oldlib" (M4)
 # style library and place them in individual "newlib" style files.
diff --git a/lib/memory.list b/lib/memory.list
index 00e7b88..ed58e7f 100755
--- a/lib/memory.list
+++ b/lib/memory.list
@@ -22,7 +22,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # mask package values...
 #
diff --git a/lib/memory.m4 b/lib/memory.m4
index 8bdceeb..7af73fb 100755
--- a/lib/memory.m4
+++ b/lib/memory.m4
@@ -23,7 +23,6 @@ divert(-1)
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 define(`Description_27512_dil', `EPROM 64Kx8')
 define(`Param1_27512_dil', 28)
diff --git a/lib/minicircuits.inc b/lib/minicircuits.inc
index 22174a5..9ec6218 100644
--- a/lib/minicircuits.inc
+++ b/lib/minicircuits.inc
@@ -1,6 +1,5 @@
 # -*- m4 -*-
 #
-# $Id$
 #                            COPYRIGHT
 #
 #   PCB, interactive printed circuit board design
diff --git a/lib/misc.inc b/lib/misc.inc
index 380d511..f34a3fc 100755
--- a/lib/misc.inc
+++ b/lib/misc.inc
@@ -22,7 +22,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # misc packages
 #
diff --git a/lib/nichicon.inc b/lib/nichicon.inc
index 545e1d4..f96c151 100644
--- a/lib/nichicon.inc
+++ b/lib/nichicon.inc
@@ -1,6 +1,5 @@
 # -*- m4 -*-
 #
-# $Id$
 #                            COPYRIGHT
 #
 #   PCB, interactive printed circuit board design
diff --git a/lib/optek.inc b/lib/optek.inc
index 943f0c4..711ecde 100644
--- a/lib/optek.inc
+++ b/lib/optek.inc
@@ -1,6 +1,5 @@
 # -*- m4 -*-
 #
-# $Id$
 #                            COPYRIGHT
 #
 #   PCB, interactive printed circuit board design
diff --git a/lib/optical.list b/lib/optical.list
index 8fa292b..1a78dfb 100755
--- a/lib/optical.list
+++ b/lib/optical.list
@@ -22,7 +22,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # mask package values...
 #
diff --git a/lib/optical.m4 b/lib/optical.m4
index 92b6a17..24a7f52 100755
--- a/lib/optical.m4
+++ b/lib/optical.m4
@@ -23,7 +23,6 @@ divert(-1)
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # most (all at the beginning) of the data was provided by
 # Volker Bosch (bosch at iema.e-technik.uni-stuttgart.de)
diff --git a/lib/panasonic.inc b/lib/panasonic.inc
index 5c3b85a..b539cd6 100644
--- a/lib/panasonic.inc
+++ b/lib/panasonic.inc
@@ -1,6 +1,5 @@
 # -*- m4 -*-
 #
-# $Id$
 #                            COPYRIGHT
 #
 #   PCB, interactive printed circuit board design
diff --git a/lib/pcblib b/lib/pcblib
index 694c5dc..6d2fc0a 100644
--- a/lib/pcblib
+++ b/lib/pcblib
@@ -1,4 +1,4 @@
-# This is a frozen state file generated by GNU M4 1.4.14
+# This is a frozen state file generated by GNU M4 1.4.16
 V1
 T17,97
 PinList_TL085_dil`In1-',`In1+',`Out1',`Out2',`In2+',`In2-',`Vcc-',`In3-',`In3+',`Out3',`Vcc+',`Out4',`In4+',`In4-'
@@ -3173,6 +3173,8 @@ T26,42
 Description_geda_SOJ30_350`Small outline J-leaded package (350 mil)'
 T26,28
 Description_geda_QFP128_28`Square Quad-side flat pack'
+T21,40
+Description_geda_DIP4`Dual in-line package, narrow (300 mil)'
 T21,46
 Description_74631_dil`16bit parallel error detection/correction OC'
 T21,43
@@ -8610,6 +8612,8 @@ T26,29
 Description_geda_PENTAWATT`Power IC, as in MULTIWATT15'
 T16,3
 Param2_74322_dil300
+T8,34
+PKG_DIP4PKG_N(`$1', `$2', `$3',   4,  300)
 T24,29
 Description_r_025_csil_6`6xR-array 0.25W, common pin'
 T26,38
diff --git a/lib/pcblib-newlib/geda/DIP4.fp b/lib/pcblib-newlib/geda/DIP4.fp
new file mode 100644
index 0000000..34ee5f5
--- /dev/null
+++ b/lib/pcblib-newlib/geda/DIP4.fp
@@ -0,0 +1,16 @@
+# retain backwards compatibility to older versions of PKG_DIL 
+# which did not have 100,60,28 args
+Element(0x00 "Dual in-line package, narrow (300 mil)" "" "DIP4" 220 100 3 100 0x00)
+(
+	Pin(50 50 60 28 "1" 0x101)
+	Pin(50 150 60 28 "2" 0x01)
+	Pin(350 150 60 28 "3" 0x01)
+	Pin(350 50 60 28 "4" 0x01)
+	ElementLine(0 0 0 200 10)
+	ElementLine(0 200 400 200 10)
+	ElementLine(400 200 400 0 10)
+	ElementLine(0 0 150 0 10)
+	ElementLine(250 0 400 0 10)
+	ElementArc(200 0 50 50 0 180 10)
+	Mark(50 50)
+)
diff --git a/lib/pcblib-newlib/geda/index.html b/lib/pcblib-newlib/geda/index.html
index 4379466..42ee1ed 100644
--- a/lib/pcblib-newlib/geda/index.html
+++ b/lib/pcblib-newlib/geda/index.html
@@ -9,6 +9,10 @@
 </TR>
 
   <TR>
+    <TD>DIP4, Dual in-line package, narrow (300 mil) </TD>
+    <TD><A HREF="DIP4.fp">DIP4.fp</A></TD>
+  </TR>
+  <TR>
     <TD>DIP6, Dual in-line package, narrow (300 mil) </TD>
     <TD><A HREF="DIP6.fp">DIP6.fp</A></TD>
   </TR>
diff --git a/lib/pcblib.contents b/lib/pcblib.contents
index 90226c7..88dfcf0 100644
--- a/lib/pcblib.contents
+++ b/lib/pcblib.contents
@@ -248,6 +248,7 @@ cts_CTS_745C_10:CTS_745C_10:CTS_745C_10:CTS 745C Series Chip Resistor Array [CTS
 cts_CTS_745X_10:CTS_745X_10:CTS_745X_10:CTS 745X Series Chip Resistor Array [CTS_745X_10]
 cts_CTS_746X_10:CTS_746X_10:CTS_746X_10:CTS 746X Series Chip Resistor Array [CTS_746X_10]
 TYPE=~geda
+geda_DIP4:DIP4:DIP4:Dual in-line package, narrow (300 mil) [DIP4]
 geda_DIP6:DIP6:DIP6:Dual in-line package, narrow (300 mil) [DIP6]
 geda_DIP8:DIP8:DIP8:Dual in-line package, narrow (300 mil) [DIP8]
 geda_DIP14:DIP14:DIP14:Dual in-line package, narrow (300 mil) [DIP14]
diff --git a/lib/pci.inc b/lib/pci.inc
index 762749e..23d9189 100644
--- a/lib/pci.inc
+++ b/lib/pci.inc
@@ -1,5 +1,3 @@
-# $Id$
-#
 # Definitions for PCI boards
 # by D.J. Barrow dj_barrow at ariasoft.ie
 #
diff --git a/lib/pci.list b/lib/pci.list
index 0ddcb59..44f9fbd 100644
--- a/lib/pci.list
+++ b/lib/pci.list
@@ -1,6 +1,3 @@
-# $Id$
-#
-
 PCI5V_AVE_HEIGHT:PCI5V_AVE_HEIGHT:PCI5V_AVE_HEIGHT
 PCI5V_MIN_HEIGHT:PCI5V_MIN_HEIGHT:PCI5V_MIN_HEIGHT
 PCI5V_MAX_HEIGHT:PCI5V_MAX_HEIGHT:PCI5V_MAX_HEIGHT
diff --git a/lib/pci.m4 b/lib/pci.m4
index 632ec7d..4dfa176 100644
--- a/lib/pci.m4
+++ b/lib/pci.m4
@@ -1,5 +1,4 @@
 divert(-1)
-# $Id$
 #
 # Definitions for PCI boards
 # by D.J. Barrow dj_barrow at ariasoft.ie
diff --git a/lib/plcc.inc b/lib/plcc.inc
index 5e1a1dc..cbe7458 100755
--- a/lib/plcc.inc
+++ b/lib/plcc.inc
@@ -22,7 +22,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # PLCC packages
 #
diff --git a/lib/png_diff.sh b/lib/png_diff.sh
index 478c19c..ee557fd 100755
--- a/lib/png_diff.sh
+++ b/lib/png_diff.sh
@@ -1,7 +1,5 @@
 #!/bin/sh
 #
-# $Id$
-#
 # Copyright (c) 2003, 2004, 2005, 2006, 2007 Dan McMahill
 
 #  This program is free software; you can redistribute it and/or modify
diff --git a/lib/qfn.inc b/lib/qfn.inc
index d8fb50f..5710cc6 100644
--- a/lib/qfn.inc
+++ b/lib/qfn.inc
@@ -1,5 +1,4 @@
 # -*- m4 -*-
-# $Id$
 #                            COPYRIGHT
 #
 #   PCB, interactive printed circuit board design
diff --git a/lib/qfp-ui.in b/lib/qfp-ui.in
index f6261a1..fe0b8d0 100755
--- a/lib/qfp-ui.in
+++ b/lib/qfp-ui.in
@@ -1,6 +1,5 @@
 #!@WISH@ -f
 
-# $Id$
 #
 # User Interface that generates custom QFP and SOIC packages for pcb-1.6.3
 # Invoked from a line like
diff --git a/lib/qfp.inc b/lib/qfp.inc
index 0ceaeed..a0598d4 100644
--- a/lib/qfp.inc
+++ b/lib/qfp.inc
@@ -22,7 +22,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 #  QFP packages
 #
diff --git a/lib/qfp2.inc b/lib/qfp2.inc
index 04f6aa2..130f237 100644
--- a/lib/qfp2.inc
+++ b/lib/qfp2.inc
@@ -22,7 +22,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 #  QFP packages
 #
diff --git a/lib/qfpdj.inc b/lib/qfpdj.inc
index 51e30b1..98c5d5b 100644
--- a/lib/qfpdj.inc
+++ b/lib/qfpdj.inc
@@ -24,7 +24,6 @@
 #   Improvments by D.J. Barrow dj_barrow at ariasoft.ie
 #   Further improved by W. Kazubski <wk at ire.pw.edu.pl>
 # 
-#   RCS: $Id$
 #
 #  QFP packages
 #
diff --git a/lib/resistor_0.25W.list b/lib/resistor_0.25W.list
index 3c68234..71e27dc 100755
--- a/lib/resistor_0.25W.list
+++ b/lib/resistor_0.25W.list
@@ -22,7 +22,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # mask package values...
 #
diff --git a/lib/resistor_0.25W.m4 b/lib/resistor_0.25W.m4
index 3487ab6..b83a624 100755
--- a/lib/resistor_0.25W.m4
+++ b/lib/resistor_0.25W.m4
@@ -23,7 +23,6 @@ divert(-1)
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 define(`Description_r_025', ``R 0.25W'')
 
diff --git a/lib/resistor_adjust.list b/lib/resistor_adjust.list
index a211622..b6d2657 100644
--- a/lib/resistor_adjust.list
+++ b/lib/resistor_adjust.list
@@ -22,7 +22,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # mask package values...
 #
diff --git a/lib/resistor_adjust.m4 b/lib/resistor_adjust.m4
index ec13611..10def9f 100644
--- a/lib/resistor_adjust.m4
+++ b/lib/resistor_adjust.m4
@@ -23,7 +23,6 @@ divert(-1)
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # most (all at the beginning) of the data was provided by
 # Volker Bosch (bosch at iema.e-technik.uni-stuttgart.de)
diff --git a/lib/resistor_array.list b/lib/resistor_array.list
index f659ba8..32ed7af 100755
--- a/lib/resistor_array.list
+++ b/lib/resistor_array.list
@@ -22,7 +22,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # mask package values...
 #
diff --git a/lib/resistor_array.m4 b/lib/resistor_array.m4
index bdf96e0..a939410 100755
--- a/lib/resistor_array.m4
+++ b/lib/resistor_array.m4
@@ -23,7 +23,6 @@ divert(-1)
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 
 # ----------------------------------------------------------------------
 # resistor array without common pin
diff --git a/lib/rules.inc b/lib/rules.inc
index aee42f9..244e592 100644
--- a/lib/rules.inc
+++ b/lib/rules.inc
@@ -1,5 +1,4 @@
 #
-#   $Id$
 #
 #   design rule definitions --
 #   tune design rules here
diff --git a/lib/smt.inc b/lib/smt.inc
index ace76a0..eba644a 100644
--- a/lib/smt.inc
+++ b/lib/smt.inc
@@ -1,5 +1,4 @@
 # -*- m4 -*-
-#   $Id$
 #
 #   surface mounted components
 #
diff --git a/lib/texas_inst_amplifier.list b/lib/texas_inst_amplifier.list
index 531aaad..4776a48 100755
--- a/lib/texas_inst_amplifier.list
+++ b/lib/texas_inst_amplifier.list
@@ -22,7 +22,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # mask package values...
 #
diff --git a/lib/texas_inst_amplifier.m4 b/lib/texas_inst_amplifier.m4
index 01c2ea5..47572f1 100755
--- a/lib/texas_inst_amplifier.m4
+++ b/lib/texas_inst_amplifier.m4
@@ -23,7 +23,6 @@ divert(-1)
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 define(`Description_TL070_dil', `Single low noise JFET input operational amplifier')
 define(`Param1_TL070_dil', 8)
diff --git a/lib/texas_inst_voltage_reg.list b/lib/texas_inst_voltage_reg.list
index 862cea9..100e641 100644
--- a/lib/texas_inst_voltage_reg.list
+++ b/lib/texas_inst_voltage_reg.list
@@ -22,7 +22,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 #
-#   RCS: $Id$
 #
 # mask package values...
 #
diff --git a/lib/texas_inst_voltage_reg.m4 b/lib/texas_inst_voltage_reg.m4
index a6fdb2f..5a1052c 100644
--- a/lib/texas_inst_voltage_reg.m4
+++ b/lib/texas_inst_voltage_reg.m4
@@ -23,7 +23,6 @@ divert(-1)
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 #
-#   RCS: $Id$
 #
 #
 define(`Description_uA7905C',`-5V 1.5A voltage regulator')
diff --git a/lib/transistor.list b/lib/transistor.list
index 2e7d339..f814079 100755
--- a/lib/transistor.list
+++ b/lib/transistor.list
@@ -22,7 +22,6 @@
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # mask package values...
 #
diff --git a/lib/transistor.m4 b/lib/transistor.m4
index fa33af6..fa112fe 100755
--- a/lib/transistor.m4
+++ b/lib/transistor.m4
@@ -23,7 +23,6 @@ divert(-1)
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
 # 
-#   RCS: $Id$
 #
 # most data by Volker Bosch (bosch at iema.e-technik.uni-stuttgart.de
 #
diff --git a/newlib/2_pin_thru-hole_packages/Makefile.am b/newlib/2_pin_thru-hole_packages/Makefile.am
index 18f59ed..bc67252 100644
--- a/newlib/2_pin_thru-hole_packages/Makefile.am
+++ b/newlib/2_pin_thru-hole_packages/Makefile.am
@@ -1,6 +1,3 @@
-## $Id$
-##
-
 pcblibsubdir= @PCBTREEDIR@/2_pin_thru-hole_packages
 pcblibsub_DATA= ${COMPONENTS}
 COMPONENTS= \
diff --git a/newlib/2_pin_thru-hole_packages/Makefile.in b/newlib/2_pin_thru-hole_packages/Makefile.in
index 7f4c4cd..38fc4b5 100644
--- a/newlib/2_pin_thru-hole_packages/Makefile.in
+++ b/newlib/2_pin_thru-hole_packages/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,6 +16,23 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -65,6 +82,11 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -86,6 +108,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(pcblibsubdir)"
 DATA = $(pcblibsub_DATA)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -93,6 +121,7 @@ ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -105,7 +134,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -171,6 +199,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -279,6 +311,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -345,8 +379,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 install-pcblibsubDATA: $(pcblibsub_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(pcblibsubdir)" || $(MKDIR_P) "$(DESTDIR)$(pcblibsubdir)"
 	@list='$(pcblibsub_DATA)'; test -n "$(pcblibsubdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pcblibsubdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pcblibsubdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -360,9 +397,7 @@ uninstall-pcblibsubDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(pcblibsub_DATA)'; test -n "$(pcblibsubdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(pcblibsubdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(pcblibsubdir)" && rm -f $$files
+	dir='$(DESTDIR)$(pcblibsubdir)'; $(am__uninstall_files_from_dir)
 tags: TAGS
 TAGS:
 
@@ -417,10 +452,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/newlib/Makefile.am b/newlib/Makefile.am
index e38b946..da5dc95 100644
--- a/newlib/Makefile.am
+++ b/newlib/Makefile.am
@@ -1,5 +1,3 @@
-## $Id$
-##
 ## Top level 'newlib' automake file
 
 SUBDIRS=\
diff --git a/newlib/Makefile.in b/newlib/Makefile.in
index 9b7cc1c..2d1ce5d 100644
--- a/newlib/Makefile.in
+++ b/newlib/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -71,6 +88,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	install-pdf-recursive install-ps-recursive install-recursive \
 	installcheck-recursive installdirs-recursive pdf-recursive \
 	ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
   distclean-recursive maintainer-clean-recursive
 AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
@@ -109,6 +131,7 @@ ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -121,7 +144,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -187,6 +209,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -295,6 +321,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -527,13 +555,10 @@ distdir: $(DISTFILES)
 	done
 	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(MKDIR_P) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
+	    $(am__make_dryrun) \
+	      || test -d "$(distdir)/$$subdir" \
+	      || $(MKDIR_P) "$(distdir)/$$subdir" \
+	      || exit 1; \
 	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
 	    $(am__relativize); \
 	    new_distdir=$$reldir; \
@@ -568,10 +593,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/newlib/connectors/Makefile.am b/newlib/connectors/Makefile.am
index b1d56c8..b261d4d 100644
--- a/newlib/connectors/Makefile.am
+++ b/newlib/connectors/Makefile.am
@@ -1,6 +1,3 @@
-## $Id$
-##
-
 pcblibsubdir= @PCBTREEDIR@/connectors
 pcblibsub_DATA= ${COMPONENTS}
 COMPONENTS= \
diff --git a/newlib/connectors/Makefile.in b/newlib/connectors/Makefile.in
index d4f1dbe..dd6cb55 100644
--- a/newlib/connectors/Makefile.in
+++ b/newlib/connectors/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,6 +16,23 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -65,6 +82,11 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -86,6 +108,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(pcblibsubdir)"
 DATA = $(pcblibsub_DATA)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -93,6 +121,7 @@ ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -105,7 +134,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -171,6 +199,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -279,6 +311,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -346,8 +380,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 install-pcblibsubDATA: $(pcblibsub_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(pcblibsubdir)" || $(MKDIR_P) "$(DESTDIR)$(pcblibsubdir)"
 	@list='$(pcblibsub_DATA)'; test -n "$(pcblibsubdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pcblibsubdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pcblibsubdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -361,9 +398,7 @@ uninstall-pcblibsubDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(pcblibsub_DATA)'; test -n "$(pcblibsubdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(pcblibsubdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(pcblibsubdir)" && rm -f $$files
+	dir='$(DESTDIR)$(pcblibsubdir)'; $(am__uninstall_files_from_dir)
 tags: TAGS
 TAGS:
 
@@ -418,10 +453,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/newlib/crystal/Makefile.am b/newlib/crystal/Makefile.am
index a45bf12..f91a2d2 100644
--- a/newlib/crystal/Makefile.am
+++ b/newlib/crystal/Makefile.am
@@ -1,6 +1,3 @@
-## $Id$
-##
-
 pcblibsubdir= @PCBTREEDIR@/crystal
 pcblibsub_DATA= ${COMPONENTS}
 COMPONENTS= \
diff --git a/newlib/crystal/Makefile.in b/newlib/crystal/Makefile.in
index 3fd3e2a..237c80a 100644
--- a/newlib/crystal/Makefile.in
+++ b/newlib/crystal/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,6 +16,23 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -65,6 +82,11 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -86,6 +108,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(pcblibsubdir)"
 DATA = $(pcblibsub_DATA)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -93,6 +121,7 @@ ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -105,7 +134,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -171,6 +199,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -279,6 +311,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -339,8 +373,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 install-pcblibsubDATA: $(pcblibsub_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(pcblibsubdir)" || $(MKDIR_P) "$(DESTDIR)$(pcblibsubdir)"
 	@list='$(pcblibsub_DATA)'; test -n "$(pcblibsubdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pcblibsubdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pcblibsubdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -354,9 +391,7 @@ uninstall-pcblibsubDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(pcblibsub_DATA)'; test -n "$(pcblibsubdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(pcblibsubdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(pcblibsubdir)" && rm -f $$files
+	dir='$(DESTDIR)$(pcblibsubdir)'; $(am__uninstall_files_from_dir)
 tags: TAGS
 TAGS:
 
@@ -411,10 +446,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/newlib/electro-optics/Makefile.am b/newlib/electro-optics/Makefile.am
index 5003ae8..c84c7fd 100644
--- a/newlib/electro-optics/Makefile.am
+++ b/newlib/electro-optics/Makefile.am
@@ -1,6 +1,3 @@
-## $Id$
-##
-
 pcblibsubdir= @PCBTREEDIR@/electro-optics
 pcblibsub_DATA= ${COMPONENTS}
 COMPONENTS= \
diff --git a/newlib/electro-optics/Makefile.in b/newlib/electro-optics/Makefile.in
index 9035ca0..2c75631 100644
--- a/newlib/electro-optics/Makefile.in
+++ b/newlib/electro-optics/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,6 +16,23 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -65,6 +82,11 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -86,6 +108,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(pcblibsubdir)"
 DATA = $(pcblibsub_DATA)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -93,6 +121,7 @@ ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -105,7 +134,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -171,6 +199,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -279,6 +311,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -339,8 +373,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 install-pcblibsubDATA: $(pcblibsub_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(pcblibsubdir)" || $(MKDIR_P) "$(DESTDIR)$(pcblibsubdir)"
 	@list='$(pcblibsub_DATA)'; test -n "$(pcblibsubdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pcblibsubdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pcblibsubdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -354,9 +391,7 @@ uninstall-pcblibsubDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(pcblibsub_DATA)'; test -n "$(pcblibsubdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(pcblibsubdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(pcblibsubdir)" && rm -f $$files
+	dir='$(DESTDIR)$(pcblibsubdir)'; $(am__uninstall_files_from_dir)
 tags: TAGS
 TAGS:
 
@@ -411,10 +446,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/newlib/headers/Makefile.am b/newlib/headers/Makefile.am
index 6a196bf..b543e09 100644
--- a/newlib/headers/Makefile.am
+++ b/newlib/headers/Makefile.am
@@ -1,6 +1,3 @@
-## $Id$
-##
-
 pcblibsubdir= @PCBTREEDIR@/headers
 pcblibsub_DATA= ${COMPONENTS}
 COMPONENTS= \
diff --git a/newlib/headers/Makefile.in b/newlib/headers/Makefile.in
index 10a2a9a..a831ec0 100644
--- a/newlib/headers/Makefile.in
+++ b/newlib/headers/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,6 +16,23 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -65,6 +82,11 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -86,6 +108,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(pcblibsubdir)"
 DATA = $(pcblibsub_DATA)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -93,6 +121,7 @@ ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -105,7 +134,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -171,6 +199,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -279,6 +311,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -341,8 +375,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 install-pcblibsubDATA: $(pcblibsub_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(pcblibsubdir)" || $(MKDIR_P) "$(DESTDIR)$(pcblibsubdir)"
 	@list='$(pcblibsub_DATA)'; test -n "$(pcblibsubdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pcblibsubdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pcblibsubdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -356,9 +393,7 @@ uninstall-pcblibsubDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(pcblibsub_DATA)'; test -n "$(pcblibsubdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(pcblibsubdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(pcblibsubdir)" && rm -f $$files
+	dir='$(DESTDIR)$(pcblibsubdir)'; $(am__uninstall_files_from_dir)
 tags: TAGS
 TAGS:
 
@@ -413,10 +448,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/newlib/keystone/Makefile.am b/newlib/keystone/Makefile.am
index 295f064..e0cde83 100644
--- a/newlib/keystone/Makefile.am
+++ b/newlib/keystone/Makefile.am
@@ -1,6 +1,3 @@
-## $Id$
-##
-
 pcblibsubdir= @PCBTREEDIR@/keystone
 pcblibsub_DATA= ${COMPONENTS}
 COMPONENTS= \
diff --git a/newlib/keystone/Makefile.in b/newlib/keystone/Makefile.in
index 192deca..126fc85 100644
--- a/newlib/keystone/Makefile.in
+++ b/newlib/keystone/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,6 +16,23 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -65,6 +82,11 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -86,6 +108,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(pcblibsubdir)"
 DATA = $(pcblibsub_DATA)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -93,6 +121,7 @@ ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -105,7 +134,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -171,6 +199,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -279,6 +311,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -339,8 +373,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 install-pcblibsubDATA: $(pcblibsub_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(pcblibsubdir)" || $(MKDIR_P) "$(DESTDIR)$(pcblibsubdir)"
 	@list='$(pcblibsub_DATA)'; test -n "$(pcblibsubdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pcblibsubdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pcblibsubdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -354,9 +391,7 @@ uninstall-pcblibsubDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(pcblibsub_DATA)'; test -n "$(pcblibsubdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(pcblibsubdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(pcblibsubdir)" && rm -f $$files
+	dir='$(DESTDIR)$(pcblibsubdir)'; $(am__uninstall_files_from_dir)
 tags: TAGS
 TAGS:
 
@@ -411,10 +446,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/newlib/msp430/Makefile.am b/newlib/msp430/Makefile.am
index ae9ac11..08471b2 100644
--- a/newlib/msp430/Makefile.am
+++ b/newlib/msp430/Makefile.am
@@ -1,6 +1,3 @@
-## $Id$
-##
-
 pcblibsubdir= @PCBTREEDIR@/msp430
 pcblibsub_DATA= ${COMPONENTS}
 COMPONENTS= \
diff --git a/newlib/msp430/Makefile.in b/newlib/msp430/Makefile.in
index 3e3c80a..8ec38cf 100644
--- a/newlib/msp430/Makefile.in
+++ b/newlib/msp430/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,6 +16,23 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -65,6 +82,11 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -86,6 +108,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(pcblibsubdir)"
 DATA = $(pcblibsub_DATA)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -93,6 +121,7 @@ ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -105,7 +134,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -171,6 +199,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -279,6 +311,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -340,8 +374,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 install-pcblibsubDATA: $(pcblibsub_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(pcblibsubdir)" || $(MKDIR_P) "$(DESTDIR)$(pcblibsubdir)"
 	@list='$(pcblibsub_DATA)'; test -n "$(pcblibsubdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pcblibsubdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pcblibsubdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -355,9 +392,7 @@ uninstall-pcblibsubDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(pcblibsub_DATA)'; test -n "$(pcblibsubdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(pcblibsubdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(pcblibsubdir)" && rm -f $$files
+	dir='$(DESTDIR)$(pcblibsubdir)'; $(am__uninstall_files_from_dir)
 tags: TAGS
 TAGS:
 
@@ -412,10 +447,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/newlib/not_vetted_ingo/Makefile.am b/newlib/not_vetted_ingo/Makefile.am
index 580e9c8..1b8f3fe 100644
--- a/newlib/not_vetted_ingo/Makefile.am
+++ b/newlib/not_vetted_ingo/Makefile.am
@@ -1,6 +1,3 @@
-## $Id$
-##
-
 pcblibsubdir= @PCBTREEDIR@/not_vetted_ingo
 pcblibsub_DATA= ${COMPONENTS}
 COMPONENTS= \
diff --git a/newlib/not_vetted_ingo/Makefile.in b/newlib/not_vetted_ingo/Makefile.in
index 0ce869d..2f49860 100644
--- a/newlib/not_vetted_ingo/Makefile.in
+++ b/newlib/not_vetted_ingo/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,6 +16,23 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -65,6 +82,11 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -86,6 +108,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(pcblibsubdir)"
 DATA = $(pcblibsub_DATA)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -93,6 +121,7 @@ ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -105,7 +134,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -171,6 +199,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -279,6 +311,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -356,8 +390,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 install-pcblibsubDATA: $(pcblibsub_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(pcblibsubdir)" || $(MKDIR_P) "$(DESTDIR)$(pcblibsubdir)"
 	@list='$(pcblibsub_DATA)'; test -n "$(pcblibsubdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pcblibsubdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pcblibsubdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -371,9 +408,7 @@ uninstall-pcblibsubDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(pcblibsub_DATA)'; test -n "$(pcblibsubdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(pcblibsubdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(pcblibsubdir)" && rm -f $$files
+	dir='$(DESTDIR)$(pcblibsubdir)'; $(am__uninstall_files_from_dir)
 tags: TAGS
 TAGS:
 
@@ -428,10 +463,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/newlib/sockets/Makefile.am b/newlib/sockets/Makefile.am
index 5cf859f..15b4e57 100644
--- a/newlib/sockets/Makefile.am
+++ b/newlib/sockets/Makefile.am
@@ -1,6 +1,3 @@
-## $Id$
-##
-
 pcblibsubdir= @PCBTREEDIR@/sockets
 pcblibsub_DATA= ${COMPONENTS}
 COMPONENTS=
diff --git a/newlib/sockets/Makefile.in b/newlib/sockets/Makefile.in
index fe8ff75..b3282ef 100644
--- a/newlib/sockets/Makefile.in
+++ b/newlib/sockets/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,6 +16,23 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -65,6 +82,11 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -86,6 +108,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(pcblibsubdir)"
 DATA = $(pcblibsub_DATA)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -93,6 +121,7 @@ ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -105,7 +134,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -171,6 +199,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -279,6 +311,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -337,8 +371,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 install-pcblibsubDATA: $(pcblibsub_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(pcblibsubdir)" || $(MKDIR_P) "$(DESTDIR)$(pcblibsubdir)"
 	@list='$(pcblibsub_DATA)'; test -n "$(pcblibsubdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pcblibsubdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pcblibsubdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -352,9 +389,7 @@ uninstall-pcblibsubDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(pcblibsub_DATA)'; test -n "$(pcblibsubdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(pcblibsubdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(pcblibsubdir)" && rm -f $$files
+	dir='$(DESTDIR)$(pcblibsubdir)'; $(am__uninstall_files_from_dir)
 tags: TAGS
 TAGS:
 
@@ -409,10 +444,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/newlib/tests/Makefile.am b/newlib/tests/Makefile.am
index 0be6654..356d9ba 100644
--- a/newlib/tests/Makefile.am
+++ b/newlib/tests/Makefile.am
@@ -1,6 +1,3 @@
-## $Id$
-##
-
 pcblibsubdir= @PCBTREEDIR@/tests
 pcblibsub_DATA= ${COMPONENTS}
 COMPONENTS= \
diff --git a/newlib/tests/Makefile.in b/newlib/tests/Makefile.in
index 7c6fa9a..a9b8afb 100644
--- a/newlib/tests/Makefile.in
+++ b/newlib/tests/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,6 +16,23 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -65,6 +82,11 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -86,6 +108,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(pcblibsubdir)"
 DATA = $(pcblibsub_DATA)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -93,6 +121,7 @@ ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -105,7 +134,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -171,6 +199,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -279,6 +311,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -346,8 +380,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 install-pcblibsubDATA: $(pcblibsub_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(pcblibsubdir)" || $(MKDIR_P) "$(DESTDIR)$(pcblibsubdir)"
 	@list='$(pcblibsub_DATA)'; test -n "$(pcblibsubdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pcblibsubdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pcblibsubdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -361,9 +398,7 @@ uninstall-pcblibsubDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(pcblibsub_DATA)'; test -n "$(pcblibsubdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(pcblibsubdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(pcblibsubdir)" && rm -f $$files
+	dir='$(DESTDIR)$(pcblibsubdir)'; $(am__uninstall_files_from_dir)
 tags: TAGS
 TAGS:
 
@@ -418,10 +453,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/po/LINGUAS b/po/LINGUAS
index 5af1fed..39ef71f 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -1,3 +1,4 @@
 fr
 ru
 nl
+pt_BR
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
index d29ff17..a10319c 100644
--- a/po/Makefile.in.in
+++ b/po/Makefile.in.in
@@ -49,8 +49,8 @@ MSGFMT = @MSGFMT@
 XGETTEXT = @XGETTEXT@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-MSGMERGE = XGETTEXT=${XGETTEXT} MSGFMT=${MSGFMT}  INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
-GENPOT = XGETTEXT=${XGETTEXT} MSGFMT=${MSGFMT}  INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
+MSGMERGE = XGETTEXT=${XGETTEXT} MSGFMT=${MSGFMT}  INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
+GENPOT = XGETTEXT=${XGETTEXT} MSGFMT=${MSGFMT}  INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
 
 ALL_LINGUAS = @ALL_LINGUAS@
 
@@ -73,15 +73,20 @@ CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$l
 .SUFFIXES:
 .SUFFIXES: .po .pox .gmo .mo .msg .cat
 
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+INTLTOOL_V_MSGFMT = $(INTLTOOL__v_MSGFMT_$(V))
+INTLTOOL__v_MSGFMT_= $(INTLTOOL__v_MSGFMT_$(AM_DEFAULT_VERBOSITY))
+INTLTOOL__v_MSGFMT_0 = @echo "  MSGFMT" $@;
+
 .po.pox:
 	$(MAKE) $(GETTEXT_PACKAGE).pot
 	$(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
 
 .po.mo:
-	$(MSGFMT) -o $@ $<
+	$(INTLTOOL_V_MSGFMT)$(MSGFMT) -o $@ $<
 
 .po.gmo:
-	file=`echo $* | sed 's,.*/,,'`.gmo \
+	$(INTLTOOL_V_MSGFMT)file=`echo $* | sed 's,.*/,,'`.gmo \
 	  && rm -f $$file && $(GMSGFMT) -o $$file $<
 
 .po.cat:
@@ -217,4 +222,4 @@ stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
 .NOEXPORT:
 
 %.res.h: %.res
-	$(INTLTOOL_EXTRACT) --type=gettext/quoted $^
+	make -C ../src $@
diff --git a/po/POTFILES.in b/po/POTFILES.in
index d3d3bbb..f38edcc 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,3 +1,4 @@
+data/pcb.appdata.xml.in
 data/pcb.desktop.in
 data/pcb.xml.in
 data/x-excellon.desktop.in
@@ -16,7 +17,7 @@ src/edif.c
 src/error.c
 src/file.c
 src/find.c
-src/gpcb-menu.res.in
+src/gpcb-menu.res.h
 src/hid/batch/batch.c
 src/hid/common/actions.c
 src/hid/common/hidnogui.c
@@ -36,15 +37,18 @@ src/hid/gtk/gui-library-window.c
 src/hid/gtk/gui-log-window.c
 src/hid/gtk/gui-misc.c
 src/hid/gtk/gui-netlist-window.c
+src/hid/gtk/gui-output-events.c
 src/hid/gtk/gui-top-window.c
 src/hid/lesstif/dialogs.c
+src/hid/lpr/lpr.c
 src/hid/ps/ps.c
+src/hid/gtk/gui-trackball.c
 src/main.c
 src/misc.c
 src/move.c
 src/netlist.c
-src/parse_y.c
-src/pcb-menu.res.in
+src/parse_y.y
+src/pcb-menu.res.h
 src/polygon.c
 src/rats.c
 src/report.c
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
new file mode 100644
index 0000000..14c2dc8
--- /dev/null
+++ b/po/POTFILES.skip
@@ -0,0 +1,2 @@
+intl/plural.c
+src/parse_y.c
diff --git a/po/pt_BR.po b/po/pt_BR.po
new file mode 100644
index 0000000..3f6d379
--- /dev/null
+++ b/po/pt_BR.po
@@ -0,0 +1,6989 @@
+# Brazilian Portuguese  translation for the gEDA pcb package.
+# Copyright (C) 1994,1995,1996 Thomas Nau
+# Copyright (C) 1997, 1998, 1999, 2000, 2001 Harry Eaton
+# This file is distributed under the same license as the pcb package.
+# Jorge Barros de Abreu <ficmatin10 at gmail.com>, 2014.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pcb VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-02-23 05:45-0300\n"
+"PO-Revision-Date: 2014-01-01 09:37-0200\n"
+"Last-Translator: Jorge Barros de Abreu <ficmatin10 at gmail.com>\n"
+"Language-Team: pt_BR <ldpbr-translation at lists.sourceforge.net>\n"
+"Language: pt_BR\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../data/pcb.appdata.xml.in.h:1
+msgid ""
+"PCB is an interactive printed circuit board editor for Unix, Linux, Windows, "
+"and Mac systems."
+msgstr ""
+"PCB é um editor de placa de circuito impresso interativo para sistemas Unix, "
+"Linux, Windows, e Mac."
+
+#: ../data/pcb.appdata.xml.in.h:2
+msgid ""
+"PCB includes a rats nest feature and schematic/netlist import, design rule "
+"checking, and can provide industry standard RS-274X (Gerber), NC drill, and "
+"centroid data (X-Y data) output for use in the board fabrication and "
+"assembly process, as well as photorealistic and design review images."
+msgstr ""
+"PCB inclui um recurso de importação de ninhos de rato and diagramas "
+"esquemáticos e netlist, verificação de regras de desenho, e pode fornecer o "
+"padrão industrial RS-274X (Gerber), perfuração NC, e saída de dados de "
+"cantroid (dados X-Y) para uso em fabricação de placas e processo de "
+"fabricação, bem como imagens fotorealisticas e imagens de exibição de "
+"desenho."
+
+#: ../data/pcb.appdata.xml.in.h:3
+msgid ""
+"PCB offers high end features such as an autorouter and trace optimizer which "
+"can tremendously reduce layout time."
+msgstr ""
+"PCB ofereca recursos de alta qualidade tais como roteamento automático e "
+"otimizador de trilha que pode reduzir tremendamente o tempo do desenho do "
+"traçado."
+
+#: ../data/pcb.appdata.xml.in.h:4
+msgid ""
+"For custom requirements, PCB offers a plug-in API for inserting new "
+"functionality and using that functionality from within the GUI as well as in "
+"scripts."
+msgstr ""
+"Para requisitos personalizados, PCB oferece uma API de recursos adicionais "
+"para inserção de novas funcionalidades e utilização dessa nova "
+"funcionalidade a partir de dentro da interface gráfica do usuário bem com em "
+"scripts."
+
+#: ../data/pcb.desktop.in.h:1
+msgid "PCB Designer"
+msgstr "Desenhista do PCB"
+
+#: ../data/pcb.desktop.in.h:2
+msgid "PCB Design"
+msgstr "Desenho do PCB"
+
+#: ../data/pcb.desktop.in.h:3
+msgid "Create and edit printed circuit board designs"
+msgstr "Cria e edita desenhos de placa de circuito impresso"
+
+#: ../data/pcb.xml.in.h:1 ../data/x-pcb-layout.desktop.in.h:1
+msgid "PCB layout"
+msgstr "Traçado PCB"
+
+#: ../data/pcb.xml.in.h:2 ../data/x-pcb-footprint.desktop.in.h:1
+msgid "PCB footprint"
+msgstr "Matriz PCB"
+
+#: ../data/pcb.xml.in.h:3 ../data/x-pcb-netlist.desktop.in.h:1
+msgid "PCB netlist"
+msgstr "Netlist PCB"
+
+#: ../data/pcb.xml.in.h:4 ../data/x-gerber.desktop.in.h:1
+msgid "Gerber file"
+msgstr "Arquivo Gerber"
+
+#: ../data/pcb.xml.in.h:5 ../data/x-excellon.desktop.in.h:1
+msgid "Excellon drill file"
+msgstr "Arquivo de perfuração Excellon"
+
+#: ../src/action.c:550
+#, c-format
+msgid "Unknown stroke %s\n"
+msgstr "Pressionamento desconhecido %s\n"
+
+#: ../src/action.c:754
+#, c-format
+msgid "Error: function hash size too small (%d vs %lu at %s:%d)\n"
+msgstr "Erro: tamanho do hash de função muito pequeno (%d vs %lu em %s:%d)\n"
+
+#. Change 'char' to 'int' and remove this when we get to 256
+#. strings to hash.
+#: ../src/action.c:762
+#, c-format
+msgid "Error: function hash type too small (%d vs %lu at %s:%d)\n"
+msgstr "Erro: tipo de hash de função muito pequeno (%d vs %lu em %s:%d)\n"
+
+#: ../src/action.c:1016
+msgid ""
+"You must turn via visibility on before\n"
+"you can place vias\n"
+msgstr ""
+"Você deve habilitar a visibilidade da via antes\n"
+"de colocar vias\n"
+
+#: ../src/action.c:1381 ../src/change.c:2294
+msgid "Enter text:"
+msgstr "Insira o texto:"
+
+#: ../src/action.c:1459 ../src/action.c:1602 ../src/action.c:1661
+#: ../src/action.c:1715 ../src/action.c:4066 ../src/action.c:6791
+#: ../src/move.c:477 ../src/move.c:568 ../src/move.c:666 ../src/move.c:740
+#: ../src/rotate.c:422
+msgid "Sorry, the object is locked\n"
+msgstr "Sinto muito, o objeto está travado\n"
+
+#. ---------------------------------------------------------------------------
+#: ../src/action.c:1768
+msgid "Atomic(Save|Restore|Close|Block)"
+msgstr "Atômica(Gravar|Recuperar|Fechar|Bloquear)"
+
+#: ../src/action.c:1770
+msgid "Save or restore the undo serial number."
+msgstr "Gravar ou recuperar o número de série de desfazer."
+
+#. --------------------------------------------------------------------------
+#: ../src/action.c:1833
+msgid "DRC()"
+msgstr "DRC()"
+
+#: ../src/action.c:1835
+msgid "Invoke the DRC check."
+msgstr "Verificar DRC."
+
+#: ../src/action.c:1851
+msgid ""
+"%m+Rules are minspace %$mS, minoverlap %$mS minwidth %$mS, minsilk %$mS\n"
+"min drill %$mS, min annular ring %$mS\n"
+msgstr ""
+"%m+Regras mínimas são espaçamento %$mS, sobreposição %$mS largura %$mS, seda "
+"%$mS\n"
+"perfuração %$mS, espeçura auréola do anel %$mS\n"
+
+#: ../src/action.c:1863
+msgid "No DRC problems found.\n"
+msgstr "Nenhum problema de DRC encontrado.\n"
+
+#: ../src/action.c:1865
+#, c-format
+msgid "Found %d design rule errors.\n"
+msgstr "Encontrado %d erros de regra de desenho\n"
+
+#: ../src/action.c:1867
+#, c-format
+msgid "Aborted DRC after %d design rule errors.\n"
+msgstr "DRC abortado após %d erros de regra de desenho.\n"
+
+#. --------------------------------------------------------------------------
+#: ../src/action.c:1874
+msgid "DumpLibrary()"
+msgstr "DumpLibrary()"
+
+#: ../src/action.c:1877
+msgid "Display the entire contents of the libraries."
+msgstr "Mostrar todo o conteúdo das bibliotecas."
+
+#. --------------------------------------------------------------------------
+#: ../src/action.c:1928
+msgid "Flip(Object|Selected|SelectedElements)"
+msgstr "Vira(Objeto|Selecionado|ComponenteSelecionado)"
+
+#: ../src/action.c:1931
+msgid "Flip an element to the opposite side of the board."
+msgstr "Transfere componentes para o lado posto da placa."
+
+#. --------------------------------------------------------------------------
+#: ../src/action.c:1982
+msgid "Message(message)"
+msgstr "Message(messagem)"
+
+#: ../src/action.c:1984
+msgid "Writes a message to the log window."
+msgstr "Escreve uma mensagem na janela de registro."
+
+#: ../src/action.c:2019
+msgid ""
+"Set the thermal (on the current layer) of pins or vias to the given style.\n"
+"Style = 0 means no thermal.\n"
+"Style = 1 has diagonal fingers with sharp edges.\n"
+"Style = 2 has horizontal and vertical fingers with sharp edges.\n"
+"Style = 3 is a solid connection to the plane.Style = 4 has diagonal fingers "
+"with rounded edges.\n"
+"Style = 5 has horizontal and vertical fingers with rounded edges.\n"
+msgstr ""
+"Ajusta o térmico (sobre a camada atual) dos conectores ou vias para o estilo "
+"dado.\n"
+"Estilo = 0 significa sem térmico.\n"
+"Estilo = 1 tem dedos em diagonal com arestas afiadas.\n"
+"Estilo = 2 tem dedos horizontais e verticais com arestas afiadas.\n"
+"Estilo = 3 é uma conecção sólida ao plano.Style = 4 tem deos em diagonal com "
+"arestas arredondadas.\n"
+"Estilo = 5 tem dedos horizontais e verticais com arestas arredondadas.\n"
+
+#: ../src/action.c:2124
+msgid ""
+"SetValue(Grid|Line|LineSize|Text|TextScale|ViaDrillingHole|Via|ViaSize, "
+"delta)"
+msgstr ""
+"SetValue(Grade|Linha|TamanhoLinha|Texto|TextoProporção|"
+"AnelPerfuraçãoOrifício|Via,|TamanhoVia, delta)"
+
+#: ../src/action.c:2128
+msgid "Change various board-wide values and sizes."
+msgstr "Muda vários vaores e tamanhos de placas largas."
+
+#. ---------------------------------------------------------------------------
+#: ../src/action.c:2234
+msgid "Quit()"
+msgstr "Sair()"
+
+#: ../src/action.c:2236
+msgid "Quits the application after confirming."
+msgstr "Sai de uma aplicação após confirmação."
+
+#: ../src/action.c:2262
+msgid "Connection(Find|ResetLinesAndPolygons|ResetPinsAndVias|Reset)"
+msgstr "Connection(Encontra|ResetLinesAndPolygons|ResetPinsAndVias|Reset)"
+
+#: ../src/action.c:2265
+msgid "Searches connections of the object at the cursor position."
+msgstr "Busca por conecções de objetos na posição do cursor."
+
+#: ../src/action.c:2300 ../src/report.c:692
+msgid "Click on a connection"
+msgstr "Clique sobre uma conecção"
+
+#: ../src/action.c:2339
+msgid "DisperseElements(All|Selected)"
+msgstr "DisperseElements(Todos|Selecionados)"
+
+#: ../src/action.c:2341
+msgid "Disperses elements."
+msgstr "Dispersa componentes."
+
+#: ../src/action.c:2464
+msgid ""
+"Display(NameOnPCB|Description|Value)\n"
+"Display(Grid|Redraw)\n"
+"Display(CycleClip|CycleCrosshair|Toggle45Degree|ToggleStartDirection)\n"
+"Display(ToggleGrid|ToggleRubberBandMode|ToggleUniqueNames)\n"
+"Display(ToggleMask|ToggleName|ToggleClearLine|ToggleFullPoly|ToggleSnapPin)\n"
+"Display(ToggleThindraw|ToggleThindrawPoly|ToggleOrthoMove|ToggleLocalRef)\n"
+"Display(ToggleCheckPlanes|ToggleShowDRC|ToggleAutoDRC)\n"
+"Display(ToggleLiveRoute|LockNames|OnlyNames)\n"
+"Display(Pinout|PinOrPadName)"
+msgstr ""
+"Mostra(NameOnPCB|Descrição|Valor)\n"
+"Mostra(Grade|Redesenha)\n"
+"Mostra(CycleClip|CycleCrosshair|Toggle45Degree|ToggleStartDirection)\n"
+"Mostra(ToggleGrid|ToggleRubberBandMode|ToggleUniqueNames)\n"
+"Mostra(ToggleMask|ToggleName|ToggleClearLine|ToggleFullPoly|ToggleSnapPin)\n"
+"Mostra(ToggleThindraw|ToggleThindrawPoly|ToggleOrthoMove|ToggleLocalRef)\n"
+"Mostra(ToggleCheckPlanes|ToggleShowDRC|ToggleAutoDRC)\n"
+"Mostra(ToggleLiveRoute|LockNames|OnlyNames)\n"
+"Mostra(Pinout|PinOrPadName)"
+
+#: ../src/action.c:2474
+msgid "Several display-related actions."
+msgstr "Muitas ações relacionadas a exibir."
+
+#: ../src/action.c:2830 ../src/action.c:7985
+msgid "Click on an element"
+msgstr "Clique sobre um componente"
+
+#: ../src/action.c:2947
+msgid ""
+"Mode(Arc|Arrow|Copy|InsertPoint|Line|Lock|Move|None|PasteBuffer)\n"
+"Mode(Polygon|Rectangle|Remove|Rotate|Text|Thermal|Via)\n"
+"Mode(Notify|Release|Cancel|Stroke)\n"
+"Mode(Save|Restore)"
+msgstr ""
+"Modo(Arc|Arrow|Copy|InsertPoint|Line|Lock|Move|None|PasteBuffer)\n"
+"Modo(Polygon|Rectangle|Remove|Rotate|Text|Thermal|Via)\n"
+"Modo(Notify|Release|Cancel|Stroke)\n"
+"Modo(Save|Restore)"
+
+#: ../src/action.c:2952
+msgid "Change or use the tool mode."
+msgstr "Muda ou usa o modo ferramenta."
+
+#. ---------------------------------------------------------------------------
+#: ../src/action.c:3220
+msgid "RemoveSelected()"
+msgstr "RemoverSelecionados()"
+
+#: ../src/action.c:3222
+msgid "Removes any selected objects."
+msgstr "Apague quaisquer objetos selecionados."
+
+#. ---------------------------------------------------------------------------
+#: ../src/action.c:3238
+msgid ""
+"Renumber()\n"
+"Renumber(filename)"
+msgstr ""
+"Renumerar()\n"
+"Renumerar(nomearquivo)"
+
+#: ../src/action.c:3242
+msgid ""
+"Renumber all elements.  The changes will be recorded to filename\n"
+"for use in backannotating these changes to the schematic."
+msgstr ""
+"Renumere todos os componentes. As modificações serão gravadas em "
+"nomearquivo.\n"
+"para uso em voltar anotações dessas mudanças para o diagrama esquemático."
+
+#.
+#. * We deal with the case where name already exists in this
+#. * function so the GUI doesn't need to deal with it
+#.
+#: ../src/action.c:3279
+msgid "Save Renumber Annotation File As ..."
+msgstr "Grave o Arquivo de Anotação Renumerado Como ..."
+
+#: ../src/action.c:3280
+msgid ""
+"Choose a file to record the renumbering to.\n"
+"This file may be used to back annotate the\n"
+"change to the schematics.\n"
+msgstr ""
+"Escolha um arquivo para salvar a renumeração.\n"
+"Esse arquivo pode ser usado para voltar anotações de\n"
+"mudança para o diagrama esquemático.\n"
+
+#: ../src/action.c:3305 ../src/action.c:6112
+msgid "File exists!  Ok to overwrite?"
+msgstr "Arquivo existe! Pode sobrescrever?"
+
+#: ../src/action.c:3315
+#, c-format
+msgid "Could not open %s\n"
+msgstr "Não posso abrir %s\n"
+
+#: ../src/action.c:3432
+#, c-format
+msgid "realloc failed() in %s\n"
+msgstr "realloc failed() em %s\n"
+
+#. ---------------------------------------------------------------------------
+#: ../src/action.c:3594
+msgid "RipUp(All|Selected|Element)"
+msgstr "Cancelar(Tudo|Selecionado|Componente)"
+
+#: ../src/action.c:3597
+msgid "Ripup auto-routed tracks, or convert an element to parts."
+msgstr "Cancelar tilhar autoroteadas, ou converter um componente em partes."
+
+#. ---------------------------------------------------------------------------
+#: ../src/action.c:3723
+msgid "AddRats(AllRats|SelectedRats|Close)"
+msgstr "AddRats(AllRats|SelectedRats|Close)"
+
+#: ../src/action.c:3726
+msgid "Add one or more rat lines to the board."
+msgstr "Adicionar uma ou mais linhas de rato à placa."
+
+#: ../src/action.c:3803
+msgid ""
+"Delete(Object|Selected)\n"
+"Delete(AllRats|SelectedRats)"
+msgstr ""
+"Apaga(Objeto|Selecionado)\n"
+"Apaga(Todos os ratos|ratos selecionados)"
+
+#: ../src/action.c:3806
+msgid "Delete stuff."
+msgstr "Apagar coisas."
+
+#: ../src/action.c:3854
+msgid "DeleteRats(AllRats|Selected|SelectedRats)"
+msgstr "ApagaRatos(Todos|Selecionados|SelectedRats)"
+
+#: ../src/action.c:3856
+msgid "Delete rat lines."
+msgstr "Apaga linhas de rato."
+
+#. ---------------------------------------------------------------------------
+#: ../src/action.c:3888
+msgid "AutoPlaceSelected()"
+msgstr "Coloca automaticamente componentes selecionados"
+
+#: ../src/action.c:3890
+msgid "Auto-place selected components."
+msgstr "Coloca automaticamente componentes selecionados"
+
+#: ../src/action.c:3903
+msgid ""
+"Auto-placement can NOT be undone.\n"
+"Do you want to continue anyway?\n"
+msgstr ""
+"Colocação automática não pode ser desfeita.\n"
+"Deseja prosseguir mesmo assim?\n"
+
+#. ---------------------------------------------------------------------------
+#: ../src/action.c:3914
+msgid "AutoRoute(AllRats|SelectedRats)"
+msgstr "AutoRoute(AllRats|SelectedRats)"
+
+#: ../src/action.c:3916
+msgid "Auto-route some or all rat lines."
+msgstr "Auto-route some or all rat lines."
+
+#: ../src/action.c:3967
+msgid ""
+"MarkCrosshair()\n"
+"MarkCrosshair(Center)"
+msgstr ""
+"MarkCrosshair()\n"
+"MarkCrosshair(Centro)"
+
+#: ../src/action.c:3970
+msgid "Set/Reset the Crosshair mark."
+msgstr "Ajusta/Zera a marca de mira."
+
+#: ../src/action.c:4022
+msgid ""
+"ChangeSize(Object, delta)\n"
+"ChangeSize(SelectedObjects|Selected, delta)\n"
+"ChangeSize(SelectedLines|SelectedPins|SelectedVias, delta)\n"
+"ChangeSize(SelectedPads|SelectedTexts|SelectedNames, delta)\n"
+"ChangeSize(SelectedElements, delta)"
+msgstr ""
+"ChangeSize(Object, delta)\n"
+"ChangeSize(SelectedObjects|Selected, delta)\n"
+"ChangeSize(SelectedLines|SelectedPins|SelectedVias, delta)\n"
+"ChangeSize(SelectedPads|SelectedTexts|SelectedNames, delta)\n"
+"ChangeSize(SelectedElements, delta)"
+
+#: ../src/action.c:4028
+msgid "Changes the size of objects."
+msgstr "Modifica o tamanho de objetos."
+
+#: ../src/action.c:4125
+msgid ""
+"ChangeDrillSize(Object, delta)\n"
+"ChangeDrillSize(SelectedPins|SelectedVias|Selected|SelectedObjects, delta)"
+msgstr ""
+"ChangeDrillSize(Object, delta)\n"
+"ChangeDrillSize(SelectedPins|SelectedVias|Selected|SelectedObjects, delta)"
+
+#: ../src/action.c:4129
+msgid "Changes the drilling hole size of objects."
+msgstr "Modifica orifício de perfuração dos objetos selecionados."
+
+#: ../src/action.c:4154 ../src/action.c:4224 ../src/action.c:4587
+#: ../src/action.c:4675 ../src/action.c:4729 ../src/action.c:4805
+#: ../src/action.c:4866 ../src/action.c:4924 ../src/action.c:4983
+#: ../src/action.c:5041 ../src/action.c:5102 ../src/action.c:5165
+#: ../src/action.c:5227 ../src/action.c:5276 ../src/action.c:6561
+#: ../src/action.c:8187
+msgid "Select an Object"
+msgstr "Selecione um Objeto"
+
+#: ../src/action.c:4186
+msgid ""
+"ChangeClearSize(Object, delta)\n"
+"ChangeClearSize(SelectedPins|SelectedPads|SelectedVias, delta)\n"
+"ChangeClearSize(SelectedLines|SelectedArcs, delta\n"
+"ChangeClearSize(Selected|SelectedObjects, delta)"
+msgstr ""
+"ChangeClearSize(Object, delta)\n"
+"ChangeClearSize(SelectedPins|SelectedPads|SelectedVias, delta)\n"
+"ChangeClearSize(SelectedLines|SelectedArcs, delta\n"
+"ChangeClearSize(Selected|SelectedObjects, delta)"
+
+#: ../src/action.c:4192
+msgid "Changes the clearance size of objects."
+msgstr "Modifica o tamanho da folga de objetos."
+
+#: ../src/action.c:4266
+msgid ""
+"MinMaskGap(delta)\n"
+"MinMaskGap(Selected, delta)"
+msgstr ""
+"MinMaskGap(delta)\n"
+"MinMaskGap(Selecionado, delta)"
+
+#: ../src/action.c:4270
+msgid "Ensures the mask is a minimum distance from pins and pads."
+msgstr ""
+"Garante que a máscara esteja a uma distância mínima de conectores e "
+"pastilhas."
+
+#: ../src/action.c:4350
+msgid ""
+"MinClearGap(delta)\n"
+"MinClearGap(Selected, delta)"
+msgstr ""
+"MinClearGap(delta)\n"
+"MinClearGap(Selecionado, delta)"
+
+#: ../src/action.c:4354
+msgid "Ensures that polygons are a minimum distance from objects."
+msgstr "Garante que polígonos estejam a uma mínima distância de objetos."
+
+#: ../src/action.c:4456
+msgid "ChangePinName(ElementName,PinNumber,PinName)"
+msgstr "ChangePinName(ElementName,PinNumber,PinName)"
+
+#: ../src/action.c:4459
+msgid "Sets the name of a specific pin on a specific element."
+msgstr "Ajusta o nome de um conector específico de um componente específico."
+
+#: ../src/action.c:4549
+msgid ""
+"ChangeName(Object)\n"
+"ChangeName(Layout|Layer)"
+msgstr ""
+"ChangeName(Objeto)\n"
+"ChangeName(Traçado|Camada)"
+
+#: ../src/action.c:4552
+msgid "Sets the name of objects."
+msgstr "Ajusta o nome de objetos."
+
+#: ../src/action.c:4625 ../src/action.c:5923
+msgid "Enter the layout name:"
+msgstr "Informe o nome do traçado:"
+
+#: ../src/action.c:4633
+msgid "Enter the layer name:"
+msgstr "Informe o nome da camada:"
+
+#. ---------------------------------------------------------------------------
+#: ../src/action.c:4647
+msgid "MorphPolygon(Object|Selected)"
+msgstr "MorphPolygon(Objeto|Selecionado)"
+
+#: ../src/action.c:4650
+msgid "Converts dead polygon islands into separate polygons."
+msgstr "Converte ilhas de polígonos mortos em polígonos separados."
+
+#: ../src/action.c:4704
+msgid "ToggleHideName(Object|SelectedElements)"
+msgstr "ToggleHideName(Objetos|SelecionadosComponentes)"
+
+#: ../src/action.c:4707
+msgid "Toggles the visibility of element names."
+msgstr "Altere a visibilidade dos nomes dos componentes selecionados."
+
+#: ../src/action.c:4776
+msgid "ChangeJoin(ToggleObject|SelectedLines|SelectedArcs|Selected)"
+msgstr "ChangeJoin(ToggleObject|SelectedLines|SelectedArcs|Selected)"
+
+#: ../src/action.c:4779
+msgid "Changes the join (clearance through polygons) of objects."
+msgstr "Modifica a proximidade (folga através de polígonos) de objetos."
+
+#: ../src/action.c:4837
+msgid ""
+"ChangeSquare(ToggleObject)\n"
+"ChangeSquare(SelectedElements|SelectedPins)\n"
+"ChangeSquare(Selected|SelectedObjects)"
+msgstr ""
+"ChangeSquare(ToggleObject)\n"
+"ChangeSquare(SelectedElements|SelectedPins)\n"
+"ChangeSquare(Selected|SelectedObjects)"
+
+#: ../src/action.c:4842
+msgid "Changes the square flag of pins and pads."
+msgstr "Altere o sinalizador de quadrado de um objeto."
+
+#: ../src/action.c:4898
+msgid "SetSquare(ToggleObject|SelectedElements|SelectedPins)"
+msgstr "SetSquare(ToggleObject|SelectedElements|SelectedPins)"
+
+#: ../src/action.c:4900
+msgid "sets the square-flag of objects."
+msgstr "ajusta o sinalizador de quadrado de objetos."
+
+#: ../src/action.c:4956
+msgid "ClearSquare(ToggleObject|SelectedElements|SelectedPins)"
+msgstr "ClearSquare(ToggleObject|SelectedElements|SelectedPins)"
+
+#: ../src/action.c:4959
+msgid "Clears the square-flag of pins and pads."
+msgstr "Apaga o sinalizador de quadrado de conectores e pastilhas."
+
+#: ../src/action.c:5015
+msgid ""
+"ChangeOctagon(Object|ToggleObject|SelectedObjects|Selected)\n"
+"ChangeOctagon(SelectedElements|SelectedPins|SelectedVias)"
+msgstr ""
+"ChangeOctagon(Object|ToggleObject|SelectedObjects|Selected)\n"
+"ChangeOctagon(SelectedElements|SelectedPins|SelectedVias)"
+
+#: ../src/action.c:5019
+msgid "Changes the octagon-flag of pins and vias."
+msgstr "Modifique o sinalizador de octógono de conectores e vias."
+
+#: ../src/action.c:5078
+msgid "SetOctagon(Object|ToggleObject|SelectedElements|Selected)"
+msgstr "SetOctagon(Object|ToggleObject|SelectedElements|Selected)"
+
+#: ../src/action.c:5080
+msgid "Sets the octagon-flag of objects."
+msgstr "Modifique o sinalizador de octógono do objetos."
+
+#: ../src/action.c:5139
+msgid ""
+"ClearOctagon(ToggleObject|Object|SelectedObjects|Selected)\n"
+"ClearOctagon(SelectedElements|SelectedPins|SelectedVias)"
+msgstr ""
+"ClearOctagon(ToggleObject|Object|SelectedObjects|Selected)\n"
+"ClearOctagon(SelectedElements|SelectedPins|SelectedVias)"
+
+#: ../src/action.c:5143
+msgid "Clears the octagon-flag of pins and vias."
+msgstr "Apaga o sinalizador de octógono de conectores e vias."
+
+#: ../src/action.c:5202
+msgid "ChangeHole(ToggleObject|Object|SelectedVias|Selected)"
+msgstr "ChangeHole(ToggleObject|Object|SelectedVias|Selected)"
+
+#: ../src/action.c:5204
+msgid "Changes the hole flag of objects."
+msgstr "Modifica o sinalizador de orifício de objetos."
+
+#: ../src/action.c:5248
+msgid "ChangePaste(ToggleObject|Object|SelectedPads|Selected)"
+msgstr "ChangePaste(ToggleObject|Object|SelectedPads|Selected)"
+
+#: ../src/action.c:5251
+msgid "Changes the no paste flag of objects."
+msgstr "Modifica o sinalizador de não colar de objetos."
+
+#: ../src/action.c:5297
+msgid ""
+"Select(Object|ToggleObject)\n"
+"Select(All|Block|Connection)\n"
+"Select(ElementByName|ObjectByName|PadByName|PinByName)\n"
+"Select(ElementByName|ObjectByName|PadByName|PinByName, Name)\n"
+"Select(TextByName|ViaByName|NetByName)\n"
+"Select(TextByName|ViaByName|NetByName, Name)\n"
+"Select(Convert)"
+msgstr ""
+"Seleciona(Object|ToggleObject)\n"
+"Seleciona(All|Block|Connection)\n"
+"Seleciona(ElementByName|ObjectByName|PadByName|PinByName)\n"
+"Seleciona(ElementByName|ObjectByName|PadByName|PinByName, Name)\n"
+"Seleciona(TextByName|ViaByName|NetByName)\n"
+"Seleciona(TextByName|ViaByName|NetByName, Name)\n"
+"Seleciona(Convert)"
+
+#: ../src/action.c:5305
+msgid "Toggles or sets the selection."
+msgstr "Modifica ou ajusta a seleção."
+
+#: ../src/action.c:5387 ../src/action.c:5583
+msgid "Enter pattern:"
+msgstr "Informe o modelo:"
+
+#: ../src/action.c:5470
+msgid "Select the Element's Mark Location"
+msgstr "Selecione a Marca de Localização do Componente"
+
+#: ../src/action.c:5505
+msgid ""
+"Unselect(All|Block|Connection)\n"
+"Unselect(ElementByName|ObjectByName|PadByName|PinByName)\n"
+"Unselect(ElementByName|ObjectByName|PadByName|PinByName, Name)\n"
+"Unselect(TextByName|ViaByName)\n"
+"Unselect(TextByName|ViaByName, Name)\n"
+msgstr ""
+"RemoveSeleção(All|Block|Connection)\n"
+"RemoveSeleção(ElementByName|ObjectByName|PadByName|PinByName)\n"
+"RemoveSeleção(ElementByName|ObjectByName|PadByName|PinByName, Name)\n"
+"RemoveSeleção(TextByName|ViaByName)\n"
+"RemoveSeleção(TextByName|ViaByName, Name)\n"
+
+#: ../src/action.c:5512
+msgid "Unselects the object at the pointer location or the specified objects."
+msgstr ""
+"Remove seleção do objeto na localização informada ou de objetos "
+"específicados."
+
+#: ../src/action.c:5665
+msgid ""
+"SaveTo(Layout|LayoutAs,filename)\n"
+"SaveTo(AllConnections|AllUnusedPins|ElementConnections,filename)\n"
+"SaveTo(PasteBuffer,filename)"
+msgstr ""
+"SaveTo(Layout|LayoutAs,filename)\n"
+"SaveTo(AllConnections|AllUnusedPins|ElementConnections,filename)\n"
+"SaveTo(PasteBuffer,filename)"
+
+#: ../src/action.c:5669
+msgid "Saves data to a file."
+msgstr "Grava dados em um arquivo."
+
+#: ../src/action.c:5788
+msgid ""
+"SaveSettings()\n"
+"SaveSettings(local)"
+msgstr ""
+"SaveSettings()\n"
+"SaveSettings(local)"
+
+#: ../src/action.c:5791
+msgid "Saves settings."
+msgstr "Grava Configurações."
+
+#: ../src/action.c:5812
+msgid "LoadFrom(Layout|LayoutToBuffer|ElementToBuffer|Netlist|Revert,filename)"
+msgstr ""
+"LoadFrom(Layout|LayoutToBuffer|ElementToBuffer|Netlist|Revert,filename)"
+
+#: ../src/action.c:5814
+msgid "Load layout data from a file."
+msgstr "Coloca na memória dados a partir de um arquivo."
+
+#: ../src/action.c:5878
+msgid "OK to override layout data?"
+msgstr "Pode sobrescrever os dados do traçado?"
+
+#: ../src/action.c:5893
+msgid "OK to override changes?"
+msgstr "Pode sobrescrever modificações?"
+
+#. ---------------------------------------------------------------------------
+#: ../src/action.c:5903
+msgid "New([name])"
+msgstr "Novo([nome])"
+
+#: ../src/action.c:5905
+msgid "Starts a new layout."
+msgstr "Inicia novo traçado."
+
+#: ../src/action.c:5918
+msgid "OK to clear layout data?"
+msgstr "Pode apagar os dados do traçado ?"
+
+#: ../src/action.c:5969
+msgid ""
+"PasteBuffer(AddSelected|Clear|1..MAX_BUFFER)\n"
+"PasteBuffer(Rotate, 1..3)\n"
+"PasteBuffer(Convert|Save|Restore|Mirror)\n"
+"PasteBuffer(ToLayout, X, Y, units)"
+msgstr ""
+"PasteBuffer(AddSelected|Clear|1..MAX_BUFFER)\n"
+"PasteBuffer(Rotate, 1..3)\n"
+"PasteBuffer(Convert|Save|Restore|Mirror)\n"
+"PasteBuffer(ToLayout, X, Y, units)"
+
+#: ../src/action.c:5975
+msgid "Various operations on the paste buffer."
+msgstr "Várias operações sobre colar na memória."
+
+#: ../src/action.c:6078
+msgid "Buffer has no elements!\n"
+msgstr "Memória vazia!\n"
+
+#: ../src/action.c:6084
+msgid "Save Paste Buffer As ..."
+msgstr "Gravar Colagem de Memória Como ..."
+
+#: ../src/action.c:6085
+msgid ""
+"Choose a file to save the contents of the\n"
+"paste buffer to.\n"
+msgstr ""
+"Escolha um arquivo para gravar o conteúdo da\n"
+"colagem da memória.\n"
+
+#. ---------------------------------------------------------------------------
+#: ../src/action.c:6173
+msgid ""
+"Undo()\n"
+"Undo(ClearList)"
+msgstr ""
+"Undo()\n"
+"Undo(ClearList)"
+
+#: ../src/action.c:6176
+msgid "Undo recent changes."
+msgstr "Desfazer modificações recentes."
+
+#. ---------------------------------------------------------------------------
+#: ../src/action.c:6352
+msgid "Redo()"
+msgstr "Refazer()"
+
+#: ../src/action.c:6354
+msgid "Redo recent \"undo\" operations."
+msgstr "Refaça a última operação de desfazer."
+
+#. ---------------------------------------------------------------------------
+#: ../src/action.c:6400
+msgid "Polygon(Close|PreviousPoint)"
+msgstr "Polígono(Fecha|PontoAnterior)"
+
+#: ../src/action.c:6402
+msgid "Some polygon related stuff."
+msgstr "Algumas coisas relacionadas a polígonos."
+
+#. ---------------------------------------------------------------------------
+#: ../src/action.c:6448
+msgid "RouteStyle(1|2|3|4)"
+msgstr "Estilos de Rota(1|2|3|4)"
+
+#: ../src/action.c:6451
+msgid "Copies the indicated routing style into the current sizes."
+msgstr "Copia o estilo de rota indicado no tamanho atuais."
+
+#. ---------------------------------------------------------------------------
+#: ../src/action.c:6483
+msgid "MoveObject(X,Y,dim)"
+msgstr "MoveObjeto(X,Y,dim)"
+
+#: ../src/action.c:6486
+msgid "Moves the object under the crosshair."
+msgstr "Move o objeto sob a mira."
+
+#: ../src/action.c:6515
+msgid "Nothing found under crosshair\n"
+msgstr "Nada encontrado sob a mira\n"
+
+#: ../src/action.c:6535
+msgid "MoveToCurrentLayer(Object|SelectedObjects)"
+msgstr "MoveToCurrentLayer(Object|SelectedObjects)"
+
+#: ../src/action.c:6538
+msgid "Moves objects to the current layer."
+msgstr "Mova objetos para a camada atual."
+
+#: ../src/action.c:6581
+msgid "SetSame()"
+msgstr "Ajusta o Mesmo"
+
+#: ../src/action.c:6584
+msgid "Sets current layer and sizes to match indicated item."
+msgstr "Grava a camada atual e tamanhos para coincidir com o item indicado."
+
+#: ../src/action.c:6657
+msgid ""
+"SetFlag(Object|Selected|SelectedObjects, flag)\n"
+"SetFlag(SelectedLines|SelectedPins|SelectedVias, flag)\n"
+"SetFlag(SelectedPads|SelectedTexts|SelectedNames, flag)\n"
+"SetFlag(SelectedElements, flag)\n"
+"flag = square | octagon | thermal | join"
+msgstr ""
+"SetFlag(Objeto|Selected|SelectedObjects, sinalizador)\n"
+"SetFlag(SelectedLines|SelectedPins|SelectedVias, sinalizador)\n"
+"SetFlag(SelectedPads|SelectedTexts|SelectedNames, sinalizador)\n"
+"SetFlag(SelectedElements, sinalizador)\n"
+"flag = quadrado | octógono | térmico | junção"
+
+#: ../src/action.c:6663
+msgid "Sets flags on objects."
+msgstr "Ajusta sinalizadores sobre objetos."
+
+#: ../src/action.c:6688
+msgid ""
+"ClrFlag(Object|Selected|SelectedObjects, flag)\n"
+"ClrFlag(SelectedLines|SelectedPins|SelectedVias, flag)\n"
+"ClrFlag(SelectedPads|SelectedTexts|SelectedNames, flag)\n"
+"ClrFlag(SelectedElements, flag)\n"
+"flag = square | octagon | thermal | join"
+msgstr ""
+"ClrFlag(Object|Selected|SelectedObjects, flag)\n"
+"ClrFlag(SelectedLines|SelectedPins|SelectedVias, flag)\n"
+"ClrFlag(SelectedPads|SelectedTexts|SelectedNames, flag)\n"
+"ClrFlag(SelectedElements, flag)\n"
+"sinalizador = quadrado | octógono | térmico | junção"
+
+#: ../src/action.c:6694
+msgid "Clears flags on objects."
+msgstr "Apaga sinalizadores sobre objetos."
+
+#: ../src/action.c:6719
+msgid ""
+"ChangeFlag(Object|Selected|SelectedObjects, flag, value)\n"
+"ChangeFlag(SelectedLines|SelectedPins|SelectedVias, flag, value)\n"
+"ChangeFlag(SelectedPads|SelectedTexts|SelectedNames, flag, value)\n"
+"ChangeFlag(SelectedElements, flag, value)\n"
+"flag = square | octagon | thermal | join\n"
+"value = 0 | 1"
+msgstr ""
+"ChangeFlag(Object|Selected|SelectedObjects, flag, value)\n"
+"ChangeFlag(SelectedLines|SelectedPins|SelectedVias, flag, value)\n"
+"ChangeFlag(SelectedPads|SelectedTexts|SelectedNames, flag, value)\n"
+"ChangeFlag(SelectedElements, flag, value)\n"
+"sinalizador = quadrado | octógono | térmico | junção\n"
+"valor = 0 | 1"
+
+#: ../src/action.c:6726
+msgid "Sets or clears flags on objects."
+msgstr "Ajusta ou apaga sinalizadores sobre objetos."
+
+#: ../src/action.c:6776
+#, c-format
+msgid "%s():  Flag \"%s\" is not valid\n"
+msgstr "%s():  Sinalizador \"%s\" inválido\n"
+
+#. ---------------------------------------------------------------------------
+#: ../src/action.c:6842
+msgid "ExecuteFile(filename)"
+msgstr "ExecuteFile(nomearquivo)"
+
+#: ../src/action.c:6844
+msgid "Run actions from the given file."
+msgstr "Run actions from the given file."
+
+#: ../src/action.c:6868
+#, c-format
+msgid "Could not open actions file \"%s\".\n"
+msgstr "Não posso abrir arquivo de ações \"%s\".\n"
+
+#: ../src/action.c:6969
+msgid "ElementList(Start|Done|Need,<refdes>,<footprint>,<value>)"
+msgstr "ElementList(Inicia|Feito|Precisa,<refdes>,<matriz>,<valor>)"
+
+#: ../src/action.c:6972
+msgid "Adds the given element if it doesn't already exist."
+msgstr "Adiciona o componente dado se ele não existir."
+
+#: ../src/action.c:7050
+msgid ""
+"Not all requested footprints were found.\n"
+"See the message log for details"
+msgstr ""
+"Falta ser encontrado algumas matrizes requisitadas.\n"
+"Veja mensagem no registro para detalhes"
+
+#: ../src/action.c:7187
+msgid "ElementSetAttr(refdes,name[,value])"
+msgstr "ElementSetAttr(refdes,name[,value])"
+
+#: ../src/action.c:7190
+msgid "Sets or clears an element-specific attribute."
+msgstr "Ajusta ou apaga um atributo específico de componente."
+
+#: ../src/action.c:7228
+#, c-format
+msgid "Cannot change attribute of %s - element not found\n"
+msgstr "Não posso mudar o atributo de %s - componente não encontrado\n"
+
+#. ----------------------------------------------------------------
+#: ../src/action.c:7252
+msgid "ExecCommand(command)"
+msgstr "ExecCommand(comando)"
+
+#: ../src/action.c:7254
+msgid "Runs a command."
+msgstr "Executar um comando."
+
+#. error
+#: ../src/action.c:7296
+msgid "Cannot fork!"
+msgstr "Não posso bifurcar"
+
+#: ../src/action.c:7451
+#, c-format
+msgid "%s():  Unable to determine temp directory name from the temp file\n"
+msgstr ""
+"%s():  Incapaz de determinar o nome do diretório temporário a partir do "
+"arquivo temporário\n"
+
+#: ../src/action.c:7474
+#, c-format
+msgid "Failed to unlink \"%s\"\n"
+msgstr "Falha para desfazer ligação \"%s\"\n"
+
+#: ../src/action.c:7487
+msgid ""
+"Import()\n"
+"Import([gnetlist|make[,source,source,...]])\n"
+"Import(setnewpoint[,(mark|center|X,Y)])\n"
+"Import(setdisperse,D,units)\n"
+msgstr ""
+"Import()\n"
+"Import([gnetlist|make[,source,source,...]])\n"
+"Import(setnewpoint[,(marca|centro|X,Y)])\n"
+"Import(setdisperse,D,unidades)\n"
+
+#: ../src/action.c:7492
+msgid "Import schematics."
+msgstr "Importa diagramas esquemáticos."
+
+#: ../src/action.c:7626
+msgid "Enter dispersion:"
+msgstr "Informe a dispersão:"
+
+#: ../src/action.c:7652
+msgid "Click on a location"
+msgstr "Clique sobre uma localização"
+
+#: ../src/action.c:7675
+msgid "Bad syntax for Import(setnewpoint)"
+msgstr "Sintaxe inadequada para Import(setnewpoint)"
+
+#: ../src/action.c:7764 ../src/action.c:7827
+msgid "Could not create temp file"
+msgstr "Não posso criar arquivo temporário"
+
+#: ../src/action.c:7881
+#, c-format
+msgid "Unknown import mode: %s\n"
+msgstr "Modo de importação desconhecido: %s\n"
+
+#: ../src/action.c:7898
+msgid ""
+"Attributes(Layout|Layer|Element)\n"
+"Attributes(Layer,layername)"
+msgstr ""
+"Attributes(Traçado|Camada|Componente)\n"
+"Attributes(Camada,nomecamada)"
+
+#: ../src/action.c:7902
+msgid ""
+"Let the user edit the attributes of the layout, current or given\n"
+"layer, or selected element."
+msgstr ""
+"Permite ao usuário editar os atributos do traçado, camada atual\n"
+"ou informada, ou componente selecionado."
+
+#: ../src/action.c:7925
+msgid "This GUI doesn't support Attribute Editing\n"
+msgstr "Essa Interface Gráfica de Usuário não suporta Edição de Atributo\n"
+
+#: ../src/action.c:7933
+msgid "Layout Attributes"
+msgstr "Atributos de Traçado"
+
+#: ../src/action.c:7952
+#, c-format
+msgid "No layer named %s\n"
+msgstr "Nenhuma camada chamada de %s\n"
+
+#: ../src/action.c:7957 ../src/action.c:7958
+#, c-format
+msgid "Layer %s Attributes"
+msgstr "Atributos %s da Camada"
+
+#: ../src/action.c:7979
+msgid "Too many elements selected\n"
+msgstr "Muitos componentes selecionados\n"
+
+#: ../src/action.c:7992
+msgid "No element found there\n"
+msgstr "Nenhum elemento encontrado aí\n"
+
+#: ../src/action.c:8000 ../src/action.c:8001
+#, c-format
+msgid "Element %s Attributes"
+msgstr "Atributos %s de Componente"
+
+#: ../src/action.c:8005
+msgid "Unnamed Element Attributes"
+msgstr "Atributos do Componente inominado"
+
+#: ../src/action.c:8097
+msgid "Click on Object or Flip Point"
+msgstr "Clique sobre o Objeto ou Ponto a ser Virado "
+
+#: ../src/action.c:8169
+msgid "Select item to use attributes from"
+msgstr "Selecione os itens para usar os atributos de"
+
+#: ../src/autoplace.c:766 ../src/rats.c:739 ../src/rats.c:831
+msgid "Can't add rat lines because no netlist is loaded.\n"
+msgstr ""
+"Não posso adicionar linhas de rato porque nenhuma netlist está carregada.\n"
+
+#: ../src/autoplace.c:773
+msgid "No elements selected to autoplace.\n"
+msgstr "Nenhum componente selecionado para colocação automática.\n"
+
+#: ../src/autoroute.c:4888
+msgid "Autorouting tracks"
+msgstr "Roteando automaticamente trilhas"
+
+#: ../src/buffer.c:717
+#, c-format
+msgid "Unable to load footprint %s\n"
+msgstr "Incapaz de colocar a matriz %s na memória\n"
+
+#: ../src/buffer.c:779
+msgid "LoadFootprint(filename[,refdes,value])"
+msgstr "LoadFootprint(nomearquivo[,refdes,valor])"
+
+#: ../src/buffer.c:782
+msgid "Loads a single footprint by name."
+msgstr "Coloca na memória uma única matriz pelo nome."
+
+#: ../src/buffer.c:808
+#, c-format
+msgid "Footprint %s contains no elements"
+msgstr "Matriz %s vazia"
+
+#: ../src/buffer.c:813
+#, c-format
+msgid "Footprint %s contains multiple elements"
+msgstr "Matriz %s contém múltiplos componentes"
+
+#: ../src/buffer.c:847
+msgid "Error!  Buffer doesn't contain a single element\n"
+msgstr "Erro! Memória não contém um único componente\n"
+
+#: ../src/buffer.c:1022
+msgid ""
+"Warning: All of the pads are on the opposite\n"
+"side from the component - that's probably not what\n"
+"you wanted\n"
+msgstr ""
+"Atenção: Todas as pastilhas estão do lado\n"
+"oposto aos componentes - isso não é provavelmente o que\n"
+"você desejou\n"
+
+#: ../src/buffer.c:1101
+msgid ""
+"There was nothing to convert!\n"
+"Elements must have some silk, pads or pins.\n"
+msgstr ""
+"Não existe nada a converter!\n"
+"Os componentes devem ter algumas sedas, pastilhas ou conectores.\n"
+
+#: ../src/buffer.c:1106
+msgid ""
+"There were polygons that can't be made into pins!\n"
+"So they were not included in the element\n"
+msgstr ""
+"Existem polígonos que não podem ser convertidos em conectores!\n"
+"Então eles não foram incluídos no componente\n"
+
+#: ../src/buffer.c:1350
+msgid "FreeRotateBuffer([Angle])"
+msgstr "FreeRotateBuffer([Angulo])"
+
+#: ../src/buffer.c:1353
+msgid ""
+"Rotates the current paste buffer contents by the specified angle.  The\n"
+"angle is given in degrees.  If no angle is given, the user is prompted\n"
+"for one.\n"
+msgstr ""
+"Rotaciona o conteúdo da memória de colar de um ângulo especificado.  O\n"
+"angulo é dado em graus.  Se nenhum ângulo for dado, o usuário é solicitado\n"
+"a informar um.\n"
+
+#: ../src/buffer.c:1370
+msgid "Enter Rotation (degrees, CCW):"
+msgstr "Informe Ângulo de Rotação (graus, anti-horários):"
+
+#: ../src/buffer.c:1409
+msgid "You can't mirror a buffer that has elements!\n"
+msgstr "Você não pode refletir uma memória que tem componentes!\n"
+
+#: ../src/buffer.c:1417
+msgid "You can't mirror a buffer that has text!\n"
+msgstr "Você não pode refletir uma memória que tem texto!\n"
+
+#: ../src/change.c:758
+msgid ""
+"To change the clearance of objects in a polygon, change the objects, not the "
+"polygon.\n"
+"Hint: To set a minimum clearance for a group of objects, select them all "
+"then :MinClearGap(Selected,=10,mil)"
+msgstr ""
+"Para mudar a folga de objetos em um polígono, mude os objetos, não o "
+"polígono.\n"
+"Dica: Para ajustar uma folga mínima para um grupo de objetos, selecione "
+"todos eles então :MinClearGap(Selected,=10,mil)"
+
+#: ../src/change.c:1051
+#, c-format
+msgid "Error: The name \"%s\" is not unique!\n"
+msgstr "Erro: O nome \"%s\" não é único!\n"
+
+#: ../src/change.c:2274
+msgid "Linename:"
+msgstr "Nome da linha:"
+
+#: ../src/change.c:2279
+msgid "Vianame:"
+msgstr "Nome da via:"
+
+#: ../src/change.c:2284
+#, c-format
+msgid "%s Pin Name:"
+msgstr "%s Nome do conector:"
+
+#: ../src/change.c:2289
+#, c-format
+msgid "%s Pad Name:"
+msgstr "%s Nome da Pastilha:"
+
+#: ../src/change.c:2299
+msgid "Elementname:"
+msgstr "Nome do componente:"
+
+#: ../src/create.c:250
+msgid ""
+"%m+Dropping via at %$mD because it's hole would overlap with the via at %"
+"$mD\n"
+msgstr ""
+"%m+Soltando via em %$mD porque seu orifíco pode sobrescrever com a via em %"
+"$mD\n"
+
+#: ../src/create.c:271
+msgid "%m+Mapped via drill hole to %$mS from %$mS per vendor table\n"
+msgstr ""
+"%m+Mapeado orifíco de perfuração da via para %$mS a partir de %$mS pela "
+"tabela do fornecedor\n"
+
+#: ../src/create.c:289
+msgid "%m+Increased via thickness to %$mS to allow enough copper at %$mD.\n"
+msgstr ""
+"%m+Incrementado espessura de via para %$mS para permitir cobre suficiente em "
+"%$mD.\n"
+
+#: ../src/create.c:811
+msgid ""
+"%m+Did not map pin #%s (%s) drill hole because %$mS is below the minimum "
+"allowed size\n"
+msgstr ""
+"%m+Não posso mapear orifíco de perfuração do conector #%s (%s) porque %$mS "
+"está abaixo do tamanho mínimo permitido\n"
+
+#: ../src/create.c:817
+msgid ""
+"%m+Did not map pin #%s (%s) drill hole because %$mS is above the maximum "
+"allowed size\n"
+msgstr ""
+"%m+Não posso mapear orifíco de perfuração do conector #%s (%s) porque %$mS "
+"está acima do tamanho máximo permitido\n"
+
+#: ../src/create.c:824
+msgid ""
+"%m+Did not map pin #%s (%s) drill hole because %$mS does not leave enough "
+"copper\n"
+msgstr ""
+"%m+Não posso mapear orifíco de perfuração do conector #%s (%s) porque %$mS "
+"não coloca cobre  suficiente\n"
+
+#: ../src/create.c:836
+msgid "%m+Mapped pin drill hole to %$mS from %$mS per vendor table\n"
+msgstr ""
+"%m+Mapeado orifíco de perfuração de conector para %$mS a partir de %$mS pela "
+"tabela do fornecedor\n"
+
+#: ../src/create.c:941
+#, c-format
+msgid "Can't find font-symbol-file '%s'\n"
+msgstr "Não encontro o arquivo fonte-símbolo '%s'\n"
+
+#: ../src/crosshair.c:759
+msgid ""
+"WARNING: A plugin is using the deprecated API HideCrosshair().\n"
+"         This API may be removed in a future release of PCB.\n"
+msgstr ""
+"ATENÇÃO: Uma extensão está usando a API HideCrosshair() que é antiga.\n"
+"         Essa API pode ser removida em uma futura versão do PCB.\n"
+
+#: ../src/crosshair.c:774
+msgid ""
+"WARNING: A plugin is using the deprecated API RestoreCrosshair().\n"
+"         This API may be removed in a future release of PCB.\n"
+msgstr ""
+"ATENÇÃO: Uma extensão está usando a API RestoreCrosshair() que é antiga.\n"
+"         Essa API pode ser removida em uma futura versão do PCB.\n"
+
+#: ../src/error.c:104 ../src/error.c:108
+#, c-format
+msgid ""
+"Can't open file\n"
+"   '%s'\n"
+"fopen() returned: '%s'\n"
+msgstr ""
+"Não posso abrir o arquivo\n"
+"    '%s'\n"
+"fopen() retornou: '%s'\n"
+
+#: ../src/error.c:124 ../src/error.c:128
+#, c-format
+msgid ""
+"Can't execute command\n"
+"   '%s'\n"
+"popen() returned: '%s'\n"
+msgstr ""
+"Não posso executar o comando\n"
+"   '%s'\n"
+"popen() retornou: '%s'\n"
+
+#: ../src/error.c:144 ../src/error.c:148
+#, c-format
+msgid ""
+"Can't scan directory\n"
+"   '%s'\n"
+"opendir() returned: '%s'\n"
+msgstr ""
+"Não posso examinar o diretório\n"
+"   '%s'\n"
+"opendir() retornou: '%s'\n"
+
+#: ../src/error.c:164 ../src/error.c:168
+#, c-format
+msgid ""
+"Can't change working directory to\n"
+"   '%s'\n"
+"chdir() returned: '%s'\n"
+msgstr ""
+"Não posso mudar o diretório de trabalho para\n"
+"   '%s'\n"
+"chdir() retornou: '%s'\n"
+
+#: ../src/file.c:264
+#, c-format
+msgid "File '%s' exists, use anyway?"
+msgstr "Arquivo '%s' existe, usar mesmo assim?"
+
+#. not used
+#. CheckAndOpenFile deals with the case where fname already exists
+#: ../src/file.c:306
+msgid "Save Connection Data As ..."
+msgstr "Grava Dados de Conecção Como ..."
+
+#: ../src/file.c:307
+msgid "Choose a file to save all connection data to."
+msgstr "Escolha um arquivo para gravar todos os dados de conecção."
+
+#: ../src/file.c:427
+#, c-format
+msgid "File '%s' has no font information, using default font\n"
+msgstr "Arquivo '%s' não tem informação de fonte, usando a fonte padrão\n"
+
+#: ../src/file.c:1022
+#, c-format
+msgid "Trying to save your layout in '%s'\n"
+msgstr "Tentando gravar seu traçado em '%s'\n"
+
+# FIXME: is this an Error:  or a Warning:   ?
+#: ../src/file.c:1186
+msgid ""
+"LoadNewlibFootprintsFromDir: Could not determine initial working directory\n"
+msgstr ""
+"LoadNewlibFootprintsFromDir: Não posso determinar o diretório inicial de "
+"trabalho\n"
+
+# FIXME: is this an Error:  or a Warning:   ?
+#: ../src/file.c:1204
+msgid ""
+"LoadNewlibFootprintsFromDir: Could not determine new working directory\n"
+msgstr ""
+"LoadNewlibFootprintsFromDir: Não posso determinar o novo diretório de "
+"trabalho\n"
+
+# FIXME: is this an Error:  or a Warning:   ?
+#: ../src/file.c:1312
+msgid "ParseLibraryTree: Could not determine initial working directory\n"
+msgstr ""
+"ParseLibraryTree: Não posso determinar o diretório inicial de trabalho\n"
+
+# FIXME: is this an Error:  or a Warning:   ?
+#: ../src/file.c:1347
+msgid "ParseLibraryTree: Could not determine new working directory\n"
+msgstr "ParseLibraryTree: Não posso determinar o novo diretório de trabalho\n"
+
+#. nothing to do
+#: ../src/file.c:1539
+#, c-format
+msgid "Importing PCB netlist %s\n"
+msgstr "Importando netlist do PCB %s\n"
+
+#: ../src/file.c:1577
+#, c-format
+msgid ""
+"Line length (%i) exceeded in netlist file.\n"
+"additional characters will be ignored.\n"
+msgstr ""
+"Comprimento de linha (%i) excedeu no arquivo netlist.\n"
+"caracteres adicionais irão ser ignorados.\n"
+
+#: ../src/file.c:1631
+msgid "Empty netlist file!\n"
+msgstr "Arquivo de netlist vazio!\n"
+
+#: ../src/file.c:1671
+#, c-format
+msgid "Importing edif netlist %s\n"
+msgstr "Importando edif netlist %s\n"
+
+#: ../src/find.c:201
+msgid "%m+near %$mD\n"
+msgstr "%m+perto %$mD\n"
+
+#: ../src/find.c:209
+#, c-format
+msgid "WARNING!  Design Rule error - %s\n"
+msgstr "ATENÇÃO!  Erro de Regra de Desenho - %s\n"
+
+#: ../src/find.c:210
+msgid "%m+near location %$mD\n"
+msgstr "%m+perto da localização %$mD\n"
+
+#.
+#. * message when asked about continuing DRC checks after next
+#. * violation is found.
+#.
+#: ../src/find.c:219
+msgid "Press Next to continue DRC checking"
+msgstr "Pressione Seguinte para continuar verificação de DRC"
+
+#: ../src/find.c:220
+msgid "Next"
+msgstr "Seguinte"
+
+#: ../src/find.c:221 ../src/gpcb-menu.res:518 ../src/pcb-menu.res:183
+msgid "Cancel"
+msgstr "Cancela"
+
+#: ../src/find.c:854
+#, c-format
+msgid "bad layer number %d max_copper_layer=%d in find.c\n"
+msgstr "número de camada inadequado %d max_copper_layer=%d em find.c\n"
+
+#: ../src/find.c:896
+msgid "WARNING: Hole too close to pin.\n"
+msgstr "ATENÇÃO: Orifício muito próximo a conector.\n"
+
+#: ../src/find.c:898
+msgid "WARNING: Hole too close to via.\n"
+msgstr "ATENÇÃO: Orifício muito próximo a via.\n"
+
+#: ../src/find.c:967
+msgid "WARNING: Hole too close to line.\n"
+msgstr "ATENÇÃO: Orifício muito próximo a linha.\n"
+
+#: ../src/find.c:987
+msgid "WARNING: Hole too close to pad.\n"
+msgstr "ATENÇÃO: Orifício muito próximo pastilha.\n"
+
+#: ../src/find.c:1007
+msgid "WARNING: Hole touches arc.\n"
+msgstr "ATENÇÃO: Orifício toca arco.\n"
+
+#: ../src/find.c:3369
+msgid "Potential for broken trace"
+msgstr "Risco de trilha quebrada"
+
+#: ../src/find.c:3370
+msgid ""
+"Insufficient overlap between objects can lead to broken tracks\n"
+"due to registration errors with old wheel style photo-plotters."
+msgstr ""
+"Sobreposição insuficiente entre objetos pode levar a quebrar trilhas\n"
+"devido a erros de registro com antigo estilo de giro de impressoras "
+"fotográficas."
+
+#: ../src/find.c:3422
+msgid "Copper areas too close"
+msgstr "Áreas de cobre muito próximas"
+
+#: ../src/find.c:3423 ../src/find.c:3542
+msgid ""
+"Circuits that are too close may bridge during imaging, etching,\n"
+"plating, or soldering processes resulting in a direct short."
+msgstr ""
+"Circuitos que estão muito próximos podem se juntar durante desenho da "
+"matriz, corrosão,\n"
+"galvanoplastia, ou processos de soldagem resultando em um curto circuito."
+
+#: ../src/find.c:3487
+msgid "Line with insufficient clearance inside polygon\n"
+msgstr "Linha com folga insuficiente dentro do polígono\n"
+
+#: ../src/find.c:3496
+msgid "Arc with insufficient clearance inside polygon\n"
+msgstr "Arco com folga insuficiente dentro do polígono\n"
+
+#: ../src/find.c:3506
+msgid "Pad with insufficient clearance inside polygon\n"
+msgstr "Pastilha com folga insuficiente dentro do polígono\n"
+
+#: ../src/find.c:3515
+msgid "Pin with insufficient clearance inside polygon\n"
+msgstr "Conector com folga insuficiente dentro do polígono\n"
+
+#: ../src/find.c:3524
+msgid "Via with insufficient clearance inside polygon\n"
+msgstr "Via com folga insuficiente dentro do polígono\n"
+
+#: ../src/find.c:3666
+msgid "Line width is too thin"
+msgstr "Linha muito fina"
+
+#: ../src/find.c:3667 ../src/find.c:3711
+msgid ""
+"Process specifications dictate a minimum feature-width\n"
+"that can reliably be reproduced"
+msgstr ""
+"Especificações de processo ditam uma margem de fabricação mínima\n"
+"que pode confiávelmente ser reproduzido"
+
+# FIXME: original string has room for improvement.
+# "Arc width is too small"
+#: ../src/find.c:3710
+msgid "Arc width is too thin"
+msgstr "Largura do arco muito pequena"
+
+#: ../src/find.c:3755
+msgid "Pin annular ring too small"
+msgstr "Auréola anelar do conector é muito pequena"
+
+#: ../src/find.c:3756 ../src/find.c:3876
+msgid ""
+"Annular rings that are too small may erode during etching,\n"
+"resulting in a broken connection"
+msgstr ""
+"Auréolas anelares que são muito pequenas podem danificar durante a "
+"corrosão,\n"
+"resultando em uma conecção defeituosa"
+
+#: ../src/find.c:3787
+msgid "Pin drill size is too small"
+msgstr "Tamanho da perfuração do conector muito pequena"
+
+#: ../src/find.c:3788 ../src/find.c:3908
+msgid "Process rules dictate the minimum drill size which can be used"
+msgstr ""
+"Regras de processo ditam um tamanho mínimo de perfuração que pode ser usado"
+
+# FIXME: original string has room for improvement.
+# "Pad is too small"
+#: ../src/find.c:3830
+msgid "Pad is too thin"
+msgstr "Pastilha muito fina"
+
+#: ../src/find.c:3831
+msgid ""
+"Pads which are too thin may erode during etching,\n"
+"resulting in a broken or unreliable connection"
+msgstr ""
+"Pastilhas muito finas podem sofrer erosão durante a corrosão,\n"
+"resultando em uma conecção defeituosa e sem confiabilidade"
+
+#: ../src/find.c:3875
+msgid "Via annular ring too small"
+msgstr "Auréola anular da via é muito pequena"
+
+#: ../src/find.c:3907
+msgid "Via drill size is too small"
+msgstr "Tamanho da perfuração da via é muito pequena"
+
+# FIXME: original string has room for improvement.
+# "Silk line is too small"
+#: ../src/find.c:3950
+msgid "Silk line is too thin"
+msgstr "Linha de seda muito fina"
+
+#: ../src/find.c:3951
+msgid ""
+"Process specifications dictate a minimum silkscreen feature-width\n"
+"that can reliably be reproduced"
+msgstr ""
+"Especificações de processo ditam uma margem de fabricação de tela de seda "
+"mínima\n"
+"que pode confiávelmente ser reproduzida"
+
+# FIXME: original string has room for improvement.
+# "Element %s has %i silk lines which are too small"
+#: ../src/find.c:4002
+#, c-format
+msgid "Element %s has %i silk lines which are too thin"
+msgstr "Componente %s tem %i linhas de seda que são muito finas"
+
+#: ../src/find.c:4013
+msgid ""
+"Process specifications dictate a minimum silkscreen\n"
+"feature-width that can reliably be reproduced"
+msgstr ""
+"Especificações de processo ditam uma margem de fabricação de tela de seda\n"
+"mínima que pode confiávelmente ser reproduzida"
+
+#: ../src/find.c:4051
+#, c-format
+msgid "Warning: %d pad has the nopaste flag set.\n"
+msgid_plural "Warning: %d pads have the nopaste flag set.\n"
+msgstr[0] ""
+"Atenção:  %d pastilha está com o sinalizador de não colar habilitado.\n"
+msgstr[1] ""
+"Atenção:  %d pastilhas estão com o sinalizador de não colar habilitado.\n"
+
+#: ../src/find.c:4148
+#, c-format
+msgid "Internal error in BuildObjectList: unknown object type %i\n"
+msgstr "Erro Interno em BuildObjectList: tipo de objeto desconhecido %i\n"
+
+#: ../src/gpcb-menu.res:56
+msgid "File"
+msgstr "Arquivo"
+
+#: ../src/gpcb-menu.res:57 ../src/hid/gtk/gtkhid-main.c:994
+msgid "New"
+msgstr "Novo"
+
+#: ../src/gpcb-menu.res:57 ../src/pcb-menu.res:51
+msgid "Ctrl-N"
+msgstr "Ctrl-N"
+
+#: ../src/gpcb-menu.res:57 ../src/pcb-menu.res:51
+msgid "Ctrl<Key>n"
+msgstr "Ctrl<Tecla>n"
+
+#: ../src/gpcb-menu.res:58
+msgid "Open..."
+msgstr "Abrir..."
+
+#: ../src/gpcb-menu.res:58
+msgid "Load a layout from a file"
+msgstr "Coloca na memória arquivo de traçado"
+
+#: ../src/gpcb-menu.res:60 ../src/hid/gtk/gui-config.c:1976
+msgid "Save"
+msgstr "Gravar"
+
+#: ../src/gpcb-menu.res:60
+msgid "Saves current layout"
+msgstr "Grava traçado atual"
+
+#: ../src/gpcb-menu.res:60 ../src/pcb-menu.res:33
+msgid "Ctrl-S"
+msgstr "Ctrl-S"
+
+#: ../src/gpcb-menu.res:60 ../src/pcb-menu.res:33
+msgid "Ctrl<Key>s"
+msgstr "Ctrl<Tecla>s"
+
+#: ../src/gpcb-menu.res:61
+msgid "Save As..."
+msgstr "Gravar Como..."
+
+#: ../src/gpcb-menu.res:61
+msgid "Saves current layout into a new file"
+msgstr "Grava o traçado atual em um novo arquivo"
+
+#: ../src/gpcb-menu.res:61 ../src/pcb-menu.res:34
+msgid "Shift Ctrl-S"
+msgstr "Shift Ctrl-S"
+
+#: ../src/gpcb-menu.res:61 ../src/pcb-menu.res:34
+msgid "Shift Ctrl<Key>s"
+msgstr "Shift Ctrl<Tecla>s"
+
+#: ../src/gpcb-menu.res:62 ../src/hid/gtk/gtkhid-main.c:993
+#: ../src/pcb-menu.res:35
+msgid "Revert"
+msgstr "Reverter"
+
+#: ../src/gpcb-menu.res:62
+msgid "Revert to the layout stored on disk"
+msgstr "Reverter para o traçado gravado no disco"
+
+#: ../src/gpcb-menu.res:64 ../src/pcb-menu.res:36
+msgid "Import Schematics"
+msgstr "Coloca diagramas esquemáticos na memória"
+
+#. in case we have a dialog for loading a footprint file
+#: ../src/gpcb-menu.res:65 ../src/hid/gtk/gtkhid-main.c:1239
+#: ../src/hid/gtk/gui-dialog.c:292
+msgid "Load element to buffer"
+msgstr "Coloca componente na memória"
+
+#: ../src/gpcb-menu.res:66
+msgid "Load layout to buffer"
+msgstr "Coloca traçado na memória temporária"
+
+#: ../src/gpcb-menu.res:67
+msgid "Load netlist"
+msgstr "Coloca na memória uma netlist"
+
+#: ../src/gpcb-menu.res:68 ../src/pcb-menu.res:41
+msgid "Load vendor resource file"
+msgstr "Colocar na memória arquivo de recursos de fornecedor"
+
+#: ../src/gpcb-menu.res:70
+msgid "Save connection data of"
+msgstr "Grava dados de conecção de"
+
+#: ../src/gpcb-menu.res:71 ../src/pcb-menu.res:47
+msgid " a single element"
+msgstr " um único componente"
+
+#: ../src/gpcb-menu.res:72 ../src/pcb-menu.res:48
+msgid " all elements"
+msgstr " todos os componentes"
+
+#: ../src/gpcb-menu.res:73 ../src/pcb-menu.res:49
+msgid " unused pins"
+msgstr "conectores livres"
+
+#: ../src/gpcb-menu.res:75
+msgid "Export..."
+msgstr "Exportar..."
+
+#: ../src/gpcb-menu.res:77 ../src/pcb-menu.res:44
+msgid "Calibrate Printer..."
+msgstr "Faça a calibração da impressora..."
+
+#: ../src/gpcb-menu.res:78
+msgid "Print..."
+msgstr "Imprimir..."
+
+#: ../src/gpcb-menu.res:80
+msgid "Preferences..."
+msgstr "Preferências..."
+
+#: ../src/gpcb-menu.res:82
+msgid "Quit"
+msgstr "Sair"
+
+#: ../src/gpcb-menu.res:82 ../src/pcb-menu.res:53
+msgid "Ctrl-Q"
+msgstr "Ctrl-Q"
+
+#: ../src/gpcb-menu.res:82 ../src/pcb-menu.res:53
+msgid "Ctrl<Key>q"
+msgstr "Ctrl<Tecla>q"
+
+#: ../src/gpcb-menu.res:88
+msgid "Edit"
+msgstr "Editar"
+
+#: ../src/gpcb-menu.res:89 ../src/pcb-menu.res:418
+msgid "Undo"
+msgstr "Desfazer"
+
+#: ../src/gpcb-menu.res:89 ../src/pcb-menu.res:134
+msgid "U"
+msgstr "U"
+
+#: ../src/gpcb-menu.res:89 ../src/pcb-menu.res:134
+msgid "<Key>u"
+msgstr "<Tecla>u"
+
+#: ../src/gpcb-menu.res:90
+msgid "Redo"
+msgstr "Refazer"
+
+#: ../src/gpcb-menu.res:90 ../src/pcb-menu.res:135
+msgid "Shift-R"
+msgstr "Shift-R"
+
+#: ../src/gpcb-menu.res:90 ../src/pcb-menu.res:135
+msgid "Shift<Key>r"
+msgstr "Shift<Tecla>r"
+
+#: ../src/gpcb-menu.res:91 ../src/pcb-menu.res:136
+msgid "Clear undo-buffer"
+msgstr "Apagar histórico de desfazer"
+
+#: ../src/gpcb-menu.res:91 ../src/pcb-menu.res:136
+msgid "Shift-Ctrl-U"
+msgstr "Shift-Ctrl-U"
+
+#: ../src/gpcb-menu.res:91 ../src/pcb-menu.res:136
+msgid "Shift Ctrl<Key>u"
+msgstr "Shift Ctrl<Tecla>u"
+
+#: ../src/gpcb-menu.res:296
+msgid "Cut to buffer"
+msgstr "Cortar para a memória"
+
+#: ../src/gpcb-menu.res:95 ../src/pcb-menu.res:140
+msgid "Ctrl-X"
+msgstr "Ctrl-X"
+
+#: ../src/gpcb-menu.res:95 ../src/pcb-menu.res:140
+msgid "Ctrl<Key>x"
+msgstr "Ctrl<Tecla>x"
+
+#: ../src/gpcb-menu.res:96
+msgid "Copy to buffer"
+msgstr "Copiar para a memória"
+
+#: ../src/gpcb-menu.res:98 ../src/pcb-menu.res:143
+msgid "Ctrl-C"
+msgstr "Ctrl-C"
+
+#: ../src/gpcb-menu.res:98 ../src/pcb-menu.res:143
+msgid "Ctrl<Key>c"
+msgstr "Ctrl<Tecla>c"
+
+#: ../src/gpcb-menu.res:298
+msgid "Paste buffer"
+msgstr "Cola na memória"
+
+#: ../src/gpcb-menu.res:99 ../src/pcb-menu.res:144
+msgid "Ctrl-V"
+msgstr "Ctrl-V"
+
+#: ../src/gpcb-menu.res:99 ../src/pcb-menu.res:144
+msgid "Ctrl<Key>v"
+msgstr "Ctrl<Tecla>v"
+
+#: ../src/gpcb-menu.res:240 ../src/pcb-menu.res:146
+msgid "Unselect all"
+msgstr "Remove seleção de tudo"
+
+#: ../src/gpcb-menu.res:101 ../src/pcb-menu.res:146
+msgid "Shift-Alt-A"
+msgstr "Shift-Alt-A"
+
+#: ../src/gpcb-menu.res:101 ../src/pcb-menu.res:146
+msgid "Shift Alt<Key>a"
+msgstr "Shift Alt<Tecla>a"
+
+#: ../src/gpcb-menu.res:236 ../src/pcb-menu.res:147
+msgid "Select all visible"
+msgstr "Selecione tudo que estiver visível"
+
+#: ../src/gpcb-menu.res:102 ../src/pcb-menu.res:147
+msgid "Alt-A"
+msgstr "Alt-A"
+
+#: ../src/gpcb-menu.res:102 ../src/pcb-menu.res:147
+msgid "Alt<Key>a"
+msgstr "Alt<Tecla>a"
+
+#: ../src/gpcb-menu.res:104
+msgid "Edit name of"
+msgstr "Editar nome de"
+
+#: ../src/gpcb-menu.res:105
+msgid "text on layout"
+msgstr "texto sobre traçado"
+
+#: ../src/gpcb-menu.res:105 ../src/pcb-menu.res:150
+msgid "N"
+msgstr "N"
+
+#: ../src/gpcb-menu.res:105 ../src/pcb-menu.res:150
+msgid "<Key>n"
+msgstr "<Tecla>n"
+
+#: ../src/gpcb-menu.res:106
+msgid "layout"
+msgstr "traçado"
+
+#: ../src/gpcb-menu.res:107
+msgid "active layer"
+msgstr "camada ativa"
+
+#: ../src/gpcb-menu.res:109
+msgid "Edit attributes of"
+msgstr "Editar atributos de"
+
+#: ../src/gpcb-menu.res:110
+msgid "Layout"
+msgstr "Traçado"
+
+#: ../src/gpcb-menu.res:111
+msgid "CurrentLayer"
+msgstr "Camada Atual"
+
+#: ../src/gpcb-menu.res:112
+msgid "Element"
+msgstr "Componente"
+
+#. Create edit button
+#: ../src/gpcb-menu.res:115 ../src/hid/gtk/ghid-route-style-selector.c:417
+#: ../src/pcb-menu.res:159
+msgid "Route Styles"
+msgstr "Estilos de Rota"
+
+#: ../src/gpcb-menu.res:117 ../src/pcb-menu.res:162
+msgid "Edit..."
+msgstr "Editar..."
+
+#: ../src/gpcb-menu.res:124
+msgid "View"
+msgstr "Visão"
+
+#: ../src/gpcb-menu.res:125
+msgid "Enable visible grid"
+msgstr "Habilitar grade visível"
+
+#: ../src/gpcb-menu.res:126
+msgid "Grid units"
+msgstr "Unidades de grade"
+
+#: ../src/gpcb-menu.res:127 ../src/pcb-menu.res:94
+msgid "mil"
+msgstr "mil"
+
+#: ../src/gpcb-menu.res:128 ../src/pcb-menu.res:95
+msgid "mm"
+msgstr "mm"
+
+#: ../src/gpcb-menu.res:130
+msgid "Grid size"
+msgstr "Tamanho da grade"
+
+#: ../src/gpcb-menu.res:131 ../src/pcb-menu.res:98
+msgid "No Grid"
+msgstr "Sem Grade"
+
+#: ../src/gpcb-menu.res:133 ../src/pcb-menu.res:100
+msgid "0.1 mil"
+msgstr "0.1 mil"
+
+#: ../src/gpcb-menu.res:134 ../src/pcb-menu.res:101
+msgid "1 mil"
+msgstr "1 mil"
+
+#: ../src/gpcb-menu.res:135 ../src/pcb-menu.res:102
+msgid "5 mil"
+msgstr "5 mil"
+
+#: ../src/gpcb-menu.res:136 ../src/pcb-menu.res:103
+msgid "10 mil"
+msgstr "10 mil"
+
+#: ../src/gpcb-menu.res:137 ../src/pcb-menu.res:104
+msgid "25 mil"
+msgstr "25 mil"
+
+#: ../src/gpcb-menu.res:138 ../src/pcb-menu.res:105
+msgid "50 mil"
+msgstr "50 mil"
+
+#: ../src/gpcb-menu.res:139 ../src/pcb-menu.res:106
+msgid "100 mil"
+msgstr "100 mil"
+
+#: ../src/gpcb-menu.res:141 ../src/pcb-menu.res:108
+msgid "0.01 mm"
+msgstr "0.01 mm"
+
+#: ../src/gpcb-menu.res:142 ../src/pcb-menu.res:109
+msgid "0.05 mm"
+msgstr "0.05 mm"
+
+#: ../src/gpcb-menu.res:143 ../src/pcb-menu.res:110
+msgid "0.1 mm"
+msgstr "0.1 mm"
+
+#: ../src/gpcb-menu.res:144 ../src/pcb-menu.res:111
+msgid "0.25 mm"
+msgstr "0.25 mm"
+
+#: ../src/gpcb-menu.res:145 ../src/pcb-menu.res:112
+msgid "0.5 mm"
+msgstr "0.5 mm"
+
+#: ../src/gpcb-menu.res:146 ../src/pcb-menu.res:113
+msgid "1 mm"
+msgstr "1 mm"
+
+#: ../src/gpcb-menu.res:148 ../src/pcb-menu.res:115
+msgid "Grid -"
+msgstr "Grade -"
+
+#: ../src/gpcb-menu.res:148 ../src/pcb-menu.res:115
+msgid "Shift-G"
+msgstr "Shift-G"
+
+#: ../src/gpcb-menu.res:148 ../src/pcb-menu.res:115
+msgid "Shift<Key>g"
+msgstr "Shift<Tecla>g"
+
+#: ../src/gpcb-menu.res:149 ../src/pcb-menu.res:116
+msgid "Grid +"
+msgstr "Grade +"
+
+#: ../src/gpcb-menu.res:149 ../src/pcb-menu.res:116
+msgid "G"
+msgstr "G"
+
+#: ../src/gpcb-menu.res:149 ../src/pcb-menu.res:116
+msgid "<Key>g"
+msgstr "<Tecla>g"
+
+#: ../src/gpcb-menu.res:151 ../src/pcb-menu.res:97
+msgid "Realign grid"
+msgstr "Realinhar grade"
+
+#: ../src/gpcb-menu.res:153
+msgid "Displayed element name"
+msgstr "Mostra nome de componente"
+
+#: ../src/gpcb-menu.res:154 ../src/pcb-menu.res:64
+msgid "Description"
+msgstr "Descrição"
+
+#: ../src/gpcb-menu.res:155 ../src/pcb-menu.res:65
+msgid "Reference Designator"
+msgstr "Dsignador de Referência"
+
+#: ../src/gpcb-menu.res:156 ../src/pcb-menu.res:66
+msgid "Value"
+msgstr "Valor"
+
+#: ../src/gpcb-menu.res:158
+msgid "Enable Pinout shows number"
+msgstr "Habilitar saída de conector mostra número"
+
+#: ../src/gpcb-menu.res:159 ../src/pcb-menu.res:209
+msgid "Pins/Via show Name/Number"
+msgstr "Conector/Via mostra Nome/Número"
+
+#: ../src/gpcb-menu.res:159 ../src/pcb-menu.res:209
+msgid "D"
+msgstr "D"
+
+#: ../src/gpcb-menu.res:159 ../src/pcb-menu.res:209
+msgid "<Key>d"
+msgstr "<Tecla>d"
+
+#: ../src/gpcb-menu.res:161 ../src/pcb-menu.res:79
+#, no-c-format
+msgid "Zoom In 20%"
+msgstr "Aproximação 20%"
+
+#: ../src/gpcb-menu.res:161 ../src/pcb-menu.res:79
+msgid "Z"
+msgstr "Z"
+
+#: ../src/gpcb-menu.res:161 ../src/pcb-menu.res:79
+msgid "<Key>z"
+msgstr "<Tecla>z"
+
+#: ../src/gpcb-menu.res:162 ../src/pcb-menu.res:80
+#, no-c-format
+msgid "Zoom Out 20%"
+msgstr "Afastamento 20%"
+
+#: ../src/gpcb-menu.res:162 ../src/pcb-menu.res:80
+msgid "Shift-Z"
+msgstr "Shift-Z"
+
+#: ../src/gpcb-menu.res:162 ../src/pcb-menu.res:80
+msgid "Shift<Key>z"
+msgstr "Shift<Tecla>z"
+
+#: ../src/gpcb-menu.res:163
+msgid "More zooms and view changes"
+msgstr "Mais aproximações e modos de visão"
+
+#: ../src/gpcb-menu.res:164 ../src/pcb-menu.res:82
+msgid "Zoom Max"
+msgstr "Aproximação Maxima"
+
+#: ../src/gpcb-menu.res:164 ../src/pcb-menu.res:82
+msgid "V"
+msgstr "V"
+
+#: ../src/gpcb-menu.res:164 ../src/pcb-menu.res:82
+msgid "<Key>v"
+msgstr "<Tecla>v"
+
+#: ../src/gpcb-menu.res:165 ../src/pcb-menu.res:75
+msgid "Zoom In 2X"
+msgstr "Aproximação 2X"
+
+#: ../src/gpcb-menu.res:166 ../src/pcb-menu.res:81
+msgid "Zoom Out 2X"
+msgstr "Afastamento 2X"
+
+#: ../src/gpcb-menu.res:167 ../src/pcb-menu.res:85
+msgid "Zoom to 0.1mil/px"
+msgstr "Aproximação de 0.1mil/px"
+
+#: ../src/gpcb-menu.res:168 ../src/pcb-menu.res:86
+msgid "Zoom to 0.01mm/px"
+msgstr "Aproximação de 0.01mm/px"
+
+#: ../src/gpcb-menu.res:169 ../src/pcb-menu.res:87
+msgid "Zoom to 1mil/px"
+msgstr "Aproximação de 1mm/px"
+
+#: ../src/gpcb-menu.res:170 ../src/pcb-menu.res:88
+msgid "Zoom to 0.05mm/px"
+msgstr "Aproximação de 0.05mm/px"
+
+#: ../src/gpcb-menu.res:171 ../src/pcb-menu.res:89
+msgid "Zoom to 2.5mil/px"
+msgstr "Aproximação de 2.5mil/px"
+
+#: ../src/gpcb-menu.res:172 ../src/pcb-menu.res:90
+msgid "Zoom to 0.1mm/px"
+msgstr "Aproximação de 0.1mm/px"
+
+#: ../src/gpcb-menu.res:173 ../src/pcb-menu.res:91
+msgid "Zoom to 10mil/px"
+msgstr "Aproximação de 10mil/px"
+
+#: ../src/gpcb-menu.res:174
+#, no-c-format
+msgid "Zoom In 20% and center"
+msgstr "Aproximação 20% e centro"
+
+#: ../src/gpcb-menu.res:175
+#, no-c-format
+msgid "Zoom Out 20% and center"
+msgstr "Afastamento 20% e centro"
+
+#: ../src/gpcb-menu.res:176 ../src/pcb-menu.res:56
+msgid "Flip up/down"
+msgstr "Vira acima/abaixo"
+
+#: ../src/gpcb-menu.res:176 ../src/pcb-menu.res:56
+msgid "Tab"
+msgstr "Tab"
+
+#: ../src/gpcb-menu.res:176 ../src/pcb-menu.res:56
+msgid "<Key>Tab"
+msgstr "<Tecla>Tab"
+
+#: ../src/gpcb-menu.res:177 ../src/pcb-menu.res:57
+msgid "Flip left/right"
+msgstr "Vira esquerda/direita"
+
+#: ../src/gpcb-menu.res:177 ../src/pcb-menu.res:57
+msgid "Shift-Tab"
+msgstr "Shift-Tab"
+
+#: ../src/gpcb-menu.res:177 ../src/pcb-menu.res:57
+msgid "Shift<Key>Tab"
+msgstr "Shift<Tecla>Tab"
+
+#: ../src/gpcb-menu.res:178
+msgid "Spin 180 degrees"
+msgstr "Girar 180 graus"
+
+#: ../src/gpcb-menu.res:178 ../src/pcb-menu.res:58
+msgid "Ctrl-Tab"
+msgstr "Ctrl-Tab"
+
+#: ../src/gpcb-menu.res:178 ../src/pcb-menu.res:58
+msgid "Ctrl<Key>Tab"
+msgstr "Ctrl<Tecla>Tab"
+
+#: ../src/gpcb-menu.res:179 ../src/pcb-menu.res:59
+msgid "Swap Sides"
+msgstr "Trocar lados"
+
+#: ../src/gpcb-menu.res:179 ../src/pcb-menu.res:59
+msgid "Ctrl-Shift-Tab"
+msgstr "Ctrl-Shift-Tab"
+
+#: ../src/gpcb-menu.res:179 ../src/pcb-menu.res:59
+msgid "Ctrl Shift<Key>Tab"
+msgstr "Ctrl Shift<Tecla>Tab"
+
+#: ../src/gpcb-menu.res:180 ../src/pcb-menu.res:60
+msgid "Center cursor"
+msgstr "Cursor centralizado"
+
+#: ../src/gpcb-menu.res:180 ../src/pcb-menu.res:60
+msgid "C"
+msgstr "C"
+
+#: ../src/gpcb-menu.res:180 ../src/pcb-menu.res:60
+msgid "<Key>c"
+msgstr "<Tecla>c"
+
+#: ../src/gpcb-menu.res:183 ../src/pcb-menu.res:119
+msgid "Shown Layers"
+msgstr "Mostra Camadas"
+
+#: ../src/gpcb-menu.res:186 ../src/pcb-menu.res:122
+msgid "Edit Layer Groups"
+msgstr "Editar Grupos de Camada"
+
+#: ../src/gpcb-menu.res:188 ../src/pcb-menu.res:124
+msgid "Current Layer"
+msgstr "Camada Atual"
+
+#: ../src/gpcb-menu.res:191 ../src/pcb-menu.res:127
+msgid "Delete current layer"
+msgstr "Apaga camada atual"
+
+#: ../src/gpcb-menu.res:192 ../src/pcb-menu.res:128
+msgid "Add new layer"
+msgstr "Adicionar nova camada"
+
+#: ../src/gpcb-menu.res:193 ../src/pcb-menu.res:129
+msgid "Move current layer up"
+msgstr "Mova camada atual acima"
+
+#: ../src/gpcb-menu.res:194 ../src/pcb-menu.res:130
+msgid "Move current layer down"
+msgstr "Mova camada atual abaixo"
+
+#: ../src/gpcb-menu.res:201
+msgid "Settings"
+msgstr "Configurações"
+
+#: ../src/gpcb-menu.res:202 ../src/pcb-menu.res:191
+msgid "'All-direction' lines"
+msgstr "Linhas em 'Todas as direções'"
+
+#: ../src/gpcb-menu.res:202 ../src/pcb-menu.res:191
+msgid "."
+msgstr "."
+
+#: ../src/gpcb-menu.res:202 ../src/pcb-menu.res:191
+msgid "<Key>."
+msgstr "<Tecla>."
+
+#: ../src/gpcb-menu.res:203 ../src/pcb-menu.res:192
+msgid "Auto swap line start angle"
+msgstr "Trocar automaticamente ângulo de início de linha"
+
+#: ../src/gpcb-menu.res:204 ../src/pcb-menu.res:193
+msgid "Orthogonal moves"
+msgstr "Movimentos ortogonais"
+
+#: ../src/gpcb-menu.res:205 ../src/pcb-menu.res:194
+msgid "Crosshair snaps to pins and pads"
+msgstr "Mira adere a conectores e pastilhas"
+
+#: ../src/gpcb-menu.res:206 ../src/pcb-menu.res:195
+msgid "Crosshair shows DRC clearance"
+msgstr "Mira mostra folga DRC"
+
+#: ../src/gpcb-menu.res:207 ../src/pcb-menu.res:196
+msgid "Auto enforce DRC clearance"
+msgstr "Exigir automaticamente folga DRC"
+
+#: ../src/gpcb-menu.res:208 ../src/pcb-menu.res:67
+msgid "Lock Names"
+msgstr "Travar Nomes"
+
+#: ../src/gpcb-menu.res:209 ../src/pcb-menu.res:68
+msgid "Only Names"
+msgstr "Nomes Únicos"
+
+#: ../src/gpcb-menu.res:210 ../src/pcb-menu.res:69
+msgid "Hide Names"
+msgstr "Esconder Nomes"
+
+#: ../src/gpcb-menu.res:212 ../src/pcb-menu.res:198
+msgid "Rubber band mode"
+msgstr "Modo elástico"
+
+#: ../src/gpcb-menu.res:213 ../src/pcb-menu.res:199
+msgid "Require unique element names"
+msgstr "Exige nomes únicos de componente"
+
+#: ../src/gpcb-menu.res:214 ../src/pcb-menu.res:200
+msgid "Auto-zero delta measurements"
+msgstr "Zera automaticamente medições delta"
+
+#: ../src/gpcb-menu.res:215 ../src/pcb-menu.res:201
+msgid "New lines, arcs clear polygons"
+msgstr "Novas linhas/arcos apagam polígonos"
+
+#: ../src/gpcb-menu.res:216 ../src/pcb-menu.res:202
+msgid "New polygons are full ones"
+msgstr "Novos polígonos são cheios"
+
+#: ../src/gpcb-menu.res:217 ../src/pcb-menu.res:203
+msgid "Show autorouter trials"
+msgstr "Exibir trilhas roteadas automaticamente"
+
+#: ../src/gpcb-menu.res:218 ../src/pcb-menu.res:204
+msgid "Thin draw"
+msgstr "Desenho fino"
+
+#: ../src/gpcb-menu.res:218 ../src/pcb-menu.res:204
+msgid "|"
+msgstr "|"
+
+#: ../src/gpcb-menu.res:218 ../src/pcb-menu.res:204
+msgid "<Key>|"
+msgstr "<Tecla>|"
+
+#: ../src/gpcb-menu.res:219 ../src/pcb-menu.res:205
+msgid "Thin draw poly"
+msgstr "Desenho fino para polígono"
+
+#: ../src/gpcb-menu.res:219 ../src/pcb-menu.res:205
+msgid "Ctrl-Shift-P"
+msgstr "Ctrl-Shift-P"
+
+#: ../src/gpcb-menu.res:219 ../src/pcb-menu.res:205
+msgid "Ctrl Shift<Key>p"
+msgstr "Ctrl Shift<Tecla>p"
+
+#: ../src/gpcb-menu.res:220 ../src/pcb-menu.res:206
+msgid "Check polygons"
+msgstr "Verifica polígonos"
+
+#: ../src/gpcb-menu.res:222
+msgid "Vendor drill mapping"
+msgstr "Mapeamento perfuração de fornecedor"
+
+#: ../src/gpcb-menu.res:223
+msgid "Import New Elements at"
+msgstr "Importar Novos Componentes em"
+
+#: ../src/gpcb-menu.res:224 ../src/pcb-menu.res:213
+msgid " Center"
+msgstr " Centro"
+
+#: ../src/gpcb-menu.res:225 ../src/pcb-menu.res:214
+msgid " Mark"
+msgstr " Marcar"
+
+#: ../src/gpcb-menu.res:226 ../src/pcb-menu.res:215
+msgid " Crosshair"
+msgstr " Mira"
+
+#: ../src/gpcb-menu.res:228 ../src/pcb-menu.res:217
+msgid "Set Dispersion"
+msgstr "Ajusta Dispersão"
+
+#: ../src/gpcb-menu.res:235
+msgid "Select"
+msgstr "Selecione"
+
+#: ../src/gpcb-menu.res:237
+msgid "Select all found"
+msgstr "Seleciona todos que encontrar"
+
+#: ../src/gpcb-menu.res:238
+msgid "Select all connected"
+msgstr "Seleciona todos conectados"
+
+#: ../src/gpcb-menu.res:241
+msgid "Unselect all found"
+msgstr "Remove a seleção de todos os objetos encontrados"
+
+#: ../src/gpcb-menu.res:242
+msgid "Unselect all connected"
+msgstr "Remove a seleção de todos os objetos conectados"
+
+#: ../src/gpcb-menu.res:244 ../src/pcb-menu.res:230
+msgid "Select by name"
+msgstr "Seleciona por nome"
+
+#: ../src/gpcb-menu.res:245 ../src/pcb-menu.res:231
+msgid "All objects"
+msgstr "Todos os objetos"
+
+#: ../src/gpcb-menu.res:287 ../src/pcb-menu.res:268
+msgid "Elements"
+msgstr "Componentes"
+
+#: ../src/gpcb-menu.res:247 ../src/pcb-menu.res:233
+msgid "Pads"
+msgstr "Pastilhas"
+
+#: ../src/gpcb-menu.res:288 ../src/pcb-menu.res:269
+msgid "Pins"
+msgstr "Conectores"
+
+#: ../src/gpcb-menu.res:505 ../src/pcb-menu.res:170
+msgid "Text"
+msgstr "Texto"
+
+#: ../src/gpcb-menu.res:250 ../src/pcb-menu.res:236
+msgid "Vias"
+msgstr "Vias"
+
+#: ../src/gpcb-menu.res:253 ../src/pcb-menu.res:238
+msgid "Auto-place selected elements"
+msgstr "Coloca automaticamente componentes selecionados"
+
+#: ../src/gpcb-menu.res:253 ../src/pcb-menu.res:238
+msgid "Ctrl-P"
+msgstr "Ctrl-P"
+
+#: ../src/gpcb-menu.res:253 ../src/pcb-menu.res:238
+msgid "Ctrl<Key>p"
+msgstr "Ctrl<Tecla>p"
+
+#: ../src/gpcb-menu.res:254 ../src/pcb-menu.res:239
+msgid "Disperse all elements"
+msgstr "Apaga todos os componentes"
+
+#: ../src/gpcb-menu.res:255
+msgid "Disperse selected elements"
+msgstr "Dispersar componentes selecionados"
+
+#: ../src/gpcb-menu.res:257 ../src/pcb-menu.res:240
+msgid "Move selected elements to other side"
+msgstr "Mova os objetos selecionados para outro lado"
+
+#: ../src/gpcb-menu.res:257 ../src/pcb-menu.res:240
+msgid "Shift-B"
+msgstr "Shift-B"
+
+#: ../src/gpcb-menu.res:257 ../src/pcb-menu.res:240
+msgid "Shift<Key>b"
+msgstr "Shift<Tecla>b"
+
+#: ../src/gpcb-menu.res:258 ../src/pcb-menu.res:241
+msgid "Move selected to current layer"
+msgstr "Mova os objetos selecionados para a camada atual"
+
+#: ../src/gpcb-menu.res:258 ../src/pcb-menu.res:241
+msgid "Shift-M"
+msgstr "Shift-M"
+
+#: ../src/gpcb-menu.res:258 ../src/pcb-menu.res:241
+msgid "Shift<Key>m"
+msgstr "Shift<Tecla>m"
+
+#: ../src/gpcb-menu.res:474
+msgid "Remove selected objects"
+msgstr "Apague objetos selecionados"
+
+#: ../src/gpcb-menu.res:259 ../src/pcb-menu.res:362
+msgid "Shift-Delete"
+msgstr "Shift-Delete"
+
+#: ../src/gpcb-menu.res:259 ../src/pcb-menu.res:362
+msgid "Shift<Key>Delete"
+msgstr "Shift<Tecla>Delete"
+
+#: ../src/gpcb-menu.res:488 ../src/pcb-menu.res:243
+msgid "Convert selection to element"
+msgstr "Converte seleção em elemento"
+
+#: ../src/gpcb-menu.res:262 ../src/pcb-menu.res:245
+msgid "Optimize selected rats"
+msgstr "Otimize ratos selecionados"
+
+#: ../src/gpcb-menu.res:334 ../src/pcb-menu.res:311
+msgid "Auto-route selected rats"
+msgstr "Roteamento automático de ratos selecionados"
+
+#: ../src/gpcb-menu.res:263 ../src/pcb-menu.res:246
+msgid "Alt-R"
+msgstr "Alt-R"
+
+#: ../src/gpcb-menu.res:263 ../src/pcb-menu.res:246
+msgid "Alt<Key>r"
+msgstr "Alt<Tecla>r"
+
+#: ../src/gpcb-menu.res:491 ../src/pcb-menu.res:247
+msgid "Rip up selected auto-routed tracks"
+msgstr "Anule trilhas auto roteadas selecionadas"
+
+#: ../src/gpcb-menu.res:266 ../src/pcb-menu.res:249
+msgid "Change size of selected objects"
+msgstr "Modifica tamanho de objetos selecionados"
+
+#: ../src/gpcb-menu.res:267 ../src/pcb-menu.res:250
+msgid "Lines -10 mil"
+msgstr "Linhas -10 mil"
+
+#: ../src/gpcb-menu.res:268 ../src/pcb-menu.res:251
+msgid "Lines +10 mil"
+msgstr "Linhas +10 mil"
+
+#: ../src/gpcb-menu.res:269 ../src/pcb-menu.res:252
+msgid "Pads -10 mil"
+msgstr "Pastilhas -10 mil"
+
+#: ../src/gpcb-menu.res:270 ../src/pcb-menu.res:253
+msgid "Pads +10 mil"
+msgstr "Pastilhas +10 mil"
+
+#: ../src/gpcb-menu.res:282 ../src/pcb-menu.res:264
+msgid "Pins -10 mil"
+msgstr "Conectores -10 mil"
+
+#: ../src/gpcb-menu.res:283 ../src/pcb-menu.res:265
+msgid "Pins +10 mil"
+msgstr "Conectores +10 mil"
+
+#: ../src/gpcb-menu.res:273 ../src/pcb-menu.res:256
+msgid "Texts -10 mil"
+msgstr "Textos -10 mil"
+
+#: ../src/gpcb-menu.res:274 ../src/pcb-menu.res:257
+msgid "Texts +10 mil"
+msgstr "Textos +10 mil"
+
+#: ../src/gpcb-menu.res:280 ../src/pcb-menu.res:262
+msgid "Vias -10 mil"
+msgstr "Vias -10 mil"
+
+#: ../src/gpcb-menu.res:281 ../src/pcb-menu.res:263
+msgid "Vias +10 mil"
+msgstr "Vias +10 mil"
+
+#: ../src/gpcb-menu.res:279 ../src/pcb-menu.res:261
+msgid "Change drilling hole of selected objects"
+msgstr "Modifica orifício de perfuração dos objetos selecionados"
+
+#: ../src/gpcb-menu.res:286 ../src/pcb-menu.res:267
+msgid "Change square-flag of selected objects"
+msgstr "Altere o sinalizador de quadrado dos objetos selecionados"
+
+#: ../src/gpcb-menu.res:509 ../src/pcb-menu.res:174
+msgid "Buffer"
+msgstr "Memória"
+
+#: ../src/gpcb-menu.res:300 ../src/pcb-menu.res:279
+msgid "Rotate buffer 90 deg CCW"
+msgstr "Rotaciona memória 90 graus anti-horário"
+
+#: ../src/gpcb-menu.res:301 ../src/pcb-menu.res:280
+msgid "Shift-F7"
+msgstr "Shift-F7"
+
+#: ../src/gpcb-menu.res:301 ../src/pcb-menu.res:280
+msgid "Shift<Key>F7"
+msgstr "Shift<Tecla>F7"
+
+#: ../src/gpcb-menu.res:302 ../src/pcb-menu.res:281
+msgid "Rotate buffer 90 deg CW"
+msgstr "Rotaciona memória 90 graus horário"
+
+#: ../src/gpcb-menu.res:303 ../src/pcb-menu.res:282
+msgid "Arbitrarily Rotate Buffer"
+msgstr "Rotacão personalizada da memória"
+
+#: ../src/gpcb-menu.res:304 ../src/pcb-menu.res:283
+msgid "Mirror buffer (up/down)"
+msgstr "Espelhar memória (acima/abaixo)"
+
+#: ../src/gpcb-menu.res:305 ../src/pcb-menu.res:284
+msgid "Mirror buffer (left/right)"
+msgstr "Espelhar memória (esquerda/direita)"
+
+#: ../src/gpcb-menu.res:308 ../src/pcb-menu.res:287
+msgid "Clear buffer"
+msgstr "Apaga memória"
+
+#: ../src/gpcb-menu.res:309 ../src/pcb-menu.res:288
+msgid "Convert buffer to element"
+msgstr "Converte memória em componente"
+
+#: ../src/gpcb-menu.res:310 ../src/pcb-menu.res:289
+msgid "Break buffer elements to pieces"
+msgstr "Quebra componentes na memória em peças"
+
+#: ../src/gpcb-menu.res:311 ../src/pcb-menu.res:290
+msgid "Save buffer elements to file"
+msgstr "Grava componentes da memória em arquivo"
+
+#: ../src/gpcb-menu.res:313
+msgid "Select Buffer #1"
+msgstr "Seleciona Memória #1"
+
+#: ../src/gpcb-menu.res:313 ../src/pcb-menu.res:293
+msgid "Shift-1"
+msgstr "Shift-1"
+
+#: ../src/gpcb-menu.res:313 ../src/pcb-menu.res:293
+msgid "Shift<Key>1"
+msgstr "Shift<Tecla>1"
+
+#: ../src/gpcb-menu.res:314
+msgid "Select Buffer #2"
+msgstr "Selecione Memória #2"
+
+#: ../src/gpcb-menu.res:314 ../src/pcb-menu.res:294
+msgid "Shift-2"
+msgstr "Shift-2"
+
+#: ../src/gpcb-menu.res:314 ../src/pcb-menu.res:294
+msgid "Shift<Key>2"
+msgstr "Shift<Tecla>1"
+
+#: ../src/gpcb-menu.res:315
+msgid "Select Buffer #3"
+msgstr "Selecione Memória #3"
+
+#: ../src/gpcb-menu.res:315 ../src/pcb-menu.res:295
+msgid "Shift-3"
+msgstr "Shift-3"
+
+#: ../src/gpcb-menu.res:315 ../src/pcb-menu.res:295
+msgid "Shift<Key>3"
+msgstr "Shift<Tecla>3"
+
+#: ../src/gpcb-menu.res:316
+msgid "Select Buffer #4"
+msgstr "Selecione Memória #4"
+
+#: ../src/gpcb-menu.res:316 ../src/pcb-menu.res:296
+msgid "Shift-4"
+msgstr "Shift-4"
+
+#: ../src/gpcb-menu.res:316 ../src/pcb-menu.res:296
+msgid "Shift<Key>4"
+msgstr "Shift<Tecla>4"
+
+#: ../src/gpcb-menu.res:317
+msgid "Select Buffer #5"
+msgstr "Selecione Memória #5"
+
+#: ../src/gpcb-menu.res:317 ../src/pcb-menu.res:297
+msgid "Shift-5"
+msgstr "Shift-5"
+
+#: ../src/gpcb-menu.res:317 ../src/pcb-menu.res:297
+msgid "Shift<Key>5"
+msgstr "Shift<Tecla>5"
+
+#: ../src/gpcb-menu.res:323
+msgid "Connects"
+msgstr "Conecções"
+
+#: ../src/gpcb-menu.res:324
+msgid "Lookup connection"
+msgstr "Procura conecção"
+
+#: ../src/gpcb-menu.res:324 ../src/pcb-menu.res:301
+msgid "Ctrl-F"
+msgstr "Ctrl-F"
+
+#: ../src/gpcb-menu.res:324 ../src/pcb-menu.res:301
+msgid "Ctrl<Key>f"
+msgstr "Ctrl<Tecla>F"
+
+#: ../src/gpcb-menu.res:325 ../src/pcb-menu.res:302
+msgid "Reset scanned pads/pins/vias"
+msgstr "Zere pastilhas/conectores/vias examinados"
+
+#: ../src/gpcb-menu.res:326 ../src/pcb-menu.res:303
+msgid "Reset scanned lines/polygons"
+msgstr "Zere polígonos/linhas examinados"
+
+#: ../src/gpcb-menu.res:327 ../src/pcb-menu.res:304
+msgid "Reset all connections"
+msgstr "Zere todas as conecções"
+
+#: ../src/gpcb-menu.res:327 ../src/pcb-menu.res:304
+msgid "Shift-F"
+msgstr "Shift-F"
+
+#: ../src/gpcb-menu.res:327 ../src/pcb-menu.res:304
+msgid "Shift<Key>f"
+msgstr "Shift<Tecla>f"
+
+#: ../src/gpcb-menu.res:329
+msgid "Optimize rats nest"
+msgstr "Otimizar ninhos de rato"
+
+#: ../src/gpcb-menu.res:330 ../src/pcb-menu.res:307
+msgid "O"
+msgstr "O"
+
+#: ../src/gpcb-menu.res:330 ../src/pcb-menu.res:307
+msgid "<Key>o"
+msgstr "<Tecla>o"
+
+#: ../src/gpcb-menu.res:331
+msgid "Erase rats nest"
+msgstr "Apaga ninho de ratos"
+
+#: ../src/gpcb-menu.res:331 ../src/pcb-menu.res:308
+msgid "E"
+msgstr "E"
+
+#: ../src/gpcb-menu.res:331 ../src/pcb-menu.res:308
+msgid "<Key>e"
+msgstr "<Tecla>e"
+
+#: ../src/gpcb-menu.res:332 ../src/pcb-menu.res:309
+msgid "Erase selected rats"
+msgstr "Apaga os ratos selecionados"
+
+#: ../src/gpcb-menu.res:332 ../src/pcb-menu.res:309
+msgid "Shift-E"
+msgstr "Shift-E"
+
+#: ../src/gpcb-menu.res:332 ../src/pcb-menu.res:309
+msgid "Shift<Key>e"
+msgstr "Shift<Tecla>e"
+
+#: ../src/gpcb-menu.res:335 ../src/pcb-menu.res:312
+msgid "Auto-route all rats"
+msgstr "Roteando automaticamente todos os ratos"
+
+#: ../src/gpcb-menu.res:336 ../src/pcb-menu.res:313
+msgid "Rip up all auto-routed tracks"
+msgstr "Cancele todas as trilhas auto roteadas"
+
+#: ../src/gpcb-menu.res:338
+msgid "Optimize routed tracks"
+msgstr "Otimize trilhas roteadas"
+
+#: ../src/gpcb-menu.res:339 ../src/pcb-menu.res:315
+msgid "Auto-Optimize"
+msgstr "Auto-Otimizar"
+
+#: ../src/gpcb-menu.res:339 ../src/pcb-menu.res:315
+msgid "Shift-="
+msgstr "Shift-="
+
+#: ../src/gpcb-menu.res:339 ../src/pcb-menu.res:315
+msgid "Shift<Key>="
+msgstr "Shift<Tecla>="
+
+#: ../src/gpcb-menu.res:340 ../src/pcb-menu.res:316
+msgid "Debumpify"
+msgstr "Desmanchar U"
+
+#: ../src/gpcb-menu.res:341 ../src/pcb-menu.res:317
+msgid "Unjaggy"
+msgstr "Aplainar"
+
+#: ../src/gpcb-menu.res:342 ../src/pcb-menu.res:318
+msgid "Vianudge"
+msgstr "Reposicionar via"
+
+#: ../src/gpcb-menu.res:343 ../src/pcb-menu.res:319
+msgid "Viatrim"
+msgstr "Remover via"
+
+#: ../src/gpcb-menu.res:344
+msgid "Ortho pull"
+msgstr "Mover cantos"
+
+#: ../src/gpcb-menu.res:345
+msgid "Simple optimization"
+msgstr "Otimização simples"
+
+#: ../src/gpcb-menu.res:345 ../src/pcb-menu.res:321
+msgid "="
+msgstr "="
+
+#: ../src/gpcb-menu.res:345 ../src/pcb-menu.res:321
+msgid "<Key>="
+msgstr "<Tecla>="
+
+#: ../src/gpcb-menu.res:346 ../src/pcb-menu.res:322
+msgid "Miter"
+msgstr "Suavisar arestas"
+
+#: ../src/gpcb-menu.res:347 ../src/pcb-menu.res:323
+msgid "Puller"
+msgstr "Desviar"
+
+#: ../src/gpcb-menu.res:347 ../src/pcb-menu.res:323
+msgid "Y"
+msgstr "Y"
+
+#: ../src/gpcb-menu.res:347 ../src/pcb-menu.res:323
+msgid "<Key>y"
+msgstr "<Tecla>y"
+
+#: ../src/gpcb-menu.res:348 ../src/pcb-menu.res:324
+msgid "Global Puller"
+msgstr "Desvio Global"
+
+#: ../src/gpcb-menu.res:349 ../src/pcb-menu.res:325
+msgid "Selected"
+msgstr "Selecione"
+
+#: ../src/gpcb-menu.res:350 ../src/pcb-menu.res:326
+msgid "Found"
+msgstr "Encontrado"
+
+#: ../src/gpcb-menu.res:351 ../src/pcb-menu.res:327
+msgid "All"
+msgstr "Todos"
+
+#: ../src/gpcb-menu.res:354 ../src/pcb-menu.res:329
+msgid "Only autorouted nets"
+msgstr "Somente redes autoroteadas"
+
+#: ../src/gpcb-menu.res:357 ../src/pcb-menu.res:331
+msgid "Design Rule Checker"
+msgstr "Verificação das Regras de Desenho"
+
+#: ../src/gpcb-menu.res:359 ../src/pcb-menu.res:333
+msgid "Apply vendor drill mapping"
+msgstr "Aplicar mapeamento de perfuração de fornecedor"
+
+#: ../src/gpcb-menu.res:365
+msgid "Info"
+msgstr "Informação"
+
+#: ../src/gpcb-menu.res:494 ../src/pcb-menu.res:337
+msgid "Generate object report"
+msgstr "Gerar relatório de objeto"
+
+#: ../src/gpcb-menu.res:366 ../src/pcb-menu.res:337
+msgid "Ctrl-R"
+msgstr "Ctrl-R"
+
+#: ../src/gpcb-menu.res:366 ../src/pcb-menu.res:337
+msgid "Ctrl<Key>r"
+msgstr "Ctrl<Tecla>r"
+
+#: ../src/gpcb-menu.res:367 ../src/pcb-menu.res:338
+msgid "Generate drill summary"
+msgstr "Gerar sumário de perfuração"
+
+#: ../src/gpcb-menu.res:368 ../src/pcb-menu.res:339
+msgid "Report found pins/pads"
+msgstr "Informe conectores/pastilhas encontradas"
+
+#: ../src/gpcb-menu.res:369 ../src/pcb-menu.res:341
+msgid "Key Bindings"
+msgstr "Associação de Teclas"
+
+#: ../src/gpcb-menu.res:510 ../src/pcb-menu.res:342
+msgid "Remove"
+msgstr "Remover"
+
+#: ../src/gpcb-menu.res:370 ../src/pcb-menu.res:242
+msgid "Delete"
+msgstr "Apagar"
+
+#: ../src/gpcb-menu.res:370 ../src/pcb-menu.res:242
+msgid "<Key>Delete"
+msgstr "<Tecla>Delete"
+
+#: ../src/gpcb-menu.res:376
+msgid "Remove Selected"
+msgstr "Remover Selecionados"
+
+#: ../src/gpcb-menu.res:376 ../src/pcb-menu.res:342
+msgid "Backspace"
+msgstr "Backspace"
+
+#: ../src/gpcb-menu.res:376 ../src/pcb-menu.res:342
+msgid "<Key>BackSpace"
+msgstr "<Tecla>Backspace"
+
+#: ../src/gpcb-menu.res:379 ../src/pcb-menu.res:362
+msgid "Remove Connected"
+msgstr "Remover Conectados"
+
+#: ../src/gpcb-menu.res:379 ../src/pcb-menu.res:345
+msgid "Shift-Backspace"
+msgstr "Shift-Backspace"
+
+#: ../src/gpcb-menu.res:379 ../src/pcb-menu.res:345
+msgid "Shift<Key>BackSpace"
+msgstr "Shift<Tecla>Backspace"
+
+#: ../src/gpcb-menu.res:396 ../src/pcb-menu.res:379
+msgid "Set Same"
+msgstr "Ajusta o Mesmo"
+
+#: ../src/gpcb-menu.res:396 ../src/pcb-menu.res:379
+msgid "A"
+msgstr "A"
+
+#: ../src/gpcb-menu.res:396 ../src/pcb-menu.res:379
+msgid "<Key>a"
+msgstr "<Tecla>a"
+
+#: ../src/gpcb-menu.res:397 ../src/pcb-menu.res:380
+msgid "Flip Object"
+msgstr "Vira Objeto"
+
+#: ../src/gpcb-menu.res:397 ../src/pcb-menu.res:380
+msgid "B"
+msgstr "B"
+
+#: ../src/gpcb-menu.res:397 ../src/pcb-menu.res:380
+msgid "<Key>b"
+msgstr "<Tecla>b"
+
+#: ../src/gpcb-menu.res:398 ../src/pcb-menu.res:381
+msgid "Find Connections"
+msgstr "Encontra Conecções"
+
+#: ../src/gpcb-menu.res:398 ../src/pcb-menu.res:381
+msgid "F"
+msgstr "F"
+
+#: ../src/gpcb-menu.res:398 ../src/pcb-menu.res:381
+msgid "<Key>f"
+msgstr "<Tecla>f"
+
+#: ../src/gpcb-menu.res:399 ../src/pcb-menu.res:382
+msgid "ToggleHideName Object"
+msgstr "Objeto ToggleHideName"
+
+#: ../src/gpcb-menu.res:399 ../src/pcb-menu.res:382
+msgid "H"
+msgstr "H"
+
+#: ../src/gpcb-menu.res:399 ../src/pcb-menu.res:382
+msgid "<Key>h"
+msgstr "<Tecla>h"
+
+#: ../src/gpcb-menu.res:400 ../src/pcb-menu.res:383
+msgid "ToggleHideName SelectedElement"
+msgstr "ToggleHideName SelectedElement"
+
+#: ../src/gpcb-menu.res:400 ../src/pcb-menu.res:383
+msgid "Shift-H"
+msgstr "Shift-H"
+
+#: ../src/gpcb-menu.res:400 ../src/pcb-menu.res:383
+msgid "Shift<Key>h"
+msgstr "Shift<Tecla>h"
+
+#: ../src/gpcb-menu.res:401 ../src/pcb-menu.res:384
+msgid "ChangeHole Object"
+msgstr "Objeto ChangeHole"
+
+#: ../src/gpcb-menu.res:401 ../src/pcb-menu.res:384
+msgid "Ctrl-H"
+msgstr "Ctrl-H"
+
+#: ../src/gpcb-menu.res:401 ../src/pcb-menu.res:384
+msgid "Ctrl<Key>h"
+msgstr "Ctrl<Tecla>h"
+
+#: ../src/gpcb-menu.res:402 ../src/pcb-menu.res:385
+msgid "ChangeJoin Object"
+msgstr "ChangeJoin Object"
+
+#: ../src/gpcb-menu.res:402 ../src/pcb-menu.res:385
+msgid "J"
+msgstr "J"
+
+#: ../src/gpcb-menu.res:402 ../src/pcb-menu.res:385
+msgid "<Key>j"
+msgstr "<Tecla>j"
+
+#: ../src/gpcb-menu.res:403 ../src/pcb-menu.res:386
+msgid "ChangeJoin SelectedObject"
+msgstr "ChangeJoin SelectedObject"
+
+#: ../src/gpcb-menu.res:403 ../src/pcb-menu.res:386
+msgid "Shift-J"
+msgstr "Shift-J"
+
+#: ../src/gpcb-menu.res:403 ../src/pcb-menu.res:386
+msgid "Shift<Key>j"
+msgstr "Shift<Tecla>j"
+
+#: ../src/gpcb-menu.res:404 ../src/pcb-menu.res:387
+msgid "Clear Object +"
+msgstr "Apaga Objeto +"
+
+#: ../src/gpcb-menu.res:404 ../src/pcb-menu.res:387
+msgid "K"
+msgstr "K"
+
+#: ../src/gpcb-menu.res:404 ../src/pcb-menu.res:387
+msgid "<Key>k"
+msgstr "<Tecla>k"
+
+#: ../src/gpcb-menu.res:405 ../src/pcb-menu.res:388
+msgid "Clear Object -"
+msgstr "Apaga Objeto -"
+
+#: ../src/gpcb-menu.res:405 ../src/pcb-menu.res:388
+msgid "Shift-K"
+msgstr "Shift-K"
+
+#: ../src/gpcb-menu.res:405 ../src/pcb-menu.res:388
+msgid "Shift<Key>k"
+msgstr "Shift<Tecla>k"
+
+#: ../src/gpcb-menu.res:406 ../src/pcb-menu.res:389
+msgid "Clear Selected +"
+msgstr "Apaga Selecionado +"
+
+#: ../src/gpcb-menu.res:406 ../src/pcb-menu.res:389
+msgid "Ctrl-K"
+msgstr "Ctrl-K"
+
+#: ../src/gpcb-menu.res:406 ../src/pcb-menu.res:389
+msgid "Ctrl<Key>k"
+msgstr "Ctrl<Tecla>k"
+
+#: ../src/gpcb-menu.res:407 ../src/pcb-menu.res:390
+msgid "Clear Selected -"
+msgstr "Apaga Selecionado -"
+
+#: ../src/gpcb-menu.res:407 ../src/pcb-menu.res:390
+msgid "Shift-Ctrl-K"
+msgstr "Shift-Ctrl-K"
+
+#: ../src/gpcb-menu.res:407 ../src/pcb-menu.res:390
+msgid "Shift Ctrl<Key>k"
+msgstr "Shift Ctrl<Tecla>k"
+
+#: ../src/gpcb-menu.res:408 ../src/pcb-menu.res:391
+msgid "Line Tool size +"
+msgstr "Ferramenta Linha tamanho +"
+
+#: ../src/gpcb-menu.res:408 ../src/pcb-menu.res:391
+msgid "L"
+msgstr "L"
+
+#: ../src/gpcb-menu.res:408 ../src/pcb-menu.res:391
+msgid "<Key>l"
+msgstr "<Tecla>l"
+
+#: ../src/gpcb-menu.res:409 ../src/pcb-menu.res:392
+msgid "Line Tool size -"
+msgstr "Ferramenta Linha tamanho -"
+
+#: ../src/gpcb-menu.res:409 ../src/pcb-menu.res:392
+msgid "Shift-L"
+msgstr "Shift-L"
+
+#: ../src/gpcb-menu.res:409 ../src/pcb-menu.res:392
+msgid "Shift<Key>l"
+msgstr "Shift<Tecla>l"
+
+#: ../src/gpcb-menu.res:410 ../src/pcb-menu.res:393
+msgid "Move Object to current layer"
+msgstr "Mova o objeto para a camada atual"
+
+#: ../src/gpcb-menu.res:410 ../src/pcb-menu.res:393
+msgid "M"
+msgstr "M"
+
+#: ../src/gpcb-menu.res:410 ../src/pcb-menu.res:393
+msgid "<Key>m"
+msgstr "<Tecla>m"
+
+#: ../src/gpcb-menu.res:411 ../src/pcb-menu.res:394
+msgid "MarkCrosshair"
+msgstr "Marca Mira"
+
+#: ../src/gpcb-menu.res:411 ../src/pcb-menu.res:394
+msgid "Ctrl-M"
+msgstr "Ctrl-M"
+
+#: ../src/gpcb-menu.res:411 ../src/pcb-menu.res:394
+msgid "Ctrl<Key>m"
+msgstr "Ctrl<Tecla>m"
+
+#: ../src/gpcb-menu.res:412 ../src/pcb-menu.res:395
+msgid "Select shortest rat"
+msgstr "Seleciona o rato mais curto"
+
+#: ../src/gpcb-menu.res:412 ../src/pcb-menu.res:395
+msgid "Shift-N"
+msgstr "Shift-N"
+
+#: ../src/gpcb-menu.res:412 ../src/pcb-menu.res:395
+msgid "Shift<Key>n"
+msgstr "Shift<Tecla>n"
+
+#: ../src/gpcb-menu.res:413 ../src/pcb-menu.res:396
+msgid "AddRats to selected pins"
+msgstr "Adiciona ratos a conectores selecionados"
+
+#: ../src/gpcb-menu.res:413 ../src/pcb-menu.res:396
+msgid "Shift-O"
+msgstr "Shift-O"
+
+#: ../src/gpcb-menu.res:413 ../src/pcb-menu.res:396
+msgid "Shift<Key>o"
+msgstr "Shift<Tecla>o"
+
+#: ../src/gpcb-menu.res:419 ../src/pcb-menu.res:402
+msgid "ChangeOctagon Object"
+msgstr "Objeto ChangeOctogon"
+
+#: ../src/gpcb-menu.res:419 ../src/pcb-menu.res:402
+msgid "Ctrl-O"
+msgstr "Ctrl-O"
+
+#: ../src/gpcb-menu.res:419 ../src/pcb-menu.res:402
+msgid "Ctrl<Key>o"
+msgstr "Ctrl<Tecla>o"
+
+#: ../src/gpcb-menu.res:420 ../src/pcb-menu.res:403
+msgid "Polygon PreviousPoint"
+msgstr "PreviousPoint do Polígono"
+
+#: ../src/gpcb-menu.res:420 ../src/pcb-menu.res:403
+msgid "P"
+msgstr "P"
+
+#: ../src/gpcb-menu.res:420 ../src/pcb-menu.res:403
+msgid "<Key>p"
+msgstr "<Tecla>p"
+
+#: ../src/gpcb-menu.res:421 ../src/pcb-menu.res:404
+msgid "Polygon Close"
+msgstr "Fecha Polígono"
+
+#: ../src/gpcb-menu.res:421 ../src/pcb-menu.res:404
+msgid "Shift-P"
+msgstr "Shift-P"
+
+#: ../src/gpcb-menu.res:421 ../src/pcb-menu.res:404
+msgid "Shift<Key>p"
+msgstr "Shift<Tecla>p"
+
+#: ../src/gpcb-menu.res:422 ../src/pcb-menu.res:405
+msgid "ChangeSquare Object"
+msgstr "Objeto ChangeSquare"
+
+#: ../src/gpcb-menu.res:422 ../src/pcb-menu.res:405
+msgid "Q"
+msgstr "Q"
+
+#: ../src/gpcb-menu.res:422 ../src/pcb-menu.res:405
+msgid "<Key>q"
+msgstr "<Tecla>q"
+
+#: ../src/gpcb-menu.res:423 ../src/pcb-menu.res:406
+msgid "ChangeSize +"
+msgstr "Muda Tamanho +"
+
+#: ../src/gpcb-menu.res:423 ../src/pcb-menu.res:406
+msgid "S"
+msgstr "S"
+
+#: ../src/gpcb-menu.res:423 ../src/pcb-menu.res:406
+msgid "<Key>s"
+msgstr "<Tecla>s"
+
+#: ../src/gpcb-menu.res:424 ../src/pcb-menu.res:407
+msgid "ChangeSize -"
+msgstr "Muda Tamanho -"
+
+#: ../src/gpcb-menu.res:424 ../src/pcb-menu.res:407
+msgid "Shift-S"
+msgstr "Shift-S"
+
+#: ../src/gpcb-menu.res:424 ../src/pcb-menu.res:407
+msgid "Shift<Key>s"
+msgstr "Shift<Tecla>s"
+
+#: ../src/gpcb-menu.res:425 ../src/pcb-menu.res:408
+msgid "ChangeDrill +5 mil"
+msgstr "Muda Perfuração +5 mil"
+
+#: ../src/gpcb-menu.res:425 ../src/pcb-menu.res:408
+msgid "Alt-S"
+msgstr "Alt-S"
+
+#: ../src/gpcb-menu.res:425 ../src/pcb-menu.res:408
+msgid "Alt<Key>s"
+msgstr "Alt<Tecla>s"
+
+#: ../src/gpcb-menu.res:426 ../src/pcb-menu.res:409
+msgid "ChangeDrill -5 mil"
+msgstr "Muda Perfuração -5 mil"
+
+#: ../src/gpcb-menu.res:426 ../src/pcb-menu.res:409
+msgid "Alt-Shift-S"
+msgstr "Alt-Shift-S"
+
+#: ../src/gpcb-menu.res:426 ../src/pcb-menu.res:409
+msgid "Alt Shift<Key>s"
+msgstr "Alt Shift<Tecla>s"
+
+#: ../src/gpcb-menu.res:427 ../src/pcb-menu.res:410
+msgid "Text Tool scale +10 mil"
+msgstr "Ferramenta Texto escala +10 mil"
+
+#: ../src/gpcb-menu.res:427 ../src/pcb-menu.res:410
+msgid "T"
+msgstr "T"
+
+#: ../src/gpcb-menu.res:427 ../src/pcb-menu.res:410
+msgid "<Key>t"
+msgstr "<Tecla>t"
+
+#: ../src/gpcb-menu.res:428 ../src/pcb-menu.res:411
+msgid "Text Tool scale -10 mil"
+msgstr "Ferramenta Texo escala -10 mil"
+
+#: ../src/gpcb-menu.res:428 ../src/pcb-menu.res:411
+msgid "Shift-T"
+msgstr "Shift-T"
+
+#: ../src/gpcb-menu.res:428 ../src/pcb-menu.res:411
+msgid "Shift<Key>t"
+msgstr "Shift<Tecla>t"
+
+#: ../src/gpcb-menu.res:429 ../src/pcb-menu.res:412
+msgid "Via Tool size +5 mil"
+msgstr "Ferramenta Via tamanho +5 mil"
+
+#: ../src/gpcb-menu.res:429 ../src/pcb-menu.res:412
+msgid "Shift-V"
+msgstr "Shift-V"
+
+#: ../src/gpcb-menu.res:429 ../src/pcb-menu.res:412
+msgid "Shift<Key>v"
+msgstr "Shift<Tecla>v"
+
+#: ../src/gpcb-menu.res:430 ../src/pcb-menu.res:413
+msgid "Via Tool size -5 mil"
+msgstr "Ferramenta Via tamanho -5 mil"
+
+#: ../src/gpcb-menu.res:430 ../src/pcb-menu.res:413
+msgid "Shift-Ctrl-V"
+msgstr "Shift-Ctrl-V"
+
+#: ../src/gpcb-menu.res:430 ../src/pcb-menu.res:413
+msgid "Shift Ctrl<Key>v"
+msgstr "Shift Ctrl<Tecla>v"
+
+#: ../src/gpcb-menu.res:431 ../src/pcb-menu.res:414
+msgid "Via Tool drill +5 mil"
+msgstr "Ferramenta Via perfuração +5 mil"
+
+#: ../src/gpcb-menu.res:431 ../src/pcb-menu.res:414
+msgid "Alt-V"
+msgstr "Alt-V"
+
+#: ../src/gpcb-menu.res:431 ../src/pcb-menu.res:414
+msgid "Alt<Key>v"
+msgstr "Alt<Tecla>v"
+
+#: ../src/gpcb-menu.res:432 ../src/pcb-menu.res:415
+msgid "Via Tool drill -5 mil"
+msgstr "Ferramenta Via perfuração -5 mil"
+
+#: ../src/gpcb-menu.res:432 ../src/pcb-menu.res:415
+msgid "Alt-Shift-V"
+msgstr "Alt-Shift-V"
+
+#: ../src/gpcb-menu.res:432 ../src/pcb-menu.res:415
+msgid "Alt Shift<Key>v"
+msgstr "Alt Shift<Tecla>v"
+
+#: ../src/gpcb-menu.res:433 ../src/pcb-menu.res:416
+msgid "AddRats Selected"
+msgstr "Adicionar Ratos Selecionados"
+
+#: ../src/gpcb-menu.res:433 ../src/pcb-menu.res:416
+msgid "Shift-W"
+msgstr "Shift-W"
+
+#: ../src/gpcb-menu.res:433 ../src/pcb-menu.res:416
+msgid "Shift<Key>w"
+msgstr "Shift<Tecla>w"
+
+#: ../src/gpcb-menu.res:434 ../src/pcb-menu.res:417
+msgid "Add All Rats"
+msgstr "Adicionar Todos os Ratos"
+
+#: ../src/gpcb-menu.res:434 ../src/pcb-menu.res:417
+msgid "W"
+msgstr "W"
+
+#: ../src/gpcb-menu.res:434 ../src/pcb-menu.res:417
+msgid "<Key>w"
+msgstr "<Tecla>w"
+
+#: ../src/gpcb-menu.res:435 ../src/pcb-menu.res:419
+msgid "Cycle Clip"
+msgstr "Interromper Ciclo"
+
+#: ../src/gpcb-menu.res:435 ../src/pcb-menu.res:419
+msgid "/"
+msgstr "/"
+
+#: ../src/gpcb-menu.res:435 ../src/pcb-menu.res:419
+msgid "<Key>/"
+msgstr "<Tecla>/"
+
+#: ../src/gpcb-menu.res:436
+msgid "Arrow Mode"
+msgstr "Modo Seta"
+
+#: ../src/gpcb-menu.res:436 ../src/pcb-menu.res:420
+msgid "Space"
+msgstr "Espaço"
+
+#: ../src/gpcb-menu.res:436 ../src/pcb-menu.res:420
+msgid "<Key>space"
+msgstr "<Tecla>espaço"
+
+#: ../src/gpcb-menu.res:437 ../src/pcb-menu.res:421
+msgid "Temp Arrow ON"
+msgstr "Seta Temporária Ligado"
+
+#: ../src/gpcb-menu.res:437 ../src/pcb-menu.res:421
+msgid "["
+msgstr "["
+
+#: ../src/gpcb-menu.res:437 ../src/pcb-menu.res:421
+msgid "<Key>["
+msgstr "<Tecla>["
+
+#: ../src/gpcb-menu.res:438 ../src/pcb-menu.res:422
+msgid "Temp Arrow OFF"
+msgstr "Seta Temporária Desligado"
+
+#: ../src/gpcb-menu.res:438 ../src/pcb-menu.res:422
+msgid "]"
+msgstr "]"
+
+#: ../src/gpcb-menu.res:438 ../src/pcb-menu.res:422
+msgid "<Key>]"
+msgstr "<Tecla>]"
+
+#: ../src/gpcb-menu.res:440 ../src/pcb-menu.res:424
+msgid "Step Up"
+msgstr "Passo Adiante"
+
+#: ../src/gpcb-menu.res:444 ../src/pcb-menu.res:428
+msgid "Up"
+msgstr "PgUp"
+
+#: ../src/gpcb-menu.res:440 ../src/pcb-menu.res:424
+msgid "<Key>Up"
+msgstr "<Tecla>PgUp"
+
+#: ../src/gpcb-menu.res:441 ../src/pcb-menu.res:425
+msgid "Step Down"
+msgstr "Passo Abaixo"
+
+#: ../src/gpcb-menu.res:445 ../src/pcb-menu.res:429
+msgid "Down"
+msgstr "PgDown"
+
+#: ../src/gpcb-menu.res:441 ../src/pcb-menu.res:425
+msgid "<Key>Down"
+msgstr "<Tecla>PgDown"
+
+#: ../src/gpcb-menu.res:442 ../src/pcb-menu.res:426
+msgid "Step Left"
+msgstr "Passo Esquerda"
+
+#: ../src/gpcb-menu.res:446 ../src/pcb-menu.res:430
+msgid "Left"
+msgstr "Esquerda"
+
+#: ../src/gpcb-menu.res:442 ../src/pcb-menu.res:426
+msgid "<Key>Left"
+msgstr "<Tecla>Esquerda"
+
+# FIXME: this should be changed to "Length" if and when 3D geometrical GUIs, 3D-exporters, 3D-printers emerge or are used.
+#: ../src/gpcb-menu.res:443 ../src/pcb-menu.res:427
+msgid "Step Right"
+msgstr "Passo Direita"
+
+# FIXME: this should be changed to "Length" if and when 3D geometrical GUIs, 3D-exporters, 3D-printers emerge or are used.
+#: ../src/gpcb-menu.res:447 ../src/pcb-menu.res:431
+msgid "Right"
+msgstr "Direita"
+
+# FIXME: this should be changed to "Length" if and when 3D geometrical GUIs, 3D-exporters, 3D-printers emerge or are used.
+#: ../src/gpcb-menu.res:443 ../src/pcb-menu.res:427
+msgid "<Key>Right"
+msgstr "<Tecla>Direita"
+
+#: ../src/gpcb-menu.res:444 ../src/pcb-menu.res:428
+msgid "Step +Up"
+msgstr "Passo +PgUp"
+
+#: ../src/gpcb-menu.res:444 ../src/pcb-menu.res:428
+msgid "Shift<Key>Up"
+msgstr "Shift<Tecla>PgUp"
+
+#: ../src/gpcb-menu.res:445 ../src/pcb-menu.res:429
+msgid "Step +Down"
+msgstr "Passo +Abaixo"
+
+#: ../src/gpcb-menu.res:445 ../src/pcb-menu.res:429
+msgid "Shift<Key>Down"
+msgstr "Shift<Tecla>PgDown"
+
+#: ../src/gpcb-menu.res:446 ../src/pcb-menu.res:430
+msgid "Step +Left"
+msgstr "Passo +Esquerda"
+
+#: ../src/gpcb-menu.res:446 ../src/pcb-menu.res:430
+msgid "Shift<Key>Left"
+msgstr "Shift<Tecla>Esquerda"
+
+#: ../src/gpcb-menu.res:447 ../src/pcb-menu.res:431
+msgid "Step +Right"
+msgstr "Passo +Direita"
+
+#: ../src/gpcb-menu.res:447 ../src/pcb-menu.res:431
+msgid "Shift<Key>Right"
+msgstr "Shift<Tecla>Direita"
+
+#: ../src/gpcb-menu.res:448 ../src/pcb-menu.res:432
+msgid "Click"
+msgstr "Clicar"
+
+#: ../src/gpcb-menu.res:448 ../src/pcb-menu.res:432
+msgid "Enter"
+msgstr "Enter"
+
+#: ../src/gpcb-menu.res:448 ../src/pcb-menu.res:432
+msgid "<Key>Enter"
+msgstr "<Tecla>Enter"
+
+#: ../src/gpcb-menu.res:456
+msgid "Window"
+msgstr "Janela"
+
+#: ../src/gpcb-menu.res:457 ../src/hid/gtk/gui-config.c:2156
+#: ../src/pcb-menu.res:437
+msgid "Library"
+msgstr "Biblioteca"
+
+#: ../src/gpcb-menu.res:457
+msgid "i"
+msgstr "i"
+
+#: ../src/gpcb-menu.res:457
+msgid "<Key>i"
+msgstr "<Tecla>i"
+
+#: ../src/gpcb-menu.res:458 ../src/pcb-menu.res:438
+msgid "Message Log"
+msgstr "Registro de Mensagens"
+
+#: ../src/gpcb-menu.res:459
+msgid "DRC Check"
+msgstr "Verificação de DRC"
+
+#: ../src/gpcb-menu.res:460 ../src/pcb-menu.res:439
+msgid "Netlist"
+msgstr "Netlist"
+
+#: ../src/gpcb-menu.res:461
+msgid "Command Entry"
+msgstr "Entrada de Comando"
+
+#: ../src/gpcb-menu.res:461 ../src/pcb-menu.res:185
+msgid ":"
+msgstr ":"
+
+#: ../src/gpcb-menu.res:461 ../src/pcb-menu.res:185
+msgid "<Key>:"
+msgstr "<Tecla>:"
+
+#: ../src/gpcb-menu.res:462 ../src/pcb-menu.res:440
+msgid "Pinout"
+msgstr "Saída de conector"
+
+#: ../src/gpcb-menu.res:462 ../src/pcb-menu.res:440
+msgid "Shift-D"
+msgstr "Shift-D"
+
+#: ../src/gpcb-menu.res:462 ../src/pcb-menu.res:440
+msgid "Shift<Key>d"
+msgstr "Shift<Tecla>d"
+
+#: ../src/gpcb-menu.res:464 ../src/pcb-menu.res:32
+msgid "About..."
+msgstr "Sobre..."
+
+#: ../src/gpcb-menu.res:472
+msgid "Operations on selections"
+msgstr "Operações sobre seleções"
+
+#: ../src/gpcb-menu.res:473 ../src/pcb-menu.res:226
+msgid "Unselect all objects"
+msgstr "Remove a seleção de todos os objetos"
+
+#: ../src/gpcb-menu.res:475 ../src/pcb-menu.res:273
+msgid "Copy selection to buffer"
+msgstr "Copia seleção para a memória"
+
+#: ../src/gpcb-menu.res:481 ../src/pcb-menu.res:275
+msgid "Cut selection to buffer"
+msgstr "Corta seleção para a memória"
+
+#: ../src/gpcb-menu.res:489
+msgid "Auto place selected elements"
+msgstr "Coloca automaticamente os componenetes selecionados"
+
+#: ../src/gpcb-menu.res:490
+msgid "Autoroute selected elements"
+msgstr "Rotear automaticamente os componenetes selecionados"
+
+#: ../src/gpcb-menu.res:493
+msgid "Operations on this location"
+msgstr "Operações sobre essa localização"
+
+#: ../src/gpcb-menu.res:497 ../src/pcb-menu.res:134
+msgid "Undo last operation"
+msgstr "Desfazer a última operação"
+
+#: ../src/gpcb-menu.res:498 ../src/pcb-menu.res:135
+msgid "Redo last undone operation"
+msgstr "Refaça a última operação não concluída"
+
+#: ../src/gpcb-menu.res:501 ../src/pcb-menu.res:166
+msgid "None"
+msgstr "Nenhum"
+
+#: ../src/gpcb-menu.res:502 ../src/pcb-menu.res:167
+msgid "Via"
+msgstr "Via"
+
+#: ../src/gpcb-menu.res:502 ../src/pcb-menu.res:167
+msgid "F1"
+msgstr "F1"
+
+#: ../src/gpcb-menu.res:502 ../src/pcb-menu.res:167
+msgid "<Key>F1"
+msgstr "<Tecla>F1"
+
+#: ../src/gpcb-menu.res:503 ../src/pcb-menu.res:168
+msgid "Line"
+msgstr "Linha"
+
+#: ../src/gpcb-menu.res:503 ../src/pcb-menu.res:168
+msgid "F2"
+msgstr "F2"
+
+#: ../src/gpcb-menu.res:503 ../src/pcb-menu.res:168
+msgid "<Key>F2"
+msgstr "<Tecla>F2"
+
+#: ../src/gpcb-menu.res:504 ../src/pcb-menu.res:169
+msgid "Arc"
+msgstr "Arco"
+
+#: ../src/gpcb-menu.res:504 ../src/pcb-menu.res:169
+msgid "F3"
+msgstr "F3"
+
+#: ../src/gpcb-menu.res:504 ../src/pcb-menu.res:169
+msgid "<Key>F3"
+msgstr "<Tecla>F3"
+
+#: ../src/gpcb-menu.res:505 ../src/pcb-menu.res:170
+msgid "F4"
+msgstr "F5"
+
+#: ../src/gpcb-menu.res:505 ../src/pcb-menu.res:170
+msgid "<Key>F4"
+msgstr "<Tecla>F4"
+
+#: ../src/gpcb-menu.res:506 ../src/pcb-menu.res:171
+msgid "Rectangle"
+msgstr "Retângulo"
+
+#: ../src/gpcb-menu.res:506 ../src/pcb-menu.res:171
+msgid "F5"
+msgstr "F5"
+
+#: ../src/gpcb-menu.res:506 ../src/pcb-menu.res:171
+msgid "<Key>F5"
+msgstr "<Tecla>F5"
+
+#: ../src/gpcb-menu.res:507 ../src/pcb-menu.res:172
+msgid "Polygon"
+msgstr "Polígono"
+
+#: ../src/gpcb-menu.res:507 ../src/pcb-menu.res:172
+msgid "F6"
+msgstr "F6"
+
+#: ../src/gpcb-menu.res:507 ../src/pcb-menu.res:172
+msgid "<Key>F6"
+msgstr "<Tecla>F6"
+
+#: ../src/gpcb-menu.res:508 ../src/pcb-menu.res:173
+msgid "Polygon Hole"
+msgstr "Orifício de Polígono"
+
+#: ../src/gpcb-menu.res:509 ../src/pcb-menu.res:174
+msgid "F7"
+msgstr "F7"
+
+#: ../src/gpcb-menu.res:509 ../src/pcb-menu.res:174
+msgid "<Key>F7"
+msgstr "<Tecla>F7"
+
+#: ../src/gpcb-menu.res:510 ../src/pcb-menu.res:175
+msgid "F8"
+msgstr "F8"
+
+#: ../src/gpcb-menu.res:510 ../src/pcb-menu.res:175
+msgid "<Key>F8"
+msgstr "<Tecla>F8"
+
+#: ../src/gpcb-menu.res:511 ../src/pcb-menu.res:176
+msgid "Rotate"
+msgstr "Rotacionar"
+
+#: ../src/gpcb-menu.res:511 ../src/pcb-menu.res:176
+msgid "F9"
+msgstr "F9"
+
+#: ../src/gpcb-menu.res:511 ../src/pcb-menu.res:176
+msgid "<Key>F9"
+msgstr "<Tecla>F9"
+
+#: ../src/gpcb-menu.res:512 ../src/pcb-menu.res:177
+msgid "Thermal"
+msgstr "Térmico"
+
+#: ../src/gpcb-menu.res:512 ../src/pcb-menu.res:177
+msgid "F10"
+msgstr "F10"
+
+#: ../src/gpcb-menu.res:512 ../src/pcb-menu.res:177
+msgid "<Key>F10"
+msgstr "<Tecla>F10"
+
+#: ../src/gpcb-menu.res:513 ../src/pcb-menu.res:420
+msgid "Arrow"
+msgstr "Seta"
+
+#: ../src/gpcb-menu.res:513 ../src/pcb-menu.res:178
+msgid "F11"
+msgstr "F11"
+
+#: ../src/gpcb-menu.res:513 ../src/pcb-menu.res:178
+msgid "<Key>F11"
+msgstr "<Tecla>F11"
+
+#: ../src/gpcb-menu.res:514 ../src/pcb-menu.res:179
+msgid "Insert Point"
+msgstr "Ponto de inserção"
+
+#: ../src/gpcb-menu.res:514 ../src/pcb-menu.res:179
+msgid "Insert"
+msgstr "Ins"
+
+#: ../src/gpcb-menu.res:514 ../src/pcb-menu.res:179
+msgid "<Key>Insert"
+msgstr "<Tecla>Ins"
+
+#: ../src/gpcb-menu.res:515 ../src/pcb-menu.res:180
+msgid "Move"
+msgstr "Mover"
+
+#: ../src/gpcb-menu.res:516 ../src/pcb-menu.res:181
+msgid "Copy"
+msgstr "Copiar"
+
+#: ../src/gpcb-menu.res:517 ../src/pcb-menu.res:182
+msgid "Lock"
+msgstr "Travar"
+
+#: ../src/gpcb-menu.res:517 ../src/pcb-menu.res:182
+msgid "F12"
+msgstr "F12"
+
+#: ../src/gpcb-menu.res:517 ../src/pcb-menu.res:182
+msgid "<Key>F12"
+msgstr "<Tecla>F12"
+
+#: ../src/gpcb-menu.res:518 ../src/pcb-menu.res:183
+msgid "Esc"
+msgstr "Esc"
+
+#: ../src/gpcb-menu.res:518 ../src/pcb-menu.res:183
+msgid "<Key>Escape"
+msgstr "<Tecla>Esc"
+
+#: ../src/hid/common/actions.c:47
+#, c-format
+msgid "ERROR! Invalid action name, action \"%s\" not registered.\n"
+msgstr "ERRO! Nome de ação inválido, ação \"%s\" não registrada.\n"
+
+#: ../src/hid/common/actions.c:223
+#, c-format
+msgid "no action %s("
+msgstr "nenhuma ação %s("
+
+#: ../src/hid/common/actions.c:312
+#, c-format
+msgid "Syntax error: %s\n"
+msgstr "Erro de sintaxe: %s\n"
+
+#: ../src/hid/common/actions.c:313
+msgid "    expected: Action(arg1, arg2)"
+msgstr "    esperado: Ação(arg1, arg2)"
+
+#: ../src/hid/common/hidnogui.c:358
+msgid "OK to lose data ?"
+msgstr "Pode perder os dados ?"
+
+#: ../src/hid/gtk/ghid-cell-renderer-visibility.c:256
+msgid "Visibility state"
+msgstr "Estado de visibilidade"
+
+#: ../src/hid/gtk/ghid-cell-renderer-visibility.c:257
+msgid "Visibility of the layer"
+msgstr "Visibilidade da camada"
+
+#: ../src/hid/gtk/ghid-cell-renderer-visibility.c:262
+#: ../src/hid/gtk/ghid-cell-renderer-visibility.c:263
+msgid "Layer color"
+msgstr "Cor de camada"
+
+#: ../src/hid/gtk/ghid-coord-entry.c:87
+msgid "Change Units"
+msgstr "Mudar Unidades"
+
+#: ../src/hid/gtk/ghid-main-menu.c:119
+#, c-format
+msgid ""
+"Don't know how to parse \"%s\" as an accelerator in the menu resource file.\n"
+msgstr ""
+"Não sei como analisar \"%s\" como um acelerador no arquivo de recurso de "
+"menu.\n"
+
+#: ../src/hid/gtk/ghid-main-menu.c:125
+msgid ""
+"Format is:\n"
+"modifiers<Key>k\n"
+"where \"modifiers\" is a space separated list of key modifiers\n"
+"and \"k\" is the name of the key.\n"
+"Allowed modifiers are:\n"
+"   Ctrl\n"
+"   Shift\n"
+"   Alt\n"
+"Please note that case is important.\n"
+msgstr ""
+"Formato é:\n"
+"modificadores<Tecla>k\n"
+"onde \"modificadores\" é uma lista separada por espaços de modificadores de "
+"tecla\n"
+"e \"k\" é o nome da tecla.\n"
+"Modificadores permitidos são:\n"
+"   Ctrl\n"
+"   Shift\n"
+"   Alt\n"
+"Por favor note que há diferença entre letras em caixa alta e baixa.\n"
+
+#: ../src/hid/gtk/ghid-main-menu.c:166
+#, c-format
+msgid ""
+"Duplicate accelerator found: \"%s\"\n"
+"The second occurance will be dropped\n"
+msgstr ""
+"Encontrado acelerador duplicado: \"%s\"\n"
+"A segunda ocorrência irá ser descartada\n"
+
+#. if we got this far it is supposed to be an X
+#. * resource.  For now ignore it and warn the user
+#: ../src/hid/gtk/ghid-main-menu.c:343
+#, c-format
+msgid ""
+"The gtk gui currently ignores \"%s\"as part of a menuitem resource.\n"
+"Feel free to provide patches\n"
+msgstr ""
+"A interface gráfica de usuário da gtk ignora \"%s\"como parte de um recurso "
+"de item de menu.\n"
+"Sinta-se livre para corrigir isso\n"
+
+#: ../src/hid/gtk/ghid-main-menu.c:377
+#, c-format
+msgid ""
+"GTK GUI currently ignores \"%s\" in the menu\n"
+"resource file.\n"
+msgstr ""
+"GTK GUI atualmente ignora \"%s\" no arquivo\n"
+"de recurso de menu.\n"
+
+#: ../src/hid/gtk/ghid-route-style-selector.c:137
+msgid "New Style"
+msgstr "Novo estilo"
+
+#. Build dialog
+#: ../src/hid/gtk/ghid-route-style-selector.c:183
+msgid "Edit Route Styles"
+msgstr "Editar Estilos de Rota"
+
+#: ../src/hid/gtk/ghid-route-style-selector.c:189
+msgid "Edit Style:"
+msgstr "Editar Estilo:"
+
+#: ../src/hid/gtk/ghid-route-style-selector.c:209
+msgid "Route Style Data"
+msgstr "Dados de Estilo de Rota"
+
+#: ../src/hid/gtk/ghid-route-style-selector.c:213
+msgid "Name:"
+msgstr "Nome:"
+
+#: ../src/hid/gtk/ghid-route-style-selector.c:221
+msgid "Line width:"
+msgstr "Largura de linha:"
+
+#: ../src/hid/gtk/ghid-route-style-selector.c:224
+msgid "Via hole size:"
+msgstr "Tamanho do orifício da via:"
+
+#: ../src/hid/gtk/ghid-route-style-selector.c:227
+msgid "Via ring size:"
+msgstr "Tamanho do anel da via:"
+
+#: ../src/hid/gtk/ghid-route-style-selector.c:230
+msgid "Clearance:"
+msgstr "Folga:"
+
+#: ../src/hid/gtk/ghid-route-style-selector.c:234
+msgid "Set as Default"
+msgstr "Ajuste como Padrão"
+
+#: ../src/hid/gtk/ghid-route-style-selector.c:237
+msgid "Save route style settings as default"
+msgstr "Grava configurações do estilo de rota como padrão"
+
+#: ../src/hid/gtk/ghid-route-style-selector.c:243
+msgid "New (this session only)"
+msgstr "Nova (somente nessa seção)"
+
+#: ../src/hid/gtk/gtkhid-main.c:156
+msgid "Various zoom factor changes."
+msgstr "Várias mudanças no fator de aproximação."
+
+#: ../src/hid/gtk/gtkhid-main.c:239
+#, c-format
+msgid "ghid_calibrate() -- not implemented\n"
+msgstr "ghid_calibrate() -- não implementada\n"
+
+#: ../src/hid/gtk/gtkhid-main.c:565 ../src/hid/gtk/gui-dialog.c:168
+msgid "_Cancel"
+msgstr "_Cancelar"
+
+#: ../src/hid/gtk/gtkhid-main.c:566 ../src/hid/gtk/gui-dialog.c:172
+msgid "_OK"
+msgstr "_OK"
+
+#: ../src/hid/gtk/gtkhid-main.c:720
+msgid "Progress"
+msgstr "Progresso"
+
+#. add [attr_max_rows]
+#: ../src/hid/gtk/gtkhid-main.c:887
+msgid "del"
+msgstr "apagar"
+
+#: ../src/hid/gtk/gtkhid-main.c:1090
+msgid "Tell the user about this version of PCB."
+msgstr "Informa ao usuário sobre essa versão do PCB."
+
+#: ../src/hid/gtk/gtkhid-main.c:1112
+msgid "Get a coordinate."
+msgstr "Pega uma coordenada."
+
+#: ../src/hid/gtk/gtkhid-main.c:1189
+#, c-format
+msgid "LayerGroupsChanged -- not implemented\n"
+msgstr "LayerGroupsChanged -- não implementada\n"
+
+#. in case we have a dialog for loading a netlist file
+#: ../src/hid/gtk/gtkhid-main.c:1233 ../src/hid/gtk/gui-dialog.c:319
+#: ../src/pcb-menu.res:40
+msgid "Load netlist file"
+msgstr "Coloca na memória o arquivo de netlist"
+
+#: ../src/hid/gtk/gtkhid-main.c:1245 ../src/hid/gtk/gui-dialog.c:306
+msgid "Load layout file to buffer"
+msgstr "Coloca na memória arquivo de traçado"
+
+#. in case we have a dialog for loading a layout file
+#: ../src/hid/gtk/gtkhid-main.c:1251 ../src/hid/gtk/gui-dialog.c:305
+msgid "Load layout file"
+msgstr "Coloca na memória arquivo de traçado"
+
+#: ../src/hid/gtk/gtkhid-main.c:1277
+msgid "Save layout and/or element data to a user-selected file."
+msgstr "Grava traçado e/ou dados de componente em um arquivo do usuário."
+
+#: ../src/hid/gtk/gtkhid-main.c:1308
+msgid "Save element as"
+msgstr "Grava componente como"
+
+#: ../src/hid/gtk/gtkhid-main.c:1310
+msgid "Save layout as"
+msgstr "Grava traçado como"
+
+#: ../src/hid/gtk/gtkhid-main.c:1352
+msgid "Swaps the side of the board you're looking at."
+msgstr "Troca o lado da placa para o qual você está olhando."
+
+#: ../src/hid/gtk/gtkhid-main.c:1440
+msgid "Print the layout."
+msgstr "Imprime o traçado"
+
+#: ../src/hid/gtk/gtkhid-main.c:1465
+msgid "Can't find a suitable printer HID"
+msgstr "Não encontro uma impressora HID adequada"
+
+#: ../src/hid/gtk/gtkhid-main.c:1475
+msgid "Can't print empty layout"
+msgstr "Não posso imprimir traçado vazio"
+
+#: ../src/hid/gtk/gtkhid-main.c:1485
+msgid "Enter Values here:"
+msgstr "Informe Valores aqui:"
+
+#: ../src/hid/gtk/gtkhid-main.c:1487
+msgid "x-calibration"
+msgstr "calibração-x"
+
+#: ../src/hid/gtk/gtkhid-main.c:1487
+msgid "X scale for calibrating your printer"
+msgstr "Escala do eixo x para calibração de sua impressora"
+
+#: ../src/hid/gtk/gtkhid-main.c:1489
+msgid "y-calibration"
+msgstr "calibração-y"
+
+#: ../src/hid/gtk/gtkhid-main.c:1489
+msgid "Y scale for calibrating your printer"
+msgstr "Escala do eixo y para calibração de sua impressora"
+
+#: ../src/hid/gtk/gtkhid-main.c:1498
+msgid "Calibrate the printer."
+msgstr "Faça a calibração da impressora."
+
+#: ../src/hid/gtk/gtkhid-main.c:1515
+msgid "Printer Calibration Values"
+msgstr "Valores de Calibração da Impressora"
+
+#: ../src/hid/gtk/gtkhid-main.c:1516
+msgid "Enter calibration values for your printer"
+msgstr "Informe os valores de calibração para sua impressora"
+
+#: ../src/hid/gtk/gtkhid-main.c:1535
+msgid "Can't export empty layout"
+msgstr "Não posso exportar traçado vazio"
+
+#: ../src/hid/gtk/gtkhid-main.c:1563
+#, c-format
+msgid "%g redraws per second\n"
+msgstr "%g atualizações por segundo\n"
+
+#: ../src/hid/gtk/gtkhid-main.c:1574
+msgid "Moves the pointer to the center of the window."
+msgstr "Move o apontador para o centro da janela."
+
+#: ../src/hid/gtk/gtkhid-main.c:1626
+msgid "Move the cursor."
+msgstr "Mova o cursor."
+
+#: ../src/hid/gtk/gtkhid-main.c:1710
+msgid "Open various GUI windows."
+msgstr "Abre várias janelas de Interface Gráfica de Usuário."
+
+#: ../src/hid/gtk/gtkhid-main.c:1786
+msgid "Set the default measurement units."
+msgstr "Ajusta as unidades de medição padrão."
+
+#: ../src/hid/gtk/gtkhid-main.c:1833
+msgid "Scroll the viewport."
+msgstr "Role a porta de visão."
+
+#: ../src/hid/gtk/gtkhid-main.c:1883
+msgid ""
+"Start or stop panning (Mode = 1 to start, 0 to stop)\n"
+"Optional thumb argument is ignored for now in gtk hid.\n"
+msgstr ""
+"Inicia ou para um visual (Modo = 1 iniciar, 0 parar)\n"
+"Argumento opcional thumb é ignorado por agora no dispositivo de interface "
+"humana da gtk.\n"
+
+#: ../src/hid/gtk/gtkhid-main.c:1909
+msgid ""
+"The gtk gui currently ignores the optional first argument to the Pan "
+"action.\n"
+"Feel free to provide patches.\n"
+msgstr ""
+"A interface gráfica de usuário da gtk atualmente igonora o primeiro "
+"argumento opcional para Visualização.\n"
+"Sinta-se livre para corrigir isso.\n"
+
+#: ../src/hid/gtk/gtkhid-main.c:1923
+msgid ""
+"Bring up the popup menu specified by @code{MenuName}.\n"
+"If called by a mouse event then the mouse button number\n"
+"must be specified as the optional second argument."
+msgstr ""
+"Exibe menu especificado por @code{MenuName}.\n"
+"Se chamado por um evento de mouse então o numero do botão do mouse\n"
+"deve ser especificado como o segundo argumento opcional."
+
+#: ../src/hid/gtk/gtkhid-main.c:1948
+#, c-format
+msgid "The specified popup menu \"%s\" has not been defined.\n"
+msgstr "O menu especificado \"%s\" não foi definido.\n"
+
+#: ../src/hid/gtk/gtkhid-main.c:1965
+msgid "Asks user which schematics to import into PCB.\n"
+msgstr "Pergunta ao usuário qual diagrama esquemático importar no PCB.\n"
+
+#. in case we have a dialog for loading schematic files
+#: ../src/hid/gtk/gtkhid-main.c:1988 ../src/hid/gtk/gui-dialog.c:402
+msgid "Load schematics"
+msgstr "Coloca diagramas esquemáticos na memória"
+
+#: ../src/hid/gtk/gtkhid-main.c:2029
+msgid "Click on a location to center"
+msgstr "clique sobre uma localização para centralizar"
+
+#: ../src/hid/gtk/gtkhid-main.c:2049
+msgid "Click on a place to scroll"
+msgstr "Clique em um local para rolar"
+
+#: ../src/hid/gtk/gtkhid-main.c:2052
+msgid "Click on zoom focus"
+msgstr "Clique sobre o foco de aproximação"
+
+#: ../src/hid/gtk/gui-command-window.c:76
+msgid ""
+"Common commands easily accessible via the gui may not be included here.\n"
+msgstr ""
+"Comandos comuns facilmente acessíveis através do mouse podem não estarem "
+"incluídos aqui.\n"
+
+#: ../src/hid/gtk/gui-command-window.c:78
+msgid ""
+"In user commands below, 'size' values may be absolute or relative\n"
+"if preceded by a '+' or '-'.  Where 'units' are indicated, use \n"
+"'mil' or 'mm' otherwise PCB internal units will be used.\n"
+msgstr ""
+"Nos comandos de usuário abaixo, valores de 'tamanho' podem ser absolutos ou "
+"relativos\n"
+"se precedidos por um '+' ou por um '-'.  Onde 'unidades' forem indicadas, "
+"use \n"
+"'mil' ou 'mm' de outra forma unidades internas do PCB irão ser usadas.\n"
+
+#: ../src/hid/gtk/gui-command-window.c:92
+msgid "\tChanges the clearance of objects.\n"
+msgstr "\tModifica a folga de objetos.\n"
+
+#: ../src/hid/gtk/gui-command-window.c:97
+msgid "\tChanges values.  Omit 'units' for 'grid' and 'zoom'.\n"
+msgstr "\tModifica valores. Omite 'unidades' para 'grade' e 'aproximação'.\n"
+
+#: ../src/hid/gtk/gui-command-window.c:101
+msgid "\tChanges the join (clearance through polygons) of objects.\n"
+msgstr "\tModifica a proximidade (folga através de polígonos) de objetos.\n"
+
+#: ../src/hid/gtk/gui-command-window.c:107
+msgid "\tToggles, sets, or clears the square flag of objects.\n"
+msgstr "\tModifica, ajusta, ou apaga o sinalizador de quadrado de objetos.\n"
+
+#: ../src/hid/gtk/gui-command-window.c:113
+msgid "\tToggles, sets, or clears the octagon flag of objects.\n"
+msgstr "\tModifica, ajusta, ou apaga o sinalizador de octógono de objetos.\n"
+
+#: ../src/hid/gtk/gui-command-window.c:117
+msgid "\tChanges the hole flag of objects.\n"
+msgstr "\tModifica o sinalizador de orifício de objetos.\n"
+
+#: ../src/hid/gtk/gui-command-window.c:121
+msgid "\tFlip elements to the opposite side of the board.\n"
+msgstr "\tTransfere componentes para o lado posto da placa.\n"
+
+#: ../src/hid/gtk/gui-command-window.c:127
+msgid ""
+"\tToggle, set or clear a thermal (on the current layer) to pins or vias.\n"
+msgstr ""
+"\tModifica, ajusta ou apaga um térmico (na camada atual) para conectores ou "
+"vias.\n"
+
+#: ../src/hid/gtk/gui-command-window.c:131
+msgid ""
+"\tLoad a vendor file.  If 'filename' omitted, pop up file select dialog.\n"
+msgstr ""
+"Coloca na memória um arquivo de fornecedor.  Se o nome do arquivo for "
+"omitido, exibe a caixa de diálogo de seleção de arquivo.\n"
+
+#: ../src/hid/gtk/gui-command-window.c:312
+msgid "PCB Command Entry"
+msgstr "Entrada de Comando do PCB"
+
+#. Make the command reference scrolled text view.  Use high level
+#. |  utility functions in gui-utils.c
+#.
+#: ../src/hid/gtk/gui-command-window.c:330
+msgid "Command Reference"
+msgstr "Referência de Comandos"
+
+#: ../src/hid/gtk/gui-command-window.c:455
+msgid "Enter command:"
+msgstr "Informe comando:"
+
+#: ../src/hid/gtk/gui-config.c:896
+msgid "Enables"
+msgstr "Habilita"
+
+#: ../src/hid/gtk/gui-config.c:901
+msgid "Use separate window for command entry"
+msgstr "Use janela separada para informar comando"
+
+#: ../src/hid/gtk/gui-config.c:906
+msgid "Alternate window layout to allow smaller horizontal size"
+msgstr "Janela de traçado alternativa para permitir menor tamanho horizontal"
+
+#: ../src/hid/gtk/gui-config.c:911
+msgid "Alternate window layout to allow smaller vertical size"
+msgstr "Janela de traçado alternativa para permitir menor tamanho vertical"
+
+#: ../src/hid/gtk/gui-config.c:913
+msgid "Backups"
+msgstr "Cópias de segurança"
+
+#: ../src/hid/gtk/gui-config.c:917
+#, c-format
+msgid "If layout is modified at exit, save into PCB.%i.save"
+msgstr "Se o traçado for modificado ao sair, grave em /tmp/PCB.%i.save"
+
+#: ../src/hid/gtk/gui-config.c:920
+msgid ""
+"Seconds between auto backups\n"
+"(set to zero to disable auto backups)"
+msgstr ""
+"Segundos entre gravações automáticas de segurança\n"
+"(ajuste para zero para desabilitar cópias automáticas de segurança)"
+
+#: ../src/hid/gtk/gui-config.c:923
+msgid "Misc"
+msgstr "Diversos"
+
+#: ../src/hid/gtk/gui-config.c:927
+msgid "Number of commands to remember in the history list"
+msgstr "Número de comandos a serem lembrados no histórico de comandos"
+
+#. ---- Board Size ----
+#: ../src/hid/gtk/gui-config.c:1027
+msgid "Board Size"
+msgstr "Tamanho da Placa"
+
+#: ../src/hid/gtk/gui-config.c:1041
+msgid "Width"
+msgstr "Largura"
+
+# FIXME: this should be changed to "Length" if and when 3D geometrical GUIs, 3D-exporters, 3D-printers emerge or are used.
+#: ../src/hid/gtk/gui-config.c:1046
+msgid "Height"
+msgstr "Altura"
+
+#: ../src/hid/gtk/gui-config.c:1049
+msgid "Use this board size as the default for new layouts"
+msgstr "Use esse tamanho de placa como padrão para novos traçados"
+
+#. ---- Text Scale ----
+#: ../src/hid/gtk/gui-config.c:1052
+msgid "Text Scale"
+msgstr "Escala do Texto"
+
+#. ---- DRC Sizes ----
+#: ../src/hid/gtk/gui-config.c:1070
+msgid "Design Rule Checking"
+msgstr "Verificação das Regras de Desenho"
+
+#: ../src/hid/gtk/gui-config.c:1083
+msgid "Minimum copper spacing"
+msgstr "Espaçamento mínimo entre trilhas"
+
+#: ../src/hid/gtk/gui-config.c:1089
+msgid "Minimum copper width"
+msgstr "Largura mínima de trilha"
+
+#: ../src/hid/gtk/gui-config.c:1095
+msgid "Minimum touching copper overlap"
+msgstr "Sobreposição mínima ao encostar"
+
+#: ../src/hid/gtk/gui-config.c:1101
+msgid "Minimum silk width"
+msgstr "Largura mínima da seda"
+
+#: ../src/hid/gtk/gui-config.c:1107
+msgid "Minimum drill diameter"
+msgstr "Diâmetro mínimo de perfuração"
+
+#: ../src/hid/gtk/gui-config.c:1113
+msgid "Minimum annular ring"
+msgstr "Auréola anular mínima"
+
+#: ../src/hid/gtk/gui-config.c:1118
+msgid "Use DRC values as the default for new layouts"
+msgstr "Use valores DRC como padrão para novos traçados"
+
+#: ../src/hid/gtk/gui-config.c:1170
+msgid "Metric Increment Settings"
+msgstr "Configurações de Incremento de Métrica"
+
+#: ../src/hid/gtk/gui-config.c:1178 ../src/hid/gtk/gui-config.c:1199
+msgid "Grid:"
+msgstr "Grade:"
+
+#: ../src/hid/gtk/gui-config.c:1179 ../src/hid/gtk/gui-config.c:1200
+msgid "For 'g' and '<shift>g' grid change actions"
+msgstr "Para 'g' e '<shift>g' ações de modificar grade"
+
+#: ../src/hid/gtk/gui-config.c:1180 ../src/hid/gtk/gui-config.c:1201
+msgid "Size:"
+msgstr "Tamanho:"
+
+#: ../src/hid/gtk/gui-config.c:1181 ../src/hid/gtk/gui-config.c:1202
+msgid ""
+"For 's' and '<shift>s' size change actions on lines,\n"
+"pads, pins and text.\n"
+"Use '<ctrl>s' and '<shift><ctrl>s' for drill holes."
+msgstr ""
+"Para 's' e '<shift>s' ações de modificar tamanho\n"
+"de linhas, pastilhas, conectores, texto.\n"
+"Use '<ctrl>s' e '<shift><ctrl>s' para orifícios de perfuração."
+
+#: ../src/hid/gtk/gui-config.c:1184 ../src/hid/gtk/gui-config.c:1205
+msgid "Line:"
+msgstr "Linha:"
+
+#: ../src/hid/gtk/gui-config.c:1185 ../src/hid/gtk/gui-config.c:1206
+msgid "For 'l' and '<shift>l' routing line width change actions"
+msgstr "Para 'l' e '<shift>l' ações de mudar largura de linha de rota"
+
+#: ../src/hid/gtk/gui-config.c:1186 ../src/hid/gtk/gui-config.c:1207
+msgid "Clear:"
+msgstr "Apaga:"
+
+#: ../src/hid/gtk/gui-config.c:1187 ../src/hid/gtk/gui-config.c:1208
+msgid ""
+"For 'k' and '<shift>k' line clearance inside polygon size\n"
+"change actions"
+msgstr ""
+"Para 'k' e '<shift>k' ações de mudar o tamanho da folga da linha\n"
+"dentro do polígono"
+
+#: ../src/hid/gtk/gui-config.c:1191
+msgid "Imperial Increment Settings"
+msgstr "Ajustes de Incremento Ingleses"
+
+#: ../src/hid/gtk/gui-config.c:1213
+msgid "Save as Default"
+msgstr "Grava como Padrão"
+
+#: ../src/hid/gtk/gui-config.c:1216
+msgid "Use values as the default for new layouts"
+msgstr "Use valores como padrão para novos traçados"
+
+#: ../src/hid/gtk/gui-config.c:1240
+msgid "Element Directories"
+msgstr "Diretórios de componente"
+
+#: ../src/hid/gtk/gui-config.c:1243
+#, c-format
+msgid ""
+"<small>Enter a \"%s\" separated list of custom top level\n"
+"element directories.  For example:\n"
+"%s\n"
+"Elements should be organized into subdirectories below each\n"
+"top level directory.  Restart program for changes to take effect.</small>"
+msgstr ""
+"<small>Enter uma lista separada \"%s\" de diretórios de componente de nível "
+"mais alto\n"
+" de nível mais alto.  Por exemplo:\n"
+"%s\n"
+"Componentes devem ser organizados em subdiretórios abaixo de cada\n"
+"diretório de nível mais alto.  Re-iniciar o programa para que modificações "
+"entrem em vigor.</small>"
+
+#: ../src/hid/gtk/gui-config.c:1283
+msgid "<h>Layer Names\n"
+msgstr "<h>Nomes de camada\n"
+
+#: ../src/hid/gtk/gui-config.c:1284
+msgid ""
+"You may enter layer names for the layers drawn on the screen.\n"
+"The special 'top side' and 'bottom side' are layers which\n"
+"will be printed out, so they must have in their group at least one\n"
+"of the other layers that are drawn on the screen.\n"
+msgstr ""
+"Você pode inserir nomes para os desenhos de camada na tela.\n"
+"As camadas especiais 'lado do topo' e 'lado de inferior' são camadas que\n"
+"serão impressas, de forma que elas devem ter no seu grupo ao menos uma\n"
+"das outras camadas que foram desenhadas na tela.\n"
+
+#: ../src/hid/gtk/gui-config.c:1289
+msgid "<h>Layer Groups\n"
+msgstr "<h>Grupos de Camada\n"
+
+#: ../src/hid/gtk/gui-config.c:1290
+msgid ""
+"Each layer on the screen may be in its own group which allows the\n"
+"maximum number of board layers.  However, for boards with fewer\n"
+"layers, you may group layers together which will then print as a\n"
+"single layer on a printout.  This allows a visual color distinction\n"
+"to be displayed on the screen for signal groups which will print as\n"
+"a single layer\n"
+msgstr ""
+"Cada camada na tela pode estar no seu próprio grupo o que permite o\n"
+"número máximo de camadas de placa. Todavia, para placas com poucas\n"
+"camadas, você pode agrupar camadas juntas que irão então serem impressas "
+"como uma\n"
+"camada simples numa saída de impressora. Isso permite uma distinção visual "
+"de cores\n"
+"a serem mostradas na tela para grupos de sinal os quais irão ser impressos "
+"como\n"
+"uma camada simples\n"
+
+#: ../src/hid/gtk/gui-config.c:1297
+msgid ""
+"For example, for a 4 layer board a useful layer group arrangement\n"
+"can be to have 3 screen displayed layers grouped into the same group\n"
+"as the 'top side' and 'bottom side' printout layers.  Then\n"
+"groups such as signals, ground, and supply traces can be color\n"
+"coded on the screen while printing as a single layer.  For this\n"
+"you would select buttons and enter names on the Setup page to\n"
+"structure four layer groups similar to this:\n"
+msgstr ""
+"Por exemplo, para uma placa com 4 camadas uma associação útil de grupos de "
+"camada\n"
+"pode ser ter 3 camadas exibidas na tela agrupadas no mesmo grupo\n"
+"como as camadas de saída 'lado do topo' e 'lado inferior'.  Então\n"
+"grupos tais como sinais, aterramento, e trilhas de alimentação podem ser "
+"coloridas\n"
+"codificadas na tela enquanto a impressão ocorre em uma camada simples.  Para "
+"isso\n"
+"você deve selecionar botões e inserir nomes na página de Configuração para\n"
+"estruturar quatro grupos de camadas similares a esse:\n"
+
+#: ../src/hid/gtk/gui-config.c:1305
+msgid "<b>Group 1:"
+msgstr "<b>Grupo 1:"
+
+#: ../src/hid/gtk/gui-config.c:1307
+msgid "top"
+msgstr "topo"
+
+#: ../src/hid/gtk/gui-config.c:1309
+msgid "GND-top"
+msgstr "topo-GND"
+
+#: ../src/hid/gtk/gui-config.c:1311
+msgid "Vcc-top"
+msgstr "topo-Vcc"
+
+#: ../src/hid/gtk/gui-config.c:1313 ../src/hid/gtk/gui-config.c:1563
+msgid "top side"
+msgstr "lado do topo"
+
+#: ../src/hid/gtk/gui-config.c:1315
+msgid "<b>Group 2:"
+msgstr "<b>Grupo 2:"
+
+#: ../src/hid/gtk/gui-config.c:1317
+msgid "bottom"
+msgstr "inferior"
+
+#: ../src/hid/gtk/gui-config.c:1319
+msgid "GND-bottom"
+msgstr "inferior-GND"
+
+#: ../src/hid/gtk/gui-config.c:1321
+msgid "Vcc-bottom"
+msgstr "inferior-Vcc"
+
+#: ../src/hid/gtk/gui-config.c:1323 ../src/hid/gtk/gui-config.c:1565
+msgid "bottom side"
+msgstr "lado inferior"
+
+#: ../src/hid/gtk/gui-config.c:1325
+msgid "<b>Group 3:"
+msgstr "<b>Grupo 3:"
+
+#: ../src/hid/gtk/gui-config.c:1327
+msgid "signal1"
+msgstr "sinal1"
+
+#: ../src/hid/gtk/gui-config.c:1329
+msgid "<b>Group 4:"
+msgstr "<b>Grupo 4:"
+
+#: ../src/hid/gtk/gui-config.c:1331
+msgid "signal2"
+msgstr "sinal2"
+
+#: ../src/hid/gtk/gui-config.c:1445
+msgid ""
+"Both, 'top side' and 'bottom side' layer must have at least\n"
+"\tone other layer in their group.\n"
+msgstr ""
+"Ambas as camadas 'lado do topo' ou a 'lado inferior' devem ter ao menos\n"
+"\tuma outra camada em seu grupo.\n"
+
+#: ../src/hid/gtk/gui-config.c:1452
+msgid ""
+"The 'top side' and 'bottom side' layers are not allowed\n"
+"\tto be in the same layer group #\n"
+msgstr ""
+"Às camadas 'lado do topo' e 'lado inferior' não se permite\n"
+"\testarem no mesmo grupo de camada #\n"
+
+#. working copy
+#. So can know if PCB changes on us
+#: ../src/hid/gtk/gui-config.c:1543
+msgid "Group #"
+msgstr "Grupo #"
+
+#. -- Change tab
+#: ../src/hid/gtk/gui-config.c:1631
+msgid "Change"
+msgstr "Modifica"
+
+#: ../src/hid/gtk/gui-config.c:1633
+msgid "Operations on currently selected layer:"
+msgstr "Operações sobre a camada selecionada atualmente:"
+
+#: ../src/hid/gtk/gui-config.c:1662
+msgid "Add new layer above currently selected layer:"
+msgstr "Adicione nova camada acima da camada selecionada atualmente:"
+
+#. -- Groups tab
+#: ../src/hid/gtk/gui-config.c:1672
+msgid "Groups"
+msgstr "Grupos"
+
+#. -- Info tab
+#: ../src/hid/gtk/gui-config.c:1688
+msgctxt "tab"
+msgid "Info"
+msgstr "Informação"
+
+#: ../src/hid/gtk/gui-config.c:1737
+#, c-format
+msgid "Current colors loaded: <b>%s</b>"
+msgstr "Cores atuais na memória: <b>%s</b>"
+
+#: ../src/hid/gtk/gui-config.c:1782
+msgid "Load Color File"
+msgstr "Colocar Arquivo de Cor na Memória"
+
+#: ../src/hid/gtk/gui-config.c:1812
+msgid "Save Color File"
+msgstr "Grava Arquivo de Cor"
+
+#: ../src/hid/gtk/gui-config.c:1818
+msgid "Sorry, not overwriting the default color file!"
+msgstr "Sinto muito, não posso sobregravar o arquivo de cores padronizadas!"
+
+#: ../src/hid/gtk/gui-config.c:1872
+#, c-format
+msgid "PCB %s Color"
+msgstr "Cor %s do PCB"
+
+#. ---- Main colors ----
+#: ../src/hid/gtk/gui-config.c:1902
+msgid "Main colors"
+msgstr "Cores principais"
+
+#. ---- Layer colors ----
+#: ../src/hid/gtk/gui-config.c:1917
+msgid "Layer colors"
+msgstr "Cores da Camada"
+
+#. ---- Selected colors ----
+#: ../src/hid/gtk/gui-config.c:1932
+msgid "Selected colors"
+msgstr "Cores selecionadas"
+
+#: ../src/hid/gtk/gui-config.c:1958
+msgid "<b>Warning:</b> unsaved color changes will be lost at program exit."
+msgstr ""
+"<b>Atenção:</b> modificações de cores não gravadas irão ser perdidas ao sair "
+"do programa."
+
+#: ../src/hid/gtk/gui-config.c:1973
+msgid "Load"
+msgstr "Colocar na Memória"
+
+#: ../src/hid/gtk/gui-config.c:1978
+msgid "Defaults"
+msgstr "Padrões"
+
+#: ../src/hid/gtk/gui-config.c:2112
+msgid "PCB Preferences"
+msgstr "Preferências do PCB"
+
+#: ../src/hid/gtk/gui-config.c:2137
+msgid "General"
+msgstr "Geral"
+
+#: ../src/hid/gtk/gui-config.c:2144
+msgid "Sizes"
+msgstr "Tamanhos"
+
+#: ../src/hid/gtk/gui-config.c:2150
+msgid "Increments"
+msgstr "Incrementos"
+
+#: ../src/hid/gtk/gui-config.c:2162
+msgid "Layers"
+msgstr "Camadas"
+
+#: ../src/hid/gtk/gui-config.c:2169
+msgid "Colors"
+msgstr "Cores"
+
+#: ../src/hid/gtk/gui-dialog.c:54
+msgid "PCB User Input"
+msgstr "Entrada de Usuário do PCB"
+
+#: ../src/hid/gtk/gui-dialog.c:68
+msgid "Enter something"
+msgstr "Informe alguma coisa"
+
+#: ../src/hid/gtk/gui-dialog.c:118
+msgid "Confirm"
+msgstr "Confirmar"
+
+#: ../src/hid/gtk/gui-dialog.c:124
+msgid "Sequence OK"
+msgstr "Sequência OK"
+
+#: ../src/hid/gtk/gui-dialog.c:212
+#, c-format
+msgid "Save the changes to layout before closing?"
+msgstr "Grava as modificações no traçado antes de sair?"
+
+#: ../src/hid/gtk/gui-dialog.c:215
+#, c-format
+msgid "Save the changes to layout \"%s\" before closing?"
+msgstr "Grava as modificações no traçado \"%s\" antes de fechar?"
+
+#: ../src/hid/gtk/gui-dialog.c:220
+msgid "If you don't save, all your changes will be permanently lost."
+msgstr ""
+"Se você não gravar, todas as suas modificações irão ser perdidas "
+"permanentemente."
+
+#: ../src/hid/gtk/gui-dialog.c:230
+msgid "Close _without saving"
+msgstr "Fechar _sem gravar"
+
+#: ../src/hid/gtk/gui-dialog-print.c:327
+#, c-format
+msgid "%s: unknown type of HID attribute\n"
+msgstr "%s: tipo de atributo de HID desconhecido\n"
+
+#: ../src/hid/gtk/gui-dialog-print.c:382
+#, c-format
+msgid "%s() -- malloc failed\n"
+msgstr "%s() -- malloc falhoufailed\n"
+
+#. non-zero means cancel was picked
+#: ../src/hid/gtk/gui-dialog-print.c:387
+msgid "PCB Print Layout"
+msgstr "Imprime Traçado do PCB"
+
+#: ../src/hid/gtk/gui-dialog-print.c:417
+msgid "PCB Export Layout"
+msgstr "Exporta Traçado do PCB"
+
+#: ../src/hid/gtk/gui-dialog-print.c:455
+msgid "Can't find a suitable exporter HID"
+msgstr "Não encontro um exportador HID adequado"
+
+#: ../src/hid/gtk/gui-drc-window.c:135
+#, c-format
+msgid "Object ID %i identified during DRC was not found. Stale DRC window?\n"
+msgstr ""
+"Identificação de objeto %i ocorrida durante DRC não encontrada. Janela de "
+"DRC obsoleta?\n"
+
+#: ../src/hid/gtk/gui-drc-window.c:536
+msgid ""
+"%m+<b>%s (%$mS)</b>\n"
+"<span size='1024'> </span>\n"
+"<small><i>%s</i>\n"
+"<span size='5120'> </span>\n"
+"Required: %$mS</small>"
+msgstr ""
+"%m+<b>%s (%$mS)</b>\n"
+"<span size='1024'> </span>\n"
+"<small><i>%s</i>\n"
+"<span size='5120'> </span>\n"
+"Requirido: %$mS</small>"
+
+#: ../src/hid/gtk/gui-drc-window.c:551
+msgid ""
+"%m+<b>%s</b>\n"
+"<span size='1024'> </span>\n"
+"<small><i>%s</i>\n"
+"<span size='5120'> </span>\n"
+"Required: %$mS</small>"
+msgstr ""
+"%m+<b>%s</b>\n"
+"<span size='1024'> </span>\n"
+"<small><i>%s</i>\n"
+"<span size='5120'> </span>\n"
+"Requerido: %$mS</small>"
+
+#: ../src/hid/gtk/gui-drc-window.c:772
+msgid "PCB DRC"
+msgstr "DRC do PCB"
+
+#. APPEND
+#: ../src/hid/gtk/gui-drc-window.c:806
+msgid "No."
+msgstr "Não."
+
+#. APPEND
+#: ../src/hid/gtk/gui-drc-window.c:814
+msgid "Violation details"
+msgstr "Detalhes da quebra de regra"
+
+#: ../src/hid/gtk/gui-keyref-window.c:44
+msgid "Keyboard\n"
+msgstr "Teclado\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:45
+msgid "Keyboard shortcuts and actions available in PCB.\n"
+msgstr "Atalhos de teclado e ações disponíveis no PCB.\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:46
+msgid "In below key actions, <s> is <shift>, <c> is <ctrl>\n"
+msgstr "Ações de tecla adiante, <s> é <shift>, <c> é <ctrl>\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:47
+msgid "and <a> is <alt> or <mod>\n"
+msgstr "e <a> é <alt> ou <mod>\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:51
+msgid "Set layer and size from line or arc\n"
+msgstr "Ajusta camada e tamanho de linha ou de arco\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:55
+msgid "Unselect all objects\n"
+msgstr "Remove a seleção de todos os objetos\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:59
+msgid "Flip element to opposite side of the board\n"
+msgstr "Transfere componente para o lado oposto da placa\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:61
+msgid "Flip selected objects to opposite side of the board\n"
+msgstr "Transfere objetos selecionados para o lado oposto da placa\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:65
+msgid "Copy selected to buffer and unselect\n"
+msgstr "Copia a seleção para a memória e remove a seleção\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:69
+msgid "Display pin/pad names (numbers with View->Enable pinout shows number)\n"
+msgstr ""
+"Mostra nomes de conector/pastilha (númeos com Ver->Ativado exibir número de "
+"saída de conector)\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:71
+msgid "Open pinout window for element under cursor\n"
+msgstr "Abra janela de saída de conector para o componente sob o cursor\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:75
+msgid "Delete all rats\n"
+msgstr "Apaga todos os ratos\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:77
+msgid "Delete selected rats\n"
+msgstr "Apaga os ratos selecionados\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:81
+msgid "Highlight connections to object\n"
+msgstr "Seleciona conecções a objeto\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:83
+msgid "Reset highlighted connections\n"
+msgstr "Remova conecções selecionadas\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:85
+msgid "Cumulative highlight connections to object\n"
+msgstr "Seleção cumulativa de conecções a objeto\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:89
+msgid "Increment grid by configured grid increment\n"
+msgstr "Incremento da grade pelo incremento de grade configurado\n"
+
+# FIXME: original string needs correction.
+# "Decrement grid by configured grid decrement\n"
+#: ../src/hid/gtk/gui-keyref-window.c:92
+msgid "Decrement grid by configured grid increment\n"
+msgstr "Decremento da grade pelo decremento de grade configurado\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:96
+msgid "Toggle visibility of element name under cursor\n"
+msgstr "Altere a visibilidade do nome do componente sob o cursor\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:99
+msgid "Toggle visibility of selected element names\n"
+msgstr "Altere a visibilidade dos nomes dos componentes selecionados\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:102
+msgid "Toggle the hole flag of object under cursor\n"
+msgstr "Altere o sinalizador de orifíco do objeto sob o cursor\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:106
+msgid "Toggle line/arc should clear polygons flag of object under cursor\n"
+msgstr ""
+"Altere o sinalizador que indica se linha/arco deve apagar polígonos do "
+"objeto sob o cursor\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:109
+msgid "Toggle line/arc should clear polygons flag of selected\n"
+msgstr ""
+"Altere o sinalizador que indica se linha/arco deve apagar polígonos da "
+"seleção\n"
+
+# FIXME: original string has room for improvement.
+# "Increase clearance of object by configured value\n"
+#: ../src/hid/gtk/gui-keyref-window.c:113
+msgid "Increase clearance of object by configured clearance\n"
+msgstr "Incremente folga de objeto através da folga configurada\n"
+
+# FIXME: original string has room for improvement.
+# "Decrease clearance of object by configured value\n"
+#: ../src/hid/gtk/gui-keyref-window.c:116
+msgid "Decrease clearance of object by configured clearance\n"
+msgstr "Decremente folga de objeto usando a folga configurada\n"
+
+# FIXME: original string has room for improvement.
+# "Increase clearance of selected objects by configured value\n"
+#: ../src/hid/gtk/gui-keyref-window.c:119
+msgid "Increase clearance of selected objects by configured clearance\n"
+msgstr "Incremente folga de objetos selecionados usando a folga configurada\n"
+
+# FIXME: original string has room for improvement.
+# "Decrease clearance of selected objects by configured value\n"
+#: ../src/hid/gtk/gui-keyref-window.c:122
+msgid "Decrease clearance of selected objects by configured clearance\n"
+msgstr "Decremente folga de objetos selecionados usando a folga configurada\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:126
+msgid "Increment current route style line size by configured line increment\n"
+msgstr ""
+"Incremente o tamanho de linha do estilo de roteamento atual usando o "
+"incremento de linha configurado\n"
+
+# FIXME: original string needs correction.
+# "Decrement current route style line size by configured value\n"
+#: ../src/hid/gtk/gui-keyref-window.c:129
+msgid "Decrement current route style line size by configured line increment\n"
+msgstr ""
+"Decremente o tamanho de linha no estilo de roteamento atual usando o "
+"decremento de linha configurado\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:133
+msgid "Move object to current layer\n"
+msgstr "Mova o objeto para a camada atual\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:136
+msgid "Move selected objects to current layer\n"
+msgstr "Mova os objetos selecionados para a camada atual\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:139
+msgid "Mark at cursor location for showing relative offsets\n"
+msgstr "Marque na localização do cursor para mostrar intervalos relativos\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:143
+msgid "Select the shortest unselected rat on the board\n"
+msgstr "Selecione o menor rato não selecionado na placa\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:147
+msgid "Optimize and draw all rats\n"
+msgstr "Otimize e desenhe todos os ratos\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:150
+msgid "Optimize and draw selected rats\n"
+msgstr "Otimize e desenhe ratos selecionados\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:154
+msgid "Change octagon flag of object\n"
+msgstr "Modifique o sinalizador de octógono do objeto\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:158
+msgid "Backup polygon drawing to previous point\n"
+msgstr "Cópia de polígono desenhado no ponto anterior\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:161
+msgid "Close polygon\n"
+msgstr "Fechar polígono\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:165
+msgid "Toggle the square flag of an object\n"
+msgstr "Altere o sinalizador de quadrado de um objeto\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:169
+msgid "Redo last undone operation\n"
+msgstr "Refaça a última operação de desfazer\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:173
+msgid "Increment size of an object by configured size increment\n"
+msgstr ""
+"Incremente o tamanho de um objeto usando o tamanho de incremento "
+"configurado\n"
+
+# FIXME: original string needs correction.
+# "Decrement size of an object by configured size decrement\n"
+#: ../src/hid/gtk/gui-keyref-window.c:175
+msgid "Decrement size of an object by configured size increment\n"
+msgstr ""
+"Decremente o tamanho de um objeto usando o tamanho de incremento "
+"configurado\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:177
+msgid "Increment drill size of a pin or via\n"
+msgstr "Incremente o tamanho de perfuração de uma conector ou de uma via\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:179
+msgid "Decrement drill size of a pin or via\n"
+msgstr "Decremente o tamanho de perfuração de um conector ou de uma via\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:183
+msgid ""
+"Adjust text scale so new text increases by the configured size increment\n"
+msgstr ""
+"Ajuste a proporção do texto de forma que novo texto incremente usando o "
+"tamanho de incremento configurado\n"
+
+# increment is to be replaced with decrement
+#: ../src/hid/gtk/gui-keyref-window.c:185
+msgid ""
+"Adjust text scale so new text decreases by the configured size increment\n"
+msgstr ""
+"Ajuste a proporção do texto de forma que novo texto decremente usando o "
+"tamanho de incremento configurado\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:189
+msgid "Undo last operation\n"
+msgstr "Desfazer a última operação\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:193
+msgid "Zoom to board extents\n"
+msgstr "Aproxime a extensão da placa\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:195
+msgid "Increment current route style via size\n"
+msgstr "Incremente o tamanho da via no estilo de rota atual\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:197
+msgid "Decrement current route style via size\n"
+msgstr "Decremente o tamanho da via no estilo de rota atual\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:199
+msgid "Increment current route style via hole size\n"
+msgstr "Incremente o tamanho do orifício da via no estilo de rota atual\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:201
+msgid "Decrement current route style via hole size\n"
+msgstr "Decremente o tamanho do orifício da via no estilo de rota atual\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:205
+msgid "Copy selection to buffer and enter pastebuffer mode\n"
+msgstr "Copie a seleção para memória e informe o modo de colar\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:207
+msgid "Cut selection to buffer and enter pastebuffer mode\n"
+msgstr "Corte a seleção para a memória e informe o modo de colar\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:211
+msgid "Zoom in\n"
+msgstr "Aproximação\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:213
+msgid "Zoom out\n"
+msgstr "Afastamento\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:217
+msgid "Toggle thin draw mode\n"
+msgstr "Altere o modo de desenho fino\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:221
+msgid "Cycle multiline mode (Using <s> overrides)\n"
+msgstr "Modo multilinha de ciclo (Usando <s> sobrescreve)\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:225
+msgid "Toggle all direction lines mode\n"
+msgstr "Mude todos os modos de linha de direção\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:229
+msgid "If drawing an object, return to a neutral state.\n"
+msgstr "Se desenhar um objeto, retorne ao estado neutro.\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:233
+msgid "Switch view to other side\n"
+msgstr "Mude a visão para o outro lado\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:237
+msgid "Switch to select mode\n"
+msgstr "Mude para modo de seleção\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:241
+msgid "Enter user command or pop up command window\n"
+msgstr "Informe comando de usuário ou exiba janela de comando\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:245
+msgid "Delete object\n"
+msgstr "Apague objeto\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:249
+msgid "Select drawing layers\n"
+msgstr "Selecione camadas de desenho\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:253
+msgid "Select current buffer\n"
+msgstr "Selecione a memória atual\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:257
+msgid "Mouse\n"
+msgstr "Mouse\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:258
+msgid ""
+"Modifier key use can be combined with mouse button presses\n"
+"to modify mouse button actions.\n"
+msgstr ""
+"Tecla modificadora pode ser combinada com pressionamentos de botão de mouse\n"
+"para modificar ações de botões de mouse.\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:261
+msgid "<b>Left button\n"
+msgstr "<b>Botão esquerdo\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:262
+msgid "\tPerform or initiate action determined by current mode.\n"
+msgstr "\tExecute ou inicie ação determinada pelo modo atual.\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:265
+#: ../src/hid/gtk/gui-keyref-window.c:271
+#: ../src/hid/gtk/gui-keyref-window.c:285
+#: ../src/hid/gtk/gui-keyref-window.c:291
+msgid "<b><shift>"
+msgstr "<b><shift>"
+
+#: ../src/hid/gtk/gui-keyref-window.c:266
+msgid " - change rotation direction for rotation tool actions.\n"
+msgstr ""
+" - mude o sentido da rotação usado em ações da ferramenta de rotação.\n"
+
+# FIXME: This message has room for improvement !
+#: ../src/hid/gtk/gui-keyref-window.c:268
+msgid ""
+"\tAfter a draw operation has been left mouse button initiated,\n"
+"\tmodifier key effects:\n"
+msgstr ""
+"\tApós a operação de desenho ter sido iniciada pelo botão esquerdo do "
+"mouse,\n"
+"\tos efeitos de tecla modificadora são:\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:272
+msgid " - change line 45 degree direction and arc angle direction,\n"
+msgstr ""
+" - mude a direção da linha em 45 graus e a direção do ângulo do arco,\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:274
+msgid "<b>Middle button\n"
+msgstr "<b>Botão do meio\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:275
+msgid ""
+"\tIf a line, arc, rectangle, or polygon draw operation has been\n"
+"\tinitiated, a click restarts the draw operation at the cursor position.\n"
+msgstr ""
+"\tSe uma operação de desenho de linha, arco, retângulo, ou polígono tiver "
+"sido\n"
+"\tiniciada, um clique reinicia a operação de desenho na posição do cursor.\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:278
+msgid ""
+"\tIf such a draw has not been initiated, a click selects objects and\n"
+"\ta press and drag moves objects.\n"
+msgstr ""
+"\tSe a operação de desenho não tiver sido iniciada, um clique seleciona "
+"objetos e\n"
+"\tum pressionamento e soltar move objetos.\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:281
+msgid "<b>Right button\n"
+msgstr "<b>Botão direito\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:282
+msgid ""
+"\tPress and drag to pan.\n"
+"\tWhile drawing or moving, a click without a drag toggles auto pan mode.\n"
+msgstr ""
+"\tPressione e solte para ver.\n"
+"\tEnquanto desenhando ou movendo, um clique sem soltar muda o modo de visão "
+"automática.\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:286
+msgid " - Popup a menu.\n"
+msgstr "- Exibe um menu.\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:288
+msgid "<b>Scroll wheel\n"
+msgstr "<b>Roda de rolagem\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:289
+msgid "\tZoom in/out.\n"
+msgstr "\tAproxima/Afasta.\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:292
+msgid " - pan vertically.\n"
+msgstr "- ver verticalmente.\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:294
+msgid "<b><ctrl>"
+msgstr "<b><ctrl>"
+
+# two decimal points ?
+#: ../src/hid/gtk/gui-keyref-window.c:295
+msgid " - pan horizontally.\n"
+msgstr "- ver horizontalmente.\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:297
+msgid "<b>Usage:\n"
+msgstr "<b>Uso:\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:298
+msgid ""
+"\tMouse actions can typically be combined.  For example: while moving\n"
+"\tan object (with left or middle press and drag), the right button may\n"
+"\tbe simultaneously clicked to toggle auto pan or pressed and dragged\n"
+"\tto manually pan.  Mouse moving or drawing may also be combined with\n"
+"\tkey actions.\n"
+msgstr ""
+"\tAções de mouse podem tipicamente serem combinadas.  Por exemplo: enquanto "
+"movendo\n"
+"\tum objeto (pressionado e soltando tanto o botão médio quanto o esquerdo), "
+"o direito pode\n"
+"\tser simultâneamente clicado para mudar visão automática ou presionado e "
+"solto\n"
+"\tpara visão manual.  Movendo ou desenhando com mouse pode também ser "
+"combinado com\n"
+"\tações de tecla.\n"
+
+#: ../src/hid/gtk/gui-keyref-window.c:353
+msgid "PCB Key Reference"
+msgstr "Referência de teclas do PCB"
+
+#: ../src/hid/gtk/gui-library-window.c:169
+msgid "PCB Library"
+msgstr "Biblioteca do PCB"
+
+#. GtkTreeViewColumn
+#: ../src/hid/gtk/gui-library-window.c:685
+msgid "Components"
+msgstr "Componentes"
+
+#. GtkLabel
+#: ../src/hid/gtk/gui-library-window.c:711
+msgid "Filter:"
+msgstr "Filtro:"
+
+#: ../src/hid/gtk/gui-library-window.c:805
+msgid "Select Footprint..."
+msgstr "Selecione Matriz..."
+
+#: ../src/hid/gtk/gui-library-window.c:827
+msgid "Libraries"
+msgstr "Bibliotecas"
+
+#. GtkFrame
+#: ../src/hid/gtk/gui-library-window.c:836
+msgid "Preview"
+msgstr "Prévia"
+
+#: ../src/hid/gtk/gui-log-window.c:85
+msgid "PCB Log"
+msgstr "Registro do PCB"
+
+#: ../src/hid/gtk/gui-misc.c:406
+msgid ""
+"%m+<b>view</b>=%s  <b>grid</b>=%$mS  %s%s  <b>line</b>=%mS  <b>via</b>=%mS "
+"(%mS)  %s<b>clearance</b>=%mS  <b>text</b>=%i%%  <b>buffer</b>=#%i"
+msgstr ""
+"%m+<b>visão</b>=%s  <b>grade</b>=%$mS  %s%s  <b>linha</b>=%mS  <b>via</b>="
+"%mS (%mS)  %s<b>folga</b>=%mS  <b>texto</b>=%i%%  <b>memória</b>=#%i"
+
+#: ../src/hid/gtk/gui-misc.c:415
+msgctxt "status"
+msgid "bottom"
+msgstr "inferior"
+
+#: ../src/hid/gtk/gui-misc.c:415
+msgctxt "status"
+msgid "top"
+msgstr "topo"
+
+#: ../src/hid/gtk/gui-misc.c:444
+#, c-format
+msgid "%m+r %-mS; phi %-.1f; %-mS %-mS"
+msgstr "%m+r %-mS; phi %-.1f; %-mS %-mS"
+
+#: ../src/hid/gtk/gui-misc.c:452
+msgid "r __.__; phi __._; __.__ __.__"
+msgstr "r __.__; phi __._; __.__ __.__"
+
+#: ../src/hid/gtk/gui-misc.c:454
+#, c-format
+msgid "%m+%-mS %-mS"
+msgstr "%m+%-mS %-mS"
+
+#: ../src/hid/gtk/gui-netlist-window.c:708
+msgid "PCB Netlist"
+msgstr "Netlist do PCB"
+
+#: ../src/hid/gtk/gui-netlist-window.c:735
+msgid " "
+msgstr " "
+
+#: ../src/hid/gtk/gui-netlist-window.c:741
+msgid "Net Name"
+msgstr "Nome de Fiação"
+
+#: ../src/hid/gtk/gui-netlist-window.c:772
+msgid "Nodes"
+msgstr "Nodos"
+
+#: ../src/hid/gtk/gui-netlist-window.c:784
+msgid "Operations on selected 'Net Name':"
+msgstr "Operações sobre 'Nome de Fiação' selecionada:"
+
+#: ../src/hid/gtk/gui-netlist-window.c:791
+msgctxt "netlist"
+msgid "Select"
+msgstr "Selecione"
+
+#: ../src/hid/gtk/gui-netlist-window.c:796
+msgid "Unselect"
+msgstr "Remove Seleção"
+
+#: ../src/hid/gtk/gui-netlist-window.c:801
+msgid "Find"
+msgstr "Encontrar"
+
+#: ../src/hid/gtk/gui-netlist-window.c:806
+msgid "Rip Up"
+msgstr "Anule"
+
+#: ../src/hid/gtk/gui-netlist-window.c:813
+msgid "Disable all nets for adding rats"
+msgstr "Desabilite todas as fiações para adicionar ratos"
+
+#: ../src/hid/gtk/gui-output-events.c:417
+#: ../src/hid/gtk/gui-output-events.c:453
+#: ../src/hid/gtk/gui-output-events.c:454
+msgid "--"
+msgstr "--"
+
+#: ../src/hid/gtk/gui-output-events.c:449
+#, c-format
+msgid ""
+"Element name: %s\n"
+"Pinname : %s\n"
+"Netname : %s"
+msgstr ""
+"Nome de componente: %s\n"
+"Nome de conector : %s\n"
+"Nomenet : %s"
+
+#: ../src/hid/gtk/gui-top-window.c:248
+msgid "Reload"
+msgstr "Coloque novamente na memória"
+
+#: ../src/hid/gtk/gui-top-window.c:269
+msgid "Do you want to drop your changes and reload the file?"
+msgstr ""
+"Deseja descartar suas modificações e colocar o arquivo novamente na memória?"
+
+#: ../src/hid/gtk/gui-top-window.c:270
+msgid "Do you want to reload the file?"
+msgstr "Deseja colocar o arquivo na memória novamente?"
+
+#: ../src/hid/gtk/gui-top-window.c:272
+#, c-format
+msgid ""
+"<b>The file %s has changed on disk</b>\n"
+"\n"
+"%s"
+msgstr ""
+"<b>O arquivo %s mudou no disco</b>\n"
+"\n"
+"%s"
+
+#: ../src/hid/gtk/gui-top-window.c:491
+msgid "silk"
+msgstr "seda"
+
+#: ../src/hid/gtk/gui-top-window.c:496
+msgid "rat lines"
+msgstr "linhas de rato"
+
+#: ../src/hid/gtk/gui-top-window.c:501
+msgid "pins/pads"
+msgstr "conectores/pastilhas"
+
+#: ../src/hid/gtk/gui-top-window.c:506
+msgid "vias"
+msgstr "vias"
+
+#: ../src/hid/gtk/gui-top-window.c:511
+msgid "far side"
+msgstr "lado oposto"
+
+#: ../src/hid/gtk/gui-top-window.c:516
+msgid "solder mask"
+msgstr "máscara de soldagem"
+
+#: ../src/hid/gtk/gui-top-window.c:689
+msgid "Unnamed"
+msgstr "Sem nome"
+
+#: ../src/hid/gtk/gui-top-window.c:692
+msgid "Unsaved.pcb"
+msgstr "Naosalvo.pcb"
+
+#: ../src/hid/gtk/gui-top-window.c:954
+msgid "via"
+msgstr "via"
+
+#: ../src/hid/gtk/gui-top-window.c:955
+msgid "line"
+msgstr "linhas de rato"
+
+#: ../src/hid/gtk/gui-top-window.c:956
+msgid "arc"
+msgstr "arco"
+
+#: ../src/hid/gtk/gui-top-window.c:957
+msgid "text"
+msgstr "texto"
+
+#: ../src/hid/gtk/gui-top-window.c:958
+msgid "rectangle"
+msgstr "retângulo"
+
+#: ../src/hid/gtk/gui-top-window.c:959
+msgid "polygon"
+msgstr "polígono"
+
+#: ../src/hid/gtk/gui-top-window.c:960
+msgid "polygonhole"
+msgstr "orifício de polígono"
+
+#: ../src/hid/gtk/gui-top-window.c:961
+msgid "buffer"
+msgstr "memória"
+
+#: ../src/hid/gtk/gui-top-window.c:962
+msgid "remove"
+msgstr "remover"
+
+#: ../src/hid/gtk/gui-top-window.c:963
+msgid "rotate"
+msgstr "rotacionar"
+
+#: ../src/hid/gtk/gui-top-window.c:964
+msgid "insertPoint"
+msgstr "ponto de inserção"
+
+#: ../src/hid/gtk/gui-top-window.c:965
+msgid "thermal"
+msgstr "térmico"
+
+#: ../src/hid/gtk/gui-top-window.c:966
+msgid "select"
+msgstr "selecione"
+
+#: ../src/hid/gtk/gui-top-window.c:967
+msgid "lock"
+msgstr "trava"
+
+#: ../src/hid/gtk/gui-top-window.c:1611
+msgid "Read end of pipe died!\n"
+msgstr "Leitura do final do cano fechou!\n"
+
+#: ../src/hid/gtk/gui-top-window.c:1626
+msgid "ERROR status from g_io_channel_read_line\n"
+msgstr "ERRO situação atual de g_io_channel_read_line\n"
+
+#: ../src/hid/gtk/gui-top-window.c:1631
+msgid ""
+"Input pipe returned EOF.  The --listen option is \n"
+"probably not running anymore in this session.\n"
+msgstr ""
+"Entrada do cano retornou EOF.  A opção --listen \n"
+"provavelmente não está executando mais nessa seção.\n"
+
+#: ../src/hid/gtk/gui-top-window.c:1637
+msgid "AGAIN status from g_io_channel_read_line\n"
+msgstr "NOVAMENTE situação atual de g_io_channel_read_line\n"
+
+#: ../src/hid/gtk/gui-top-window.c:1642
+#, c-format
+msgid "ERROR:  unhandled case in ghid_listener_cb\n"
+msgstr "ERRO:  caso não previsto em ghid_listener_cb\n"
+
+#: ../src/hid/gtk/gui-top-window.c:1649
+#, c-format
+msgid "Unknown condition in ghid_listener_cb\n"
+msgstr "Condição desconhecida em ghid_listener_cb\n"
+
+#. %start-doc options "21 GTK+ GUI Options"
+#. @ftable @code
+#. @item --listen
+#. Listen for actions on stdin.
+#. @end ftable
+#. %end-doc
+#.
+#: ../src/hid/gtk/gui-top-window.c:1679
+msgid "Listen for actions on stdin"
+msgstr "Espere por ações sobre a entrada padrão"
+
+#. %start-doc options "21 GTK+ GUI Options"
+#. @ftable @code
+#. @item --bg-image <string>
+#. File name of an image to put into the background of the GUI canvas. The image must
+#. be a color PPM image, in binary (not ASCII) format. It can be any size, and will be
+#. automatically scaled to fit the canvas.
+#. @end ftable
+#. %end-doc
+#.
+#: ../src/hid/gtk/gui-top-window.c:1692
+msgid "Background Image"
+msgstr "Imagem de Fundo"
+
+#. %start-doc options "21 GTK+ GUI Options"
+#. @ftable @code
+#. @item --pcb-menu <string>
+#. Location of the @file{gpcb-menu.res} file which defines the menu for the GTK+ GUI.
+#. @end ftable
+#. %end-doc
+#.
+#: ../src/hid/gtk/gui-top-window.c:1703
+msgid "Location of gpcb-menu.res file"
+msgstr "Localização do arquivo gpcb-menu.res"
+
+#: ../src/hid/gtk/gui-top-window.c:1863
+msgid ""
+"ToggleView(1..MAXLAYER)\n"
+"ToggleView(layername)\n"
+"ToggleView(Silk|Rats|Pins|Vias|Mask|BackSide)"
+msgstr ""
+"ToggleView(1..MAXLAYER)\n"
+"ToggleView(nomecamada)\n"
+"ToggleView(Seda|Ratos|Conectores|Vias|Máscara|LadodeTrás)"
+
+#: ../src/hid/gtk/gui-top-window.c:1868
+msgid "Toggle the visibility of the specified layer or layer group."
+msgstr "Altere a visibilidade da camada especificada ou grupo de camada."
+
+#: ../src/hid/gtk/gui-top-window.c:1937
+msgid "SelectLayer(1..MAXLAYER|Silk|Rats)"
+msgstr "SelectLayer(1..MAXLAYER|Seda|Ratos)"
+
+#: ../src/hid/gtk/gui-top-window.c:1940
+msgid "Select which layer is the current layer."
+msgstr "Seleciona qual camada é a atual."
+
+#: ../src/hid/gtk/gui-top-window.c:2061
+#, c-format
+msgid ""
+"ERROR:  overflow of the ghid_hotkey_actions array.  Index = %d\n"
+"Please report this.\n"
+msgstr ""
+"ERRO:  sobrecarga do vetor estático ghid_hotkey_actions.  Index = %d\n"
+"Por favor me envie um relatório sobre isso.\n"
+
+#: ../src/hid/gtk/gui-top-window.c:2085
+#, c-format
+msgid "Note:  home directory is \"%s\"\n"
+msgstr "Nota: diretório de usuário é \"%s\"\n"
+
+#: ../src/hid/gtk/gui-top-window.c:2090
+msgid "Warning:  could not determine home directory\n"
+msgstr "Atenção: não posso determinar diretório de usuário\n"
+
+#: ../src/hid/gtk/gui-top-window.c:2120
+#, c-format
+msgid "Error: internal menu resource didn't parse\n"
+msgstr "Erro: recurso interno de menu não pode ser analizado\n"
+
+#: ../src/hid/gtk/gui-top-window.c:2127
+#, c-format
+msgid "Loading menus from %s\n"
+msgstr "Colocando na memória menus a partir de %s\n"
+
+#: ../src/hid/gtk/gui-top-window.c:2133
+msgid "Using default menus\n"
+msgstr "Usando menus padrão\n"
+
+#: ../src/hid/gtk/gui-top-window.c:2179
+msgid "AdjustStyle()\n"
+msgstr "AdjustStyle()\n"
+
+#: ../src/hid/gtk/gui-top-window.c:2182
+msgid "Open the window which allows editing of the route styles."
+msgstr "Abre a janela que permite edição dos estilos de rota."
+
+#: ../src/hid/gtk/gui-top-window.c:2204
+msgid "EditLayerGroups()\n"
+msgstr "Editar Grupos de Camada()\n"
+
+#: ../src/hid/gtk/gui-top-window.c:2207
+msgid "Open the preferences window which allows editing of the layer groups."
+msgstr "Abre a janela de preferências que permite edução de grupos de camadas."
+
+#: ../src/hid/lesstif/dialogs.c:1186
+#, c-format
+msgid "Units are %s."
+msgstr "Unidades são %s."
+
+#: ../src/hid/lpr/lpr.c:26
+#, c-format
+msgid "HID error: pcb called unimplemented PS function %s.\n"
+msgstr "Erro de HID: pcb chamou a função PS %s não implementada.\n"
+
+#. %start-doc options "98 lpr Printing Options"
+#. @ftable @code
+#. @item --lprcommand <string>
+#. Command to use for printing. Defaults to @code{lpr}. This can be used to produce
+#. PDF output with a virtual PDF printer. Example: @*
+#. @code{--lprcommand "lp -d CUPS-PDF-Printer"}.
+#. @end ftable
+#. @noindent In addition, all @ref{Postscript Export} options are valid.
+#. %end-doc
+#.
+#: ../src/hid/lpr/lpr.c:41 ../src/hid/ps/ps.c:1329
+msgid "lprcommand"
+msgstr "Comando lpr"
+
+#: ../src/hid/lpr/lpr.c:41
+msgid "Command to use for printing"
+msgstr "Comando a ser usado na impressão"
+
+#: ../src/hid/lpr/lpr.c:97
+#, c-format
+msgid "LPR: open %s\n"
+msgstr "LPR: abre %s\n"
+
+#: ../src/hid/lpr/lpr.c:136
+msgid "Postscript print"
+msgstr "Impressora postscript"
+
+#. other HIDs expect this to be first.
+#. %start-doc options "91 Postscript Export"
+#. @ftable @code
+#. @item --psfile <string>
+#. Name of the postscript output file. Can contain a path.
+#. @end ftable
+#. %end-doc
+#.
+#: ../src/hid/ps/ps.c:153
+msgid "psfile"
+msgstr "arquivops"
+
+#: ../src/hid/ps/ps.c:153
+msgid "Postscript output file"
+msgstr "Arquivo de saída postscript"
+
+#. %start-doc options "91 Postscript Export"
+#. @ftable @code
+#. @cindex drill-helper
+#. @item --drill-helper
+#. Print a centering target in large drill holes.
+#. @end ftable
+#. %end-doc
+#.
+#: ../src/hid/ps/ps.c:165
+msgid "drill-helper"
+msgstr "ajuda de perfuração"
+
+#: ../src/hid/ps/ps.c:165
+msgid "Print a centering target in large drill holes"
+msgstr "Imprime um alvo centralizado em grandes orifícios de perfuração"
+
+#. %start-doc options "91 Postscript Export"
+#. @ftable @code
+#. @cindex align-marks
+#. @item --align-marks
+#. Print alignment marks on each sheet. This is meant to ease alignment during exposure.
+#. @end ftable
+#. %end-doc
+#.
+#: ../src/hid/ps/ps.c:177
+msgid "align-marks"
+msgstr "alinhar marcas"
+
+#: ../src/hid/ps/ps.c:177
+msgid "Print alignment marks on each sheet"
+msgstr "Imprimir marcas de alinhamento sobre cada folha"
+
+#. %start-doc options "91 Postscript Export"
+#. @ftable @code
+#. @item --outline
+#. Print the contents of the outline layer on each sheet.
+#. @end ftable
+#. %end-doc
+#.
+#: ../src/hid/ps/ps.c:188
+msgid "outline"
+msgstr "linhas de saída"
+
+#: ../src/hid/ps/ps.c:188
+msgid "Print outline on each sheet"
+msgstr "Imprime linha de saída sobre cada folha"
+
+#. %start-doc options "91 Postscript Export"
+#. @ftable @code
+#. @item --mirror
+#. Print mirror image.
+#. @end ftable
+#. %end-doc
+#.
+#: ../src/hid/ps/ps.c:198
+msgid "mirror"
+msgstr "espelho"
+
+#: ../src/hid/ps/ps.c:198
+msgid "Print mirror image of every page"
+msgstr "Imprimir imagem refletida de todas as páginas"
+
+#. %start-doc options "91 Postscript Export"
+#. @ftable @code
+#. @item --fill-page
+#. Scale output to make the board fit the page.
+#. @end ftable
+#. %end-doc
+#.
+#: ../src/hid/ps/ps.c:209
+msgid "fill-page"
+msgstr "preencher página"
+
+#: ../src/hid/ps/ps.c:209
+msgid "Scale board to fill page"
+msgstr "Proporção de placa preenchendo a página"
+
+#. %start-doc options "91 Postscript Export"
+#. @ftable @code
+#. @item --auto-mirror
+#. Print mirror image of appropriate layers.
+#. @end ftable
+#. %end-doc
+#.
+#: ../src/hid/ps/ps.c:220
+msgid "auto-mirror"
+msgstr "auto refletir"
+
+#: ../src/hid/ps/ps.c:220
+msgid "Print mirror image of appropriate layers"
+msgstr "Imprime imagens refletidas das camadas apropriadas"
+
+#. %start-doc options "91 Postscript Export"
+#. @ftable @code
+#. @item --ps-color
+#. Postscript output in color.
+#. @end ftable
+#. %end-doc
+#.
+#: ../src/hid/ps/ps.c:231
+msgid "ps-color"
+msgstr "cor ps"
+
+#: ../src/hid/ps/ps.c:231
+msgid "Prints in color"
+msgstr "Imprimir em Cores"
+
+#. %start-doc options "91 Postscript Export"
+#. @ftable @code
+#. @cindex ps-bloat
+#. @item --ps-bloat <num>
+#. Amount to add to trace/pad/pin edges.
+#. @end ftable
+#. %end-doc
+#.
+#: ../src/hid/ps/ps.c:243
+msgid "ps-bloat"
+msgstr "inchaço ps"
+
+#: ../src/hid/ps/ps.c:243
+msgid "Amount to add to trace/pad/pin edges"
+msgstr "Qauntidade para adicionar a arestas de trilha/pastilha/conector"
+
+#. %start-doc options "91 Postscript Export"
+#. @ftable @code
+#. @cindex ps-invert
+#. @item --ps-invert
+#. Draw objects as white-on-black.
+#. @end ftable
+#. %end-doc
+#.
+#: ../src/hid/ps/ps.c:255
+msgid "ps-invert"
+msgstr "inverter ps"
+
+#: ../src/hid/ps/ps.c:255
+msgid "Draw objects as white-on-black"
+msgstr "Desenha objetos em preto e branco"
+
+#. %start-doc options "91 Postscript Export"
+#. @ftable @code
+#. @item --media <media-name>
+#. Size of the media, the postscript is fitted to. The parameter
+#. @code{<media-name>} can be any of the standard names for paper size: @samp{A0}
+#. to @samp{A10}, @samp{B0} to @samp{B10}, @samp{Letter}, @samp{11x17},
+#. @samp{Ledger}, @samp{Legal}, @samp{Executive}, @samp{A-Size}, @samp{B-size},
+#. @samp{C-Size}, @samp{D-size}, @samp{E-size}, @samp{US-Business_Card},
+#. @samp{Intl-Business_Card}.
+#. @end ftable
+#. %end-doc
+#.
+#: ../src/hid/ps/ps.c:271
+msgid "media"
+msgstr "media"
+
+#: ../src/hid/ps/ps.c:271
+msgid "Media type"
+msgstr "Tipo de mídia"
+
+#. %start-doc options "91 Postscript Export"
+#. @ftable @code
+#. @cindex psfade
+#. @item --psfade <num>
+#. Fade amount for assembly drawings (0.0=missing, 1.0=solid).
+#. @end ftable
+#. %end-doc
+#.
+#: ../src/hid/ps/ps.c:283
+msgid "psfade"
+msgstr "desvanecer gradual de ps"
+
+#: ../src/hid/ps/ps.c:284
+msgid "Fade amount for assembly drawings (0.0=missing, 1.0=solid)"
+msgstr ""
+"Quatdade de desvanecimento para desenhos de montagem (0.0=omitido, "
+"1.0=sólido)"
+
+#. %start-doc options "91 Postscript Export"
+#. @ftable @code
+#. @item --scale <num>
+#. Scale value to compensate for printer sizing errors (1.0 = full scale).
+#. @end ftable
+#. %end-doc
+#.
+#: ../src/hid/ps/ps.c:295
+msgid "scale"
+msgstr "proporção"
+
+#: ../src/hid/ps/ps.c:296
+msgid "Scale value to compensate for printer sizing errors (1.0 = full scale)"
+msgstr ""
+"Valor de proporção a compensar para erros de ajuste de tamanho em "
+"impressoras (1.0 = proporção completa)"
+
+#. %start-doc options "91 Postscript Export"
+#. @ftable @code
+#. @cindex multi-file
+#. @item --multi-file
+#. Produce multiple files, one per page, instead of a single multi page file.
+#. @end ftable
+#. %end-doc
+#.
+#: ../src/hid/ps/ps.c:308
+msgid "multi-file"
+msgstr "multi-arquivo"
+
+#: ../src/hid/ps/ps.c:309
+msgid "Produce multiple files, one per page, instead of a single file"
+msgstr ""
+"Produz múltiplos arquivos, um para cada página, ao invés de um só arquivo"
+
+#. %start-doc options "91 Postscript Export"
+#. @ftable @code
+#. @item --xcalib <num>
+#. Paper width. Used for x-Axis calibration.
+#. @end ftable
+#. %end-doc
+#.
+#: ../src/hid/ps/ps.c:320
+msgid "xcalib"
+msgstr "calibração-x"
+
+#: ../src/hid/ps/ps.c:320
+msgid "Paper width. Used for x-Axis calibration"
+msgstr "Largura do papel. Usada para calibração do eixo x"
+
+#. %start-doc options "91 Postscript Export"
+#. @ftable @code
+#. @item --ycalib <num>
+#. Paper height. Used for y-Axis calibration.
+#. @end ftable
+#. %end-doc
+#.
+#: ../src/hid/ps/ps.c:331
+msgid "ycalib"
+msgstr "calibração-y"
+
+#: ../src/hid/ps/ps.c:331
+msgid "Paper height. Used for y-Axis calibration"
+msgstr "Altura do papel. Usada para calibração do eixo y"
+
+#. %start-doc options "91 Postscript Export"
+#. @ftable @code
+#. @item --drill-copper
+#. Draw drill holes in pins / vias, instead of leaving solid copper.
+#. @end ftable
+#. %end-doc
+#.
+#: ../src/hid/ps/ps.c:342
+msgid "drill-copper"
+msgstr "cobre de perfuração"
+
+#: ../src/hid/ps/ps.c:343
+msgid "Draw drill holes in pins / vias, instead of leaving solid copper"
+msgstr ""
+"Desenha orifícios de perfuração em conectores / vias, ao invés de deixar o "
+"cobre sólido"
+
+#. %start-doc options "91 Postscript Export"
+#. @ftable @code
+#. @cindex show-legend
+#. @item --show-legend
+#. Print file name and scale on printout.
+#. @end ftable
+#. %end-doc
+#.
+#: ../src/hid/ps/ps.c:355
+msgid "show-legend"
+msgstr "exibe legenda"
+
+#: ../src/hid/ps/ps.c:355
+msgid "Print file name and scale on printout"
+msgstr "Imprime nome de arquivo e proporção na saída de impressão"
+
+#: ../src/hid/ps/ps.c:1329
+msgid "Command to print"
+msgstr "Comando para imprimir"
+
+#: ../src/hid/ps/ps.c:1438
+#, c-format
+msgid ""
+"X value of %g is too far off.\n"
+"Expecting it near: %.1f, %.1f, %.1f, %.1f\n"
+msgstr ""
+"Valor X de %g é muito distante.\n"
+"Esperado próximo a: %.1f, %.1f, %.1f, %.1f\n"
+
+#: ../src/hid/ps/ps.c:1450
+#, c-format
+msgid ""
+"Y value of %g is too far off.\n"
+"Expecting it near: %.1f, %.1f, %.1f, %.1f\n"
+msgstr ""
+"Valor Y de %g muito distante.\n"
+"Expecting it near: %.1f, %.1f, %.1f, %.1f\n"
+
+#: ../src/hid/ps/ps.c:1462
+msgid "Print Calibration Page"
+msgstr "Página de Ajuste de Impressora"
+
+#: ../src/hid/ps/ps.c:1462
+msgid "Generates a printer calibration page"
+msgstr "Gera uma página de ajuste de impressora"
+
+#: ../src/hid/ps/ps.c:1555
+msgid "Postscript export"
+msgstr "Exporta postscript"
+
+#: ../src/hid/gtk/gui-trackball.c:259
+msgid "2D View"
+msgstr "Visão 2D"
+
+#: ../src/main.c:2031
+#, c-format
+msgid "Executing startup script file %s\n"
+msgstr "Executando script de inicialização %s\n"
+
+#: ../src/main.c:2037
+#, c-format
+msgid "Executing startup action %s\n"
+msgstr "Executando ação de inicialização %s\n"
+
+#: ../src/misc.c:1374
+#, c-format
+msgid "Warning: layer \"%s\" not known\n"
+msgstr "Atenção: camada \"%s\" desconhecida\n"
+
+#: ../src/misc.c:1377
+#, c-format
+msgid "Named layers in this board are:\n"
+msgstr "Camadas conhecidas nessa placa são:\n"
+
+#: ../src/misc.c:1381
+#, c-format
+msgid ""
+"Also: component, solder, rats, invisible, pins, vias, elements or silk, "
+"mask, solderside.\n"
+msgstr ""
+"Também: componente, soldagem, ratos, invisível, conectores, vias, "
+"componentes ou seda, máscara, lado de soldagem.\n"
+
+#: ../src/misc.c:1461
+#, c-format
+msgid "Request for bounding box of unsupported type %d\n"
+msgstr "Requisição de caixa associada de tipo não suportado %d\n"
+
+#: ../src/misc.c:2193
+msgid ""
+"This is PCB, an interactive\n"
+"printed circuit board editor\n"
+"version "
+msgstr ""
+"Esse é o PCB, um editor\n"
+"de placa de circuito impresso interativo\n"
+"versão "
+
+#: ../src/misc.c:2206
+msgid ""
+"It is licensed under the terms of the GNU\n"
+"General Public License version 2\n"
+"See the LICENSE file for more information\n"
+"\n"
+"For more information see:\n"
+msgstr ""
+"Licenciado nos termos da GNU\n"
+"General Public License versão 2\n"
+"Veja arquivo LICENSE para mais informação\n"
+"\n"
+"Para mais informação veja:\n"
+
+#: ../src/misc.c:2210
+msgid "PCB homepage: "
+msgstr "Sítio internet do PCB: "
+
+#: ../src/misc.c:2212
+msgid "gEDA homepage: "
+msgstr "Sítio internet do gEDA: "
+
+#: ../src/misc.c:2214
+msgid "gEDA Wiki: "
+msgstr "Wiki gEDA: "
+
+#: ../src/misc.c:2217
+msgid ""
+"\n"
+"----- Compile Time Options -----\n"
+msgstr ""
+"\n"
+"----- Opções Durante Compilação -----\n"
+
+#: ../src/misc.c:2219
+msgid "GUI:\n"
+msgstr "GUI:\n"
+
+#: ../src/misc.c:2232
+msgid "Exporters:\n"
+msgstr "Exportadores:\n"
+
+#: ../src/misc.c:2245
+msgid "Printers:\n"
+msgstr "Impressoras:\n"
+
+#: ../src/netlist.c:448 ../src/report.c:833 ../src/select.c:845
+#: ../src/vendor.c:896
+#, c-format
+msgid "regexp error: %s\n"
+msgstr "erro de expressão regular: %s\n"
+
+#: ../src/netlist.c:456 ../src/report.c:841 ../src/select.c:857
+#: ../src/vendor.c:916
+#, c-format
+msgid "re_comp error: %s\n"
+msgstr "erro de re_comp: %s\n"
+
+#: ../src/parse_y.y:169 ../src/parse_y.y:235 ../src/parse_y.y:258
+msgid "illegal fileformat\n"
+msgstr "formatoarquivo ilegal\n"
+
+#: ../src/parse_y.y:201
+msgid "illegal layer-group string\n"
+msgstr "sequência ilegal de caracteres de agrupamentos de camadas\n"
+
+#: ../src/parse_y.y:657 ../src/parse_y.y:665
+msgid "illegal route-style string\n"
+msgstr "sequência ilegal de caracteres de estilo de roteamento\n"
+
+#: ../src/parse_y.y:1148
+#, c-format
+msgid ""
+"WARNING parsing file '%s'\n"
+"    line:        %i\n"
+"    description: 'ignored polygon (< 3 points in a contour)'\n"
+msgstr ""
+"ALERTA de análise do arquivo '%s'\n"
+"    linha:        %i\n"
+"    descrição: 'polígono ignoradon (menos de três pontos em um contorno)'\n"
+
+#: ../src/parse_y.y:1949
+#, c-format
+msgid ""
+"ERROR parsing file '%s'\n"
+"    line:        %i\n"
+"    description: '%s'\n"
+msgstr ""
+"ERRO de análise do arquivo '%s'\n"
+"    linha:        %i\n"
+"    descrição: '%s'\n"
+
+#: ../src/parse_y.y:1965
+#, c-format
+msgid ""
+"ERROR:  The file you are attempting to load is in a format\n"
+"which is too new for this version of pcb.  To load this file\n"
+"you need a version of pcb which is >= %d.  If you are\n"
+"using a version built from git source, the source date\n"
+"must be >= %d.  This copy of pcb can only read files\n"
+"up to file version %d.\n"
+msgstr ""
+"ERRO:  O arquivo que você está tentando colocar na memóriaetá em um formato\n"
+"que é muito novo para essa versão do pcb.  Para colocar esse arquivo na "
+"memória\n"
+"você precisa de uma versão do pcb que é >= %d.  Se você está\n"
+"usando uma versão construída a partir do repositório git, a data de código "
+"fonte\n"
+"deve ser >= %d.  Essa cópia do pcb somente pode ler arquivos\n"
+"até a versão %d.\n"
+
+#: ../src/pcb-menu.res:33
+msgid "Save layout"
+msgstr "Grava traçado como"
+
+#: ../src/pcb-menu.res:34
+msgid "Save layout as..."
+msgstr "Grava traçado como..."
+
+#: ../src/pcb-menu.res:37
+msgid "Load layout"
+msgstr "Coloca na memória arquivo de traçado"
+
+#: ../src/pcb-menu.res:38
+msgid "Load element data to paste-buffer"
+msgstr "Coloca dados de componente para colar memória"
+
+#: ../src/pcb-menu.res:39
+msgid "Load layout data to paste-buffer"
+msgstr "Coloca dados de traçado para colar memória"
+
+#: ../src/pcb-menu.res:42
+msgid "Print layout..."
+msgstr "Imprime o traçado..."
+
+#: ../src/pcb-menu.res:43
+msgid "Export layout..."
+msgstr "Exporta Traçado..."
+
+#: ../src/pcb-menu.res:46
+msgid "Save connection data of..."
+msgstr "Grava Dados de Conecção de ..."
+
+#: ../src/pcb-menu.res:51
+msgid "Start new layout"
+msgstr "Inicia novo traçado"
+
+#: ../src/pcb-menu.res:53
+msgid "Quit Program"
+msgstr "Sair do Programa"
+
+#: ../src/pcb-menu.res:58
+msgid "Spin 180"
+msgstr "Gira 180"
+
+#: ../src/pcb-menu.res:61
+msgid "Show soldermask"
+msgstr "Exibe máscara de soldagem"
+
+#: ../src/pcb-menu.res:63
+msgid "Displayed element-name..."
+msgstr "Mostrado nome de componente..."
+
+#: ../src/pcb-menu.res:208
+msgid "Pinout shows number"
+msgstr "Mostra número saída de componente"
+
+#: ../src/pcb-menu.res:72
+msgid "Open pinout menu"
+msgstr "Abre menu de saída de componente"
+
+#: ../src/pcb-menu.res:83
+msgid "Zoom Toggle"
+msgstr "Muda Aproximação"
+
+#: ../src/pcb-menu.res:83
+msgid "`"
+msgstr "`"
+
+#: ../src/pcb-menu.res:83
+msgid "<Key>`"
+msgstr "<Tecla>`"
+
+#: ../src/pcb-menu.res:96
+msgid "Display grid"
+msgstr "Exibe grade"
+
+#: ../src/pcb-menu.res:277
+msgid "Paste buffer to layout"
+msgstr "Cola memória no traçado"
+
+#: ../src/pcb-menu.res:149
+msgid "Edit Names..."
+msgstr "Editar Nomes..."
+
+#: ../src/pcb-menu.res:150
+msgid " Change text on layout"
+msgstr "Muda texto sobre traçado"
+
+#: ../src/pcb-menu.res:151
+msgid " Edit name of layout"
+msgstr "Editar nome do traçado"
+
+#: ../src/pcb-menu.res:152
+msgid " Edit name of active layer"
+msgstr "Editar nome da camada ativa"
+
+#: ../src/pcb-menu.res:153
+msgid "Edit Attributes..."
+msgstr "Editar atributos..."
+
+#: ../src/pcb-menu.res:154
+msgid " Layout"
+msgstr " Traçado"
+
+#: ../src/pcb-menu.res:155
+msgid " CurrentLayer"
+msgstr "Camada Atual"
+
+#: ../src/pcb-menu.res:156
+msgid " Element"
+msgstr " Componente"
+
+#: ../src/pcb-menu.res:158
+msgid "Board Sizes"
+msgstr "Tamanhos da Placa"
+
+#: ../src/pcb-menu.res:185
+msgid "Command"
+msgstr "Comando"
+
+#: ../src/pcb-menu.res:188
+msgid "Layer groups"
+msgstr "Grupos de Camada"
+
+#: ../src/pcb-menu.res:189
+msgid "Edit layer groupings"
+msgstr "Editar agrupamentos de camadadas"
+
+#: ../src/pcb-menu.res:210
+msgid "Enable vendor drill mapping"
+msgstr "Habilita mapeamento de perfuração de forncedor"
+
+#: ../src/pcb-menu.res:211
+msgid "Import Settings"
+msgstr "Importar Configurações"
+
+#: ../src/pcb-menu.res:212
+msgid "New elements added at..."
+msgstr "Novos componentes adicionados em..."
+
+#: ../src/pcb-menu.res:222
+msgid "Select all visible objects"
+msgstr "Seleciona todos os objetos visíveis"
+
+#: ../src/pcb-menu.res:223
+msgid "Select all found objects"
+msgstr "Seleciona todos os objetos encontrados"
+
+#: ../src/pcb-menu.res:224
+msgid "Select all connected objects"
+msgstr "Seleciona todos os objetos conectados"
+
+#: ../src/pcb-menu.res:227
+msgid "unselect all found objects"
+msgstr "remove a seleção de todos os objetos encontrados"
+
+#: ../src/pcb-menu.res:228
+msgid "unselect all connected objects"
+msgstr "remove a seleção de todos os objetos conectados"
+
+#: ../src/pcb-menu.res:235
+msgid "Text Objects"
+msgstr "Objetos de Texto"
+
+#: ../src/pcb-menu.res:242
+msgid "Delete selected objects"
+msgstr "Apaga objetos selecionados"
+
+#: ../src/pcb-menu.res:292
+msgid "Select current buffer"
+msgstr "Selecione a memória atual"
+
+#: ../src/pcb-menu.res:293
+msgid "#1"
+msgstr "#1"
+
+#: ../src/pcb-menu.res:294
+msgid "#2"
+msgstr "#2"
+
+#: ../src/pcb-menu.res:295
+msgid "#3"
+msgstr "#3"
+
+#: ../src/pcb-menu.res:296
+msgid "#4"
+msgstr "#4"
+
+#: ../src/pcb-menu.res:297
+msgid "#5"
+msgstr "#5"
+
+#: ../src/pcb-menu.res:301
+msgid "Lookup connection to object"
+msgstr "Procura conecção a objeto"
+
+#: ../src/pcb-menu.res:306
+msgid "Optimize rats-nest"
+msgstr "Otimiza ninhos de ratos"
+
+#: ../src/pcb-menu.res:308
+msgid "Erase rats-nest"
+msgstr "Apaga ninhos de ratos"
+
+#: ../src/pcb-menu.res:320
+msgid "Orthopull"
+msgstr "Mover cantos"
+
+#: ../src/pcb-menu.res:321
+msgid "SimpleOpts"
+msgstr "Otimização simples"
+
+#: ../src/pcb-menu.res:340
+msgid "Report net length"
+msgstr "Informar comprimento da rede"
+
+#: ../src/pcb-menu.res:340
+msgid "R"
+msgstr "R"
+
+#: ../src/pcb-menu.res:340
+msgid "<Key>r"
+msgstr "<Tecla>r"
+
+#: ../src/pcb-menu.res:418
+msgid "Alt-Z"
+msgstr "Alt-Z"
+
+#: ../src/pcb-menu.res:418
+msgid "Alt<Key>z"
+msgstr "Alt<Tecla>z"
+
+#: ../src/pcb-menu.res:436
+msgid "Board Layout"
+msgstr "Traçado da Placa"
+
+#: ../src/polygon.c:1378
+msgid "Cannot close polygon because 45 degree lines are requested.\n"
+msgstr "Não posso fechar o polígono porque linhas de 45 graus são exigidas.\n"
+
+#: ../src/polygon.c:1386
+msgid "A polygon has to have at least 3 points\n"
+msgstr "Um polígono tem ao menos 3 pontos não alinhados\n"
+
+#: ../src/rats.c:108
+#, c-format
+msgid "Bad net-list format encountered near: \"%s\"\n"
+msgstr "Formato de net-list inadequado encontrado próximo de: \"%s\"\n"
+
+#: ../src/rats.c:189
+#, c-format
+msgid ""
+"Error! Netlist file is missing pin!\n"
+"white space after \"%s-\"\n"
+msgstr ""
+"Erro! Arquivo netlist faltando conector!\n"
+"Espaço em branco após \"%s-\"\n"
+
+#: ../src/rats.c:206
+#, c-format
+msgid "Can't find %s pin %s called for in netlist.\n"
+msgstr "Não encontro %s conector %s citado nessa netlist.\n"
+
+#: ../src/rats.c:276
+#, c-format
+msgid "Error! Element %s pin %s appears multiple times in the netlist file.\n"
+msgstr ""
+"Erro! Componente %s conector %s aparece múltiplas vezes no arquivo de "
+"netlist.\n"
+
+#: ../src/rats.c:373
+#, c-format
+msgid "Warning! Net \"%s\" is shorted to %s pin %s\n"
+msgstr "Atenção! Fiação \"%s\" em curto com %s conector %s\n"
+
+#: ../src/rats.c:394 ../src/rats.c:430
+#, c-format
+msgid "Warning! Net \"%s\" is shorted to net \"%s\"\n"
+msgstr "Atenção! Fiação \"%s\" em curto com a fiação \"%s\"\n"
+
+#: ../src/rats.c:409
+#, c-format
+msgid "Warning! Net \"%s\" is shorted  to %s pad %s\n"
+msgstr "Atenção! Fiação \"%s\" está em curto com %s pastilha \"%s\"\n"
+
+#: ../src/rats.c:802
+msgid ""
+"Congratulations!!\n"
+"The layout is complete and has no shorted nets.\n"
+msgstr ""
+"Parabéns!!\n"
+"O traçado está completo e não tem fiação em curto.\n"
+
+#: ../src/rats.c:805
+msgid ""
+"Nothing more to add, but there are\n"
+"either rat-lines in the layout, disabled nets\n"
+"in the net-list, or missing components\n"
+msgstr ""
+"Nada a adicionar, mas existe\n"
+"ou linhas de rato no traçado, fiação desabilitadas\n"
+"na net-list, ou componentes faltando\n"
+
+#: ../src/rats.c:915 ../src/rats.c:935
+msgid "No pad/pin under rat line\n"
+msgstr "Nenhuma pastilha/conector sob linha de rato\n"
+
+#: ../src/rats.c:921
+msgid "You must name the starting element first\n"
+msgstr "Você deve nomear o componente inicial primeiramente\n"
+
+#: ../src/rats.c:941
+msgid "You must name the ending element first\n"
+msgstr "Você deve nomear o componente final primeiramente\n"
+
+#: ../src/rats.c:955
+msgid "Both connections already in netlist - cannot merge nets\n"
+msgstr "Ambas as conecções já estão na netlist - não posso associar fiação\n"
+
+#: ../src/report.c:94
+#, c-format
+msgid ""
+"There are %d different drill sizes used in this layout, %d holes total\n"
+"\n"
+"Drill Diam. (%s)\t# of Pins\t# of Vias\t# of Elements\t# Unplated\n"
+msgstr ""
+"Existem %d tamanhos de perfuração diferentes nesse traçado, %d orifícios no "
+"total\n"
+"\n"
+"Diam. de perfuração (%s)\t# de conetores\t# de Vias\t# de componetes\t# Sem "
+"anel de cobre\n"
+
+#. create dialog box
+#: ../src/report.c:114
+msgid "Drill Report"
+msgstr "Relatório d Perfuração"
+
+#: ../src/report.c:121
+msgid "ReportDialog()"
+msgstr "ReportDialog()"
+
+#: ../src/report.c:124
+msgid "Report on the object under the crosshair"
+msgstr "Relatório do objeto sob a mira"
+
+#: ../src/report.c:158
+msgid ""
+"%m+VIA ID# %ld; Flags:%s\n"
+"(X,Y) = %$mD.\n"
+"It is a pure hole of diameter %$mS.\n"
+"Name = \"%s\".%s"
+msgstr ""
+"%m+VIA ID# %ld; Sinalizadores:%s\n"
+"(X,Y) = %$mD.\n"
+"É um orifício puro de diâmetro %$mS.\n"
+"Nome = \"%s\".%s"
+
+#: ../src/report.c:164 ../src/report.c:182 ../src/report.c:213
+#: ../src/report.c:233 ../src/report.c:261 ../src/report.c:319
+#: ../src/report.c:347 ../src/report.c:397 ../src/report.c:431
+#: ../src/report.c:472
+msgid "It is LOCKED.\n"
+msgstr "Estrá TRAVADO.\n"
+
+#: ../src/report.c:166
+msgid ""
+"%m+VIA ID# %ld;  Flags:%s\n"
+"(X,Y) = %$mD.\n"
+"Copper width = %$mS. Drill width = %$mS.\n"
+"Clearance width in polygons = %$mS.\n"
+"Annulus = %$mS.\n"
+"Solder mask hole = %$mS (gap = %$mS).\n"
+"Name = \"%s\".%s"
+msgstr ""
+"%m+VIA ID# %ld;  Sinalizadores:%s\n"
+"(X,Y) = %$mD.\n"
+"Largura do cobre = %$mS. Largura de perfução = %$mS.\n"
+"Largura da folga em polígonos = %$mS.\n"
+"Anelar = %$mS.\n"
+"Orifício de máscara de soldagem = %$mS (gap = %$mS).\n"
+"Nome = \"%s\".%s"
+
+#: ../src/report.c:206
+msgid ""
+"%m+PIN ID# %ld; Flags:%s\n"
+"(X,Y) = %$mD.\n"
+"It is a mounting hole. Drill width = %$mS.\n"
+"It is owned by element %$mS.\n"
+"%s"
+msgstr ""
+"%m+PIN ID# %ld; Sinalizadores:%s\n"
+"(X,Y) = %$mD.\n"
+"É um orifício de montagem. Largura de perfuração = %$mS.\n"
+"é possuído pelo componente %$mS.\n"
+"%s"
+
+#: ../src/report.c:216
+msgid ""
+"%m+PIN ID# %ld;  Flags:%s\n"
+"(X,Y) = %$mD.\n"
+"Copper width = %$mS. Drill width = %$mS.\n"
+"Clearance width to Polygon = %$mS.\n"
+"Annulus = %$mS.\n"
+"Solder mask hole = %$mS (gap = %$mS).\n"
+"Name = \"%s\".\n"
+"It is owned by element %s\n"
+" as pin number %s.\n"
+"%s"
+msgstr ""
+"%m+ID de CONECTOR# %ld;  Sinalizadores:%s\n"
+"(X,Y) = %$mD.\n"
+"Largura do cobre = %$mS. Largura de perfuração = %$mS.\n"
+"Largura da folga para polígonos = %$mS.\n"
+"Anelar = %$mS.\n"
+"Orifício de máscara de soldagem = %$mS (gap = %$mS).\n"
+"Nome = \"%s\".\n"
+"É possído pelo componente %s\n"
+" com número de conector %s.\n"
+"%s"
+
+#: ../src/report.c:248
+msgid ""
+"%m+LINE ID# %ld;  Flags:%s\n"
+"FirstPoint(X,Y)  = %$mD, ID = %ld.\n"
+"SecondPoint(X,Y) = %$mD, ID = %ld.\n"
+"Width = %$mS.\n"
+"Clearance width in polygons = %$mS.\n"
+"It is on layer %d\n"
+"and has name \"%s\".\n"
+"%s"
+msgstr ""
+"%m+LINE ID# %ld;  Sinalizadores:%s\n"
+"FirstPoint(X,Y)  = %$mD, ID = %ld.\n"
+"SecondPoint(X,Y) = %$mD, ID = %ld.\n"
+"Largura = %$mS.\n"
+"Largura de folga em polígonos = %$mS.\n"
+"Está na camada %d\n"
+"e tem o nome \"%s\".\n"
+"%s"
+
+#: ../src/report.c:275
+msgid ""
+"%m+RAT-LINE ID# %ld;  Flags:%s\n"
+"FirstPoint(X,Y)  = %$mD; ID = %ld; connects to layer group %d.\n"
+"SecondPoint(X,Y) = %$mD; ID = %ld; connects to layer group %d.\n"
+msgstr ""
+"%m+ID de RAT-LINE# %ld;  Sinalizadores:%s\n"
+"FirstPoint(X,Y)  = %$mD; ID = %ld; conecta-se ao grupode camada %d.\n"
+"SecondPoint(X,Y) = %$mD; ID = %ld; conecta-se ao grupode camada %d.\n"
+
+#: ../src/report.c:302
+msgid ""
+"%m+ARC ID# %ld;  Flags:%s\n"
+"CenterPoint(X,Y) = %$mD.\n"
+"Radius = %$mS, Thickness = %$mS.\n"
+"Clearance width in polygons = %$mS.\n"
+"StartAngle = %ma degrees, DeltaAngle = %ma degrees.\n"
+"Bounding Box is %$mD, %$mD.\n"
+"That makes the end points at %$mD and %$mD.\n"
+"It is on layer %d.\n"
+"%s"
+msgstr ""
+"%m+ID de ARCO# %ld;  Sinalizadores:%s\n"
+"CenterPoint(X,Y) = %$mD.\n"
+"Raio = %$mS, Espessura = %$mS.\n"
+"Espessura da folga em polígonos = %$mS.\n"
+"StartAngle = %ma graus, DeltaAngle = %ma graus.\n"
+"Caixa Associada é %$mD, %$mD.\n"
+"O que coloca as extremidades em %$mD e em %$mD.\n"
+"Está na camada %d.\n"
+"%s"
+
+#: ../src/report.c:335
+msgid ""
+"%m+POLYGON ID# %ld;  Flags:%s\n"
+"Its bounding box is %$mD %$mD.\n"
+"It has %d points and could store %d more\n"
+"  without using more memory.\n"
+"It has %d holes and resides on layer %d.\n"
+"%s"
+msgstr ""
+"%m+ID de POLÍGONO# %ld;  Sinalizadores:%s\n"
+"Sua caixa associada é %$mD %$mD.\n"
+"Tem %d pontos e pode armazenar %d a mais\n"
+"  sem usar mais memória.\n"
+"Tem %d orifícios e localiza-se na camada %d.\n"
+"%s"
+
+#: ../src/report.c:374
+msgid ""
+"%m+PAD ID# %ld;  Flags:%s\n"
+"FirstPoint(X,Y)  = %$mD; ID = %ld.\n"
+"SecondPoint(X,Y) = %$mD; ID = %ld.\n"
+"Width = %$mS.  Length = %$mS.\n"
+"Clearance width in polygons = %$mS.\n"
+"Solder mask = %$mS x %$mS (gap = %$mS).\n"
+"Name = \"%s\".\n"
+"It is owned by SMD element %s\n"
+"  as pin number %s and is on the %s\n"
+"side of the board.\n"
+"%s"
+msgstr ""
+"%m+ID de PASTILHA# %ld;  Sinalizadores:%s\n"
+"FirstPoint(X,Y)  = %$mD; ID = %ld.\n"
+"SecondPoint(X,Y) = %$mD; ID = %ld.\n"
+"Largura = %$mS.  Comprimento = %$mS.\n"
+"Largura da folga em polígonos = %$mS.\n"
+"Máscara de soldagem = %$mS x %$mS (gap = %$mS).\n"
+"Nome = \"%s\".\n"
+"É possuída pelo componente SMD %s\n"
+"  como número de conectorr %s e está sobre o lado\n"
+"%s da placa.\n"
+"%s"
+
+#: ../src/report.c:396 ../src/report.c:430
+msgid "solder (bottom)"
+msgstr "soldagem (inferior)"
+
+#: ../src/report.c:396 ../src/report.c:430
+msgid "component"
+msgstr "componente"
+
+#: ../src/report.c:411
+msgid ""
+"%m+ELEMENT ID# %ld;  Flags:%s\n"
+"BoundingBox %$mD %$mD.\n"
+"Descriptive Name \"%s\".\n"
+"Name on board \"%s\".\n"
+"Part number name \"%s\".\n"
+"It is %$mS tall and is located at (X,Y) = %$mD %s.\n"
+"Mark located at point (X,Y) = %$mD.\n"
+"It is on the %s side of the board.\n"
+"%s"
+msgstr ""
+"%m+ID de COMPONENTE# %ld;  Sinalizadores:%s\n"
+"BoundingBox %$mD %$mD.\n"
+"Nome Descritivo \"%s\".\n"
+"Nome na placa \"%s\".\n"
+"Nome no número da peça \"%s\".\n"
+"Tem %$mS de altura e está localizado em (X,Y) = %$mD %s.\n"
+"Marca localiada no ponto (X,Y) = %$mD.\n"
+"Está do lado %s da placa.\n"
+"%s"
+
+#: ../src/report.c:428
+msgid ""
+",\n"
+"  but it's hidden"
+msgstr ""
+",\n"
+"  mas está escondido"
+
+#: ../src/report.c:457
+#, c-format
+msgid "It is on layer %d."
+msgstr "Está sobre a camada %d."
+
+#: ../src/report.c:459
+msgid ""
+"%m+TEXT ID# %ld;  Flags:%s\n"
+"Located at (X,Y) = %$mD.\n"
+"Characters are %$mS tall.\n"
+"Value is \"%s\".\n"
+"Direction is %d.\n"
+"The bounding box is %$mD %$mD.\n"
+"%s\n"
+"%s"
+msgstr ""
+"%m+ID de TEXTO# %ld;  Sinalizadores:%s\n"
+"Localizado em (X,Y) = %$mD.\n"
+"Caracteres são %$mS tall.\n"
+"Valor é \"%s\".\n"
+"Direção é %d.\n"
+"A caixa associada é %$mD %$mD.\n"
+"%s\n"
+"%s"
+
+#: ../src/report.c:471
+msgid "It is an element name."
+msgstr "É um nome de componente."
+
+#: ../src/report.c:479
+msgid ""
+"%m+POINT ID# %ld.\n"
+"Located at (X,Y) = %$mD.\n"
+"It belongs to a %s on layer %d.\n"
+msgstr ""
+"%m+ID de PONTO# %ld.\n"
+"Localizado em (X,Y) = %$mD.\n"
+"Pertence a um %s na camada %d.\n"
+
+#: ../src/report.c:484
+msgctxt "report"
+msgid "line"
+msgstr "linha"
+
+#: ../src/report.c:484
+msgctxt "report"
+msgid "polygon"
+msgstr "Polígono"
+
+#: ../src/report.c:493
+#, c-format
+msgid "Unknown\n"
+msgstr "Desconhecido\n"
+
+#: ../src/report.c:499
+msgid "Nothing found to report on\n"
+msgstr "Nada encontrado para relatório\n"
+
+#. create dialog box
+#: ../src/report.c:503 ../src/report.c:545
+msgid "Report"
+msgstr "Relatório"
+
+#: ../src/report.c:516
+msgid "The following pins/pads are FOUND:\n"
+msgstr "Os seguintes conectores/pastilhas foram ENCONTRADOS:\n"
+
+#: ../src/report.c:523 ../src/report.c:535
+#, c-format
+msgid "%s-%s,%c"
+msgstr "%s-%s,%c"
+
+#: ../src/report.c:675 ../src/report.c:776 ../src/report.c:929
+msgid "%$m*"
+msgstr "%$m*"
+
+#: ../src/report.c:676
+#, c-format
+msgid "Net %s length %s\n"
+msgstr "Rede %s comprimento %s\n"
+
+#: ../src/report.c:711
+msgid "No net under cursor.\n"
+msgstr "Nenhuma rede sob o ursor.\n"
+
+#: ../src/report.c:728 ../src/report.c:753
+msgid "-"
+msgstr "-"
+
+#: ../src/report.c:778 ../src/report.c:931
+#, c-format
+msgid "Net \"%s\" length: %s\n"
+msgstr "Rede \"%s\" comprimento: %s\n"
+
+#: ../src/report.c:780 ../src/report.c:933
+#, c-format
+msgid "Net length: %s\n"
+msgstr "Comprimento da rede: %s\n"
+
+#: ../src/report.c:891
+#, c-format
+msgid "No net named %s\n"
+msgstr "Nenhuma net chamada %s\n"
+
+#: ../src/report.c:920
+msgid "Net found, but no lines or arcs were flagged.\n"
+msgstr "Net encontrada, mas sem linhas ou arcos foram sinalizadas.\n"
+
+#: ../src/report.c:922
+msgid "Net not found.\n"
+msgstr "Net desaparecida.\n"
+
+#: ../src/report.c:945
+msgid "Report(Object|DrillReport|FoundPins|NetLength|AllNetLengths|[,name])"
+msgstr "Report(Objeto|DrillReport|FoundPins|NetLength|AllNetLengths|[,nome])"
+
+#: ../src/report.c:947
+msgid "Produce various report."
+msgstr "Produz vários relatórios."
+
+#: ../src/report.c:985 ../src/report.c:1006
+msgid "Click on an object"
+msgstr "Clique sobre um objeto"
+
+#: ../src/set.c:261
+msgid "That mode is NOT allowed when drawing ratlines!\n"
+msgstr "Esse modo NÃO é permitido quando desenhando linhas de rato!\n"
+
+#: ../src/toporouter.c:1121
+#, c-format
+msgid "Elapsed time: %.2f seconds\n"
+msgstr "Tempo decorrido: %.2f segundos\n"
+
+#: ../src/toporouter.c:6503
+msgid ""
+"Reticulating splines... successful\n"
+"\n"
+msgstr ""
+"Reticulando splines... successo\n"
+"\n"
+
+#. NB: We could use the %$mS specifier to print these distances, but we would
+#. *     have to cast to Coord, which might overflow for complex routing when
+#. *     PCB is built with Coord as a 32-bit integer.
+#.
+#: ../src/toporouter.c:6508 ../src/toporouter.c:6509
+#, c-format
+msgid "Wiring cost: %f inches\n"
+msgstr "Custo de fios: %f polegadas\n"
+
+#: ../src/toporouter.c:7296
+msgid "ROAR router: "
+msgstr "Roteador ROAR: "
+
+#: ../src/toporouter.c:7310
+#, c-format
+msgid "%d nets remaining\n"
+msgstr "%d fiações restantes\n"
+
+#: ../src/toporouter.c:7313
+#, c-format
+msgid "%d -> "
+msgstr "%d -> "
+
+#: ../src/toporouter.c:7489 ../src/toporouter.c:7490
+#, c-format
+msgid "RUBIX router: %d nets remaining\n"
+msgstr "Roteador RUBIX: %d fiações restantes\n"
+
+#: ../src/toporouter.c:7573
+msgid "Topological Autorouter\n"
+msgstr "Autorouter Topológico\n"
+
+#: ../src/toporouter.c:7574
+#, c-format
+msgid "Started %s"
+msgstr "Iniciado %s"
+
+#: ../src/toporouter.c:7575
+msgid "-------------------------------------\n"
+msgstr "-------------------------------------\n"
+
+#: ../src/toporouter.c:7750
+msgid "Select a set of pads"
+msgstr "Seleciona um conjunto de pastilhas"
+
+#: ../src/toporouter.c:7751
+msgid "Pad escape"
+msgstr "Escape de pastilha"
+
+#: ../src/toporouter.c:7751
+msgid "Escape()"
+msgstr "Escape()"
+
+#: ../src/toporouter.c:7752
+msgid "Select net(s)"
+msgstr "Selecione net(s)"
+
+#: ../src/toporouter.c:7753
+msgid "Topological autorouter"
+msgstr "Autorouter topológico"
+
+#: ../src/toporouter.c:7753
+msgid "Toporouter()"
+msgstr "Toporouter()"
+
+#: ../src/undo.c:221
+#, c-format
+msgid "Size of 'undo-list' exceeds %li kb\n"
+msgstr "Tamanho da 'undo-list' excedeu %li kb\n"
+
+#: ../src/undo.c:937
+msgid ""
+"ERROR: Attempt to Undo() with Serial == 0\n"
+"       Please save your work and report this bug.\n"
+msgstr ""
+"ERRO: Tentativa de Undo() com Serial == 0\n"
+"      Por favor grave seu trabalho e me envie um relatório sobre esse erro.\n"
+
+#: ../src/undo.c:944
+msgid "Nothing to undo - buffer is empty\n"
+msgstr "Nada a desfazer - memória vazia\n"
+
+#: ../src/undo.c:954
+#, c-format
+msgid ""
+"ERROR: Bad undo serial number %d in undo stack - expecting %d or lower\n"
+"       Please save your work and report this bug.\n"
+msgstr ""
+"ERRO: número serial de desfazer %d inadequado na pilha de desfazer - "
+"esperado %d ou menos\n"
+"       Por favor grave seu trabalho e informe essa falha.\n"
+
+#: ../src/undo.c:983
+msgid "ERROR: Failed to undo some operations\n"
+msgstr "ERRO: Falha ao desfazer algumas operações\n"
+
+#: ../src/undo.c:1119
+msgid "Nothing to redo. Perhaps changes have been made since last undo\n"
+msgstr ""
+"Nada a refazer. Pode ser que modificações tenham sido feitas desde o último "
+"desfazer\n"
+
+#: ../src/undo.c:1127
+#, c-format
+msgid ""
+"ERROR: Bad undo serial number %d in redo stack - expecting %d or higher\n"
+"       Please save your work and report this bug.\n"
+msgstr ""
+"ERRO: número serial de undo  %d inadequado na pilha de refazer - expectativa "
+"%d ou maior\n"
+"      Por favor grave seu trabalho e me envie um relatório sobre esse erro.\n"
+
+#: ../src/undo.c:1159
+msgid "ERROR: Failed to redo some operations\n"
+msgstr "ERRO: Falha ao refazer algumas operações\n"
+
+#: ../src/undo.c:1174
+msgid ""
+"ERROR: Operations were added to the Undo stack with an incorrect serial "
+"number\n"
+msgstr ""
+"ERRO: Operações foram adicionadas à pilha de desfazer com serial serial "
+"incorreto\n"
+
+#. ************************************************************
+#: ../src/vendor.c:104
+msgid "ApplyVendor()"
+msgstr "ApplyVendor()"
+
+#: ../src/vendor.c:107
+msgid "Applies the currently loaded vendor drill table to the current design."
+msgstr ""
+"Aplica o atualmente na memória tabela de perfuração de fornecedor para o "
+"desenho atual."
+
+#. ************************************************************
+#: ../src/vendor.c:128
+msgid "ToggleVendor()"
+msgstr "ToggleVendor()"
+
+#: ../src/vendor.c:131
+msgid "Toggles the state of automatic drill size mapping."
+msgstr "Muda o estado do mapeamento automático de tamanho de perfuração."
+
+#. ************************************************************
+#: ../src/vendor.c:159
+msgid "EnableVendor()"
+msgstr "EnableVendor()"
+
+#: ../src/vendor.c:162
+msgid "Enables automatic drill size mapping."
+msgstr "Habilita mapeamento automático de tamanho de perfuração."
+
+#. ************************************************************
+#: ../src/vendor.c:187
+msgid "DisableVendor()"
+msgstr "DisableVendor()"
+
+#: ../src/vendor.c:190
+msgid "Disables automatic drill size mapping."
+msgstr "Desabilita mapeamento automático de perfuração."
+
+#. ************************************************************
+#: ../src/vendor.c:213
+msgid "UnloadVendor()"
+msgstr "UnloadVendor()"
+
+#: ../src/vendor.c:216
+msgid "Unloads the current vendor drill mapping table."
+msgstr ""
+"Remove da memória a atual tabela de mapeamento de perfuração de fornecedor."
+
+#. ************************************************************
+#: ../src/vendor.c:245
+msgid "LoadVendorFrom(filename)"
+msgstr "LoadVendorFrom(nomearquivo)"
+
+#: ../src/vendor.c:248
+msgid "Loads the specified vendor resource file."
+msgstr "Colocar na memória arquivo de recursos de fornecedor."
+
+#: ../src/vendor.c:281
+msgid "Load Vendor Resource File..."
+msgstr "Colocar na Memória Arquivo de Recursos de Fornecedor..."
+
+#: ../src/vendor.c:282
+msgid ""
+"Picks a vendor resource file to load.\n"
+"This file can contain drc settings for a\n"
+"particular vendor as well as a list of\n"
+"predefined drills which are allowed."
+msgstr ""
+"Escolhe um arquivo de recursos de fornecedor para a memória.\n"
+"Esse arquivo pode conter ajustes de DRC para um\n"
+"fornecedor em particular bem com uma lista de\n"
+"orifícios pré-definidos que são permitidos."
+
+#: ../src/vendor.c:315
+#, c-format
+msgid "Could not load vendor resource file \"%s\"\n"
+msgstr "Não posso carregar o arquivo de recurso do fornecedor \"%s\"\n"
+
+#: ../src/vendor.c:342
+#, c-format
+msgid "\"%s\" is not a supported units.  Defaulting to inch\n"
+msgstr "\"%s\" é um tipo de roteamento inválido.  Padronizando em polegada\n"
+
+#: ../src/vendor.c:355
+msgid "No drillmap resource found\n"
+msgstr "Nenhum recurso de mapeamento de perfuração encontrado\n"
+
+#: ../src/vendor.c:372
+#, c-format
+msgid "\"%s\" is not a valid rounding type. Defaulting to up\n"
+msgstr "\"%s\" é um tipo de roteamento inválido.  Padronizando para cima\n"
+
+#: ../src/vendor.c:404 ../src/vendor.c:420
+#, c-format
+msgid "Set DRC minimum copper spacing to %.2f mils\n"
+msgstr "Ajuste DRC espaçamento mínimo entre trilhas para %.2f mils\n"
+
+#: ../src/vendor.c:412
+#, c-format
+msgid "Set DRC minimum copper overlap to %.2f mils\n"
+msgstr "Ajuste DRC sobreposição mínima entre trilhas para %.2f mils\n"
+
+#: ../src/vendor.c:428
+#, c-format
+msgid "Set DRC minimum silk width to %.2f mils\n"
+msgstr "Ajuste DRC de largura de seda mínima para %.2f mils\n"
+
+#: ../src/vendor.c:436
+#, c-format
+msgid "Set DRC minimum drill diameter to %.2f mils\n"
+msgstr "Ajuste DRC diâmetro mínimo de perfuração para %.2f mils\n"
+
+# annular is already ring shaped (pleonastic)
+#: ../src/vendor.c:444
+#, c-format
+msgid "Set DRC minimum annular ring to %.2f mils\n"
+msgstr "Ajuste DRC de largura mínima de auréola anular para %.2f mils\n"
+
+#: ../src/vendor.c:448
+#, c-format
+msgid "Loaded %d vendor drills from %s\n"
+msgstr "Colocado na memória %d perfurações de fornecedor de %s\n"
+
+#: ../src/vendor.c:449
+#, c-format
+msgid "Loaded %d RefDes skips, %d Value skips, %d Descr skips\n"
+msgstr ""
+"Colocado na memória %d RefDes ignorado, %d Value ignorado, %d Descr gnorado\n"
+
+#: ../src/vendor.c:494
+#, c-format
+msgid ""
+"Via at %.2f, %.2f not changed. Possible reasons:\n"
+"\t- pad size too small\n"
+"\t- new size would be too large or too small\n"
+msgstr ""
+"Via em %.2f, %.2f não modificada.  Possíveis razões:\n"
+"\t- tamanho de pastilha muito pequeno\n"
+"\t- novo tamanho pode ser muito grande ou muito pequeno\n"
+
+#: ../src/vendor.c:503
+#, c-format
+msgid "Locked via at %.2f, %.2f not changed.\n"
+msgstr "Via travada em %.2f, %.2f não modificada.\n"
+
+#: ../src/vendor.c:534
+#, c-format
+msgid ""
+"Pin %s (%s) at %.2f, %.2f (element %s, %s, %s) not changed.\n"
+"\tPossible reasons:\n"
+"\t- pad size too small\n"
+"\t- new size would be too large or too small\n"
+msgstr ""
+"Conector %s (%s) em %.2f, %.2f (componente %s, %s, %s) não modificado.\n"
+"\tPossíveis razões:\n"
+"\t- tamanho de pastilha muito pequeno\n"
+"\t- novo tamanho pode ser muito grande ou muito pequeno\n"
+
+#: ../src/vendor.c:548
+#, c-format
+msgid "Locked pin at %-6.2f, %-6.2f not changed.\n"
+msgstr "Conector travado em %-6.2f, %-6.2f não modificados.\n"
+
+#: ../src/vendor.c:558
+#, c-format
+msgid "Updated %d drill sizes out of %d total\n"
+msgstr "Atualizado %d tamanhos de perfuração fora do %d total\n"
+
+#: ../src/vendor.c:567
+#, c-format
+msgid "Adjusted active via hole size to be %6.2f mils\n"
+msgstr "Ajustado tamanho de orifíco de via ativa para ser %6.2f mils\n"
+
+#: ../src/vendor.c:580
+#, c-format
+msgid "Adjusted %s routing style via hole size to be %6.2f mils\n"
+msgstr ""
+"Ajustado %s o tamanho do orifício de via que consta no estilo de roteamento "
+"para %6.2f mils\n"
+
+#: ../src/vendor.c:589
+#, c-format
+msgid "Increased %s routing style via diameter to %6.2f mils\n"
+msgstr ""
+"Incrementado de %s o diâmetro da via que consta no estilo de roteamento para "
+"%6.2f mils\n"
+
+#: ../src/vendor.c:641
+#, c-format
+msgid ""
+"Vendor drill list does not contain a drill >= %6.2f mil\n"
+"Using %6.2f mil instead.\n"
+msgstr ""
+"Lista de orifíco do fornecedor não possui uma perfuração >= %6.2f mil\n"
+"Usando %6.2f mil.\n"
+
+#: ../src/vendor.c:698
+#, c-format
+msgid "realloc() failed to allocate %ld bytes\n"
+msgstr "realloc() falhou em alocar %ld bytes\n"
+
+#: ../src/vendor.c:760
+msgid "Error:  null skip value\n"
+msgstr "Error:  valor nulo desconsiderado\n"
+
+#: ../src/vendor.c:796
+#, c-format
+msgid "realloc() failed\n"
+msgstr "realloc() falhou\n"
+
+#: ../src/vendor.c:806
+#, c-format
+msgid "Ignored resource type = %d in skips= section\n"
+msgstr "Ignorado recurso tipo = %d em skips= seção\n"
+
+#: ../src/vendor.c:828
+#, c-format
+msgid "Vendor mapping skipped because refdes = %s matches %s\n"
+msgstr "Mapeamento de fornecedor ignorado porque refdes = %s coincide com %s\n"
+
+#: ../src/vendor.c:840
+#, c-format
+msgid "Vendor mapping skipped because value = %s matches %s\n"
+msgstr "Mapeamento de fornecedor ignorado porque valor = %s coincide com %s\n"
+
+#: ../src/vendor.c:855
+#, c-format
+msgid "Vendor mapping skipped because descr = %s matches %s\n"
+msgstr "Mapeamento de fornecedor ignorado porque descr = %s conincide com %s\n"
+
+#: ../src/vendor.c:864
+#, c-format
+msgid "Vendor mapping skipped because element %s is locked\n"
+msgstr ""
+"Mapeamento de fornecedor ignorado porque o componente %s está travado\n"
+
+#: ../src/vendor.c:933
+msgid "re_exec error\n"
+msgstr "erro de re_exec\n"
diff --git a/po/ru.po b/po/ru.po
index 0fa6ea8..66660fe 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -1,59 +1,64 @@
 # PCB PO template translation to Russian.
-# Copyright (C) 2009
+#
 # This file is distributed under the same license as the PCB package.
 #
-# Sergey Alyoshin <alyoshin.s at gmail.com>, 2009
+# Copyright (C)
+# Sergey Alyoshin <alyoshin.s at gmail.com>, 2009, 2014
+# Eugene Mikhantiev <mikhantiev at gmail.com>, 2012
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: pcb-git\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-05-23 14:25+0400\n"
-"PO-Revision-Date: 2010-04-12 23:34+0400\n"
+"POT-Creation-Date: 2014-01-25 15:30+0400\n"
+"PO-Revision-Date: 2014-01-25 17:07+0400\n"
 "Last-Translator: Sergey Alyoshin <alyoshin.s at gmail.com>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
 #: ../data/pcb.desktop.in.h:1
-msgid "Create and edit printed circuit board designs"
-msgstr "Создание и редактирование проектов печатных плат"
+msgid "PCB Designer"
+msgstr "Редактор PCB"
 
 #: ../data/pcb.desktop.in.h:2
 msgid "PCB Design"
 msgstr "Проект PCB"
 
 #: ../data/pcb.desktop.in.h:3
-msgid "PCB Designer"
-msgstr "Редактор PCB"
-
-#: ../data/pcb.xml.in.h:1 ../data/x-excellon.desktop.in.h:1
-msgid "Excellon drill file"
-msgstr "Файл сверловки Excellon"
+msgid "Create and edit printed circuit board designs"
+msgstr "Создание и редактирование проектов печатных плат"
 
-#: ../data/pcb.xml.in.h:2 ../data/x-gerber.desktop.in.h:1
-msgid "Gerber file"
-msgstr "Gerber-файл"
+#: ../data/pcb.xml.in.h:1 ../data/x-pcb-layout.desktop.in.h:1
+msgid "PCB layout"
+msgstr "PCB трассировка"
 
-#: ../data/pcb.xml.in.h:3 ../data/x-pcb-footprint.desktop.in.h:1
+#: ../data/pcb.xml.in.h:2 ../data/x-pcb-footprint.desktop.in.h:1
 msgid "PCB footprint"
 msgstr "PCB посадочное место"
 
-#: ../data/pcb.xml.in.h:4 ../data/x-pcb-layout.desktop.in.h:1
-msgid "PCB layout"
-msgstr "PCB трассировка"
-
-#: ../data/pcb.xml.in.h:5 ../data/x-pcb-netlist.desktop.in.h:1
+#: ../data/pcb.xml.in.h:3 ../data/x-pcb-netlist.desktop.in.h:1
 msgid "PCB netlist"
 msgstr "PCB список соединений"
 
-#: ../src/action.c:563
+#: ../data/pcb.xml.in.h:4 ../data/x-gerber.desktop.in.h:1
+msgid "Gerber file"
+msgstr "Gerber-файл"
+
+#: ../data/pcb.xml.in.h:5 ../data/x-excellon.desktop.in.h:1
+msgid "Excellon drill file"
+msgstr "Файл сверловки Excellon"
+
+#: ../src/action.c:550
 #, c-format
 msgid "Unknown stroke %s\n"
 msgstr "Неизвестный жест %s\n"
 
-#: ../src/action.c:760
+#: ../src/action.c:754
 #, c-format
 msgid "Error: function hash size too small (%d vs %lu at %s:%d)\n"
 msgstr ""
@@ -61,12 +66,12 @@ msgstr ""
 
 #. Change 'char' to 'int' and remove this when we get to 256
 #. strings to hash.
-#: ../src/action.c:768
+#: ../src/action.c:762
 #, c-format
 msgid "Error: function hash type too small (%d vs %lu at %s:%d)\n"
 msgstr "Ошибка: слишком маленький тип хеша функции (%d против %lu в %s:%d)\n"
 
-#: ../src/action.c:1022
+#: ../src/action.c:1016
 msgid ""
 "You must turn via visibility on before\n"
 "you can place vias\n"
@@ -74,49 +79,45 @@ msgstr ""
 "Необходимо включить отображение переходов\n"
 "перед тем как их размещать\n"
 
-#: ../src/action.c:1388 ../src/change.c:2273
+#: ../src/action.c:1381 ../src/change.c:2294
 msgid "Enter text:"
 msgstr "Текст:"
 
-#: ../src/action.c:1516 ../src/action.c:1575 ../src/action.c:1629
-#: ../src/action.c:3981 ../src/action.c:6689 ../src/move.c:490
-#: ../src/move.c:581 ../src/move.c:681 ../src/move.c:758 ../src/rotate.c:434
+#: ../src/action.c:1459 ../src/action.c:1602 ../src/action.c:1661
+#: ../src/action.c:1715 ../src/action.c:4064 ../src/action.c:6787
+#: ../src/move.c:477 ../src/move.c:568 ../src/move.c:666 ../src/move.c:740
+#: ../src/rotate.c:422
 msgid "Sorry, the object is locked\n"
 msgstr "Объект заблокирован\n"
 
-#: ../src/action.c:1766
-#, c-format
+#: ../src/action.c:1851
 msgid ""
-"Rules are minspace %d.%02d, minoverlap %d.%d minwidth %d.%02d, minsilk %d.%"
-"02d\n"
-"min drill %d.%02d, min annular ring %d.%02d\n"
+"%m+Rules are minspace %$mS, minoverlap %$mS minwidth %$mS, minsilk %$mS\n"
+"min drill %$mS, min annular ring %$mS\n"
 msgstr ""
-"Нормы: мин.зазор %d.%02d, мин.перекрытие %d.%d, мин.толщина %d.%02d,\n"
-"мин.шёлкография %d.%02d, мин.отверстие %d.%02d, мин.кольцо %d.%02d\n"
+"%m+Норма означает минимальные: зазор %$mS, перекрытие %$mS, \n"
+"толщину %$mS, шёлкографию %$mS, диаметр переходного отверстия %$mS, \n"
+"\tтолщину кольца перехода %$mS\n"
 
-#: ../src/action.c:1781
+#: ../src/action.c:1863
 msgid "No DRC problems found.\n"
 msgstr "Нарушений проектных норм не найдено.\n"
 
-#: ../src/action.c:1783
+#: ../src/action.c:1865
 #, c-format
 msgid "Found %d design rule errors.\n"
 msgstr "Найдено %d нарушений проектных норм.\n"
 
-#: ../src/action.c:1785
+#: ../src/action.c:1867
 #, c-format
 msgid "Aborted DRC after %d design rule errors.\n"
 msgstr "Проверка проектных норм прекращена после %d нарушений.\n"
 
-#: ../src/action.c:2154
-msgid "Don't combine metric/English grids like that!\n"
-msgstr "Не объединяйте таким образом метрические и дюймовые сетки!\n"
-
-#: ../src/action.c:2263
+#: ../src/action.c:2299
 msgid "Click on a connection"
 msgstr "Щёлкните на соединении"
 
-#: ../src/action.c:2757 ../src/action.c:7694
+#: ../src/action.c:2829 ../src/action.c:7976
 msgid "Click on an element"
 msgstr "Щёлкните на элементе"
 
@@ -124,11 +125,11 @@ msgstr "Щёлкните на элементе"
 #. * We deal with the case where name already exists in this
 #. * function so the GUI doesn't need to deal with it
 #.
-#: ../src/action.c:3195
+#: ../src/action.c:3278
 msgid "Save Renumber Annotation File As ..."
 msgstr "Сохранить файл аннотации перенумерации как..."
 
-#: ../src/action.c:3196
+#: ../src/action.c:3279
 msgid ""
 "Choose a file to record the renumbering to.\n"
 "This file may be used to back annotate the\n"
@@ -138,16 +139,16 @@ msgstr ""
 "Этот файл может быть использован для\n"
 "обратной аннотации изменений в схеме.\n"
 
-#: ../src/action.c:3221 ../src/action.c:6015 ../src/hid/gtk/gtkhid-main.c:1429
+#: ../src/action.c:3304 ../src/action.c:6109
 msgid "File exists!  Ok to overwrite?"
 msgstr "Файл существует! Перезаписать?"
 
-#: ../src/action.c:3231
+#: ../src/action.c:3314
 #, c-format
 msgid "Could not open %s\n"
 msgstr "Невозможно открыть %s\n"
 
-#: ../src/action.c:3820
+#: ../src/action.c:3901
 msgid ""
 "Auto-placement can NOT be undone.\n"
 "Do you want to continue anyway?\n"
@@ -155,52 +156,52 @@ msgstr ""
 "Авторазмещение не может быть отменено.\n"
 "Хотите продолжить?\n"
 
-#: ../src/action.c:4071 ../src/action.c:4140 ../src/action.c:4504
-#: ../src/action.c:4592 ../src/action.c:4647 ../src/action.c:4725
-#: ../src/action.c:4788 ../src/action.c:4848 ../src/action.c:4909
-#: ../src/action.c:4969 ../src/action.c:5032 ../src/action.c:5097
-#: ../src/action.c:5161 ../src/action.c:5211 ../src/action.c:6458
-#: ../src/action.c:7888
+#: ../src/action.c:4152 ../src/action.c:4222 ../src/action.c:4585
+#: ../src/action.c:4673 ../src/action.c:4727 ../src/action.c:4803
+#: ../src/action.c:4864 ../src/action.c:4922 ../src/action.c:4981
+#: ../src/action.c:5039 ../src/action.c:5100 ../src/action.c:5163
+#: ../src/action.c:5225 ../src/action.c:5273 ../src/action.c:6557
+#: ../src/action.c:8177
 msgid "Select an Object"
 msgstr "Выберите объект"
 
-#: ../src/action.c:4542 ../src/action.c:5824
+#: ../src/action.c:4623 ../src/action.c:5920
 msgid "Enter the layout name:"
 msgstr "Название трассировки:"
 
-#: ../src/action.c:4549
+#: ../src/action.c:4631
 msgid "Enter the layer name:"
 msgstr "Название слоя:"
 
-#: ../src/action.c:5317 ../src/action.c:5500
+#: ../src/action.c:5384 ../src/action.c:5580
 msgid "Enter pattern:"
 msgstr "Посадочное место:"
 
-#: ../src/action.c:5387
+#: ../src/action.c:5467
 msgid "Select the Element's Mark Location"
 msgstr "Выберите расположение отметки элемента"
 
-#: ../src/action.c:5776
+#: ../src/action.c:5875
 msgid "OK to override layout data?"
 msgstr "Заменить данные трассировки?"
 
-#: ../src/action.c:5791
+#: ../src/action.c:5890
 msgid "OK to override changes?"
 msgstr "Заменить изменения?"
 
-#: ../src/action.c:5819
+#: ../src/action.c:5915
 msgid "OK to clear layout data?"
 msgstr "Удалить данные трассировки?"
 
-#: ../src/action.c:5981
+#: ../src/action.c:6075
 msgid "Buffer has no elements!\n"
 msgstr "В буфере нет элементов!\n"
 
-#: ../src/action.c:5987
+#: ../src/action.c:6081
 msgid "Save Paste Buffer As ..."
 msgstr "Сохранить буфер обмена как..."
 
-#: ../src/action.c:5988
+#: ../src/action.c:6082
 msgid ""
 "Choose a file to save the contents of the\n"
 "paste buffer to.\n"
@@ -208,100 +209,116 @@ msgstr ""
 "Выберите файл для сохранения содержимого\n"
 "буфера обмена\n"
 
-#: ../src/action.c:6411
+#: ../src/action.c:6511
 msgid "Nothing found under crosshair\n"
 msgstr "Под курсором ничего не найдено\n"
 
-#: ../src/action.c:6673
+#: ../src/action.c:6772
 #, c-format
 msgid "%s():  Flag \"%s\" is not valid\n"
-msgstr "%s(): флаг \"%s\" не действителен\n"
+msgstr "%s(): флаг «%s» не действителен\n"
 
-#: ../src/action.c:6768
+#: ../src/action.c:6864
 #, c-format
 msgid "Could not open actions file \"%s\".\n"
-msgstr "Невозможно открыть файл действий \"%s\".\n"
+msgstr "Невозможно открыть файл действий «%s».\n"
 
-#: ../src/action.c:7073
+#: ../src/action.c:7220
 #, c-format
 msgid "Cannot change attribute of %s - element not found\n"
 msgstr "Невозможно изменить атрибут для %s — элемент не найден\n"
 
 #. error
-#: ../src/action.c:7206
+#: ../src/action.c:7288
 msgid "Cannot fork!"
 msgstr "Невозможно создать дочерний процесс!"
 
-#: ../src/action.c:7353
+#: ../src/action.c:7443
 #, c-format
 msgid "%s():  Unable to determine temp directory name from the temp file\n"
 msgstr ""
 "%s(): невозможно определить название временного каталога по названию "
 "временного файла\n"
 
-#: ../src/action.c:7376
+#: ../src/action.c:7466
 #, c-format
 msgid "Failed to unlink \"%s\"\n"
-msgstr "Невозможно удалить \"%s\"\n"
+msgstr "Невозможно удалить «%s»\n"
+
+#: ../src/action.c:7618
+msgid "Enter dispersion:"
+msgstr "Разброс:"
 
-#: ../src/action.c:7475 ../src/action.c:7537
+#: ../src/action.c:7644
+msgid "Click on a location"
+msgstr "Щёлкните на расположении"
+
+#: ../src/action.c:7667
+msgid "Bad syntax for Import(setnewpoint)"
+msgstr "Неверный синтаксис для Import(setnewpoint)"
+
+#: ../src/action.c:7756 ../src/action.c:7819
 msgid "Could not create temp file"
 msgstr "Невозможно создать временный файл"
 
-#: ../src/action.c:7591
+#: ../src/action.c:7873
 #, c-format
 msgid "Unknown import mode: %s\n"
 msgstr "Неизвестный режим импорта: %s\n"
 
-#: ../src/action.c:7635
+#: ../src/action.c:7917
 msgid "This GUI doesn't support Attribute Editing\n"
 msgstr "Этот графический интерфейс не поддерживает редактирование атрибутов\n"
 
-#: ../src/action.c:7662
+#: ../src/action.c:7944
 #, c-format
 msgid "No layer named %s\n"
 msgstr "Нет слоя с названием %s\n"
 
-#: ../src/action.c:7688
+#: ../src/action.c:7970
 msgid "Too many elements selected\n"
 msgstr "Выбрано слишком много элементов\n"
 
-#: ../src/action.c:7701
+#: ../src/action.c:7983
 msgid "No element found there\n"
 msgstr "Элемент не найден\n"
 
-#: ../src/action.c:7798
+#: ../src/action.c:8087
 msgid "Click on Object or Flip Point"
 msgstr "Щёлкните на объекте или точке перестановки"
 
-#: ../src/action.c:7870
+#: ../src/action.c:8159
 msgid "Select item to use attributes from"
 msgstr "Выберите элемент для использования его атрибутов"
 
-#: ../src/autoplace.c:776 ../src/rats.c:691 ../src/rats.c:785
+#: ../src/autoplace.c:766 ../src/rats.c:739 ../src/rats.c:831
 msgid "Can't add rat lines because no netlist is loaded.\n"
 msgstr ""
 "Невозможно добавить соединения, так как список соединений не загружен.\n"
 
-#: ../src/autoplace.c:783
+#: ../src/autoplace.c:773
 msgid "No elements selected to autoplace.\n"
 msgstr "Элементы для авторазмещения не выбраны.\n"
 
-#: ../src/buffer.c:933
+#: ../src/autoroute.c:4888
+msgid "Autorouting tracks"
+msgstr "Автотрассировка соединений"
+
+#: ../src/buffer.c:845
 msgid "Error!  Buffer doesn't contain a single element\n"
 msgstr "Ошибка! В буфере нет ни одного элемента\n"
 
-#: ../src/buffer.c:1148
+#: ../src/buffer.c:1020
 msgid ""
 "Warning: All of the pads are on the opposite\n"
 "side from the component - that's probably not what\n"
 "you wanted\n"
 msgstr ""
 "Предупреждение: все площадки расположены на\n"
-"противоположной стороне от компонента, вероятно,\n"
-"вы этого не хотите\n"
+"противоположной стороне от компонента.\n"
+"Вероятно, это не то, что вам нужно.\n"
 
-#: ../src/buffer.c:1180
+#: ../src/buffer.c:1099
 msgid ""
 "There was nothing to convert!\n"
 "Elements must have some silk, pads or pins.\n"
@@ -309,7 +326,7 @@ msgstr ""
 "Преобразовывать нечего!\n"
 "Элементы должны содержать шёлкографию, площадки или выводы.\n"
 
-#: ../src/buffer.c:1185
+#: ../src/buffer.c:1104
 msgid ""
 "There were polygons that can't be made into pins!\n"
 "So they were not included in the element\n"
@@ -317,15 +334,15 @@ msgstr ""
 "Есть полигоны, которые не могут быть преобразованы в выводы!\n"
 "Поэтому они не включены в элемент\n"
 
-#: ../src/buffer.c:1478
+#: ../src/buffer.c:1407
 msgid "You can't mirror a buffer that has elements!\n"
 msgstr "Невозможно отразить буфер содержащий элементы!\n"
 
-#: ../src/buffer.c:1486
+#: ../src/buffer.c:1415
 msgid "You can't mirror a buffer that has text!\n"
 msgstr "Невозможно отразить буфер содержащий текст!\n"
 
-#: ../src/change.c:753
+#: ../src/change.c:758
 msgid ""
 "To change the clearance of objects in a polygon, change the objects, not the "
 "polygon.\n"
@@ -337,94 +354,103 @@ msgstr ""
 "Замечание: для установки минимального отступа для группы объектов, выберите "
 "их все и выполните :MinClearGap(Selected,=10,mil)"
 
-#: ../src/change.c:1046
+#: ../src/change.c:1051
 #, c-format
 msgid "Error: The name \"%s\" is not unique!\n"
-msgstr "Ошибка: название \"%s\" не является уникальным!\n"
+msgstr "Ошибка: название «%s» не является уникальным!\n"
 
-#: ../src/change.c:2253
+#: ../src/change.c:2274
 msgid "Linename:"
 msgstr "Назв. линии:"
 
-#: ../src/change.c:2258
+#: ../src/change.c:2279
 msgid "Vianame:"
 msgstr "Название перехода:"
 
-#: ../src/change.c:2263
+#: ../src/change.c:2284
 #, c-format
 msgid "%s Pin Name:"
 msgstr "%s название вывода:"
 
-#: ../src/change.c:2268
+#: ../src/change.c:2289
 #, c-format
 msgid "%s Pad Name:"
 msgstr "%s название конт. площадки:"
 
-#: ../src/change.c:2278
+#: ../src/change.c:2299
 msgid "Elementname:"
 msgstr "Назв. элемента:"
 
-#: ../src/create.c:240
-#, c-format
+#: ../src/create.c:250
 msgid ""
-"Dropping via at (%d, %d) because it would overlap with the via at (%d, %d)\n"
+"%m+Dropping via at %$mD because it's hole would overlap with the via at %"
+"$mD\n"
 msgstr ""
-"Переход не будет установлен в (%d, %d), так как он перекрывается с переходом "
-"в (%d, %d)\n"
+"%m+Переход не будет установлен в %$mD, так как он перекрывается с переходом "
+"в %$mD\n"
 
-#: ../src/create.c:261
-#, c-format
-msgid "Mapped via drill hole to %.2f mils from %.2f mils per vendor table\n"
+#: ../src/create.c:271
+msgid "%m+Mapped via drill hole to %$mS from %$mS per vendor table\n"
 msgstr ""
-"Переходное отверстие преобразовано в %.2f мил из %.2f мил по карте "
+"%m+Переходное отверстие преобразовано в %$mS из %$mS по карте "
 "производственных отверстий\n"
 
-#: ../src/create.c:279
-#, c-format
-msgid ""
-"Increased via thickness to %.2f mils to allow enough copper at (%.2f,%.2f).\n"
-msgstr "Толщина перехода увеличена до %.2f мил для проводника в (%.2f,%.2f).\n"
+#: ../src/create.c:289
+msgid "%m+Increased via thickness to %$mS to allow enough copper at %$mD.\n"
+msgstr "%m+Толщина перехода увеличена до %$mS для проводника в %$mD\n"
 
-#: ../src/create.c:797
-#, c-format
+#: ../src/create.c:811
 msgid ""
-"Did not map pin #%s (%s) drill hole because %6.2f mil is below the minimum "
+"%m+Did not map pin #%s (%s) drill hole because %$mS is below the minimum "
 "allowed size\n"
 msgstr ""
-"Отверстие вывода №%s (%s) не преобразовано, так как оно меньше минимально "
-"допустимого на %6.2f мил\n"
+"%m+Отверстие вывода №%s (%s) не преобразовано, так как оно меньше минимально "
+"допустимого на %$mS\n"
 
-#: ../src/create.c:805
-#, c-format
+#: ../src/create.c:817
 msgid ""
-"Did not map pin #%s (%s) drill hole because %6.2f mil is above the maximum "
+"%m+Did not map pin #%s (%s) drill hole because %$mS is above the maximum "
 "allowed size\n"
 msgstr ""
-"Отверстие вывода №%s (%s) не преобразовано, так как оно больше максимально "
-"допустимого на %6.2f мил\n"
+"%m+Отверстие вывода №%s (%s) не преобразовано, так как оно больше максимально "
+"допустимого на %$mS\n"
 
-#: ../src/create.c:814
-#, c-format
+#: ../src/create.c:824
 msgid ""
-"Did not map pin #%s (%s) drill hole because %6.2f mil does not leave enough "
+"%m+Did not map pin #%s (%s) drill hole because %$mS does not leave enough "
 "copper\n"
 msgstr ""
-"Отверстие вывода №%s (%s) не преобразовано, так как %6.2f мил не достаточно "
+"%m+Отверстие вывода №%s (%s) не преобразовано, так как %$mS не достаточно "
 "для проводника\n"
 
-#: ../src/create.c:828
-#, c-format
-msgid "Mapped pin drill hole to %.2f mils from %.2f mils per vendor table\n"
+#: ../src/create.c:836
+msgid "%m+Mapped pin drill hole to %$mS from %$mS per vendor table\n"
 msgstr ""
-"Отверстие вывода преобразовано в %.2f мил из %.2f мил по карте "
+"%m+Отверстие вывода преобразовано в %$mS из %$mS по карте "
 "производственных отверстий\n"
 
-#: ../src/create.c:935
+#: ../src/create.c:941
 #, c-format
 msgid "Can't find font-symbol-file '%s'\n"
 msgstr "Невозможно найти файл символов шрифта '%s'\n"
 
-#: ../src/error.c:109 ../src/error.c:113
+#: ../src/crosshair.c:759
+msgid ""
+"WARNING: A plugin is using the deprecated API HideCrosshair().\n"
+"         This API may be removed in a future release of PCB.\n"
+msgstr ""
+"ПРЕДУПРЕЖДЕНИЕ: плагин использует устаревший API HideCrosshair().\n"
+"         Эта функция может быть удалена в будущих выпусках PCB.\n"
+
+#: ../src/crosshair.c:774
+msgid ""
+"WARNING: A plugin is using the deprecated API RestoreCrosshair().\n"
+"         This API may be removed in a future release of PCB.\n"
+msgstr ""
+"ПРЕДУПРЕЖДЕНИЕ: плагин использует устаревший API RestoreCrosshair().\n"
+"         Эта функция может быть удалена в будущих выпусках PCB.\n"
+
+#: ../src/error.c:104 ../src/error.c:108
 #, c-format
 msgid ""
 "Can't open file\n"
@@ -435,7 +461,7 @@ msgstr ""
 "   '%s'\n"
 "Функция fopen() возвратила: '%s'\n"
 
-#: ../src/error.c:129 ../src/error.c:133
+#: ../src/error.c:124 ../src/error.c:128
 #, c-format
 msgid ""
 "Can't execute command\n"
@@ -446,7 +472,7 @@ msgstr ""
 "   '%s'\n"
 "Функция popen() возвратила: '%s'\n"
 
-#: ../src/error.c:149 ../src/error.c:153
+#: ../src/error.c:144 ../src/error.c:148
 #, c-format
 msgid ""
 "Can't scan directory\n"
@@ -457,7 +483,7 @@ msgstr ""
 "   '%s'\n"
 "Функция opendir() возвратила: '%s'\n"
 
-#: ../src/error.c:169 ../src/error.c:173
+#: ../src/error.c:164 ../src/error.c:168
 #, c-format
 msgid ""
 "Can't change working directory to\n"
@@ -468,39 +494,60 @@ msgstr ""
 "   '%s'\n"
 "Функция chdir() возвратила: '%s'\n"
 
-#: ../src/file.c:226
+#: ../src/file.c:264
 #, c-format
 msgid "File '%s' exists, use anyway?"
 msgstr "Файл '%s' существует, всё равно использовать?"
 
 #. not used
 #. CheckAndOpenFile deals with the case where fname already exists
-#: ../src/file.c:268
+#: ../src/file.c:306
 msgid "Save Connection Data As ..."
 msgstr "Сохранить данные соединений как..."
 
-#: ../src/file.c:269
+#: ../src/file.c:307
 msgid "Choose a file to save all connection data to."
 msgstr "Выберите файл для сохранения данных соединений."
 
-#: ../src/file.c:384
+#: ../src/file.c:427
 #, c-format
 msgid "File '%s' has no font information, using default font\n"
 msgstr ""
 "Файл '%s' не содержит информации о шрифте, используется шрифт по умолчанию\n"
 
-#: ../src/file.c:970
+#: ../src/file.c:1022
 #, c-format
 msgid "Trying to save your layout in '%s'\n"
 msgstr "Попытка сохранить трассировку в '%s'\n"
 
+#: ../src/file.c:1186
+msgid ""
+"LoadNewlibFootprintsFromDir: Could not determine initial working directory\n"
+msgstr ""
+"LoadNewlibFootprintsFromDir: невозможно определить начальный рабочий "
+"каталог\n"
+
+#: ../src/file.c:1204
+msgid ""
+"LoadNewlibFootprintsFromDir: Could not determine new working directory\n"
+msgstr ""
+"LoadNewlibFootprintsFromDir: невозможно определить новый рабочий каталог\n"
+
+#: ../src/file.c:1312
+msgid "ParseLibraryTree: Could not determine initial working directory\n"
+msgstr "ParseLibraryTree: невозможно определить начальный рабочий каталог\n"
+
+#: ../src/file.c:1347
+msgid "ParseLibraryTree: Could not determine new working directory\n"
+msgstr "ParseLibraryTree: невозможно определить новый рабочий каталог\n"
+
 #. nothing to do
-#: ../src/file.c:1438
+#: ../src/file.c:1539
 #, c-format
 msgid "Importing PCB netlist %s\n"
 msgstr "Импорт списка соединений PCB %s\n"
 
-#: ../src/file.c:1476
+#: ../src/file.c:1577
 #, c-format
 msgid ""
 "Line length (%i) exceeded in netlist file.\n"
@@ -509,76 +556,74 @@ msgstr ""
 "Длина строки (%i) превышена в файле списка соединений.\n"
 "Дополнительные символы будут проигнорированы.\n"
 
-#: ../src/file.c:1530
+#: ../src/file.c:1631
 msgid "Empty netlist file!\n"
 msgstr "Пустой файл списка соединений!\n"
 
-#: ../src/file.c:1571
+#: ../src/file.c:1671
 #, c-format
 msgid "Importing edif netlist %s\n"
 msgstr "Импорт списка соединений edif %s\n"
 
-#: ../src/find.c:248
-#, c-format
-msgid "near (%.*f, %.*f)\n"
-msgstr "в области (%.*f, %.*f)\n"
+#: ../src/find.c:201
+msgid "%m+near %$mD\n"
+msgstr "%m+около %$mD\n"
 
-#: ../src/find.c:256
+#: ../src/find.c:209
 #, c-format
 msgid "WARNING!  Design Rule error - %s\n"
-msgstr "ПРЕДУПРЕЖДЕНИЕ! Ошибка проектной нормы - %s\n"
+msgstr "ПРЕДУПРЕЖДЕНИЕ! Ошибка проектной нормы — %s\n"
 
-#: ../src/find.c:257
-#, c-format
-msgid "near location (%.*f, %.*f)\n"
-msgstr "в области (%.*f, %.*f)\n"
+#: ../src/find.c:210
+msgid "%m+near location %$mD\n"
+msgstr "%m+около расположения %$mD\n"
 
 #.
 #. * message when asked about continuing DRC checks after next
 #. * violation is found.
 #.
-#: ../src/find.c:266
+#: ../src/find.c:219
 msgid "Press Next to continue DRC checking"
 msgstr "Нажмите Далее для продолжения проверки проектных норм"
 
-#: ../src/find.c:267
+#: ../src/find.c:220
 msgid "Next"
 msgstr "Далее"
 
-#: ../src/find.c:268 ../src/gpcb-menu.res:522 ../src/pcb-menu.res:186
+#: ../src/find.c:221 ../src/gpcb-menu.res:518 ../src/pcb-menu.res:183
 msgid "Cancel"
 msgstr "Отмена"
 
-#: ../src/find.c:951
+#: ../src/find.c:854
 #, c-format
-msgid "bad layer number %d max_layer=%d in find.c\n"
-msgstr "неверный номер слоя %d, max_layer=%d в find.c\n"
+msgid "bad layer number %d max_copper_layer=%d in find.c\n"
+msgstr "неверный номер слоя %d, max_copper_layer=%d в find.c\n"
 
-#: ../src/find.c:998
+#: ../src/find.c:896
 msgid "WARNING: Hole too close to pin.\n"
 msgstr "ПРЕДУПРЕЖДЕНИЕ: отверстие слишком близко к выводу.\n"
 
-#: ../src/find.c:1000
+#: ../src/find.c:898
 msgid "WARNING: Hole too close to via.\n"
 msgstr "ПРЕДУПРЕЖДЕНИЕ: отверстие слишком близко к переходу.\n"
 
-#: ../src/find.c:1064
+#: ../src/find.c:967
 msgid "WARNING: Hole too close to line.\n"
 msgstr "ПРЕДУПРЕЖДЕНИЕ: отверстие слишком близко к трассе.\n"
 
-#: ../src/find.c:1084
+#: ../src/find.c:987
 msgid "WARNING: Hole too close to pad.\n"
 msgstr "ПРЕДУПРЕЖДЕНИЕ: отверстие слишком близко к площадке.\n"
 
-#: ../src/find.c:1104
+#: ../src/find.c:1007
 msgid "WARNING: Hole touches arc.\n"
 msgstr "ПРЕДУПРЕЖДЕНИЕ: отверстие касается дуги.\n"
 
-#: ../src/find.c:3685
+#: ../src/find.c:3369
 msgid "Potential for broken trace"
 msgstr "Возможность разрыва трассы"
 
-#: ../src/find.c:3686
+#: ../src/find.c:3370
 msgid ""
 "Insufficient overlap between objects can lead to broken tracks\n"
 "due to registration errors with old wheel style photo-plotters."
@@ -586,11 +631,11 @@ msgstr ""
 "Недостаточное перекрытие между объектами может привести к разрывам трасс\n"
 "из-за ошибок совмещения на старых апертурных фото-плоттерах."
 
-#: ../src/find.c:3743
+#: ../src/find.c:3422
 msgid "Copper areas too close"
 msgstr "Области заливки слишком близко"
 
-#: ../src/find.c:3744 ../src/find.c:3888
+#: ../src/find.c:3423 ../src/find.c:3542
 msgid ""
 "Circuits that are too close may bridge during imaging, etching,\n"
 "plating, or soldering processes resulting in a direct short."
@@ -598,31 +643,31 @@ msgstr ""
 "Элементы, расположенные слишком близко, могут быть закорочены в\n"
 "процессе формирования изображения, травления, металлизации или пайки."
 
-#: ../src/find.c:3833
+#: ../src/find.c:3487
 msgid "Line with insufficient clearance inside polygon\n"
 msgstr "Трасса в полигоне с недостаточным отступом\n"
 
-#: ../src/find.c:3842
+#: ../src/find.c:3496
 msgid "Arc with insufficient clearance inside polygon\n"
 msgstr "Дуга в полигоне с недостаточным отступом\n"
 
-#: ../src/find.c:3852
+#: ../src/find.c:3506
 msgid "Pad with insufficient clearance inside polygon\n"
 msgstr "Площадка в полигоне с недостаточным отступом\n"
 
-#: ../src/find.c:3861
+#: ../src/find.c:3515
 msgid "Pin with insufficient clearance inside polygon\n"
 msgstr "Вывод в полигоне с недостаточным отступом\n"
 
-#: ../src/find.c:3870
+#: ../src/find.c:3524
 msgid "Via with insufficient clearance inside polygon\n"
 msgstr "Переход в полигоне с недостаточным отступом\n"
 
-#: ../src/find.c:4010
+#: ../src/find.c:3666
 msgid "Line width is too thin"
 msgstr "Толщина трассы слишком мала"
 
-#: ../src/find.c:4011 ../src/find.c:4055
+#: ../src/find.c:3667 ../src/find.c:3711
 msgid ""
 "Process specifications dictate a minimum feature-width\n"
 "that can reliably be reproduced"
@@ -630,15 +675,15 @@ msgstr ""
 "Технологический процесс определяет минимальный размер\n"
 "топологии, который может быть создан"
 
-#: ../src/find.c:4054
+#: ../src/find.c:3710
 msgid "Arc width is too thin"
 msgstr "Толщина дуги слишком мала"
 
-#: ../src/find.c:4099
+#: ../src/find.c:3755
 msgid "Pin annular ring too small"
 msgstr "Кольцо вывода слишком мало"
 
-#: ../src/find.c:4100 ../src/find.c:4222
+#: ../src/find.c:3756 ../src/find.c:3876
 msgid ""
 "Annular rings that are too small may erode during etching,\n"
 "resulting in a broken connection"
@@ -646,20 +691,20 @@ msgstr ""
 "Слишком малые кольца могут быть искажены при травлении,\n"
 "что приведёт к повреждению соединения"
 
-#: ../src/find.c:4133
+#: ../src/find.c:3787
 msgid "Pin drill size is too small"
 msgstr "Размер отверстия вывода слишком мал"
 
-#: ../src/find.c:4134 ../src/find.c:4256
+#: ../src/find.c:3788 ../src/find.c:3908
 msgid "Process rules dictate the minimum drill size which can be used"
 msgstr ""
 "Нормы процесса изготовления задают минимально возможный размер отверстия"
 
-#: ../src/find.c:4176
+#: ../src/find.c:3830
 msgid "Pad is too thin"
 msgstr "Толщина площадки слишком мала"
 
-#: ../src/find.c:4177
+#: ../src/find.c:3831
 msgid ""
 "Pads which are too thin may erode during etching,\n"
 "resulting in a broken or unreliable connection"
@@ -667,19 +712,19 @@ msgstr ""
 "Слишком узкие площадки могут быть разрушены при травлении,\n"
 "что приведёт к отсутствию соединения или к ненадёжному соединению"
 
-#: ../src/find.c:4221
+#: ../src/find.c:3875
 msgid "Via annular ring too small"
 msgstr "Кольцо перехода слишком мало"
 
-#: ../src/find.c:4255
+#: ../src/find.c:3907
 msgid "Via drill size is too small"
 msgstr "Переходное отверстие слишком мало"
 
-#: ../src/find.c:4303
+#: ../src/find.c:3950
 msgid "Silk line is too thin"
 msgstr "Толщина линии шёлкографии слишком мала"
 
-#: ../src/find.c:4304
+#: ../src/find.c:3951
 msgid ""
 "Process specifications dictate a minimum silkscreen feature-width\n"
 "that can reliably be reproduced"
@@ -687,12 +732,12 @@ msgstr ""
 "Технологический процесс определяет минимальную толщину шёлкографии,\n"
 "которая может быть нанесена"
 
-#: ../src/find.c:4358
+#: ../src/find.c:4002
 #, c-format
 msgid "Element %s has %i silk lines which are too thin"
 msgstr "Элемент %s содержит %i слишком тонких линий шёлкографии"
 
-#: ../src/find.c:4369
+#: ../src/find.c:4013
 msgid ""
 "Process specifications dictate a minimum silkscreen\n"
 "feature-width that can reliably be reproduced"
@@ -700,2162 +745,2354 @@ msgstr ""
 "Технологический процесс определяет минимальную\n"
 "толщину линии шёлкографии, которая может быть нанесена"
 
-#: ../src/find.c:4409
+#: ../src/find.c:4051
 #, c-format
-msgid "Warning:  %d pad%s the nopaste flag set.\n"
-msgstr "Предупреждение: для %d площадок%s установлен флаг nopaste.\n"
+msgid "Warning: %d pad has the nopaste flag set.\n"
+msgid_plural "Warning: %d pads have the nopaste flag set.\n"
+msgstr[0] "Предупреждение: для %d площадок установлен флаг nopaste.\n"
+msgstr[1] "Предупреждение: для %d площадки установлен флаг nopaste.\n"
+msgstr[2] "Предупреждение: для %d площадок установлен флаг nopaste.\n"
 
-#: ../src/gpcb-menu.res:63 ../src/pcb-menu.res:46
-msgid " a single element"
-msgstr " единственного элемента"
+#: ../src/find.c:4148
+#, c-format
+msgid "Internal error in BuildObjectList: unknown object type %i\n"
+msgstr "Внутренняя ошибка в BuildObjectList: неизвестный тип объекта %i\n"
 
-#: ../src/gpcb-menu.res:64 ../src/pcb-menu.res:47
-msgid " all elements"
-msgstr " всех элементов"
+#: ../src/gpcb-menu.res:56
+msgid "File"
+msgstr "Файл"
 
-#: ../src/gpcb-menu.res:65 ../src/pcb-menu.res:48
-msgid " unused pins"
-msgstr " неиспользуемые выводы"
+#: ../src/gpcb-menu.res:57
+msgid "New"
+msgstr "Новый"
 
-#: ../src/gpcb-menu.res:303 ../src/pcb-menu.res:284
-msgid "#1"
-msgstr "№ 1"
+#: ../src/gpcb-menu.res:57 ../src/pcb-menu.res:51
+msgid "Ctrl-N"
+msgstr "Ctrl-N"
 
-#: ../src/gpcb-menu.res:304 ../src/pcb-menu.res:285
-msgid "#2"
-msgstr "№ 2"
+#: ../src/gpcb-menu.res:57 ../src/pcb-menu.res:51
+msgid "Ctrl<Key>n"
+msgstr "Ctrl<Key>n"
 
-#: ../src/gpcb-menu.res:305 ../src/pcb-menu.res:286
-msgid "#3"
-msgstr "№ 3"
+#: ../src/gpcb-menu.res:58
+msgid "Open..."
+msgstr "Открыть..."
 
-#: ../src/gpcb-menu.res:306 ../src/pcb-menu.res:287
-msgid "#4"
-msgstr "№ 4"
+#: ../src/gpcb-menu.res:58
+msgid "Load a layout from a file"
+msgstr "Загрузить трассировку из файла"
 
-#: ../src/gpcb-menu.res:307 ../src/pcb-menu.res:288
-msgid "#5"
-msgstr "№ 5"
+#: ../src/gpcb-menu.res:60 ../src/hid/gtk/gui-config.c:1979
+msgid "Save"
+msgstr "Сохранить"
 
-#: ../src/gpcb-menu.res:202 ../src/pcb-menu.res:194
-msgid "'All-direction' lines"
-msgstr "Линии любого направления"
+#: ../src/gpcb-menu.res:60
+msgid "Saves current layout"
+msgstr "Сохранить текущую трассировку"
 
-#: ../src/gpcb-menu.res:202 ../src/pcb-menu.res:194
-msgid "."
-msgstr "."
+#: ../src/gpcb-menu.res:60 ../src/pcb-menu.res:33
+msgid "Ctrl-S"
+msgstr "Ctrl-S"
 
-#: ../src/gpcb-menu.res:441 ../src/pcb-menu.res:409
-msgid "/"
-msgstr "/"
+#: ../src/gpcb-menu.res:60 ../src/pcb-menu.res:33
+msgid "Ctrl<Key>s"
+msgstr "Ctrl<Key>s"
 
-#: ../src/gpcb-menu.res:139 ../src/pcb-menu.res:107
-msgid "0.01 mm"
-msgstr "0.01 мм"
+#: ../src/gpcb-menu.res:61
+msgid "Save As..."
+msgstr "Сохранить как..."
 
-#: ../src/gpcb-menu.res:140 ../src/pcb-menu.res:108
-msgid "0.05 mm"
-msgstr "0.05 мм"
+#: ../src/gpcb-menu.res:61
+msgid "Saves current layout into a new file"
+msgstr "Сохранить текущую трассировку в новый файл"
 
-#: ../src/gpcb-menu.res:131 ../src/pcb-menu.res:99
-msgid "0.1 mil"
-msgstr "0.1 мил"
+#: ../src/gpcb-menu.res:61 ../src/pcb-menu.res:34
+msgid "Shift Ctrl-S"
+msgstr "Shift Ctrl-S"
 
-#: ../src/gpcb-menu.res:141 ../src/pcb-menu.res:109
-msgid "0.1 mm"
-msgstr "0.1 мм"
+#: ../src/gpcb-menu.res:61 ../src/pcb-menu.res:34
+msgid "Shift Ctrl<Key>s"
+msgstr "Shift Ctrl<Key>s"
 
-#: ../src/gpcb-menu.res:142 ../src/pcb-menu.res:110
-msgid "0.25 mm"
-msgstr "0.25 мм"
+#: ../src/gpcb-menu.res:62 ../src/pcb-menu.res:35
+msgid "Revert"
+msgstr "Перезагрузить"
 
-#: ../src/gpcb-menu.res:143 ../src/pcb-menu.res:111
-msgid "0.5 mm"
-msgstr "0.5 мм"
+#: ../src/gpcb-menu.res:62
+msgid "Revert to the layout stored on disk"
+msgstr "Перезагрузить трассировку с диска"
 
-#: ../src/gpcb-menu.res:132 ../src/pcb-menu.res:100
-msgid "1 mil"
-msgstr "1 мил"
+#: ../src/gpcb-menu.res:64 ../src/pcb-menu.res:36
+msgid "Import Schematics"
+msgstr "Импортировать схему"
 
-#: ../src/gpcb-menu.res:144 ../src/pcb-menu.res:112
-msgid "1 mm"
-msgstr "1 мм"
+#. in case we have a dialog for loading a footprint file
+#: ../src/gpcb-menu.res:65 ../src/hid/gtk/gtkhid-main.c:1239
+#: ../src/hid/gtk/gui-dialog.c:292
+msgid "Load element to buffer"
+msgstr "Загрузить элемент в буфер"
 
-#: ../src/gpcb-menu.res:134 ../src/pcb-menu.res:102
-msgid "10 mil"
-msgstr "10 мил"
+#: ../src/gpcb-menu.res:66
+msgid "Load layout to buffer"
+msgstr "Загрузить трассировку в буфер"
 
-#: ../src/gpcb-menu.res:137 ../src/pcb-menu.res:105
-msgid "100 mil"
-msgstr "100 мил"
+#: ../src/gpcb-menu.res:67
+msgid "Load netlist"
+msgstr "Загрузить список соединений"
 
-#: ../src/gpcb-menu.res:135 ../src/pcb-menu.res:103
-msgid "25 mil"
-msgstr "25 мил"
+#: ../src/gpcb-menu.res:68 ../src/pcb-menu.res:41
+msgid "Load vendor resource file"
+msgstr "Загрузить файл ресурсов производителя"
 
-#: ../src/gpcb-menu.res:133 ../src/pcb-menu.res:101
-msgid "5 mil"
-msgstr "5 мил"
+#: ../src/gpcb-menu.res:70
+msgid "Save connection data of"
+msgstr "Сохранить данные соединений"
 
-#: ../src/gpcb-menu.res:136 ../src/pcb-menu.res:104
-msgid "50 mil"
-msgstr "50 мил"
+#: ../src/gpcb-menu.res:71 ../src/pcb-menu.res:47
+msgid " a single element"
+msgstr " единственного элемента"
 
-#: ../src/gpcb-menu.res:466 ../src/pcb-menu.res:188
-msgid ":"
-msgstr ":"
+#: ../src/gpcb-menu.res:72 ../src/pcb-menu.res:48
+msgid " all elements"
+msgstr " всех элементов"
 
-#: ../src/gpcb-menu.res:202 ../src/pcb-menu.res:194
-msgid "<Key>."
-msgstr "<Key>."
+#: ../src/gpcb-menu.res:73 ../src/pcb-menu.res:49
+msgid " unused pins"
+msgstr " неиспользуемые выводы"
 
-#: ../src/gpcb-menu.res:441 ../src/pcb-menu.res:409
-msgid "<Key>/"
-msgstr "<Key>/"
+#: ../src/gpcb-menu.res:75
+msgid "Export..."
+msgstr "Экспорт..."
 
-#: ../src/gpcb-menu.res:466 ../src/pcb-menu.res:188
-msgid "<Key>:"
-msgstr "<Key>:"
+#: ../src/gpcb-menu.res:77 ../src/pcb-menu.res:44
+msgid "Calibrate Printer..."
+msgstr "Калибровать принтер..."
 
-#: ../src/gpcb-menu.res:335 ../src/pcb-menu.res:312
-msgid "<Key>="
-msgstr "<Key>="
+#: ../src/gpcb-menu.res:78
+msgid "Print..."
+msgstr "Печать..."
 
-#: ../src/gpcb-menu.res:366 ../src/pcb-menu.res:333
-msgid "<Key>BackSpace"
-msgstr "<Key>BackSpace"
+#: ../src/gpcb-menu.res:80
+msgid "Preferences..."
+msgstr "Настройки..."
 
-#: ../src/gpcb-menu.res:360 ../src/pcb-menu.res:234
-msgid "<Key>Delete"
-msgstr "<Key>Delete"
+#: ../src/gpcb-menu.res:82
+msgid "Quit"
+msgstr "Выход"
 
-#: ../src/gpcb-menu.res:447 ../src/pcb-menu.res:415
-msgid "<Key>Down"
-msgstr "<Key>Вниз"
+#: ../src/gpcb-menu.res:82 ../src/pcb-menu.res:53
+msgid "Ctrl-Q"
+msgstr "Ctrl-Q"
 
-#: ../src/gpcb-menu.res:454 ../src/pcb-menu.res:422
-msgid "<Key>Enter"
-msgstr "<Key>Enter"
+#: ../src/gpcb-menu.res:82 ../src/pcb-menu.res:53
+msgid "Ctrl<Key>q"
+msgstr "Ctrl<Key>q"
 
-#: ../src/gpcb-menu.res:522 ../src/pcb-menu.res:186
-msgid "<Key>Escape"
-msgstr "<Key>Escape"
+#: ../src/gpcb-menu.res:88
+msgid "Edit"
+msgstr "Правка"
 
-#: ../src/gpcb-menu.res:507 ../src/pcb-menu.res:171
-msgid "<Key>F1"
-msgstr "<Key>F1"
+#: ../src/gpcb-menu.res:89 ../src/pcb-menu.res:418
+msgid "Undo"
+msgstr "Отменить"
 
-#: ../src/gpcb-menu.res:516 ../src/pcb-menu.res:180
-msgid "<Key>F10"
-msgstr "<Key>F10"
+#: ../src/gpcb-menu.res:89 ../src/pcb-menu.res:134
+msgid "U"
+msgstr "U"
 
-#: ../src/gpcb-menu.res:517 ../src/pcb-menu.res:181
-msgid "<Key>F11"
-msgstr "<Key>F11"
+#: ../src/gpcb-menu.res:89 ../src/pcb-menu.res:134
+msgid "<Key>u"
+msgstr "<Key>u"
 
-#: ../src/gpcb-menu.res:508 ../src/pcb-menu.res:172
-msgid "<Key>F2"
-msgstr "<Key>F2"
+#: ../src/gpcb-menu.res:90
+msgid "Redo"
+msgstr "Вернуть"
 
-#: ../src/gpcb-menu.res:509 ../src/pcb-menu.res:173
-msgid "<Key>F3"
-msgstr "<Key>F3"
+#: ../src/gpcb-menu.res:90 ../src/pcb-menu.res:135
+msgid "Shift-R"
+msgstr "Shift-R"
 
-#: ../src/gpcb-menu.res:510 ../src/pcb-menu.res:174
-msgid "<Key>F4"
-msgstr "<Key>F4"
+#: ../src/gpcb-menu.res:90 ../src/pcb-menu.res:135
+msgid "Shift<Key>r"
+msgstr "Shift<Key>r"
 
-#: ../src/gpcb-menu.res:511 ../src/pcb-menu.res:175
-msgid "<Key>F5"
-msgstr "<Key>F5"
+#: ../src/gpcb-menu.res:91 ../src/pcb-menu.res:136
+msgid "Clear undo-buffer"
+msgstr "Очистить буфер отмен"
 
-#: ../src/gpcb-menu.res:512 ../src/pcb-menu.res:176
-msgid "<Key>F6"
-msgstr "<Key>F6"
+#: ../src/gpcb-menu.res:91 ../src/pcb-menu.res:136
+msgid "Shift-Ctrl-U"
+msgstr "Shift-Ctrl-U"
 
-#: ../src/gpcb-menu.res:513 ../src/pcb-menu.res:177
-msgid "<Key>F7"
-msgstr "<Key>F7"
+#: ../src/gpcb-menu.res:91 ../src/pcb-menu.res:136
+msgid "Shift Ctrl<Key>u"
+msgstr "Shift Ctrl<Key>u"
 
-#: ../src/gpcb-menu.res:514 ../src/pcb-menu.res:178
-msgid "<Key>F8"
-msgstr "<Key>F8"
+#: ../src/gpcb-menu.res:296
+msgid "Cut to buffer"
+msgstr "Вырезать в буфер"
 
-#: ../src/gpcb-menu.res:515 ../src/pcb-menu.res:179
-msgid "<Key>F9"
-msgstr "<Key>F9"
+#: ../src/gpcb-menu.res:95 ../src/pcb-menu.res:140
+msgid "Ctrl-X"
+msgstr "Ctrl-X"
 
-#: ../src/gpcb-menu.res:518 ../src/pcb-menu.res:182
-msgid "<Key>Insert"
-msgstr "<Key>Insert"
+#: ../src/gpcb-menu.res:95 ../src/pcb-menu.res:140
+msgid "Ctrl<Key>x"
+msgstr "Ctrl<Key>x"
 
-#: ../src/gpcb-menu.res:448 ../src/pcb-menu.res:416
-msgid "<Key>Left"
-msgstr "<Key>Влево"
+#: ../src/gpcb-menu.res:96
+msgid "Copy to buffer"
+msgstr "Копировать в буфер"
 
-#: ../src/gpcb-menu.res:449 ../src/pcb-menu.res:417
-msgid "<Key>Right"
-msgstr "<Key>Вправо"
+#: ../src/gpcb-menu.res:98 ../src/pcb-menu.res:143
+msgid "Ctrl-C"
+msgstr "Ctrl-C"
 
-#: ../src/gpcb-menu.res:176 ../src/pcb-menu.res:55
-msgid "<Key>Tab"
-msgstr "<Key>Tab"
+#: ../src/gpcb-menu.res:98 ../src/pcb-menu.res:143
+msgid "Ctrl<Key>c"
+msgstr "Ctrl<Key>c"
 
-#: ../src/gpcb-menu.res:446 ../src/pcb-menu.res:414
-msgid "<Key>Up"
-msgstr "<Key>Вверх"
+#: ../src/gpcb-menu.res:298
+msgid "Paste buffer"
+msgstr "Вставить из буфера"
 
-#: ../src/gpcb-menu.res:443 ../src/pcb-menu.res:411
-msgid "<Key>["
-msgstr "<Key>["
+#: ../src/gpcb-menu.res:99 ../src/pcb-menu.res:144
+msgid "Ctrl-V"
+msgstr "Ctrl-V"
 
-#: ../src/gpcb-menu.res:444 ../src/pcb-menu.res:412
-msgid "<Key>]"
-msgstr "<Key>]"
+#: ../src/gpcb-menu.res:99 ../src/pcb-menu.res:144
+msgid "Ctrl<Key>v"
+msgstr "Ctrl<Key>v"
 
-#: ../src/gpcb-menu.res:403 ../src/pcb-menu.res:370
-msgid "<Key>a"
-msgstr "<Key>a"
+#: ../src/gpcb-menu.res:240 ../src/pcb-menu.res:146
+msgid "Unselect all"
+msgstr "Снять выделение"
 
-#: ../src/gpcb-menu.res:404 ../src/pcb-menu.res:371
-msgid "<Key>b"
-msgstr "<Key>b"
+#: ../src/gpcb-menu.res:101 ../src/pcb-menu.res:146
+msgid "Shift-Alt-A"
+msgstr "Shift-Alt-A"
 
-#: ../src/gpcb-menu.res:180 ../src/pcb-menu.res:59
-msgid "<Key>c"
-msgstr "<Key>c"
+#: ../src/gpcb-menu.res:101 ../src/pcb-menu.res:146
+msgid "Shift Alt<Key>a"
+msgstr "Shift Alt<Key>a"
 
-#: ../src/gpcb-menu.res:159 ../src/pcb-menu.res:212
-msgid "<Key>d"
-msgstr "<Key>d"
+#: ../src/gpcb-menu.res:236 ../src/pcb-menu.res:147
+msgid "Select all visible"
+msgstr "Выбрать всё видимое"
 
-#: ../src/gpcb-menu.res:321 ../src/pcb-menu.res:299
-msgid "<Key>e"
-msgstr "<Key>e"
+#: ../src/gpcb-menu.res:102 ../src/pcb-menu.res:147
+msgid "Alt-A"
+msgstr "Alt-A"
 
-#: ../src/gpcb-menu.res:405 ../src/pcb-menu.res:372
-msgid "<Key>f"
-msgstr "<Key>f"
+#: ../src/gpcb-menu.res:102 ../src/pcb-menu.res:147
+msgid "Alt<Key>a"
+msgstr "Alt<Key>a"
 
-#: ../src/gpcb-menu.res:147 ../src/pcb-menu.res:115
-msgid "<Key>g"
-msgstr "<Key>g"
+#: ../src/gpcb-menu.res:104
+msgid "Edit name of"
+msgstr "Изменить название"
 
-#: ../src/gpcb-menu.res:406 ../src/pcb-menu.res:373
-msgid "<Key>h"
-msgstr "<Key>h"
+#: ../src/gpcb-menu.res:105
+msgid "text on layout"
+msgstr "Текста на трассировке"
 
-#: ../src/gpcb-menu.res:462
-msgid "<Key>i"
-msgstr "<Key>i"
+#: ../src/gpcb-menu.res:105 ../src/pcb-menu.res:150
+msgid "N"
+msgstr "N"
 
-#: ../src/gpcb-menu.res:409 ../src/pcb-menu.res:376
-msgid "<Key>j"
-msgstr "<Key>j"
+#: ../src/gpcb-menu.res:105 ../src/pcb-menu.res:150
+msgid "<Key>n"
+msgstr "<Key>n"
 
-#: ../src/gpcb-menu.res:411 ../src/pcb-menu.res:378
-msgid "<Key>k"
-msgstr "<Key>k"
+#: ../src/gpcb-menu.res:106
+msgid "layout"
+msgstr "Трассировки"
 
-#: ../src/gpcb-menu.res:415 ../src/pcb-menu.res:382
-msgid "<Key>l"
-msgstr "<Key>l"
+#: ../src/gpcb-menu.res:107
+msgid "active layer"
+msgstr "Текущего слоя"
 
-#: ../src/gpcb-menu.res:110 ../src/pcb-menu.res:150
-msgid "<Key>m"
-msgstr "<Key>m"
+#: ../src/gpcb-menu.res:109
+msgid "Edit attributes of"
+msgstr "Изменить атрибуты"
 
-#: ../src/gpcb-menu.res:100 ../src/pcb-menu.res:154
-msgid "<Key>n"
-msgstr "<Key>n"
+#: ../src/gpcb-menu.res:110
+msgid "Layout"
+msgstr "Трассировки"
 
-#: ../src/gpcb-menu.res:320 ../src/pcb-menu.res:298
-msgid "<Key>o"
-msgstr "<Key>o"
+#: ../src/gpcb-menu.res:111
+msgid "CurrentLayer"
+msgstr "Текущего слоя"
 
-#: ../src/gpcb-menu.res:426 ../src/pcb-menu.res:393
-msgid "<Key>p"
-msgstr "<Key>p"
+#: ../src/gpcb-menu.res:112
+msgid "Element"
+msgstr "Элемента"
 
-#: ../src/gpcb-menu.res:428 ../src/pcb-menu.res:395
-msgid "<Key>q"
-msgstr "<Key>q"
+#. Create edit button
+#: ../src/gpcb-menu.res:115 ../src/hid/gtk/ghid-route-style-selector.c:417
+#: ../src/pcb-menu.res:159
+msgid "Route Styles"
+msgstr "Стили трассировки"
 
-#: ../src/gpcb-menu.res:429 ../src/pcb-menu.res:396
-msgid "<Key>s"
-msgstr "<Key>s"
+#: ../src/gpcb-menu.res:117 ../src/pcb-menu.res:162
+msgid "Edit..."
+msgstr "Редактировать..."
 
-#: ../src/gpcb-menu.res:442 ../src/pcb-menu.res:410
-msgid "<Key>space"
-msgstr "<Key>пробел"
+#: ../src/gpcb-menu.res:124
+msgid "View"
+msgstr "Вид"
 
-#: ../src/gpcb-menu.res:433 ../src/pcb-menu.res:400
-msgid "<Key>t"
-msgstr "<Key>t"
+#: ../src/gpcb-menu.res:125
+msgid "Enable visible grid"
+msgstr "Отображать сетку"
 
-#: ../src/gpcb-menu.res:84 ../src/pcb-menu.res:135
-msgid "<Key>u"
-msgstr "<Key>u"
+#: ../src/gpcb-menu.res:126
+msgid "Grid units"
+msgstr "Единицы измерения сетки"
 
-#: ../src/gpcb-menu.res:164 ../src/pcb-menu.res:81
-msgid "<Key>v"
-msgstr "<Key>v"
+#: ../src/gpcb-menu.res:127 ../src/pcb-menu.res:94
+msgid "mil"
+msgstr "мил"
 
-#: ../src/gpcb-menu.res:440 ../src/pcb-menu.res:407
-msgid "<Key>w"
-msgstr "<Key>w"
+#: ../src/gpcb-menu.res:128 ../src/pcb-menu.res:95
+msgid "mm"
+msgstr "мм"
 
-#: ../src/gpcb-menu.res:337 ../src/pcb-menu.res:314
-msgid "<Key>y"
-msgstr "<Key>y"
+#: ../src/gpcb-menu.res:130
+msgid "Grid size"
+msgstr "Шаг сетки"
 
-#: ../src/gpcb-menu.res:161 ../src/pcb-menu.res:78
-msgid "<Key>z"
-msgstr "<Key>z"
+#: ../src/gpcb-menu.res:131 ../src/pcb-menu.res:98
+msgid "No Grid"
+msgstr "Без сетки"
 
-#: ../src/gpcb-menu.res:218 ../src/pcb-menu.res:207
-msgid "<Key>|"
-msgstr "<Key>|"
+#: ../src/gpcb-menu.res:133 ../src/pcb-menu.res:100
+msgid "0.1 mil"
+msgstr "0.1 мил"
 
-#: ../src/gpcb-menu.res:335 ../src/pcb-menu.res:312
-msgid "="
-msgstr "="
+#: ../src/gpcb-menu.res:134 ../src/pcb-menu.res:101
+msgid "1 mil"
+msgstr "1 мил"
 
-#: ../src/gpcb-menu.res:403 ../src/pcb-menu.res:370
-msgid "A"
-msgstr "A"
+#: ../src/gpcb-menu.res:135 ../src/pcb-menu.res:102
+msgid "5 mil"
+msgstr "5 мил"
 
-#: ../src/gpcb-menu.res:469 ../src/pcb-menu.res:31
-msgid "About..."
-msgstr "О программе..."
+#: ../src/gpcb-menu.res:136 ../src/pcb-menu.res:103
+msgid "10 mil"
+msgstr "10 мил"
 
-#: ../src/gpcb-menu.res:440 ../src/pcb-menu.res:407
-msgid "Add All Rats"
-msgstr "Добавить все соединения"
+#: ../src/gpcb-menu.res:137 ../src/pcb-menu.res:104
+msgid "25 mil"
+msgstr "25 мил"
 
-#: ../src/gpcb-menu.res:192 ../src/pcb-menu.res:129
-msgid "Add new layer"
-msgstr "Добавить новый слой"
+#: ../src/gpcb-menu.res:138 ../src/pcb-menu.res:105
+msgid "50 mil"
+msgstr "50 мил"
 
-#: ../src/gpcb-menu.res:439 ../src/pcb-menu.res:406
-msgid "AddRats Selected"
-msgstr "Добавить выбранные соединения"
+#: ../src/gpcb-menu.res:139 ../src/pcb-menu.res:106
+msgid "100 mil"
+msgstr "100 мил"
 
-#: ../src/gpcb-menu.res:419 ../src/pcb-menu.res:386
-msgid "AddRats to selected pins"
-msgstr "Добавить соединения к выбранному выводу"
+#: ../src/gpcb-menu.res:141 ../src/pcb-menu.res:108
+msgid "0.01 mm"
+msgstr "0.01 мм"
 
-#: ../src/gpcb-menu.res:341 ../src/pcb-menu.res:318
-msgid "All"
-msgstr "Все"
+#: ../src/gpcb-menu.res:142 ../src/pcb-menu.res:109
+msgid "0.05 mm"
+msgstr "0.05 мм"
 
-#: ../src/gpcb-menu.res:236 ../src/pcb-menu.res:224
-msgid "All objects"
-msgstr "Все объекты"
+#: ../src/gpcb-menu.res:143 ../src/pcb-menu.res:110
+msgid "0.1 mm"
+msgstr "0.1 мм"
 
-#: ../src/gpcb-menu.res:432 ../src/pcb-menu.res:399
-msgid "Alt Shift<Key>s"
-msgstr "Alt Shift<Key>s"
+#: ../src/gpcb-menu.res:144 ../src/pcb-menu.res:111
+msgid "0.25 mm"
+msgstr "0.25 мм"
 
-#: ../src/gpcb-menu.res:438 ../src/pcb-menu.res:405
-msgid "Alt Shift<Key>v"
-msgstr "Alt Shift<Key>v"
+#: ../src/gpcb-menu.res:145 ../src/pcb-menu.res:112
+msgid "0.5 mm"
+msgstr "0.5 мм"
 
-#: ../src/gpcb-menu.res:97 ../src/pcb-menu.res:148
-msgid "Alt-A"
-msgstr "Alt-A"
+#: ../src/gpcb-menu.res:146 ../src/pcb-menu.res:113
+msgid "1 mm"
+msgstr "1 мм"
 
-#: ../src/gpcb-menu.res:253 ../src/pcb-menu.res:238
-msgid "Alt-R"
-msgstr "Alt-R"
+#: ../src/gpcb-menu.res:148 ../src/pcb-menu.res:115
+msgid "Grid -"
+msgstr "Сетка -"
 
-#: ../src/gpcb-menu.res:431 ../src/pcb-menu.res:398
-msgid "Alt-S"
-msgstr "Alt-S"
+#: ../src/gpcb-menu.res:148 ../src/pcb-menu.res:115
+msgid "Shift-G"
+msgstr "Shift-G"
 
-#: ../src/gpcb-menu.res:432 ../src/pcb-menu.res:399
-msgid "Alt-Shift-S"
-msgstr "Alt-Shift-S"
+#: ../src/gpcb-menu.res:148 ../src/pcb-menu.res:115
+msgid "Shift<Key>g"
+msgstr "Shift<Key>g"
 
-#: ../src/gpcb-menu.res:438 ../src/pcb-menu.res:405
-msgid "Alt-Shift-V"
-msgstr "Alt-Shift-V"
+#: ../src/gpcb-menu.res:149 ../src/pcb-menu.res:116
+msgid "Grid +"
+msgstr "Сетка +"
 
-#: ../src/gpcb-menu.res:437 ../src/pcb-menu.res:404
-msgid "Alt-V"
-msgstr "Alt-V"
+#: ../src/gpcb-menu.res:149 ../src/pcb-menu.res:116
+msgid "G"
+msgstr "G"
 
-#: ../src/gpcb-menu.res:97 ../src/pcb-menu.res:148
-msgid "Alt<Key>a"
-msgstr "Alt<Key>a"
+#: ../src/gpcb-menu.res:149 ../src/pcb-menu.res:116
+msgid "<Key>g"
+msgstr "<Key>g"
 
-#: ../src/gpcb-menu.res:253 ../src/pcb-menu.res:238
-msgid "Alt<Key>r"
-msgstr "Alt<Key>r"
+#: ../src/gpcb-menu.res:151 ../src/pcb-menu.res:97
+msgid "Realign grid"
+msgstr "Выровнять сетку"
 
-#: ../src/gpcb-menu.res:431 ../src/pcb-menu.res:398
-msgid "Alt<Key>s"
-msgstr "Alt<Key>s"
+#: ../src/gpcb-menu.res:153
+msgid "Displayed element name"
+msgstr "Название отображаемого элемента"
 
-#: ../src/gpcb-menu.res:437 ../src/pcb-menu.res:404
-msgid "Alt<Key>v"
-msgstr "Alt<Key>v"
+#: ../src/gpcb-menu.res:154 ../src/pcb-menu.res:64
+msgid "Description"
+msgstr "Описание"
 
-#: ../src/gpcb-menu.res:349 ../src/pcb-menu.res:324
-msgid "Apply vendor drill mapping"
-msgstr "Применить карту производственных отверстий"
+#: ../src/gpcb-menu.res:155 ../src/pcb-menu.res:65
+msgid "Reference Designator"
+msgstr "Позиционное обозначение"
 
-#: ../src/gpcb-menu.res:509 ../src/pcb-menu.res:173
-msgid "Arc"
-msgstr "Дуга"
+#: ../src/gpcb-menu.res:156 ../src/pcb-menu.res:66
+msgid "Value"
+msgstr "Номинал"
 
-#: ../src/gpcb-menu.res:517 ../src/pcb-menu.res:410
-msgid "Arrow"
-msgstr "Выбор"
+#: ../src/gpcb-menu.res:158
+msgid "Enable Pinout shows number"
+msgstr "Нумерация выводов"
 
-#: ../src/gpcb-menu.res:442
-msgid "Arrow Mode"
-msgstr "Режим выбора"
+#: ../src/gpcb-menu.res:159 ../src/pcb-menu.res:209
+msgid "Pins/Via show Name/Number"
+msgstr "Название/номер на выводах/переходах"
 
-#: ../src/gpcb-menu.res:207 ../src/pcb-menu.res:199
-msgid "Auto enforce DRC clearance"
-msgstr "Автособлюдение отступов проектных норм"
+#: ../src/gpcb-menu.res:159 ../src/pcb-menu.res:209
+msgid "D"
+msgstr "D"
 
-#: ../src/gpcb-menu.res:494
-msgid "Auto place selected elements"
-msgstr "Авторазмещение выбранных элементов"
+#: ../src/gpcb-menu.res:159 ../src/pcb-menu.res:209
+msgid "<Key>d"
+msgstr "<Key>d"
 
-#: ../src/gpcb-menu.res:203 ../src/pcb-menu.res:195
-msgid "Auto swap line start angle"
-msgstr "Автоизменение начального угла линии"
+#: ../src/gpcb-menu.res:161 ../src/pcb-menu.res:79
+#, no-c-format
+msgid "Zoom In 20%"
+msgstr "Увеличить на 20%"
 
-#: ../src/gpcb-menu.res:329 ../src/pcb-menu.res:306
-msgid "Auto-Optimize"
-msgstr "Автооптимизация"
+#: ../src/gpcb-menu.res:161 ../src/pcb-menu.res:79
+msgid "Z"
+msgstr "Z"
 
-#: ../src/gpcb-menu.res:244 ../src/pcb-menu.res:231
-msgid "Auto-place selected elements"
-msgstr "Авторазмещение выбранных элементов"
+#: ../src/gpcb-menu.res:161 ../src/pcb-menu.res:79
+msgid "<Key>z"
+msgstr "<Key>z"
 
-#: ../src/gpcb-menu.res:325 ../src/pcb-menu.res:303
-msgid "Auto-route all rats"
-msgstr "Автотрассировка всех соединений"
+#: ../src/gpcb-menu.res:162 ../src/pcb-menu.res:80
+#, no-c-format
+msgid "Zoom Out 20%"
+msgstr "Уменьшить на 20%"
 
-#: ../src/gpcb-menu.res:324 ../src/pcb-menu.res:302
-msgid "Auto-route selected rats"
-msgstr "Автотрассировка выбранных соединений"
+#: ../src/gpcb-menu.res:162 ../src/pcb-menu.res:80
+msgid "Shift-Z"
+msgstr "Shift-Z"
 
-#: ../src/gpcb-menu.res:214 ../src/pcb-menu.res:203
-msgid "Auto-zero delta measurements"
-msgstr "Авто обнуление дельта-измерений"
+#: ../src/gpcb-menu.res:162 ../src/pcb-menu.res:80
+msgid "Shift<Key>z"
+msgstr "Shift<Key>z"
 
-#: ../src/gpcb-menu.res:495
-msgid "Autoroute selected elements"
-msgstr "Автотрассировка выбранных элементов"
+#: ../src/gpcb-menu.res:163
+msgid "More zooms and view changes"
+msgstr "Изменить масштаб и вид"
 
-#: ../src/gpcb-menu.res:404 ../src/pcb-menu.res:371
-msgid "B"
-msgstr "B"
+#: ../src/gpcb-menu.res:164 ../src/pcb-menu.res:82
+msgid "Zoom Max"
+msgstr "Увеличить максимально"
 
-#: ../src/gpcb-menu.res:366 ../src/pcb-menu.res:333
-msgid "Backspace"
-msgstr "Backspace"
+#: ../src/gpcb-menu.res:164 ../src/pcb-menu.res:82
+msgid "V"
+msgstr "V"
 
-#: ../src/gpcb-menu.res:299 ../src/pcb-menu.res:280
-msgid "Break buffer elements to pieces"
-msgstr "Разбить элементы в буфере на части"
+#: ../src/gpcb-menu.res:164 ../src/pcb-menu.res:82
+msgid "<Key>v"
+msgstr "<Key>v"
 
-#: ../src/gpcb-menu.res:513 ../src/pcb-menu.res:177
-msgid "Buffer"
-msgstr "Буфер"
+#: ../src/gpcb-menu.res:165 ../src/pcb-menu.res:75
+msgid "Zoom In 2X"
+msgstr "Увеличить вдвое"
 
-#: ../src/gpcb-menu.res:180 ../src/pcb-menu.res:59
-msgid "C"
-msgstr "C"
+#: ../src/gpcb-menu.res:166 ../src/pcb-menu.res:81
+msgid "Zoom Out 2X"
+msgstr "Уменьшить вдвое"
 
-#: ../src/gpcb-menu.res:70 ../src/pcb-menu.res:43
-msgid "Calibrate Printer..."
-msgstr "Калибровать принтер..."
+#: ../src/gpcb-menu.res:167 ../src/pcb-menu.res:85
+msgid "Zoom to 0.1mil/px"
+msgstr "0.1 мил/пиксел"
+
+#: ../src/gpcb-menu.res:168 ../src/pcb-menu.res:86
+msgid "Zoom to 0.01mm/px"
+msgstr "0.01 мм/пиксел"
+
+#: ../src/gpcb-menu.res:169 ../src/pcb-menu.res:87
+msgid "Zoom to 1mil/px"
+msgstr "1 мил/пиксел"
+
+#: ../src/gpcb-menu.res:170 ../src/pcb-menu.res:88
+msgid "Zoom to 0.05mm/px"
+msgstr "0.05 мм/пиксел"
+
+#: ../src/gpcb-menu.res:171 ../src/pcb-menu.res:89
+msgid "Zoom to 2.5mil/px"
+msgstr "2.5 мил/пиксел"
+
+#: ../src/gpcb-menu.res:172 ../src/pcb-menu.res:90
+msgid "Zoom to 0.1mm/px"
+msgstr "0.1 мм/пиксел"
+
+#: ../src/gpcb-menu.res:173 ../src/pcb-menu.res:91
+msgid "Zoom to 10mil/px"
+msgstr "10 мил/пиксел"
+
+#: ../src/gpcb-menu.res:174
+#, no-c-format
+msgid "Zoom In 20% and center"
+msgstr "Увеличить на 20% по центру"
+
+#: ../src/gpcb-menu.res:175
+#, no-c-format
+msgid "Zoom Out 20% and center"
+msgstr "Уменьшить на 20% по центру"
+
+#: ../src/gpcb-menu.res:176 ../src/pcb-menu.res:56
+msgid "Flip up/down"
+msgstr "Отразить верх/низ"
+
+#: ../src/gpcb-menu.res:176 ../src/pcb-menu.res:56
+msgid "Tab"
+msgstr "Tab"
+
+#: ../src/gpcb-menu.res:176 ../src/pcb-menu.res:56
+msgid "<Key>Tab"
+msgstr "<Key>Tab"
+
+#: ../src/gpcb-menu.res:177 ../src/pcb-menu.res:57
+msgid "Flip left/right"
+msgstr "Отразить право/лево"
 
-#: ../src/gpcb-menu.res:180 ../src/pcb-menu.res:59
+#: ../src/gpcb-menu.res:177 ../src/pcb-menu.res:57
+msgid "Shift-Tab"
+msgstr "Shift-Tab"
+
+#: ../src/gpcb-menu.res:177 ../src/pcb-menu.res:57
+msgid "Shift<Key>Tab"
+msgstr "Shift<Key>Tab"
+
+#: ../src/gpcb-menu.res:178
+msgid "Spin 180 degrees"
+msgstr "Повернуть на 180°"
+
+#: ../src/gpcb-menu.res:178 ../src/pcb-menu.res:58
+msgid "Ctrl-Tab"
+msgstr "Ctrl-Tab"
+
+#: ../src/gpcb-menu.res:178 ../src/pcb-menu.res:58
+msgid "Ctrl<Key>Tab"
+msgstr "Ctrl<Key>Tab"
+
+#: ../src/gpcb-menu.res:179 ../src/pcb-menu.res:59
+msgid "Swap Sides"
+msgstr "Поменять стороны"
+
+#: ../src/gpcb-menu.res:179 ../src/pcb-menu.res:59
+msgid "Ctrl-Shift-Tab"
+msgstr "Ctrl-Shift-Tab"
+
+#: ../src/gpcb-menu.res:179 ../src/pcb-menu.res:59
+msgid "Ctrl Shift<Key>Tab"
+msgstr "Ctrl Shift<Key>Tab"
+
+#: ../src/gpcb-menu.res:180 ../src/pcb-menu.res:60
 msgid "Center cursor"
 msgstr "Курсор в центре"
 
-#: ../src/gpcb-menu.res:269 ../src/pcb-menu.res:253
-msgid "Change drilling hole of selected objects"
-msgstr "Изменить отверстие выбранных объектов"
+#: ../src/gpcb-menu.res:180 ../src/pcb-menu.res:60
+msgid "C"
+msgstr "C"
 
-#: ../src/gpcb-menu.res:256 ../src/pcb-menu.res:241
-msgid "Change size of selected objects"
-msgstr "Изменить размер выбранных объектов"
+#: ../src/gpcb-menu.res:180 ../src/pcb-menu.res:60
+msgid "<Key>c"
+msgstr "<Key>c"
 
-#: ../src/gpcb-menu.res:276 ../src/pcb-menu.res:259
-msgid "Change square-flag of selected objects"
-msgstr "Изменить прямоугольную форму выбранных объектов"
+#: ../src/gpcb-menu.res:183 ../src/pcb-menu.res:119
+msgid "Shown Layers"
+msgstr "Отображать слои"
 
-#: ../src/gpcb-menu.res:431 ../src/pcb-menu.res:398
-msgid "ChangeDrill +5 mil"
-msgstr "Отверстие +5 мил"
+#: ../src/gpcb-menu.res:186 ../src/pcb-menu.res:122
+msgid "Edit Layer Groups"
+msgstr "Редактировать группы слоёв"
 
-#: ../src/gpcb-menu.res:432 ../src/pcb-menu.res:399
-msgid "ChangeDrill -5 mil"
-msgstr "Отверстие -5 мил"
+#: ../src/gpcb-menu.res:188 ../src/pcb-menu.res:124
+msgid "Current Layer"
+msgstr "Текущий слой"
 
-#: ../src/gpcb-menu.res:408 ../src/pcb-menu.res:375
-msgid "ChangeHole Object"
-msgstr "Изменить отверстие объекта"
+#: ../src/gpcb-menu.res:191 ../src/pcb-menu.res:127
+msgid "Delete current layer"
+msgstr "Удалить текущий слой"
+
+#: ../src/gpcb-menu.res:192 ../src/pcb-menu.res:128
+msgid "Add new layer"
+msgstr "Добавить новый слой"
+
+#: ../src/gpcb-menu.res:193 ../src/pcb-menu.res:129
+msgid "Move current layer up"
+msgstr "Перенести текущий слой вверх"
+
+#: ../src/gpcb-menu.res:194 ../src/pcb-menu.res:130
+msgid "Move current layer down"
+msgstr "Перенести текущий слой вниз"
+
+#: ../src/gpcb-menu.res:201
+msgid "Settings"
+msgstr "Настройки"
+
+#: ../src/gpcb-menu.res:202 ../src/pcb-menu.res:191
+msgid "'All-direction' lines"
+msgstr "Линии любого направления"
+
+#: ../src/gpcb-menu.res:202 ../src/pcb-menu.res:191
+msgid "."
+msgstr "."
+
+#: ../src/gpcb-menu.res:202 ../src/pcb-menu.res:191
+msgid "<Key>."
+msgstr "<Key>."
+
+#: ../src/gpcb-menu.res:203 ../src/pcb-menu.res:192
+msgid "Auto swap line start angle"
+msgstr "Автоизменение начального угла линии"
+
+#: ../src/gpcb-menu.res:204 ../src/pcb-menu.res:193
+msgid "Orthogonal moves"
+msgstr "Ортогональное перемещение"
+
+#: ../src/gpcb-menu.res:205 ../src/pcb-menu.res:194
+msgid "Crosshair snaps to pins and pads"
+msgstr "Привязка указателя к выводам и площадкам"
 
-#: ../src/gpcb-menu.res:409 ../src/pcb-menu.res:376
-msgid "ChangeJoin Object"
-msgstr "Изменить стык объекта"
+#: ../src/gpcb-menu.res:206 ../src/pcb-menu.res:195
+msgid "Crosshair shows DRC clearance"
+msgstr "Указатель показывает отступ проектных норм"
 
-#: ../src/gpcb-menu.res:410 ../src/pcb-menu.res:377
-msgid "ChangeJoin SelectedObject"
-msgstr "Изменить стык выбранного объекта"
+#: ../src/gpcb-menu.res:207 ../src/pcb-menu.res:196
+msgid "Auto enforce DRC clearance"
+msgstr "Автособлюдение отступов проектных норм"
 
-#: ../src/gpcb-menu.res:425 ../src/pcb-menu.res:392
-msgid "ChangeOctagon Object"
-msgstr "Изменить восьмиугольный объект"
+#: ../src/gpcb-menu.res:208 ../src/pcb-menu.res:67
+msgid "Lock Names"
+msgstr "Заблокировать названия"
 
-#: ../src/gpcb-menu.res:429 ../src/pcb-menu.res:396
-msgid "ChangeSize +5 mil"
-msgstr "Размер +5 мил"
+#: ../src/gpcb-menu.res:209 ../src/pcb-menu.res:68
+msgid "Only Names"
+msgstr "Только названия"
 
-#: ../src/gpcb-menu.res:430 ../src/pcb-menu.res:397
-msgid "ChangeSize -5 mil"
-msgstr "Размер -5 мил"
+#: ../src/gpcb-menu.res:210 ../src/pcb-menu.res:69
+msgid "Hide Names"
+msgstr "Скрыть названия"
 
-#: ../src/gpcb-menu.res:428 ../src/pcb-menu.res:395
-msgid "ChangeSquare Object"
-msgstr "Изменить прямоугольный объект"
+#: ../src/gpcb-menu.res:212 ../src/pcb-menu.res:198
+msgid "Rubber band mode"
+msgstr "Режим резиновой ленты"
 
-#: ../src/gpcb-menu.res:220 ../src/pcb-menu.res:209
-msgid "Check polygons"
-msgstr "Проверить полигоны"
+#: ../src/gpcb-menu.res:213 ../src/pcb-menu.res:199
+msgid "Require unique element names"
+msgstr "Уникальные названия элементов"
 
-#: ../src/gpcb-menu.res:411 ../src/pcb-menu.res:378
-msgid "Clear Object +2 mil"
-msgstr "Отступ от объекта +2 мил"
+#: ../src/gpcb-menu.res:214 ../src/pcb-menu.res:200
+msgid "Auto-zero delta measurements"
+msgstr "Авто обнуление дельта-измерений"
 
-#: ../src/gpcb-menu.res:412 ../src/pcb-menu.res:379
-msgid "Clear Object -2 mil"
-msgstr "Отступ от объекта -2 мил"
+#: ../src/gpcb-menu.res:215 ../src/pcb-menu.res:201
+msgid "New lines, arcs clear polygons"
+msgstr "Новые линии и дуги очищают полигоны"
 
-#: ../src/gpcb-menu.res:413 ../src/pcb-menu.res:380
-msgid "Clear Selected +2 mil"
-msgstr "Отступ от выбранного +2 мил"
+#: ../src/gpcb-menu.res:216 ../src/pcb-menu.res:202
+msgid "New polygons are full ones"
+msgstr "Новые полигоны залиты"
 
-#: ../src/gpcb-menu.res:414 ../src/pcb-menu.res:381
-msgid "Clear Selected -2 mil"
-msgstr "Отступ от выбранного -2 мил"
+#: ../src/gpcb-menu.res:217 ../src/pcb-menu.res:203
+msgid "Show autorouter trials"
+msgstr "Отображать попытки автотрассировщика"
 
-#: ../src/gpcb-menu.res:297 ../src/pcb-menu.res:278
-msgid "Clear buffer"
-msgstr "Очистить буфер"
+#: ../src/gpcb-menu.res:218 ../src/pcb-menu.res:204
+msgid "Thin draw"
+msgstr "Эскиз"
 
-#: ../src/gpcb-menu.res:86 ../src/pcb-menu.res:137
-msgid "Clear undo-buffer"
-msgstr "Очистить буфер отмен"
+#: ../src/gpcb-menu.res:218 ../src/pcb-menu.res:204
+msgid "|"
+msgstr "|"
 
-#: ../src/gpcb-menu.res:454 ../src/pcb-menu.res:422
-msgid "Click"
-msgstr "Щелчок"
+#: ../src/gpcb-menu.res:218 ../src/pcb-menu.res:204
+msgid "<Key>|"
+msgstr "<Key>|"
 
-#: ../src/gpcb-menu.res:466
-msgid "Command Entry"
-msgstr "Ввод команды"
+#: ../src/gpcb-menu.res:219 ../src/pcb-menu.res:205
+msgid "Thin draw poly"
+msgstr "Эскиз с трассами"
 
-#: ../src/gpcb-menu.res:313
-msgid "Connects"
-msgstr "Соединения"
+#: ../src/gpcb-menu.res:219 ../src/pcb-menu.res:205
+msgid "Ctrl-Shift-P"
+msgstr "Ctrl-Shift-P"
 
-#: ../src/gpcb-menu.res:298 ../src/pcb-menu.res:279
-msgid "Convert buffer to element"
-msgstr "Преобразовать буфер в элемент"
+#: ../src/gpcb-menu.res:219 ../src/pcb-menu.res:205
+msgid "Ctrl Shift<Key>p"
+msgstr "Ctrl Shift<Key>p"
 
-#: ../src/gpcb-menu.res:493 ../src/pcb-menu.res:235
-msgid "Convert selection to element"
-msgstr "Преобразовать выбранное в элемент"
+#: ../src/gpcb-menu.res:220 ../src/pcb-menu.res:206
+msgid "Check polygons"
+msgstr "Проверить полигоны"
 
-#: ../src/gpcb-menu.res:520 ../src/pcb-menu.res:184
-msgid "Copy"
-msgstr "Копировать"
+#: ../src/gpcb-menu.res:222
+msgid "Vendor drill mapping"
+msgstr "Карта производственных отверстий"
 
-#: ../src/gpcb-menu.res:480 ../src/pcb-menu.res:265
-msgid "Copy selection to buffer"
-msgstr "Копировать выбранное в буфер"
+#: ../src/gpcb-menu.res:223
+msgid "Import New Elements at"
+msgstr "Импортировать новые элементы по"
 
-#: ../src/gpcb-menu.res:206 ../src/pcb-menu.res:198
-msgid "Crosshair shows DRC clearance"
-msgstr "Указатель показывает отступ проектных норм"
+#: ../src/gpcb-menu.res:224 ../src/pcb-menu.res:213
+msgid " Center"
+msgstr "Центру"
 
-#: ../src/gpcb-menu.res:205 ../src/pcb-menu.res:197
-msgid "Crosshair snaps to pins and pads"
-msgstr "Привязка указателя к выводам и площадкам"
+#: ../src/gpcb-menu.res:225 ../src/pcb-menu.res:214
+msgid " Mark"
+msgstr "Отметке"
 
-#: ../src/gpcb-menu.res:179 ../src/pcb-menu.res:58
-msgid "Ctrl Shift<Key>Tab"
-msgstr "Ctrl Shift<Key>Tab"
+#: ../src/gpcb-menu.res:226 ../src/pcb-menu.res:215
+msgid " Crosshair"
+msgstr "Курсору"
 
-#: ../src/gpcb-menu.res:219 ../src/pcb-menu.res:208
-msgid "Ctrl Shift<Key>p"
-msgstr "Ctrl Shift<Key>p"
+#: ../src/gpcb-menu.res:228 ../src/pcb-menu.res:217
+msgid "Set Dispersion"
+msgstr "Разброс:"
 
-#: ../src/gpcb-menu.res:93 ../src/pcb-menu.res:144
-msgid "Ctrl-C"
-msgstr "Ctrl-C"
+#: ../src/gpcb-menu.res:235 ../src/hid/gtk/gui-netlist-window.c:791
+msgid "Select"
+msgstr "Выбрать"
 
-#: ../src/gpcb-menu.res:314 ../src/pcb-menu.res:292
-msgid "Ctrl-F"
-msgstr "Ctrl-F"
+#: ../src/gpcb-menu.res:237
+msgid "Select all found"
+msgstr "Выбрать всё найденное"
 
-#: ../src/gpcb-menu.res:149 ../src/pcb-menu.res:117
-msgid "Ctrl-G"
-msgstr "Ctrl-G"
+#: ../src/gpcb-menu.res:238
+msgid "Select all connected"
+msgstr "Выбрать все соединённое"
 
-#: ../src/gpcb-menu.res:408 ../src/pcb-menu.res:375
-msgid "Ctrl-H"
-msgstr "Ctrl-H"
+#: ../src/gpcb-menu.res:241
+msgid "Unselect all found"
+msgstr "Снять выделение со всех найденных"
 
-#: ../src/gpcb-menu.res:413 ../src/pcb-menu.res:380
-msgid "Ctrl-K"
-msgstr "Ctrl-K"
+#: ../src/gpcb-menu.res:242
+msgid "Unselect all connected"
+msgstr "Снять выделение со всех соединённых"
 
-#: ../src/gpcb-menu.res:417 ../src/pcb-menu.res:384
-msgid "Ctrl-M"
-msgstr "Ctrl-M"
+#: ../src/gpcb-menu.res:244 ../src/pcb-menu.res:230
+msgid "Select by name"
+msgstr "Выбрать по названию"
 
-#: ../src/gpcb-menu.res:425 ../src/pcb-menu.res:392
-msgid "Ctrl-O"
-msgstr "Ctrl-O"
+#: ../src/gpcb-menu.res:245 ../src/pcb-menu.res:231
+msgid "All objects"
+msgstr "Все объекты"
 
-#: ../src/gpcb-menu.res:244 ../src/pcb-menu.res:231
-msgid "Ctrl-P"
-msgstr "Ctrl-P"
+#: ../src/gpcb-menu.res:287 ../src/pcb-menu.res:268
+msgid "Elements"
+msgstr "Элементы"
 
-#: ../src/gpcb-menu.res:76 ../src/pcb-menu.res:52
-msgid "Ctrl-Q"
-msgstr "Ctrl-Q"
+#: ../src/gpcb-menu.res:247 ../src/pcb-menu.res:233
+msgid "Pads"
+msgstr "Площадки"
 
-#: ../src/gpcb-menu.res:356 ../src/pcb-menu.res:328
-msgid "Ctrl-R"
-msgstr "Ctrl-R"
+#: ../src/gpcb-menu.res:288 ../src/pcb-menu.res:269
+msgid "Pins"
+msgstr "Выводы"
 
-#: ../src/gpcb-menu.res:219 ../src/pcb-menu.res:208
-msgid "Ctrl-Shift-P"
-msgstr "Ctrl-Shift-P"
+#: ../src/gpcb-menu.res:505 ../src/pcb-menu.res:170
+msgid "Text"
+msgstr "Текст"
 
-#: ../src/gpcb-menu.res:179 ../src/pcb-menu.res:58
-msgid "Ctrl-Shift-Tab"
-msgstr "Ctrl-Shift-Tab"
+#: ../src/gpcb-menu.res:250 ../src/pcb-menu.res:236
+msgid "Vias"
+msgstr "Переходы"
 
-#: ../src/gpcb-menu.res:178 ../src/pcb-menu.res:57
-msgid "Ctrl-Tab"
-msgstr "Ctrl-Tab"
+#: ../src/gpcb-menu.res:253 ../src/pcb-menu.res:238
+msgid "Auto-place selected elements"
+msgstr "Авторазмещение выбранных элементов"
 
-#: ../src/gpcb-menu.res:94 ../src/pcb-menu.res:145
-msgid "Ctrl-V"
-msgstr "Ctrl-V"
+#: ../src/gpcb-menu.res:253 ../src/pcb-menu.res:238
+msgid "Ctrl-P"
+msgstr "Ctrl-P"
 
-#: ../src/gpcb-menu.res:90 ../src/pcb-menu.res:141
-msgid "Ctrl-X"
-msgstr "Ctrl-X"
+#: ../src/gpcb-menu.res:253 ../src/pcb-menu.res:238
+msgid "Ctrl<Key>p"
+msgstr "Ctrl<Key>p"
 
-#: ../src/gpcb-menu.res:178 ../src/pcb-menu.res:57
-msgid "Ctrl<Key>Tab"
-msgstr "Ctrl<Key>Tab"
+#: ../src/gpcb-menu.res:254 ../src/pcb-menu.res:239
+msgid "Disperse all elements"
+msgstr "Распределить все элементы"
 
-#: ../src/gpcb-menu.res:93 ../src/pcb-menu.res:144
-msgid "Ctrl<Key>c"
-msgstr "Ctrl<Key>c"
+#: ../src/gpcb-menu.res:255
+msgid "Disperse selected elements"
+msgstr "Распределить выбранные элементы"
 
-#: ../src/gpcb-menu.res:314 ../src/pcb-menu.res:292
-msgid "Ctrl<Key>f"
-msgstr "Ctrl<Key>f"
+#: ../src/gpcb-menu.res:257 ../src/pcb-menu.res:240
+msgid "Move selected elements to other side"
+msgstr "Перенести выбранные элементы противоположную сторону"
 
-#: ../src/gpcb-menu.res:149 ../src/pcb-menu.res:117
-msgid "Ctrl<Key>g"
-msgstr "Ctrl<Key>g"
+#: ../src/gpcb-menu.res:257 ../src/pcb-menu.res:240
+msgid "Shift-B"
+msgstr "Shift-B"
 
-#: ../src/gpcb-menu.res:408 ../src/pcb-menu.res:375
-msgid "Ctrl<Key>h"
-msgstr "Ctrl<Key>h"
+#: ../src/gpcb-menu.res:257 ../src/pcb-menu.res:240
+msgid "Shift<Key>b"
+msgstr "Shift<Key>b"
 
-#: ../src/gpcb-menu.res:413 ../src/pcb-menu.res:380
-msgid "Ctrl<Key>k"
-msgstr "Ctrl<Key>k"
+#: ../src/gpcb-menu.res:258 ../src/pcb-menu.res:241
+msgid "Move selected to current layer"
+msgstr "Перенести выбранное на текущий слой"
 
-#: ../src/gpcb-menu.res:417 ../src/pcb-menu.res:384
-msgid "Ctrl<Key>m"
-msgstr "Ctrl<Key>m"
+#: ../src/gpcb-menu.res:258 ../src/pcb-menu.res:241
+msgid "Shift-M"
+msgstr "Shift-M"
 
-#: ../src/gpcb-menu.res:425 ../src/pcb-menu.res:392
-msgid "Ctrl<Key>o"
-msgstr "Ctrl<Key>o"
+#: ../src/gpcb-menu.res:258 ../src/pcb-menu.res:241
+msgid "Shift<Key>m"
+msgstr "Shift<Key>m"
 
-#: ../src/gpcb-menu.res:244 ../src/pcb-menu.res:231
-msgid "Ctrl<Key>p"
-msgstr "Ctrl<Key>p"
+#: ../src/gpcb-menu.res:474
+msgid "Remove selected objects"
+msgstr "Удалить выбранные объекты"
 
-#: ../src/gpcb-menu.res:76 ../src/pcb-menu.res:52
-msgid "Ctrl<Key>q"
-msgstr "Ctrl<Key>q"
+#: ../src/gpcb-menu.res:259 ../src/pcb-menu.res:362
+msgid "Shift-Delete"
+msgstr "Shift-Delete"
 
-#: ../src/gpcb-menu.res:356 ../src/pcb-menu.res:328
-msgid "Ctrl<Key>r"
-msgstr "Ctrl<Key>r"
+#: ../src/gpcb-menu.res:259 ../src/pcb-menu.res:362
+msgid "Shift<Key>Delete"
+msgstr "Shift<Key>Delete"
 
-#: ../src/gpcb-menu.res:94 ../src/pcb-menu.res:145
-msgid "Ctrl<Key>v"
-msgstr "Ctrl<Key>v"
+#: ../src/gpcb-menu.res:488 ../src/pcb-menu.res:243
+msgid "Convert selection to element"
+msgstr "Преобразовать выбранное в элемент"
 
-#: ../src/gpcb-menu.res:90 ../src/pcb-menu.res:141
-msgid "Ctrl<Key>x"
-msgstr "Ctrl<Key>x"
+#: ../src/gpcb-menu.res:262 ../src/pcb-menu.res:245
+msgid "Optimize selected rats"
+msgstr "Оптимизировать выбранные соединения"
 
-#: ../src/gpcb-menu.res:188 ../src/pcb-menu.res:125
-msgid "Current Layer"
-msgstr "Текущий слой"
+#: ../src/gpcb-menu.res:334 ../src/pcb-menu.res:311
+msgid "Auto-route selected rats"
+msgstr "Автотрассировка выбранных соединений"
 
-#: ../src/gpcb-menu.res:106
-msgid "CurrentLayer"
-msgstr "Текущий слой"
+#: ../src/gpcb-menu.res:263 ../src/pcb-menu.res:246
+msgid "Alt-R"
+msgstr "Alt-R"
 
-#: ../src/gpcb-menu.res:486 ../src/pcb-menu.res:267
-msgid "Cut selection to buffer"
-msgstr "Вырезать выбранное в буфер"
+#: ../src/gpcb-menu.res:263 ../src/pcb-menu.res:246
+msgid "Alt<Key>r"
+msgstr "Alt<Key>r"
 
-#: ../src/gpcb-menu.res:441 ../src/pcb-menu.res:409
-msgid "Cycle Clip"
-msgstr "Переключить ограничитель"
+#: ../src/gpcb-menu.res:491 ../src/pcb-menu.res:247
+msgid "Rip up selected auto-routed tracks"
+msgstr "Разорвать выбранные автотрассированные трассы"
 
-#: ../src/gpcb-menu.res:159 ../src/pcb-menu.res:212
-msgid "D"
-msgstr "D"
+#: ../src/gpcb-menu.res:266 ../src/pcb-menu.res:249
+msgid "Change size of selected objects"
+msgstr "Изменить размеры выбранных объектов"
 
-#: ../src/gpcb-menu.res:464
-msgid "DRC Check"
-msgstr "Проверка проектных норм"
+#: ../src/gpcb-menu.res:267 ../src/pcb-menu.res:250
+msgid "Lines -10 mil"
+msgstr "Линия -10 мил"
 
-#: ../src/gpcb-menu.res:330 ../src/pcb-menu.res:307
-msgid "Debumpify"
-msgstr "Подтянуть"
+#: ../src/gpcb-menu.res:268 ../src/pcb-menu.res:251
+msgid "Lines +10 mil"
+msgstr "Линия +10 мил"
 
-#: ../src/gpcb-menu.res:360 ../src/pcb-menu.res:234
-msgid "Delete"
-msgstr "Удалить"
+#: ../src/gpcb-menu.res:269 ../src/pcb-menu.res:252
+msgid "Pads -10 mil"
+msgstr "Площадки -10 мил"
 
-#: ../src/gpcb-menu.res:191 ../src/pcb-menu.res:128
-msgid "Delete current layer"
-msgstr "Удалить текущий слой"
+#: ../src/gpcb-menu.res:270 ../src/pcb-menu.res:253
+msgid "Pads +10 mil"
+msgstr "Площадки +10 мил"
 
-#: ../src/gpcb-menu.res:154 ../src/pcb-menu.res:63
-msgid "Description"
-msgstr "Описание"
+#: ../src/gpcb-menu.res:282 ../src/pcb-menu.res:264
+msgid "Pins -10 mil"
+msgstr "Выводы -10 мил"
 
-#: ../src/gpcb-menu.res:347 ../src/pcb-menu.res:322
-msgid "Design Rule Checker"
-msgstr "Проверка проектных норм"
+#: ../src/gpcb-menu.res:283 ../src/pcb-menu.res:265
+msgid "Pins +10 mil"
+msgstr "Выводы +10 мил"
 
-#: ../src/gpcb-menu.res:245 ../src/pcb-menu.res:232
-msgid "Disperse all elements"
-msgstr "Распределить все элементы"
+#: ../src/gpcb-menu.res:273 ../src/pcb-menu.res:256
+msgid "Texts -10 mil"
+msgstr "Текст -10 мил"
 
-#: ../src/gpcb-menu.res:246
-msgid "Disperse selected elements"
-msgstr "Распределить выбранные элементы"
+#: ../src/gpcb-menu.res:274 ../src/pcb-menu.res:257
+msgid "Texts +10 mil"
+msgstr "Текст +10 мил"
 
-#: ../src/gpcb-menu.res:153
-msgid "Displayed element name"
-msgstr "Название отображаемого элемента"
+#: ../src/gpcb-menu.res:280 ../src/pcb-menu.res:262
+msgid "Vias -10 mil"
+msgstr "Переходы -10 мил"
 
-#: ../src/gpcb-menu.res:451 ../src/pcb-menu.res:419
-msgid "Down"
-msgstr "Вниз"
+#: ../src/gpcb-menu.res:281 ../src/pcb-menu.res:263
+msgid "Vias +10 mil"
+msgstr "Переходы +10 мил"
 
-#: ../src/gpcb-menu.res:321 ../src/pcb-menu.res:299
-msgid "E"
-msgstr "E"
+#: ../src/gpcb-menu.res:279 ../src/pcb-menu.res:261
+msgid "Change drilling hole of selected objects"
+msgstr "Изменить отверстия выбранных объектов"
 
-#: ../src/gpcb-menu.res:83
-msgid "Edit"
-msgstr "Правка"
+#: ../src/gpcb-menu.res:286 ../src/pcb-menu.res:267
+msgid "Change square-flag of selected objects"
+msgstr "Изменить прямоугольную форму выбранных объектов"
 
-#: ../src/gpcb-menu.res:186 ../src/pcb-menu.res:123
-msgid "Edit Layer Groups"
-msgstr "Редактировать группы слоёв"
+#: ../src/gpcb-menu.res:509 ../src/pcb-menu.res:174
+msgid "Buffer"
+msgstr "Буфер"
+
+#: ../src/gpcb-menu.res:300 ../src/pcb-menu.res:279
+msgid "Rotate buffer 90 deg CCW"
+msgstr "Повернуть буфер на +90°"
 
-#: ../src/gpcb-menu.res:104
-msgid "Edit attributes of"
-msgstr "Изменить атрибуты"
+#: ../src/gpcb-menu.res:301 ../src/pcb-menu.res:280
+msgid "Shift-F7"
+msgstr "Shift-F7"
 
-#: ../src/gpcb-menu.res:99
-msgid "Edit name of"
-msgstr "Изменить название"
+#: ../src/gpcb-menu.res:301 ../src/pcb-menu.res:280
+msgid "Shift<Key>F7"
+msgstr "Shift<Key>F7"
 
-#: ../src/gpcb-menu.res:114 ../src/pcb-menu.res:166
-msgid "Edit..."
-msgstr "Редактировать..."
+#: ../src/gpcb-menu.res:302 ../src/pcb-menu.res:281
+msgid "Rotate buffer 90 deg CW"
+msgstr "Повернуть буфер на -90°"
 
-#: ../src/gpcb-menu.res:107
-msgid "Element"
-msgstr "Элемент"
+#: ../src/gpcb-menu.res:303 ../src/pcb-menu.res:282
+msgid "Arbitrarily Rotate Buffer"
+msgstr "Повернуть буфер"
 
-#: ../src/gpcb-menu.res:277 ../src/pcb-menu.res:260
-msgid "Elements"
-msgstr "Элементы"
+#: ../src/gpcb-menu.res:304 ../src/pcb-menu.res:283
+msgid "Mirror buffer (up/down)"
+msgstr "Отразить буфер (верх/низ)"
 
-#: ../src/gpcb-menu.res:158
-msgid "Enable Pinout shows number"
-msgstr "Нумерация выводов"
+#: ../src/gpcb-menu.res:305 ../src/pcb-menu.res:284
+msgid "Mirror buffer (left/right)"
+msgstr "Отразить буфер (право/лево)"
 
-#: ../src/gpcb-menu.res:123
-msgid "Enable visible grid"
-msgstr "Отображать сетку"
+#: ../src/gpcb-menu.res:308 ../src/pcb-menu.res:287
+msgid "Clear buffer"
+msgstr "Очистить буфер"
 
-#: ../src/gpcb-menu.res:454 ../src/pcb-menu.res:422
-msgid "Enter"
-msgstr "Enter"
+#: ../src/gpcb-menu.res:309 ../src/pcb-menu.res:288
+msgid "Convert buffer to element"
+msgstr "Преобразовать буфер в элемент"
 
-#: ../src/gpcb-menu.res:321
-msgid "Erase rats nest"
-msgstr "Удалить соединения"
+#: ../src/gpcb-menu.res:310 ../src/pcb-menu.res:289
+msgid "Break buffer elements to pieces"
+msgstr "Разбить элементы в буфере на части"
 
-#: ../src/gpcb-menu.res:322 ../src/pcb-menu.res:300
-msgid "Erase selected rats"
-msgstr "Удалить выбранные соединения"
+#: ../src/gpcb-menu.res:311 ../src/pcb-menu.res:290
+msgid "Save buffer elements to file"
+msgstr "Сохранить элементы из буфера в файл"
 
-#: ../src/gpcb-menu.res:522 ../src/pcb-menu.res:186
-msgid "Esc"
-msgstr "Esc"
+#: ../src/gpcb-menu.res:313
+msgid "Select Buffer #1"
+msgstr "Выбрать буфер №1"
 
-#: ../src/gpcb-menu.res:69 ../src/pcb-menu.res:42
-msgid "Export layout..."
-msgstr "Экспортировать трассировку..."
+#: ../src/gpcb-menu.res:313 ../src/pcb-menu.res:293
+msgid "Shift-1"
+msgstr "Shift-1"
 
-#: ../src/gpcb-menu.res:405 ../src/pcb-menu.res:372
-msgid "F"
-msgstr "F"
+#: ../src/gpcb-menu.res:313 ../src/pcb-menu.res:293
+msgid "Shift<Key>1"
+msgstr "Shift<Key>1"
 
-#: ../src/gpcb-menu.res:507 ../src/pcb-menu.res:171
-msgid "F1"
-msgstr "F1"
+#: ../src/gpcb-menu.res:314
+msgid "Select Buffer #2"
+msgstr "Выбрать буфер №2"
 
-#: ../src/gpcb-menu.res:516 ../src/pcb-menu.res:180
-msgid "F10"
-msgstr "F10"
+#: ../src/gpcb-menu.res:314 ../src/pcb-menu.res:294
+msgid "Shift-2"
+msgstr "Shift-2"
 
-#: ../src/gpcb-menu.res:517 ../src/pcb-menu.res:181
-msgid "F11"
-msgstr "F11"
+#: ../src/gpcb-menu.res:314 ../src/pcb-menu.res:294
+msgid "Shift<Key>2"
+msgstr "Shift<Key>2"
 
-#: ../src/gpcb-menu.res:508 ../src/pcb-menu.res:172
-msgid "F2"
-msgstr "F2"
+#: ../src/gpcb-menu.res:315
+msgid "Select Buffer #3"
+msgstr "Выбрать буфер №3"
 
-#: ../src/gpcb-menu.res:509 ../src/pcb-menu.res:173
-msgid "F3"
-msgstr "F3"
+#: ../src/gpcb-menu.res:315 ../src/pcb-menu.res:295
+msgid "Shift-3"
+msgstr "Shift-3"
 
-#: ../src/gpcb-menu.res:510 ../src/pcb-menu.res:174
-msgid "F4"
-msgstr "F4"
+#: ../src/gpcb-menu.res:315 ../src/pcb-menu.res:295
+msgid "Shift<Key>3"
+msgstr "Shift<Key>3"
 
-#: ../src/gpcb-menu.res:511 ../src/pcb-menu.res:175
-msgid "F5"
-msgstr "F5"
+#: ../src/gpcb-menu.res:316
+msgid "Select Buffer #4"
+msgstr "Выбрать буфер №4"
 
-#: ../src/gpcb-menu.res:512 ../src/pcb-menu.res:176
-msgid "F6"
-msgstr "F6"
+#: ../src/gpcb-menu.res:316 ../src/pcb-menu.res:296
+msgid "Shift-4"
+msgstr "Shift-4"
 
-#: ../src/gpcb-menu.res:513 ../src/pcb-menu.res:177
-msgid "F7"
-msgstr "F7"
+#: ../src/gpcb-menu.res:316 ../src/pcb-menu.res:296
+msgid "Shift<Key>4"
+msgstr "Shift<Key>4"
 
-#: ../src/gpcb-menu.res:514 ../src/pcb-menu.res:178
-msgid "F8"
-msgstr "F8"
+#: ../src/gpcb-menu.res:317
+msgid "Select Buffer #5"
+msgstr "Выбрать буфер №5"
 
-#: ../src/gpcb-menu.res:515 ../src/pcb-menu.res:179
-msgid "F9"
-msgstr "F9"
+#: ../src/gpcb-menu.res:317 ../src/pcb-menu.res:297
+msgid "Shift-5"
+msgstr "Shift-5"
 
-#: ../src/gpcb-menu.res:49
-msgid "File"
-msgstr "Файл"
+#: ../src/gpcb-menu.res:317 ../src/pcb-menu.res:297
+msgid "Shift<Key>5"
+msgstr "Shift<Key>5"
 
-#: ../src/gpcb-menu.res:405 ../src/pcb-menu.res:372
-msgid "Find Connections"
-msgstr "Найти соединения"
+#: ../src/gpcb-menu.res:323
+msgid "Connects"
+msgstr "Соединения"
 
-#: ../src/gpcb-menu.res:404 ../src/pcb-menu.res:371
-msgid "Flip Object"
-msgstr "Переставить объект"
+#: ../src/gpcb-menu.res:324
+msgid "Lookup connection"
+msgstr "Поиск соединений"
 
-#: ../src/gpcb-menu.res:177 ../src/pcb-menu.res:56
-msgid "Flip left/right"
-msgstr "Отразить право/лево"
+#: ../src/gpcb-menu.res:324 ../src/pcb-menu.res:301
+msgid "Ctrl-F"
+msgstr "Ctrl-F"
 
-#: ../src/gpcb-menu.res:176 ../src/pcb-menu.res:55
-msgid "Flip up/down"
-msgstr "Отразить верх/низ"
+#: ../src/gpcb-menu.res:324 ../src/pcb-menu.res:301
+msgid "Ctrl<Key>f"
+msgstr "Ctrl<Key>f"
 
-#: ../src/gpcb-menu.res:340 ../src/pcb-menu.res:317
-msgid "Found"
-msgstr "Найдено"
+#: ../src/gpcb-menu.res:325 ../src/pcb-menu.res:302
+msgid "Reset scanned pads/pins/vias"
+msgstr "Сбросить просмотренные площадки/выводы/переходы"
 
-#: ../src/gpcb-menu.res:147 ../src/pcb-menu.res:115
-msgid "G"
-msgstr "G"
+#: ../src/gpcb-menu.res:326 ../src/pcb-menu.res:303
+msgid "Reset scanned lines/polygons"
+msgstr "Сбросить просмотренные линии/полигоны"
 
-#: ../src/gpcb-menu.res:357 ../src/pcb-menu.res:329
-msgid "Generate drill summary"
-msgstr "Отчёт о сверловке"
+#: ../src/gpcb-menu.res:327 ../src/pcb-menu.res:304
+msgid "Reset all connections"
+msgstr "Сбросить все соединения"
 
-#: ../src/gpcb-menu.res:499 ../src/pcb-menu.res:328
-msgid "Generate object report"
-msgstr "Отчёт об объектах"
+#: ../src/gpcb-menu.res:327 ../src/pcb-menu.res:304
+msgid "Shift-F"
+msgstr "Shift-F"
 
-#: ../src/gpcb-menu.res:338 ../src/pcb-menu.res:315
-msgid "Global Puller"
-msgstr "Глобальная вытяжка"
+#: ../src/gpcb-menu.res:327 ../src/pcb-menu.res:304
+msgid "Shift<Key>f"
+msgstr "Shift<Key>f"
+
+#: ../src/gpcb-menu.res:329
+msgid "Optimize rats nest"
+msgstr "Оптимизировать соединения"
 
-#: ../src/gpcb-menu.res:149 ../src/pcb-menu.res:117
-msgid "Grid +0.05mm"
-msgstr "Сетка +0.05 мм"
+#: ../src/gpcb-menu.res:330 ../src/pcb-menu.res:307
+msgid "O"
+msgstr "O"
 
-#: ../src/gpcb-menu.res:147 ../src/pcb-menu.res:115
-msgid "Grid +5mil"
-msgstr "Сетка +5 мил"
+#: ../src/gpcb-menu.res:330 ../src/pcb-menu.res:307
+msgid "<Key>o"
+msgstr "<Key>o"
 
-#: ../src/gpcb-menu.res:148 ../src/pcb-menu.res:116
-msgid "Grid -0.05mm"
-msgstr "Сетка -0.05 мм"
+#: ../src/gpcb-menu.res:331
+msgid "Erase rats nest"
+msgstr "Удалить соединения"
 
-#: ../src/gpcb-menu.res:146 ../src/pcb-menu.res:114
-msgid "Grid -5mil"
-msgstr "Сетка -5 мил"
+#: ../src/gpcb-menu.res:331 ../src/pcb-menu.res:308
+msgid "E"
+msgstr "E"
 
-#: ../src/gpcb-menu.res:128
-msgid "Grid size"
-msgstr "Шаг сетки"
+#: ../src/gpcb-menu.res:331 ../src/pcb-menu.res:308
+msgid "<Key>e"
+msgstr "<Key>e"
 
-#: ../src/gpcb-menu.res:124
-msgid "Grid units"
-msgstr "Единицы измерения сетки"
+#: ../src/gpcb-menu.res:332 ../src/pcb-menu.res:309
+msgid "Erase selected rats"
+msgstr "Удалить выбранные соединения"
 
-#: ../src/gpcb-menu.res:406 ../src/pcb-menu.res:373
-msgid "H"
-msgstr "H"
+#: ../src/gpcb-menu.res:332 ../src/pcb-menu.res:309
+msgid "Shift-E"
+msgstr "Shift-E"
 
-#: ../src/gpcb-menu.res:210 ../src/pcb-menu.res:68
-msgid "Hide Names"
-msgstr "Скрыть названия"
+#: ../src/gpcb-menu.res:332 ../src/pcb-menu.res:309
+msgid "Shift<Key>e"
+msgstr "Shift<Key>e"
 
-#: ../src/gpcb-menu.res:55 ../src/pcb-menu.res:35
-msgid "Import Schematics"
-msgstr "Импортировать схему"
+#: ../src/gpcb-menu.res:335 ../src/pcb-menu.res:312
+msgid "Auto-route all rats"
+msgstr "Автотрассировка всех соединений"
 
-#. -- Info tab
-#: ../src/gpcb-menu.res:355 ../src/hid/gtk/gui-config.c:1762
-msgid "Info"
-msgstr "Информация"
+#: ../src/gpcb-menu.res:336 ../src/pcb-menu.res:313
+msgid "Rip up all auto-routed tracks"
+msgstr "Разорвать все автотрассированные трассы"
 
-#: ../src/gpcb-menu.res:518 ../src/pcb-menu.res:182
-msgid "Insert"
-msgstr "Вставить"
+#: ../src/gpcb-menu.res:338
+msgid "Optimize routed tracks"
+msgstr "Оптимизировать трассы"
 
-#: ../src/gpcb-menu.res:518 ../src/pcb-menu.res:182
-msgid "Insert Point"
-msgstr "Точка вставки"
+#: ../src/gpcb-menu.res:339 ../src/pcb-menu.res:315
+msgid "Auto-Optimize"
+msgstr "Автооптимизация"
 
-#: ../src/gpcb-menu.res:409 ../src/pcb-menu.res:376
-msgid "J"
-msgstr "J"
+#: ../src/gpcb-menu.res:339 ../src/pcb-menu.res:315
+msgid "Shift-="
+msgstr "Shift-="
 
-#: ../src/gpcb-menu.res:411 ../src/pcb-menu.res:378
-msgid "K"
-msgstr "K"
+#: ../src/gpcb-menu.res:339 ../src/pcb-menu.res:315
+msgid "Shift<Key>="
+msgstr "Shift<Key>="
 
-#: ../src/gpcb-menu.res:359 ../src/pcb-menu.res:332
-msgid "Key Bindings"
-msgstr "Назначение клавиш"
+#: ../src/gpcb-menu.res:340 ../src/pcb-menu.res:316
+msgid "Debumpify"
+msgstr "Подтянуть"
 
-#: ../src/gpcb-menu.res:415 ../src/pcb-menu.res:382
-msgid "L"
-msgstr "L"
+#: ../src/gpcb-menu.res:341 ../src/pcb-menu.res:317
+msgid "Unjaggy"
+msgstr "Выпрямить"
 
-#: ../src/gpcb-menu.res:105
-msgid "Layout"
-msgstr "Трассировка"
+#: ../src/gpcb-menu.res:342 ../src/pcb-menu.res:318
+msgid "Vianudge"
+msgstr "Передвигать переходы"
 
-#: ../src/gpcb-menu.res:452 ../src/pcb-menu.res:420
-msgid "Left"
-msgstr "Влево"
+#: ../src/gpcb-menu.res:343 ../src/pcb-menu.res:319
+msgid "Viatrim"
+msgstr "Сокращать переходы"
 
-#: ../src/gpcb-menu.res:462 ../src/hid/gtk/gui-config.c:2227
-#: ../src/pcb-menu.res:427
-msgid "Library"
-msgstr "Библиотека"
+#: ../src/gpcb-menu.res:344
+msgid "Ortho pull"
+msgstr "Ортогональная вытяжка"
 
-#: ../src/gpcb-menu.res:508 ../src/pcb-menu.res:172
-msgid "Line"
-msgstr "Линия"
+#: ../src/gpcb-menu.res:345
+msgid "Simple optimization"
+msgstr "Простая оптимизация"
 
-#: ../src/gpcb-menu.res:415 ../src/pcb-menu.res:382
-msgid "Line Tool size +5 mil"
-msgstr "Инструмент линии +5 мил"
+#: ../src/gpcb-menu.res:345 ../src/pcb-menu.res:321
+msgid "="
+msgstr "="
 
-#: ../src/gpcb-menu.res:416 ../src/pcb-menu.res:383
-msgid "Line Tool size -5 mil"
-msgstr "Инструмент линии -5 мил"
+#: ../src/gpcb-menu.res:345 ../src/pcb-menu.res:321
+msgid "<Key>="
+msgstr "<Key>="
 
-#: ../src/gpcb-menu.res:258 ../src/pcb-menu.res:243
-msgid "Lines +10 mil"
-msgstr "Линия +10 мил"
+#: ../src/gpcb-menu.res:346 ../src/pcb-menu.res:322
+msgid "Miter"
+msgstr "Под 45°"
 
-#: ../src/gpcb-menu.res:257 ../src/pcb-menu.res:242
-msgid "Lines -10 mil"
-msgstr "Линия -10 мил"
+#: ../src/gpcb-menu.res:347 ../src/pcb-menu.res:323
+msgid "Puller"
+msgstr "Вытяжка"
 
-#: ../src/gpcb-menu.res:56
-msgid "Load a layout from a file"
-msgstr "Загрузить трассировку из файла"
+#: ../src/gpcb-menu.res:347 ../src/pcb-menu.res:323
+msgid "Y"
+msgstr "Y"
 
-#: ../src/gpcb-menu.res:57 ../src/pcb-menu.res:37
-msgid "Load element data to paste-buffer"
-msgstr "Загрузить элемент в буфер обмена"
+#: ../src/gpcb-menu.res:347 ../src/pcb-menu.res:323
+msgid "<Key>y"
+msgstr "<Key>y"
 
-#: ../src/gpcb-menu.res:56 ../src/pcb-menu.res:36
-msgid "Load layout"
-msgstr "Загрузить трассировку"
+#: ../src/gpcb-menu.res:348 ../src/pcb-menu.res:324
+msgid "Global Puller"
+msgstr "Глобальная вытяжка"
 
-#: ../src/gpcb-menu.res:58 ../src/pcb-menu.res:38
-msgid "Load layout data to paste-buffer"
-msgstr "Загрузить трассировку в буфер обмена"
+#: ../src/gpcb-menu.res:349 ../src/pcb-menu.res:325
+msgid "Selected"
+msgstr "Выбрано"
 
-#. in case we have a dialog for loading a netlist file
-#: ../src/gpcb-menu.res:59 ../src/hid/gtk/gtkhid-main.c:1339
-#: ../src/hid/gtk/gui-dialog.c:318 ../src/pcb-menu.res:39
-msgid "Load netlist file"
-msgstr "Загрузить файл списка соединений"
+#: ../src/gpcb-menu.res:350 ../src/pcb-menu.res:326
+msgid "Found"
+msgstr "Найдено"
 
-#: ../src/gpcb-menu.res:60 ../src/pcb-menu.res:40
-msgid "Load vendor resource file"
-msgstr "Загрузить файл ресурсов производителя"
+#: ../src/gpcb-menu.res:351 ../src/pcb-menu.res:327
+msgid "All"
+msgstr "Все"
 
-#: ../src/gpcb-menu.res:521 ../src/pcb-menu.res:185
-msgid "Lock"
-msgstr "Заблокировать"
+#: ../src/gpcb-menu.res:354 ../src/pcb-menu.res:329
+msgid "Only autorouted nets"
+msgstr "Только автотрассированные соединения"
 
-#: ../src/gpcb-menu.res:208 ../src/pcb-menu.res:66
-msgid "Lock Names"
-msgstr "Заблокировать названия"
+#: ../src/gpcb-menu.res:357 ../src/pcb-menu.res:331
+msgid "Design Rule Checker"
+msgstr "Проверка проектных норм"
 
-#: ../src/gpcb-menu.res:314 ../src/pcb-menu.res:292
-msgid "Lookup connection to object"
-msgstr "Поиск соединений с объектом"
+#: ../src/gpcb-menu.res:359 ../src/pcb-menu.res:333
+msgid "Apply vendor drill mapping"
+msgstr "Применить карту производственных отверстий"
 
-#: ../src/gpcb-menu.res:110 ../src/pcb-menu.res:150
-msgid "M"
-msgstr "M"
+#. -- Info tab
+#: ../src/gpcb-menu.res:365 ../src/hid/gtk/gui-config.c:1691
+msgid "Info"
+msgstr "Информация"
 
-#: ../src/gpcb-menu.res:417 ../src/pcb-menu.res:384
-msgid "MarkCrosshair"
-msgstr "Отметить курсор"
+#: ../src/gpcb-menu.res:494 ../src/pcb-menu.res:337
+msgid "Generate object report"
+msgstr "Отчёт об объектах"
 
-#: ../src/gpcb-menu.res:463 ../src/pcb-menu.res:428
-msgid "Message Log"
-msgstr "Журнал сообщений"
+#: ../src/gpcb-menu.res:366 ../src/pcb-menu.res:337
+msgid "Ctrl-R"
+msgstr "Ctrl-R"
 
-#: ../src/gpcb-menu.res:294 ../src/pcb-menu.res:275
-msgid "Mirror buffer (left/right)"
-msgstr "Отразить буфер (право/лево)"
+#: ../src/gpcb-menu.res:366 ../src/pcb-menu.res:337
+msgid "Ctrl<Key>r"
+msgstr "Ctrl<Key>r"
 
-#: ../src/gpcb-menu.res:293 ../src/pcb-menu.res:274
-msgid "Mirror buffer (up/down)"
-msgstr "Отразить буфер (верх/низ)"
+#: ../src/gpcb-menu.res:367 ../src/pcb-menu.res:338
+msgid "Generate drill summary"
+msgstr "Отчёт о сверловке"
 
-#: ../src/gpcb-menu.res:336 ../src/pcb-menu.res:313
-msgid "Miter"
-msgstr "Под 45°"
+#: ../src/gpcb-menu.res:368 ../src/pcb-menu.res:339
+msgid "Report found pins/pads"
+msgstr "Отчёт о найденных выводах/площадках"
 
-#: ../src/gpcb-menu.res:163
-msgid "More zooms and view changes"
-msgstr "Изменить масштаб и вид"
+#: ../src/gpcb-menu.res:369 ../src/pcb-menu.res:341
+msgid "Key Bindings"
+msgstr "Назначение клавиш"
 
-#: ../src/gpcb-menu.res:519 ../src/pcb-menu.res:183
-msgid "Move"
-msgstr "Переместить"
+#: ../src/gpcb-menu.res:510 ../src/pcb-menu.res:342
+msgid "Remove"
+msgstr "Удалить"
 
-#: ../src/gpcb-menu.res:194 ../src/pcb-menu.res:131
-msgid "Move current layer down"
-msgstr "Перенести текущий слой вниз"
+#: ../src/gpcb-menu.res:370 ../src/pcb-menu.res:242
+msgid "Delete"
+msgstr "Удалить"
 
-#: ../src/gpcb-menu.res:193 ../src/pcb-menu.res:130
-msgid "Move current layer up"
-msgstr "Перенести текущий слой вверх"
+#: ../src/gpcb-menu.res:370 ../src/pcb-menu.res:242
+msgid "<Key>Delete"
+msgstr "<Key>Delete"
 
-#: ../src/gpcb-menu.res:248 ../src/pcb-menu.res:233
-msgid "Move selected elements to other side"
-msgstr "Перенести выбранные элементы противоположную сторону"
+#: ../src/gpcb-menu.res:376
+msgid "Remove Selected"
+msgstr "Удалить выбранное"
 
-#: ../src/gpcb-menu.res:111 ../src/pcb-menu.res:151
-msgid "Move selected to current layer"
-msgstr "Перенести выбранное на текущий слой"
+#: ../src/gpcb-menu.res:376 ../src/pcb-menu.res:342
+msgid "Backspace"
+msgstr "Backspace"
 
-#: ../src/gpcb-menu.res:110 ../src/pcb-menu.res:150
-msgid "Move to current layer"
-msgstr "Перенести на текущий слой"
+#: ../src/gpcb-menu.res:376 ../src/pcb-menu.res:342
+msgid "<Key>BackSpace"
+msgstr "<Key>BackSpace"
 
-#: ../src/gpcb-menu.res:100 ../src/pcb-menu.res:154
-msgid "N"
-msgstr "N"
+#: ../src/gpcb-menu.res:379 ../src/pcb-menu.res:362
+msgid "Remove Connected"
+msgstr "Удалить соединённые"
 
-#: ../src/gpcb-menu.res:465 ../src/pcb-menu.res:429
-msgid "Netlist"
-msgstr "Список соединений"
+#: ../src/gpcb-menu.res:379 ../src/pcb-menu.res:345
+msgid "Shift-Backspace"
+msgstr "Shift-Backspace"
 
-#: ../src/gpcb-menu.res:215 ../src/pcb-menu.res:204
-msgid "New lines, arcs clear polygons"
-msgstr "Новые линии и дуги очищают полигоны"
+#: ../src/gpcb-menu.res:379 ../src/pcb-menu.res:345
+msgid "Shift<Key>BackSpace"
+msgstr "Shift<Key>Backspace"
 
-#: ../src/gpcb-menu.res:216 ../src/pcb-menu.res:205
-msgid "New polygons are full ones"
-msgstr "Новые полигоны залиты"
+#: ../src/gpcb-menu.res:396 ../src/pcb-menu.res:379
+msgid "Set Same"
+msgstr "Установить такой же"
 
-#: ../src/gpcb-menu.res:129 ../src/pcb-menu.res:97
-msgid "No Grid"
-msgstr "Без сетки"
+#: ../src/gpcb-menu.res:396 ../src/pcb-menu.res:379
+msgid "A"
+msgstr "A"
 
-#: ../src/gpcb-menu.res:506 ../src/pcb-menu.res:170
-msgid "None"
-msgstr "Ничего"
+#: ../src/gpcb-menu.res:396 ../src/pcb-menu.res:379
+msgid "<Key>a"
+msgstr "<Key>a"
 
-#: ../src/gpcb-menu.res:320 ../src/pcb-menu.res:298
-msgid "O"
-msgstr "O"
+#: ../src/gpcb-menu.res:397 ../src/pcb-menu.res:380
+msgid "Flip Object"
+msgstr "Переставить объект"
 
-#: ../src/gpcb-menu.res:209 ../src/pcb-menu.res:67
-msgid "Only Names"
-msgstr "Только названия"
+#: ../src/gpcb-menu.res:397 ../src/pcb-menu.res:380
+msgid "B"
+msgstr "B"
 
-#: ../src/gpcb-menu.res:344 ../src/pcb-menu.res:320
-msgid "Only autorouted nets"
-msgstr "Только автотрассированные соединения"
+#: ../src/gpcb-menu.res:397 ../src/pcb-menu.res:380
+msgid "<Key>b"
+msgstr "<Key>b"
 
-#: ../src/gpcb-menu.res:477
-msgid "Operations on selections"
-msgstr "Действия над выбранным"
+#: ../src/gpcb-menu.res:398 ../src/pcb-menu.res:381
+msgid "Find Connections"
+msgstr "Найти соединения"
 
-#: ../src/gpcb-menu.res:498
-msgid "Operations on this location"
-msgstr "Действия над этим расположением"
+#: ../src/gpcb-menu.res:398 ../src/pcb-menu.res:381
+msgid "F"
+msgstr "F"
 
-#: ../src/gpcb-menu.res:319
-msgid "Optimize rats nest"
-msgstr "Оптимизировать соединения"
+#: ../src/gpcb-menu.res:398 ../src/pcb-menu.res:381
+msgid "<Key>f"
+msgstr "<Key>f"
 
-#: ../src/gpcb-menu.res:328
-msgid "Optimize routed tracks"
-msgstr "Оптимизировать трассы"
+#: ../src/gpcb-menu.res:399 ../src/pcb-menu.res:382
+msgid "ToggleHideName Object"
+msgstr "Переключить скрытие названия объекта"
 
-#: ../src/gpcb-menu.res:252 ../src/pcb-menu.res:237
-msgid "Optimize selected rats"
-msgstr "Оптимизировать выбранные соединения"
+#: ../src/gpcb-menu.res:399 ../src/pcb-menu.res:382
+msgid "H"
+msgstr "H"
 
-#: ../src/gpcb-menu.res:334
-msgid "Ortho pull"
-msgstr "Ортогональная вытяжка"
+#: ../src/gpcb-menu.res:399 ../src/pcb-menu.res:382
+msgid "<Key>h"
+msgstr "<Key>h"
 
-#: ../src/gpcb-menu.res:204 ../src/pcb-menu.res:196
-msgid "Orthogonal moves"
-msgstr "Ортогональное перемещение"
+#: ../src/gpcb-menu.res:400 ../src/pcb-menu.res:383
+msgid "ToggleHideName SelectedElement"
+msgstr "Переключить скрытие названия выбранного элемента"
 
-#: ../src/gpcb-menu.res:426 ../src/pcb-menu.res:393
-msgid "P"
-msgstr "p"
+#: ../src/gpcb-menu.res:400 ../src/pcb-menu.res:383
+msgid "Shift-H"
+msgstr "Shift-H"
 
-#: ../src/gpcb-menu.res:238 ../src/pcb-menu.res:226
-msgid "Pads"
-msgstr "Площадки"
+#: ../src/gpcb-menu.res:400 ../src/pcb-menu.res:383
+msgid "Shift<Key>h"
+msgstr "Shift<Key>h"
 
-#: ../src/gpcb-menu.res:260 ../src/pcb-menu.res:245
-msgid "Pads +10 mil"
-msgstr "Площадки +10 мил"
+#: ../src/gpcb-menu.res:401 ../src/pcb-menu.res:384
+msgid "ChangeHole Object"
+msgstr "Изменить отверстие объекта"
 
-#: ../src/gpcb-menu.res:259 ../src/pcb-menu.res:244
-msgid "Pads -10 mil"
-msgstr "Площадки -10 мил"
+#: ../src/gpcb-menu.res:401 ../src/pcb-menu.res:384
+msgid "Ctrl-H"
+msgstr "Ctrl-H"
 
-#: ../src/gpcb-menu.res:288 ../src/pcb-menu.res:269
-msgid "Paste buffer to layout"
-msgstr "Вставить трассировку из буфера"
+#: ../src/gpcb-menu.res:401 ../src/pcb-menu.res:384
+msgid "Ctrl<Key>h"
+msgstr "Ctrl<Key>h"
 
-#: ../src/gpcb-menu.res:467 ../src/pcb-menu.res:430
-msgid "Pinout"
-msgstr "Выводы элемента"
+#: ../src/gpcb-menu.res:402 ../src/pcb-menu.res:385
+msgid "ChangeJoin Object"
+msgstr "Изменить стык объекта"
 
-#: ../src/gpcb-menu.res:278 ../src/pcb-menu.res:261
-msgid "Pins"
-msgstr "Выводы"
+#: ../src/gpcb-menu.res:402 ../src/pcb-menu.res:385
+msgid "J"
+msgstr "J"
 
-#: ../src/gpcb-menu.res:273 ../src/pcb-menu.res:257
-msgid "Pins +10 mil"
-msgstr "Выводы +10 мил"
+#: ../src/gpcb-menu.res:402 ../src/pcb-menu.res:385
+msgid "<Key>j"
+msgstr "<Key>j"
 
-#: ../src/gpcb-menu.res:272 ../src/pcb-menu.res:256
-msgid "Pins -10 mil"
-msgstr "Выводы -10 мил"
+#: ../src/gpcb-menu.res:403 ../src/pcb-menu.res:386
+msgid "ChangeJoin SelectedObject"
+msgstr "Изменить стык выбранного объекта"
 
-#: ../src/gpcb-menu.res:159 ../src/pcb-menu.res:212
-msgid "Pins/Via show Name/Number"
-msgstr "Название/номер на выводах/переходах"
+#: ../src/gpcb-menu.res:403 ../src/pcb-menu.res:386
+msgid "Shift-J"
+msgstr "Shift-J"
 
-#: ../src/gpcb-menu.res:512 ../src/pcb-menu.res:176
-msgid "Polygon"
-msgstr "Полигон"
+#: ../src/gpcb-menu.res:403 ../src/pcb-menu.res:386
+msgid "Shift<Key>j"
+msgstr "Shift<Key>j"
 
-#: ../src/gpcb-menu.res:427 ../src/pcb-menu.res:394
-msgid "Polygon Close"
-msgstr "Закрыть полигон"
+#: ../src/gpcb-menu.res:404 ../src/pcb-menu.res:387
+msgid "Clear Object +"
+msgstr "Отступ от объекта +"
 
-#: ../src/gpcb-menu.res:426 ../src/pcb-menu.res:393
-msgid "Polygon PreviousPoint"
-msgstr "Предыдущая вершина полигона"
+#: ../src/gpcb-menu.res:404 ../src/pcb-menu.res:387
+msgid "K"
+msgstr "K"
 
-#: ../src/gpcb-menu.res:74
-msgid "Preferences..."
-msgstr "Настройки..."
+#: ../src/gpcb-menu.res:404 ../src/pcb-menu.res:387
+msgid "<Key>k"
+msgstr "<Key>k"
 
-#: ../src/gpcb-menu.res:68 ../src/pcb-menu.res:41
-msgid "Print layout..."
-msgstr "Печатать трассировку..."
+#: ../src/gpcb-menu.res:405 ../src/pcb-menu.res:388
+msgid "Clear Object -"
+msgstr "Отступ от объекта -"
 
-#: ../src/gpcb-menu.res:337 ../src/pcb-menu.res:314
-msgid "Puller"
-msgstr "Вытяжка"
+#: ../src/gpcb-menu.res:405 ../src/pcb-menu.res:388
+msgid "Shift-K"
+msgstr "Shift-K"
 
-#: ../src/gpcb-menu.res:428 ../src/pcb-menu.res:395
-msgid "Q"
-msgstr "Q"
+#: ../src/gpcb-menu.res:405 ../src/pcb-menu.res:388
+msgid "Shift<Key>k"
+msgstr "Shift<Key>k"
 
-#: ../src/gpcb-menu.res:76 ../src/pcb-menu.res:52
-msgid "Quit Program"
-msgstr "Выйти из программы"
+#: ../src/gpcb-menu.res:406 ../src/pcb-menu.res:389
+msgid "Clear Selected +"
+msgstr "Отступ от выбранного +"
 
-#: ../src/gpcb-menu.res:151 ../src/pcb-menu.res:96
-msgid "Realign grid"
-msgstr "Выровнять сетку"
+#: ../src/gpcb-menu.res:406 ../src/pcb-menu.res:389
+msgid "Ctrl-K"
+msgstr "Ctrl-K"
 
-#: ../src/gpcb-menu.res:511 ../src/pcb-menu.res:175
-msgid "Rectangle"
-msgstr "Прямоугольник"
+#: ../src/gpcb-menu.res:406 ../src/pcb-menu.res:389
+msgid "Ctrl<Key>k"
+msgstr "Ctrl<Key>k"
 
-#: ../src/gpcb-menu.res:503 ../src/pcb-menu.res:136
-msgid "Redo last undone operation"
-msgstr "Повторить последнее отменённое действие"
+#: ../src/gpcb-menu.res:407 ../src/pcb-menu.res:390
+msgid "Clear Selected -"
+msgstr "Отступ от выбранного -"
 
-#: ../src/gpcb-menu.res:155 ../src/pcb-menu.res:64
-msgid "Reference Designator"
-msgstr "Позиционное обозначение"
+#: ../src/gpcb-menu.res:407 ../src/pcb-menu.res:390
+msgid "Shift-Ctrl-K"
+msgstr "Shift-Ctrl-K"
 
-#: ../src/gpcb-menu.res:514 ../src/pcb-menu.res:333
-msgid "Remove"
-msgstr "Удалить"
+#: ../src/gpcb-menu.res:407 ../src/pcb-menu.res:390
+msgid "Shift Ctrl<Key>k"
+msgstr "Shift Ctrl<Key>k"
 
-#: ../src/gpcb-menu.res:386 ../src/pcb-menu.res:353
-msgid "Remove Connected"
-msgstr "Удалить соединённые"
+#: ../src/gpcb-menu.res:408 ../src/pcb-menu.res:391
+msgid "Line Tool size +"
+msgstr "Инструмент линии +"
 
-#: ../src/gpcb-menu.res:366
-msgid "Remove Selected"
-msgstr "Удалить выбранное"
+#: ../src/gpcb-menu.res:408 ../src/pcb-menu.res:391
+msgid "L"
+msgstr "L"
 
-#: ../src/gpcb-menu.res:479
-msgid "Remove selected objects"
-msgstr "Удалить выбранные объекты"
+#: ../src/gpcb-menu.res:408 ../src/pcb-menu.res:391
+msgid "<Key>l"
+msgstr "<Key>l"
 
-#: ../src/gpcb-menu.res:358 ../src/pcb-menu.res:330
-msgid "Report found pins/pads"
-msgstr "Отчёт о найденных выводах/площадках"
+#: ../src/gpcb-menu.res:409 ../src/pcb-menu.res:392
+msgid "Line Tool size -"
+msgstr "Инструмент линии -"
 
-#: ../src/gpcb-menu.res:213 ../src/pcb-menu.res:202
-msgid "Require unique element names"
-msgstr "Уникальные названия элементов"
+#: ../src/gpcb-menu.res:409 ../src/pcb-menu.res:392
+msgid "Shift-L"
+msgstr "Shift-L"
 
-#: ../src/gpcb-menu.res:317 ../src/pcb-menu.res:295
-msgid "Reset all connections"
-msgstr "Сбросить все соединения"
+#: ../src/gpcb-menu.res:409 ../src/pcb-menu.res:392
+msgid "Shift<Key>l"
+msgstr "Shift<Key>l"
 
-#: ../src/gpcb-menu.res:316 ../src/pcb-menu.res:294
-msgid "Reset scanned lines/polygons"
-msgstr "Сбросить просмотренные линии/полигоны"
+#: ../src/gpcb-menu.res:410 ../src/pcb-menu.res:393
+msgid "Move Object to current layer"
+msgstr "Переместить объект на текущий слой"
 
-#: ../src/gpcb-menu.res:315 ../src/pcb-menu.res:293
-msgid "Reset scanned pads/pins/vias"
-msgstr "Сбросить просмотренные площадки/выводы/переходы"
+#: ../src/gpcb-menu.res:410 ../src/pcb-menu.res:393
+msgid "M"
+msgstr "M"
 
-#: ../src/gpcb-menu.res:53 ../src/pcb-menu.res:34
-msgid "Revert"
-msgstr "Перезагрузить"
+#: ../src/gpcb-menu.res:410 ../src/pcb-menu.res:393
+msgid "<Key>m"
+msgstr "<Key>m"
 
-#: ../src/gpcb-menu.res:53
-msgid "Revert to the layout stored on disk"
-msgstr "Перезагрузить трассировку с диска"
+#: ../src/gpcb-menu.res:411 ../src/pcb-menu.res:394
+msgid "MarkCrosshair"
+msgstr "Отметить курсор"
 
-#: ../src/gpcb-menu.res:453 ../src/pcb-menu.res:421
-msgid "Right"
-msgstr "Право"
+#: ../src/gpcb-menu.res:411 ../src/pcb-menu.res:394
+msgid "Ctrl-M"
+msgstr "Ctrl-M"
 
-#: ../src/gpcb-menu.res:326 ../src/pcb-menu.res:304
-msgid "Rip up all auto-routed tracks"
-msgstr "Разорвать все автотрассированные трассы"
+#: ../src/gpcb-menu.res:411 ../src/pcb-menu.res:394
+msgid "Ctrl<Key>m"
+msgstr "Ctrl<Key>m"
 
-#: ../src/gpcb-menu.res:496 ../src/pcb-menu.res:239
-msgid "Rip up selected auto-routed tracks"
-msgstr "Разорвать выбранные автотрассированные трассы"
+#: ../src/gpcb-menu.res:412 ../src/pcb-menu.res:395
+msgid "Select shortest rat"
+msgstr "Выбрать кратчайшее соединение"
 
-#: ../src/gpcb-menu.res:515 ../src/pcb-menu.res:179
-msgid "Rotate"
-msgstr "Повернуть"
+#: ../src/gpcb-menu.res:412 ../src/pcb-menu.res:395
+msgid "Shift-N"
+msgstr "Shift-N"
 
-#: ../src/gpcb-menu.res:290 ../src/pcb-menu.res:271
-msgid "Rotate buffer 90 deg CCW"
-msgstr "Повернуть буфер на +90°"
+#: ../src/gpcb-menu.res:412 ../src/pcb-menu.res:395
+msgid "Shift<Key>n"
+msgstr "Shift<Key>n"
 
-#: ../src/gpcb-menu.res:292 ../src/pcb-menu.res:273
-msgid "Rotate buffer 90 deg CW"
-msgstr "Повернуть буфер на -90°"
+#: ../src/gpcb-menu.res:413 ../src/pcb-menu.res:396
+msgid "AddRats to selected pins"
+msgstr "Добавить соединения к выбранному выводу"
 
-#: ../src/gpcb-menu.res:112 ../src/pcb-menu.res:163
-msgid "Route Styles"
-msgstr "Стили трассировки"
+#: ../src/gpcb-menu.res:413 ../src/pcb-menu.res:396
+msgid "Shift-O"
+msgstr "Shift-O"
 
-#: ../src/gpcb-menu.res:212 ../src/pcb-menu.res:201
-msgid "Rubber band mode"
-msgstr "Режим резиновой ленты"
+#: ../src/gpcb-menu.res:413 ../src/pcb-menu.res:396
+msgid "Shift<Key>o"
+msgstr "Shift<Key>o"
 
-#: ../src/gpcb-menu.res:429 ../src/pcb-menu.res:396
-msgid "S"
-msgstr "S"
+#: ../src/gpcb-menu.res:419 ../src/pcb-menu.res:402
+msgid "ChangeOctagon Object"
+msgstr "Изменить восьмиугольный объект"
 
-#: ../src/gpcb-menu.res:300 ../src/pcb-menu.res:281
-msgid "Save buffer elements to file"
-msgstr "Сохранить элементы из буфера в файл"
+#: ../src/gpcb-menu.res:419 ../src/pcb-menu.res:402
+msgid "Ctrl-O"
+msgstr "Ctrl-O"
 
-#: ../src/gpcb-menu.res:62
-msgid "Save connection data of"
-msgstr "Сохранить данные соединений"
+#: ../src/gpcb-menu.res:419 ../src/pcb-menu.res:402
+msgid "Ctrl<Key>o"
+msgstr "Ctrl<Key>o"
 
-#: ../src/gpcb-menu.res:50 ../src/pcb-menu.res:32
-msgid "Save layout"
-msgstr "Сохранить трассировку"
+#: ../src/gpcb-menu.res:420 ../src/pcb-menu.res:403
+msgid "Polygon PreviousPoint"
+msgstr "Предыдущая вершина полигона"
 
-#: ../src/gpcb-menu.res:51 ../src/pcb-menu.res:33
-msgid "Save layout as..."
-msgstr "Сохранить трассировку как..."
+#: ../src/gpcb-menu.res:420 ../src/pcb-menu.res:403
+msgid "P"
+msgstr "p"
 
-#: ../src/gpcb-menu.res:50
-msgid "Saves current layout"
-msgstr "Сохранить текущую трассировку"
+#: ../src/gpcb-menu.res:420 ../src/pcb-menu.res:403
+msgid "<Key>p"
+msgstr "<Key>p"
 
-#: ../src/gpcb-menu.res:51
-msgid "Saves current layout into a new file"
-msgstr "Сохранить текущую трассировку в новый файл"
+#: ../src/gpcb-menu.res:421 ../src/pcb-menu.res:404
+msgid "Polygon Close"
+msgstr "Закрыть полигон"
 
-#: ../src/gpcb-menu.res:228 ../src/hid/gtk/gui-netlist-window.c:756
-msgid "Select"
-msgstr "Выбрать"
+#: ../src/gpcb-menu.res:421 ../src/pcb-menu.res:404
+msgid "Shift-P"
+msgstr "Shift-P"
 
-#: ../src/gpcb-menu.res:230 ../src/pcb-menu.res:218
-msgid "Select all connected objects"
-msgstr "Выбрать все соединённые объекты"
+#: ../src/gpcb-menu.res:421 ../src/pcb-menu.res:404
+msgid "Shift<Key>p"
+msgstr "Shift<Key>p"
 
-#: ../src/gpcb-menu.res:97 ../src/pcb-menu.res:148
-msgid "Select all visible"
-msgstr "Выбрать всё видимое"
+#: ../src/gpcb-menu.res:422 ../src/pcb-menu.res:405
+msgid "ChangeSquare Object"
+msgstr "Изменить прямоугольный объект"
 
-#: ../src/gpcb-menu.res:229 ../src/pcb-menu.res:217
-msgid "Select all visible objects"
-msgstr "Выбрать все видимые объекты"
+#: ../src/gpcb-menu.res:422 ../src/pcb-menu.res:405
+msgid "Q"
+msgstr "Q"
 
-#: ../src/gpcb-menu.res:235 ../src/pcb-menu.res:223
-msgid "Select by name"
-msgstr "Выбрать по названию"
+#: ../src/gpcb-menu.res:422 ../src/pcb-menu.res:405
+msgid "<Key>q"
+msgstr "<Key>q"
 
-#: ../src/gpcb-menu.res:302 ../src/pcb-menu.res:283
-msgid "Select current buffer"
-msgstr "Выбрать текущий буфер"
+#: ../src/gpcb-menu.res:423 ../src/pcb-menu.res:406
+msgid "ChangeSize +"
+msgstr "Размер +"
 
-#: ../src/gpcb-menu.res:418 ../src/pcb-menu.res:385
-msgid "Select shortest rat"
-msgstr "Выбрать кратчайшее соединение"
+#: ../src/gpcb-menu.res:423 ../src/pcb-menu.res:406
+msgid "S"
+msgstr "S"
 
-#: ../src/gpcb-menu.res:339 ../src/pcb-menu.res:316
-msgid "Selected"
-msgstr "Выбрано"
+#: ../src/gpcb-menu.res:423 ../src/pcb-menu.res:406
+msgid "<Key>s"
+msgstr "<Key>s"
 
-#: ../src/gpcb-menu.res:403 ../src/pcb-menu.res:370
-msgid "Set Same"
-msgstr "Установить такой же"
+#: ../src/gpcb-menu.res:424 ../src/pcb-menu.res:407
+msgid "ChangeSize -"
+msgstr "Размер -"
 
-#: ../src/gpcb-menu.res:201
-msgid "Settings"
-msgstr "Настройки"
+#: ../src/gpcb-menu.res:424 ../src/pcb-menu.res:407
+msgid "Shift-S"
+msgstr "Shift-S"
 
-#: ../src/gpcb-menu.res:96 ../src/pcb-menu.res:147
-msgid "Shift Alt<Key>a"
-msgstr "Shift Alt<Key>a"
+#: ../src/gpcb-menu.res:424 ../src/pcb-menu.res:407
+msgid "Shift<Key>s"
+msgstr "Shift<Key>s"
 
-#: ../src/gpcb-menu.res:148 ../src/pcb-menu.res:116
-msgid "Shift Ctrl<Key>g"
-msgstr "Shift Ctrl<Key>g"
+#: ../src/gpcb-menu.res:425 ../src/pcb-menu.res:408
+msgid "ChangeDrill +5 mil"
+msgstr "Отверстие +5 мил"
 
-#: ../src/gpcb-menu.res:414 ../src/pcb-menu.res:381
-msgid "Shift Ctrl<Key>k"
-msgstr "Shift Ctrl<Key>k"
+#: ../src/gpcb-menu.res:425 ../src/pcb-menu.res:408
+msgid "Alt-S"
+msgstr "Alt-S"
 
-#: ../src/gpcb-menu.res:86 ../src/pcb-menu.res:137
-msgid "Shift Ctrl<Key>u"
-msgstr "Shift Ctrl<Key>u"
+#: ../src/gpcb-menu.res:425 ../src/pcb-menu.res:408
+msgid "Alt<Key>s"
+msgstr "Alt<Key>s"
 
-#: ../src/gpcb-menu.res:436 ../src/pcb-menu.res:403
-msgid "Shift Ctrl<Key>v"
-msgstr "Shift Ctrl<Key>v"
+#: ../src/gpcb-menu.res:426 ../src/pcb-menu.res:409
+msgid "ChangeDrill -5 mil"
+msgstr "Отверстие -5 мил"
 
-#: ../src/gpcb-menu.res:303 ../src/pcb-menu.res:284
-msgid "Shift-1"
-msgstr "Shift-1"
+#: ../src/gpcb-menu.res:426 ../src/pcb-menu.res:409
+msgid "Alt-Shift-S"
+msgstr "Alt-Shift-S"
 
-#: ../src/gpcb-menu.res:304 ../src/pcb-menu.res:285
-msgid "Shift-2"
-msgstr "Shift-2"
+#: ../src/gpcb-menu.res:426 ../src/pcb-menu.res:409
+msgid "Alt Shift<Key>s"
+msgstr "Alt Shift<Key>s"
 
-#: ../src/gpcb-menu.res:305 ../src/pcb-menu.res:286
-msgid "Shift-3"
-msgstr "Shift-3"
+#: ../src/gpcb-menu.res:427 ../src/pcb-menu.res:410
+msgid "Text Tool scale +10 mil"
+msgstr "Размер инструмента текста +10 мил"
 
-#: ../src/gpcb-menu.res:306 ../src/pcb-menu.res:287
-msgid "Shift-4"
-msgstr "Shift-4"
+#: ../src/gpcb-menu.res:427 ../src/pcb-menu.res:410
+msgid "T"
+msgstr "T"
 
-#: ../src/gpcb-menu.res:307 ../src/pcb-menu.res:288
-msgid "Shift-5"
-msgstr "Shift-5"
+#: ../src/gpcb-menu.res:427 ../src/pcb-menu.res:410
+msgid "<Key>t"
+msgstr "<Key>t"
 
-#: ../src/gpcb-menu.res:329 ../src/pcb-menu.res:306
-msgid "Shift-="
-msgstr "Shift-="
+#: ../src/gpcb-menu.res:428 ../src/pcb-menu.res:411
+msgid "Text Tool scale -10 mil"
+msgstr "Размер инструмента текста -10 мил"
 
-#: ../src/gpcb-menu.res:96 ../src/pcb-menu.res:147
-msgid "Shift-Alt-A"
-msgstr "Shift-Alt-A"
+#: ../src/gpcb-menu.res:428 ../src/pcb-menu.res:411
+msgid "Shift-T"
+msgstr "Shift-T"
 
-#: ../src/gpcb-menu.res:248 ../src/pcb-menu.res:233
-msgid "Shift-B"
-msgstr "Shift-B"
+#: ../src/gpcb-menu.res:428 ../src/pcb-menu.res:411
+msgid "Shift<Key>t"
+msgstr "Shift<Key>t"
 
-#: ../src/gpcb-menu.res:369 ../src/pcb-menu.res:336
-msgid "Shift-Backspace"
-msgstr "Shift-Backspace"
+#: ../src/gpcb-menu.res:429 ../src/pcb-menu.res:412
+msgid "Via Tool size +5 mil"
+msgstr "Размер инструмента перехода +5 мил"
 
-#: ../src/gpcb-menu.res:148 ../src/pcb-menu.res:116
-msgid "Shift-Ctrl-G"
-msgstr "Shift-Ctrl-G"
+#: ../src/gpcb-menu.res:429 ../src/pcb-menu.res:412
+msgid "Shift-V"
+msgstr "Shift-V"
 
-#: ../src/gpcb-menu.res:414 ../src/pcb-menu.res:381
-msgid "Shift-Ctrl-K"
-msgstr "Shift-Ctrl-K"
+#: ../src/gpcb-menu.res:429 ../src/pcb-menu.res:412
+msgid "Shift<Key>v"
+msgstr "Shift<Key>v"
 
-#: ../src/gpcb-menu.res:86 ../src/pcb-menu.res:137
-msgid "Shift-Ctrl-U"
-msgstr "Shift-Ctrl-U"
+#: ../src/gpcb-menu.res:430 ../src/pcb-menu.res:413
+msgid "Via Tool size -5 mil"
+msgstr "Размер инструмента перехода -5 мил"
 
-#: ../src/gpcb-menu.res:436 ../src/pcb-menu.res:403
+#: ../src/gpcb-menu.res:430 ../src/pcb-menu.res:413
 msgid "Shift-Ctrl-V"
 msgstr "Shift-Ctrl-V"
 
-#: ../src/gpcb-menu.res:467 ../src/pcb-menu.res:430
-msgid "Shift-D"
-msgstr "Shift-D"
+#: ../src/gpcb-menu.res:430 ../src/pcb-menu.res:413
+msgid "Shift Ctrl<Key>v"
+msgstr "Shift Ctrl<Key>v"
 
-#: ../src/gpcb-menu.res:249 ../src/pcb-menu.res:353
-msgid "Shift-Delete"
-msgstr "Shift-Delete"
+#: ../src/gpcb-menu.res:431 ../src/pcb-menu.res:414
+msgid "Via Tool drill +5 mil"
+msgstr "Инструмент переходного отверстия +5 мил"
 
-#: ../src/gpcb-menu.res:322 ../src/pcb-menu.res:300
-msgid "Shift-E"
-msgstr "Shift-E"
+#: ../src/gpcb-menu.res:431 ../src/pcb-menu.res:414
+msgid "Alt-V"
+msgstr "Alt-V"
 
-#: ../src/gpcb-menu.res:317 ../src/pcb-menu.res:295
-msgid "Shift-F"
-msgstr "Shift-F"
+#: ../src/gpcb-menu.res:431 ../src/pcb-menu.res:414
+msgid "Alt<Key>v"
+msgstr "Alt<Key>v"
 
-#: ../src/gpcb-menu.res:291 ../src/pcb-menu.res:272
-msgid "Shift-F7"
-msgstr "Shift-F7"
+#: ../src/gpcb-menu.res:432 ../src/pcb-menu.res:415
+msgid "Via Tool drill -5 mil"
+msgstr "Инструмент переходного отверстия -5 мил"
 
-#: ../src/gpcb-menu.res:146 ../src/pcb-menu.res:114
-msgid "Shift-G"
-msgstr "Shift-G"
+#: ../src/gpcb-menu.res:432 ../src/pcb-menu.res:415
+msgid "Alt-Shift-V"
+msgstr "Alt-Shift-V"
 
-#: ../src/gpcb-menu.res:407 ../src/pcb-menu.res:374
-msgid "Shift-H"
-msgstr "Shift-H"
+#: ../src/gpcb-menu.res:432 ../src/pcb-menu.res:415
+msgid "Alt Shift<Key>v"
+msgstr "Alt Shift<Key>v"
 
-#: ../src/gpcb-menu.res:410 ../src/pcb-menu.res:377
-msgid "Shift-J"
-msgstr "Shift-J"
+#: ../src/gpcb-menu.res:433 ../src/pcb-menu.res:416
+msgid "AddRats Selected"
+msgstr "Добавить выбранные соединения"
 
-#: ../src/gpcb-menu.res:412 ../src/pcb-menu.res:379
-msgid "Shift-K"
-msgstr "Shift-K"
+#: ../src/gpcb-menu.res:433 ../src/pcb-menu.res:416
+msgid "Shift-W"
+msgstr "Shift-W"
 
-#: ../src/gpcb-menu.res:416 ../src/pcb-menu.res:383
-msgid "Shift-L"
-msgstr "Shift-L"
+#: ../src/gpcb-menu.res:433 ../src/pcb-menu.res:416
+msgid "Shift<Key>w"
+msgstr "Shift<Key>w"
 
-#: ../src/gpcb-menu.res:111 ../src/pcb-menu.res:151
-msgid "Shift-M"
-msgstr "Shift-M"
+#: ../src/gpcb-menu.res:434 ../src/pcb-menu.res:417
+msgid "Add All Rats"
+msgstr "Добавить все соединения"
 
-#: ../src/gpcb-menu.res:418 ../src/pcb-menu.res:385
-msgid "Shift-N"
-msgstr "Shift-N"
+#: ../src/gpcb-menu.res:434 ../src/pcb-menu.res:417
+msgid "W"
+msgstr "W"
 
-#: ../src/gpcb-menu.res:419 ../src/pcb-menu.res:386
-msgid "Shift-O"
-msgstr "Shift-O"
+#: ../src/gpcb-menu.res:434 ../src/pcb-menu.res:417
+msgid "<Key>w"
+msgstr "<Key>w"
 
-#: ../src/gpcb-menu.res:427 ../src/pcb-menu.res:394
-msgid "Shift-P"
-msgstr "Shift-P"
+#: ../src/gpcb-menu.res:435 ../src/pcb-menu.res:419
+msgid "Cycle Clip"
+msgstr "Переключить ограничитель"
 
-#: ../src/gpcb-menu.res:85 ../src/pcb-menu.res:136
-msgid "Shift-R"
-msgstr "Shift-R"
+#: ../src/gpcb-menu.res:435 ../src/pcb-menu.res:419
+msgid "/"
+msgstr "/"
 
-#: ../src/gpcb-menu.res:430 ../src/pcb-menu.res:397
-msgid "Shift-S"
-msgstr "Shift-S"
+#: ../src/gpcb-menu.res:435 ../src/pcb-menu.res:419
+msgid "<Key>/"
+msgstr "<Key>/"
 
-#: ../src/gpcb-menu.res:434 ../src/pcb-menu.res:401
-msgid "Shift-T"
-msgstr "Shift-T"
+#: ../src/gpcb-menu.res:436
+msgid "Arrow Mode"
+msgstr "Режим выбора"
 
-#: ../src/gpcb-menu.res:177 ../src/pcb-menu.res:56
-msgid "Shift-Tab"
-msgstr "Shift-Tab"
+#: ../src/gpcb-menu.res:436 ../src/pcb-menu.res:420
+msgid "Space"
+msgstr "Пробел"
 
-#: ../src/gpcb-menu.res:435 ../src/pcb-menu.res:402
-msgid "Shift-V"
-msgstr "Shift-V"
+#: ../src/gpcb-menu.res:436 ../src/pcb-menu.res:420
+msgid "<Key>space"
+msgstr "<Key>пробел"
 
-#: ../src/gpcb-menu.res:439 ../src/pcb-menu.res:406
-msgid "Shift-W"
-msgstr "Shift-W"
+#: ../src/gpcb-menu.res:437 ../src/pcb-menu.res:421
+msgid "Temp Arrow ON"
+msgstr "Включить временный выбор"
 
-#: ../src/gpcb-menu.res:162 ../src/pcb-menu.res:79
-msgid "Shift-Z"
-msgstr "Shift-Z"
+#: ../src/gpcb-menu.res:437 ../src/pcb-menu.res:421
+msgid "["
+msgstr "["
 
-#: ../src/gpcb-menu.res:303 ../src/pcb-menu.res:284
-msgid "Shift<Key>1"
-msgstr "Shift<Key>1"
+#: ../src/gpcb-menu.res:437 ../src/pcb-menu.res:421
+msgid "<Key>["
+msgstr "<Key>["
 
-#: ../src/gpcb-menu.res:304 ../src/pcb-menu.res:285
-msgid "Shift<Key>2"
-msgstr "Shift<Key>2"
+#: ../src/gpcb-menu.res:438 ../src/pcb-menu.res:422
+msgid "Temp Arrow OFF"
+msgstr "Отключить временный выбор"
 
-#: ../src/gpcb-menu.res:305 ../src/pcb-menu.res:286
-msgid "Shift<Key>3"
-msgstr "Shift<Key>3"
+#: ../src/gpcb-menu.res:438 ../src/pcb-menu.res:422
+msgid "]"
+msgstr "]"
+
+#: ../src/gpcb-menu.res:438 ../src/pcb-menu.res:422
+msgid "<Key>]"
+msgstr "<Key>]"
+
+#: ../src/gpcb-menu.res:440 ../src/pcb-menu.res:424
+msgid "Step Up"
+msgstr "Шаг вверх"
+
+#: ../src/gpcb-menu.res:444 ../src/pcb-menu.res:428
+msgid "Up"
+msgstr "Вверх"
+
+#: ../src/gpcb-menu.res:440 ../src/pcb-menu.res:424
+msgid "<Key>Up"
+msgstr "<Key>Вверх"
 
-#: ../src/gpcb-menu.res:306 ../src/pcb-menu.res:287
-msgid "Shift<Key>4"
-msgstr "Shift<Key>4"
+#: ../src/gpcb-menu.res:441 ../src/pcb-menu.res:425
+msgid "Step Down"
+msgstr "Шаг вниз"
 
-#: ../src/gpcb-menu.res:307 ../src/pcb-menu.res:288
-msgid "Shift<Key>5"
-msgstr "Shift<Key>5"
+#: ../src/gpcb-menu.res:445 ../src/pcb-menu.res:429
+msgid "Down"
+msgstr "Вниз"
 
-#: ../src/gpcb-menu.res:329 ../src/pcb-menu.res:306
-msgid "Shift<Key>="
-msgstr "Shift<Key>="
+#: ../src/gpcb-menu.res:441 ../src/pcb-menu.res:425
+msgid "<Key>Down"
+msgstr "<Key>Вниз"
 
-#: ../src/gpcb-menu.res:369 ../src/pcb-menu.res:336
-msgid "Shift<Key>BackSpace"
-msgstr "Shift<Key>Backspace"
+#: ../src/gpcb-menu.res:442 ../src/pcb-menu.res:426
+msgid "Step Left"
+msgstr "Шаг влево"
 
-#: ../src/gpcb-menu.res:249 ../src/pcb-menu.res:353
-msgid "Shift<Key>Delete"
-msgstr "Shift<Key>Delete"
+#: ../src/gpcb-menu.res:446 ../src/pcb-menu.res:430
+msgid "Left"
+msgstr "Влево"
 
-#: ../src/gpcb-menu.res:451 ../src/pcb-menu.res:419
-msgid "Shift<Key>Down"
-msgstr "Shift<Key>Вниз"
+#: ../src/gpcb-menu.res:442 ../src/pcb-menu.res:426
+msgid "<Key>Left"
+msgstr "<Key>Влево"
 
-#: ../src/gpcb-menu.res:291 ../src/pcb-menu.res:272
-msgid "Shift<Key>F7"
-msgstr "Shift<Key>F7"
+#: ../src/gpcb-menu.res:443 ../src/pcb-menu.res:427
+msgid "Step Right"
+msgstr "Шаг вправо"
 
-#: ../src/gpcb-menu.res:452 ../src/pcb-menu.res:420
-msgid "Shift<Key>Left"
-msgstr "Shift<Key>Влево"
+#: ../src/gpcb-menu.res:447 ../src/pcb-menu.res:431
+msgid "Right"
+msgstr "Право"
 
-#: ../src/gpcb-menu.res:453 ../src/pcb-menu.res:421
-msgid "Shift<Key>Right"
-msgstr "Shift<Key>Вправо"
+#: ../src/gpcb-menu.res:443 ../src/pcb-menu.res:427
+msgid "<Key>Right"
+msgstr "<Key>Вправо"
 
-#: ../src/gpcb-menu.res:177 ../src/pcb-menu.res:56
-msgid "Shift<Key>Tab"
-msgstr "Shift<Key>Tab"
+#: ../src/gpcb-menu.res:444 ../src/pcb-menu.res:428
+msgid "Step +Up"
+msgstr "Шаг +вверх"
 
-#: ../src/gpcb-menu.res:450 ../src/pcb-menu.res:418
+#: ../src/gpcb-menu.res:444 ../src/pcb-menu.res:428
 msgid "Shift<Key>Up"
 msgstr "Shift<Key>Вверх"
 
-#: ../src/gpcb-menu.res:248 ../src/pcb-menu.res:233
-msgid "Shift<Key>b"
-msgstr "Shift<Key>b"
+#: ../src/gpcb-menu.res:445 ../src/pcb-menu.res:429
+msgid "Step +Down"
+msgstr "Шаг +вниз"
 
-#: ../src/gpcb-menu.res:467 ../src/pcb-menu.res:430
-msgid "Shift<Key>d"
-msgstr "Shift<Key>d"
+#: ../src/gpcb-menu.res:445 ../src/pcb-menu.res:429
+msgid "Shift<Key>Down"
+msgstr "Shift<Key>Вниз"
 
-#: ../src/gpcb-menu.res:322 ../src/pcb-menu.res:300
-msgid "Shift<Key>e"
-msgstr "Shift<Key>e"
+#: ../src/gpcb-menu.res:446 ../src/pcb-menu.res:430
+msgid "Step +Left"
+msgstr "Шаг +влево"
 
-#: ../src/gpcb-menu.res:317 ../src/pcb-menu.res:295
-msgid "Shift<Key>f"
-msgstr "Shift<Key>f"
+#: ../src/gpcb-menu.res:446 ../src/pcb-menu.res:430
+msgid "Shift<Key>Left"
+msgstr "Shift<Key>Влево"
 
-#: ../src/gpcb-menu.res:146 ../src/pcb-menu.res:114
-msgid "Shift<Key>g"
-msgstr "Shift<Key>g"
+#: ../src/gpcb-menu.res:447 ../src/pcb-menu.res:431
+msgid "Step +Right"
+msgstr "Шаг +вправо"
 
-#: ../src/gpcb-menu.res:407 ../src/pcb-menu.res:374
-msgid "Shift<Key>h"
-msgstr "Shift<Key>h"
+#: ../src/gpcb-menu.res:447 ../src/pcb-menu.res:431
+msgid "Shift<Key>Right"
+msgstr "Shift<Key>Вправо"
 
-#: ../src/gpcb-menu.res:410 ../src/pcb-menu.res:377
-msgid "Shift<Key>j"
-msgstr "Shift<Key>j"
+#: ../src/gpcb-menu.res:448 ../src/pcb-menu.res:432
+msgid "Click"
+msgstr "Щелчок"
 
-#: ../src/gpcb-menu.res:412 ../src/pcb-menu.res:379
-msgid "Shift<Key>k"
-msgstr "Shift<Key>k"
+#: ../src/gpcb-menu.res:448 ../src/pcb-menu.res:432
+msgid "Enter"
+msgstr "Enter"
 
-#: ../src/gpcb-menu.res:416 ../src/pcb-menu.res:383
-msgid "Shift<Key>l"
-msgstr "Shift<Key>l"
+#: ../src/gpcb-menu.res:448 ../src/pcb-menu.res:432
+msgid "<Key>Enter"
+msgstr "<Key>Enter"
 
-#: ../src/gpcb-menu.res:111 ../src/pcb-menu.res:151
-msgid "Shift<Key>m"
-msgstr "Shift<Key>m"
+#: ../src/gpcb-menu.res:456
+msgid "Window"
+msgstr "Окно"
 
-#: ../src/gpcb-menu.res:418 ../src/pcb-menu.res:385
-msgid "Shift<Key>n"
-msgstr "Shift<Key>n"
+#: ../src/gpcb-menu.res:457 ../src/hid/gtk/gui-config.c:2159
+#: ../src/pcb-menu.res:437
+msgid "Library"
+msgstr "Библиотека"
 
-#: ../src/gpcb-menu.res:419 ../src/pcb-menu.res:386
-msgid "Shift<Key>o"
-msgstr "Shift<Key>o"
+#: ../src/gpcb-menu.res:457
+msgid "i"
+msgstr "i"
 
-#: ../src/gpcb-menu.res:427 ../src/pcb-menu.res:394
-msgid "Shift<Key>p"
-msgstr "Shift<Key>p"
+#: ../src/gpcb-menu.res:457
+msgid "<Key>i"
+msgstr "<Key>i"
 
-#: ../src/gpcb-menu.res:85 ../src/pcb-menu.res:136
-msgid "Shift<Key>r"
-msgstr "Shift<Key>r"
+#: ../src/gpcb-menu.res:458 ../src/pcb-menu.res:438
+msgid "Message Log"
+msgstr "Журнал сообщений"
 
-#: ../src/gpcb-menu.res:430 ../src/pcb-menu.res:397
-msgid "Shift<Key>s"
-msgstr "Shift<Key>s"
+#: ../src/gpcb-menu.res:459
+msgid "DRC Check"
+msgstr "Проверка проектных норм"
 
-#: ../src/gpcb-menu.res:434 ../src/pcb-menu.res:401
-msgid "Shift<Key>t"
-msgstr "Shift<Key>t"
+#: ../src/gpcb-menu.res:460 ../src/pcb-menu.res:439
+msgid "Netlist"
+msgstr "Список соединений"
 
-#: ../src/gpcb-menu.res:435 ../src/pcb-menu.res:402
-msgid "Shift<Key>v"
-msgstr "Shift<Key>v"
+#: ../src/gpcb-menu.res:461
+msgid "Command Entry"
+msgstr "Ввод команды"
 
-#: ../src/gpcb-menu.res:439 ../src/pcb-menu.res:406
-msgid "Shift<Key>w"
-msgstr "Shift<Key>w"
+#: ../src/gpcb-menu.res:461 ../src/pcb-menu.res:185
+msgid ":"
+msgstr ":"
 
-#: ../src/gpcb-menu.res:162 ../src/pcb-menu.res:79
-msgid "Shift<Key>z"
-msgstr "Shift<Key>z"
+#: ../src/gpcb-menu.res:461 ../src/pcb-menu.res:185
+msgid "<Key>:"
+msgstr "<Key>:"
 
-#: ../src/gpcb-menu.res:217 ../src/pcb-menu.res:206
-msgid "Show autorouter trials"
-msgstr "Отображать попытки автотрассировщика"
+#: ../src/gpcb-menu.res:462 ../src/pcb-menu.res:440
+msgid "Pinout"
+msgstr "Выводы элемента"
 
-#: ../src/gpcb-menu.res:183 ../src/pcb-menu.res:120
-msgid "Shown Layers"
-msgstr "Отображать слои"
+#: ../src/gpcb-menu.res:462 ../src/pcb-menu.res:440
+msgid "Shift-D"
+msgstr "Shift-D"
 
-#: ../src/gpcb-menu.res:335
-msgid "Simple optimization"
-msgstr "Простая оптимизация"
+#: ../src/gpcb-menu.res:462 ../src/pcb-menu.res:440
+msgid "Shift<Key>d"
+msgstr "Shift<Key>d"
 
-#: ../src/gpcb-menu.res:442 ../src/pcb-menu.res:410
-msgid "Space"
-msgstr "Пробел"
+#: ../src/gpcb-menu.res:464 ../src/pcb-menu.res:32
+msgid "About..."
+msgstr "О программе..."
 
-#: ../src/gpcb-menu.res:178
-msgid "Spin 180 degrees"
-msgstr "Повернуть на 180°"
+#: ../src/gpcb-menu.res:472
+msgid "Operations on selections"
+msgstr "Действия над выбранным"
 
-#: ../src/gpcb-menu.res:72 ../src/pcb-menu.res:50
-msgid "Start new layout"
-msgstr "Начать новую трассировку"
+#: ../src/gpcb-menu.res:473 ../src/pcb-menu.res:226
+msgid "Unselect all objects"
+msgstr "Снять выделение со всех объектов"
 
-#: ../src/gpcb-menu.res:451 ../src/pcb-menu.res:419
-msgid "Step +Down"
-msgstr "Шаг +вниз"
+#: ../src/gpcb-menu.res:475 ../src/pcb-menu.res:273
+msgid "Copy selection to buffer"
+msgstr "Копировать выбранное в буфер"
 
-#: ../src/gpcb-menu.res:452 ../src/pcb-menu.res:420
-msgid "Step +Left"
-msgstr "Шаг +влево"
+#: ../src/gpcb-menu.res:481 ../src/pcb-menu.res:275
+msgid "Cut selection to buffer"
+msgstr "Вырезать выбранное в буфер"
 
-#: ../src/gpcb-menu.res:453 ../src/pcb-menu.res:421
-msgid "Step +Right"
-msgstr "Шаг +вправо"
+#: ../src/gpcb-menu.res:489
+msgid "Auto place selected elements"
+msgstr "Авторазмещение выбранных элементов"
 
-#: ../src/gpcb-menu.res:450 ../src/pcb-menu.res:418
-msgid "Step +Up"
-msgstr "Шаг +вверх"
+#: ../src/gpcb-menu.res:490
+msgid "Autoroute selected elements"
+msgstr "Автотрассировка выбранных элементов"
 
-#: ../src/gpcb-menu.res:447 ../src/pcb-menu.res:415
-msgid "Step Down"
-msgstr "Шаг вниз"
+#: ../src/gpcb-menu.res:493
+msgid "Operations on this location"
+msgstr "Действия над этим расположением"
 
-#: ../src/gpcb-menu.res:448 ../src/pcb-menu.res:416
-msgid "Step Left"
-msgstr "Шаг влево"
+#: ../src/gpcb-menu.res:497 ../src/pcb-menu.res:134
+msgid "Undo last operation"
+msgstr "Отменить последнее действие"
 
-#: ../src/gpcb-menu.res:449 ../src/pcb-menu.res:417
-msgid "Step Right"
-msgstr "Шаг вправо"
+#: ../src/gpcb-menu.res:498 ../src/pcb-menu.res:135
+msgid "Redo last undone operation"
+msgstr "Вернуть последнее отменённое действие"
 
-#: ../src/gpcb-menu.res:446 ../src/pcb-menu.res:414
-msgid "Step Up"
-msgstr "Шаг вверх"
+#: ../src/gpcb-menu.res:501 ../src/pcb-menu.res:166
+msgid "None"
+msgstr "Ничего"
 
-#: ../src/gpcb-menu.res:179 ../src/pcb-menu.res:58
-msgid "Swap Sides"
-msgstr "Поменять стороны"
+#: ../src/gpcb-menu.res:502 ../src/pcb-menu.res:167
+msgid "Via"
+msgstr "Переход"
 
-#: ../src/gpcb-menu.res:433 ../src/pcb-menu.res:400
-msgid "T"
-msgstr "T"
+#: ../src/gpcb-menu.res:502 ../src/pcb-menu.res:167
+msgid "F1"
+msgstr "F1"
 
-#: ../src/gpcb-menu.res:176 ../src/pcb-menu.res:55
-msgid "Tab"
-msgstr "Tab"
+#: ../src/gpcb-menu.res:502 ../src/pcb-menu.res:167
+msgid "<Key>F1"
+msgstr "<Key>F1"
 
-#: ../src/gpcb-menu.res:444 ../src/pcb-menu.res:412
-msgid "Temp Arrow OFF"
-msgstr "Отключить временный выбор"
+#: ../src/gpcb-menu.res:503 ../src/pcb-menu.res:168
+msgid "Line"
+msgstr "Линия"
 
-#: ../src/gpcb-menu.res:443 ../src/pcb-menu.res:411
-msgid "Temp Arrow ON"
-msgstr "Включить временный выбор"
+#: ../src/gpcb-menu.res:503 ../src/pcb-menu.res:168
+msgid "F2"
+msgstr "F2"
 
-#: ../src/gpcb-menu.res:510 ../src/pcb-menu.res:174
-msgid "Text"
-msgstr "Текст"
+#: ../src/gpcb-menu.res:503 ../src/pcb-menu.res:168
+msgid "<Key>F2"
+msgstr "<Key>F2"
 
-#: ../src/gpcb-menu.res:433 ../src/pcb-menu.res:400
-msgid "Text Tool scale +10 mil"
-msgstr "Размер инструмента текста +10 мил"
+#: ../src/gpcb-menu.res:504 ../src/pcb-menu.res:169
+msgid "Arc"
+msgstr "Дуга"
 
-#: ../src/gpcb-menu.res:434 ../src/pcb-menu.res:401
-msgid "Text Tool scale -10 mil"
-msgstr "Размер инструмента текста -10 мил"
+#: ../src/gpcb-menu.res:504 ../src/pcb-menu.res:169
+msgid "F3"
+msgstr "F3"
 
-#: ../src/gpcb-menu.res:264 ../src/pcb-menu.res:249
-msgid "Texts +10 mil"
-msgstr "Текст +10 мил"
+#: ../src/gpcb-menu.res:504 ../src/pcb-menu.res:169
+msgid "<Key>F3"
+msgstr "<Key>F3"
 
-#: ../src/gpcb-menu.res:263 ../src/pcb-menu.res:248
-msgid "Texts -10 mil"
-msgstr "Текст -10 мил"
+#: ../src/gpcb-menu.res:505 ../src/pcb-menu.res:170
+msgid "F4"
+msgstr "F4"
 
-#: ../src/gpcb-menu.res:516 ../src/pcb-menu.res:180
-msgid "Thermal"
-msgstr "Термобарьер"
+#: ../src/gpcb-menu.res:505 ../src/pcb-menu.res:170
+msgid "<Key>F4"
+msgstr "<Key>F4"
 
-#: ../src/gpcb-menu.res:218 ../src/pcb-menu.res:207
-msgid "Thin draw"
-msgstr "Эскиз"
+#: ../src/gpcb-menu.res:506 ../src/pcb-menu.res:171
+msgid "Rectangle"
+msgstr "Прямоугольник"
 
-#: ../src/gpcb-menu.res:219 ../src/pcb-menu.res:208
-msgid "Thin draw poly"
-msgstr "Эскиз с трассами"
+#: ../src/gpcb-menu.res:506 ../src/pcb-menu.res:171
+msgid "F5"
+msgstr "F5"
 
-#: ../src/gpcb-menu.res:406 ../src/pcb-menu.res:373
-msgid "ToggleHideName Object"
-msgstr "Переключить скрытие названия объекта"
+#: ../src/gpcb-menu.res:506 ../src/pcb-menu.res:171
+msgid "<Key>F5"
+msgstr "<Key>F5"
 
-#: ../src/gpcb-menu.res:407 ../src/pcb-menu.res:374
-msgid "ToggleHideName SelectedElement"
-msgstr "Переключить скрытие названия выбранного элемента"
+#: ../src/gpcb-menu.res:507 ../src/pcb-menu.res:172
+msgid "Polygon"
+msgstr "Полигон"
 
-#: ../src/gpcb-menu.res:84 ../src/pcb-menu.res:135
-msgid "U"
-msgstr "U"
+#: ../src/gpcb-menu.res:507 ../src/pcb-menu.res:172
+msgid "F6"
+msgstr "F6"
 
-#: ../src/gpcb-menu.res:502 ../src/pcb-menu.res:135
-msgid "Undo last operation"
-msgstr "Отменить последнее действие"
+#: ../src/gpcb-menu.res:507 ../src/pcb-menu.res:172
+msgid "<Key>F6"
+msgstr "<Key>F6"
 
-#: ../src/gpcb-menu.res:331 ../src/pcb-menu.res:308
-msgid "Unjaggy"
-msgstr "Выпрямить"
+#: ../src/gpcb-menu.res:508 ../src/pcb-menu.res:173
+msgid "Polygon Hole"
+msgstr "Отверстие в полигоне"
 
-#: ../src/gpcb-menu.res:96 ../src/pcb-menu.res:147
-msgid "Unselect all"
-msgstr "Снять выделение"
+#: ../src/gpcb-menu.res:509 ../src/pcb-menu.res:174
+msgid "F7"
+msgstr "F7"
 
-#: ../src/gpcb-menu.res:478 ../src/pcb-menu.res:220
-msgid "Unselect all objects"
-msgstr "Снять выделение со всех объектов"
+#: ../src/gpcb-menu.res:509 ../src/pcb-menu.res:174
+msgid "<Key>F7"
+msgstr "<Key>F7"
 
-#: ../src/gpcb-menu.res:450 ../src/pcb-menu.res:418
-msgid "Up"
-msgstr "Вверх"
+#: ../src/gpcb-menu.res:510 ../src/pcb-menu.res:175
+msgid "F8"
+msgstr "F8"
 
-#: ../src/gpcb-menu.res:164 ../src/pcb-menu.res:81
-msgid "V"
-msgstr "V"
+#: ../src/gpcb-menu.res:510 ../src/pcb-menu.res:175
+msgid "<Key>F8"
+msgstr "<Key>F8"
 
-#: ../src/gpcb-menu.res:156 ../src/pcb-menu.res:65
-msgid "Value"
-msgstr "Номинал"
+#: ../src/gpcb-menu.res:511 ../src/pcb-menu.res:176
+msgid "Rotate"
+msgstr "Повернуть"
 
-#: ../src/gpcb-menu.res:222
-msgid "Vendor drill mapping"
-msgstr "Карта производственных отверстий"
+#: ../src/gpcb-menu.res:511 ../src/pcb-menu.res:176
+msgid "F9"
+msgstr "F9"
 
-#: ../src/gpcb-menu.res:507 ../src/pcb-menu.res:171
-msgid "Via"
-msgstr "Переход"
+#: ../src/gpcb-menu.res:511 ../src/pcb-menu.res:176
+msgid "<Key>F9"
+msgstr "<Key>F9"
 
-#: ../src/gpcb-menu.res:437 ../src/pcb-menu.res:404
-msgid "Via Tool drill +5 mil"
-msgstr "Инструмент переходного отверстия +5 мил"
+#: ../src/gpcb-menu.res:512 ../src/pcb-menu.res:177
+msgid "Thermal"
+msgstr "Термобарьер"
 
-#: ../src/gpcb-menu.res:438 ../src/pcb-menu.res:405
-msgid "Via Tool drill -5 mil"
-msgstr "Инструмент переходного отверстия -5 мил"
+#: ../src/gpcb-menu.res:512 ../src/pcb-menu.res:177
+msgid "F10"
+msgstr "F10"
 
-#: ../src/gpcb-menu.res:435 ../src/pcb-menu.res:402
-msgid "Via Tool size +5 mil"
-msgstr "Размер инструмента перехода +5 мил"
+#: ../src/gpcb-menu.res:512 ../src/pcb-menu.res:177
+msgid "<Key>F10"
+msgstr "<Key>F10"
 
-#: ../src/gpcb-menu.res:436 ../src/pcb-menu.res:403
-msgid "Via Tool size -5 mil"
-msgstr "Размер инструмента перехода -5 мил"
+#: ../src/gpcb-menu.res:513 ../src/pcb-menu.res:420
+msgid "Arrow"
+msgstr "Выбор"
 
-#: ../src/gpcb-menu.res:332 ../src/pcb-menu.res:309
-msgid "Vianudge"
-msgstr "Передвигать переходы"
+#: ../src/gpcb-menu.res:513 ../src/pcb-menu.res:178
+msgid "F11"
+msgstr "F11"
 
-#: ../src/gpcb-menu.res:241 ../src/pcb-menu.res:229
-msgid "Vias"
-msgstr "Переходы"
+#: ../src/gpcb-menu.res:513 ../src/pcb-menu.res:178
+msgid "<Key>F11"
+msgstr "<Key>F11"
 
-#: ../src/gpcb-menu.res:271 ../src/pcb-menu.res:255
-msgid "Vias +10 mil"
-msgstr "Переходы +10 мил"
+#: ../src/gpcb-menu.res:514 ../src/pcb-menu.res:179
+msgid "Insert Point"
+msgstr "Точка вставки"
 
-#: ../src/gpcb-menu.res:270 ../src/pcb-menu.res:254
-msgid "Vias -10 mil"
-msgstr "Переходы -10 мил"
+#: ../src/gpcb-menu.res:514 ../src/pcb-menu.res:179
+msgid "Insert"
+msgstr "Вставить"
 
-#: ../src/gpcb-menu.res:333 ../src/pcb-menu.res:310
-msgid "Viatrim"
-msgstr "Сокращать переходы"
+#: ../src/gpcb-menu.res:514 ../src/pcb-menu.res:179
+msgid "<Key>Insert"
+msgstr "<Key>Insert"
 
-#: ../src/gpcb-menu.res:122
-msgid "View"
-msgstr "Вид"
+#: ../src/gpcb-menu.res:515 ../src/pcb-menu.res:180
+msgid "Move"
+msgstr "Переместить"
 
-#: ../src/gpcb-menu.res:440 ../src/pcb-menu.res:407
-msgid "W"
-msgstr "W"
+#: ../src/gpcb-menu.res:516 ../src/pcb-menu.res:181
+msgid "Copy"
+msgstr "Копировать"
 
-#: ../src/gpcb-menu.res:461
-msgid "Window"
-msgstr "Окно"
+#: ../src/gpcb-menu.res:517 ../src/pcb-menu.res:182
+msgid "Lock"
+msgstr "Заблокировать"
 
-#: ../src/gpcb-menu.res:337 ../src/pcb-menu.res:314
-msgid "Y"
-msgstr "Y"
+#: ../src/gpcb-menu.res:517 ../src/pcb-menu.res:182
+msgid "F12"
+msgstr "F12"
 
-#: ../src/gpcb-menu.res:161 ../src/pcb-menu.res:78
-msgid "Z"
-msgstr "Z"
+#: ../src/gpcb-menu.res:517 ../src/pcb-menu.res:182
+msgid "<Key>F12"
+msgstr "<Key>F12"
 
-#: ../src/gpcb-menu.res:161 ../src/pcb-menu.res:78
-#, no-c-format
-msgid "Zoom In 20%"
-msgstr "Увеличить на 20%"
+#: ../src/gpcb-menu.res:518 ../src/pcb-menu.res:183
+msgid "Esc"
+msgstr "Esc"
 
-#: ../src/gpcb-menu.res:174
-#, no-c-format
-msgid "Zoom In 20% and center"
-msgstr "Увеличить на 20% по центру"
+#: ../src/gpcb-menu.res:518 ../src/pcb-menu.res:183
+msgid "<Key>Escape"
+msgstr "<Key>Escape"
 
-#: ../src/gpcb-menu.res:165 ../src/pcb-menu.res:74
-msgid "Zoom In 2X"
-msgstr "Увеличить вдвое"
+#: ../src/hid/common/actions.c:47
+#, c-format
+msgid "ERROR! Invalid action name, action \"%s\" not registered.\n"
+msgstr "ОШИБКА! Неверное имя операции, операция «%s» не зарегистрирована.\n"
 
-#: ../src/gpcb-menu.res:164 ../src/pcb-menu.res:81
-msgid "Zoom Max"
-msgstr "Увеличить максимально"
+#: ../src/hid/common/actions.c:312
+#, c-format
+msgid "Syntax error: %s\n"
+msgstr "Ошибка синтаксиса: %s\n"
 
-#: ../src/gpcb-menu.res:162 ../src/pcb-menu.res:79
-#, no-c-format
-msgid "Zoom Out 20%"
-msgstr "Уменьшить на 20%"
+#: ../src/hid/common/actions.c:313
+msgid "    expected: Action(arg1, arg2)"
+msgstr "    ожидается: Action(arg1, arg2)"
 
-#: ../src/gpcb-menu.res:175
-#, no-c-format
-msgid "Zoom Out 20% and center"
-msgstr "Уменьшить на 20% по центру"
+#: ../src/hid/common/hidnogui.c:358
+msgid "OK to lose data ?"
+msgstr "Данные будут потеряны?"
 
-#: ../src/gpcb-menu.res:166 ../src/pcb-menu.res:80
-msgid "Zoom Out 2X"
-msgstr "Уменьшить вдвое"
+#: ../src/hid/gtk/ghid-cell-renderer-visibility.c:256
+msgid "Visibility state"
+msgstr "Видимость"
 
-#: ../src/gpcb-menu.res:168 ../src/pcb-menu.res:85
-msgid "Zoom to 0.01mm/px"
-msgstr "0.01 мм/пиксел"
+#: ../src/hid/gtk/ghid-cell-renderer-visibility.c:257
+msgid "Visibility of the layer"
+msgstr "Видимость слоя"
 
-#: ../src/gpcb-menu.res:170 ../src/pcb-menu.res:87
-msgid "Zoom to 0.05mm/px"
-msgstr "0.05 мм/пиксел"
+#: ../src/hid/gtk/ghid-cell-renderer-visibility.c:262
+#: ../src/hid/gtk/ghid-cell-renderer-visibility.c:263
+msgid "Layer color"
+msgstr "Цвет слоя"
 
-#: ../src/gpcb-menu.res:167 ../src/pcb-menu.res:84
-msgid "Zoom to 0.1mil/px"
-msgstr "0.1 мил/пиксел"
+#: ../src/hid/gtk/ghid-coord-entry.c:87
+msgid "Change Units"
+msgstr "Изменить единицы измерения"
 
-#: ../src/gpcb-menu.res:172 ../src/pcb-menu.res:89
-msgid "Zoom to 0.1mm/px"
-msgstr "0.1 мм/пиксел"
+#: ../src/hid/gtk/ghid-main-menu.c:119
+#, c-format
+msgid ""
+"Don't know how to parse \"%s\" as an accelerator in the menu resource file.\n"
+msgstr "Невозможно разобрать «%s» как акселератор в файле ресурсов меню.\n"
 
-#: ../src/gpcb-menu.res:173 ../src/pcb-menu.res:90
-msgid "Zoom to 10mil/px"
-msgstr "10 мил/пиксел"
+#: ../src/hid/gtk/ghid-main-menu.c:125
+msgid ""
+"Format is:\n"
+"modifiers<Key>k\n"
+"where \"modifiers\" is a space separated list of key modifiers\n"
+"and \"k\" is the name of the key.\n"
+"Allowed modifiers are:\n"
+"   Ctrl\n"
+"   Shift\n"
+"   Alt\n"
+"Please note that case is important.\n"
+msgstr ""
+"Формат следующий:\n"
+"модификаторы<Key>к\n"
+"где «модификаторы» это разделённый пробелами список модификаторов клавиш\n"
+"и «к» название клавиши.\n"
+"Допустимые модификаторы:\n"
+"   Ctrl\n"
+"   Shift\n"
+"   Alt\n"
+"Учтите, что регистр символов важен.\n"
 
-#: ../src/gpcb-menu.res:169 ../src/pcb-menu.res:86
-msgid "Zoom to 1mil/px"
-msgstr "1 мил/пиксел"
+#: ../src/hid/gtk/ghid-main-menu.c:166
+#, c-format
+msgid ""
+"Duplicate accelerator found: \"%s\"\n"
+"The second occurance will be dropped\n"
+msgstr ""
+"Найден повторяющийся акселератор: «%s»\n"
+"Второй акселератор будет удалён\n"
 
-#: ../src/gpcb-menu.res:171 ../src/pcb-menu.res:88
-msgid "Zoom to 2.5mil/px"
-msgstr "2.5 мил/пиксел"
+#. if we got this far it is supposed to be an X
+#. * resource.  For now ignore it and warn the user
+#: ../src/hid/gtk/ghid-main-menu.c:343
+#, c-format
+msgid ""
+"The gtk gui currently ignores \"%s\"as part of a menuitem resource.\n"
+"Feel free to provide patches\n"
+msgstr ""
+"В настоящее время графический пользовательский интерфейс GTK игнорирует\n"
+"«%s» как часть ресурса элемента меню.\n"
+"Не стесняйтесь предоставлять патчи\n"
 
-#: ../src/gpcb-menu.res:443 ../src/pcb-menu.res:411
-msgid "["
-msgstr "["
+#: ../src/hid/gtk/ghid-main-menu.c:377
+#, c-format
+msgid ""
+"GTK GUI currently ignores \"%s\" in the menu\n"
+"resource file.\n"
+msgstr ""
+"В настоящее время графический пользовательский интерфейс GTK игнорирует\n"
+"«%s» в файле ресурсов меню.\n"
 
-#: ../src/gpcb-menu.res:444 ../src/pcb-menu.res:412
-msgid "]"
-msgstr "]"
+#: ../src/hid/gtk/ghid-route-style-selector.c:137
+msgid "New Style"
+msgstr "Новый стиль"
 
-#: ../src/gpcb-menu.res:102
-msgid "active layer"
-msgstr "текущего слоя"
+#. Build dialog
+#: ../src/hid/gtk/ghid-route-style-selector.c:183
+msgid "Edit Route Styles"
+msgstr "Редактировать стиль трассировки"
 
-#: ../src/gpcb-menu.res:462
-msgid "i"
-msgstr "i"
+#: ../src/hid/gtk/ghid-route-style-selector.c:189
+msgid "Edit Style:"
+msgstr "Редактировать стиль:"
 
-#: ../src/gpcb-menu.res:101
-msgid "layout"
-msgstr "трассировки"
+#: ../src/hid/gtk/ghid-route-style-selector.c:209
+msgid "Route Style Data"
+msgstr "Данные стиля трассировки"
 
-#: ../src/gpcb-menu.res:125 ../src/hid/gtk/gui-config.c:1022
-#: ../src/hid/gtk/gui-config.c:1186 ../src/hid/gtk/gui-dialog-size.c:174
-#: ../src/pcb-menu.res:93
-msgid "mil"
-msgstr "мил"
+#: ../src/hid/gtk/ghid-route-style-selector.c:213
+msgid "Name:"
+msgstr "Название:"
 
-#: ../src/gpcb-menu.res:126 ../src/hid/gtk/gui-config.c:1022
-#: ../src/hid/gtk/gui-config.c:1186 ../src/hid/gtk/gui-dialog-size.c:174
-#: ../src/pcb-menu.res:94
-msgid "mm"
-msgstr "мм"
+#: ../src/hid/gtk/ghid-route-style-selector.c:221
+msgid "Line width:"
+msgstr "Толщина линии:"
 
-#: ../src/gpcb-menu.res:100
-msgid "text on layout"
-msgstr "текста на трассировке"
+#: ../src/hid/gtk/ghid-route-style-selector.c:224
+msgid "Via hole size:"
+msgstr "Диаметр переходного отверстия:"
 
-#: ../src/gpcb-menu.res:233 ../src/pcb-menu.res:221
-msgid "unselect all connected objects"
-msgstr "Снять выделение со всех соединённых объектов"
+#: ../src/hid/gtk/ghid-route-style-selector.c:227
+msgid "Via ring size:"
+msgstr "Размер кольца перехода:"
 
-#: ../src/gpcb-menu.res:218 ../src/pcb-menu.res:207
-msgid "|"
-msgstr "|"
+#: ../src/hid/gtk/ghid-route-style-selector.c:230
+msgid "Clearance:"
+msgstr "Зазор:"
 
-#: ../src/hid/batch/batch.c:356 ../src/hid/common/hidnogui.c:280
-msgid "OK to lose data ?"
-msgstr "Данные будут потеряны?"
+#: ../src/hid/gtk/ghid-route-style-selector.c:234
+msgid "Set as Default"
+msgstr "Установить по умолчанию"
+
+#: ../src/hid/gtk/ghid-route-style-selector.c:237
+msgid "Save route style settings as default"
+msgstr "Сделать настройками стиля трассировки по-умолчанию"
 
-#: ../src/hid/gerber/gerber.c:159
-msgid "Error, too many apertures needed for Gerber file.\n"
-msgstr "Ошибка, слишком много апертур для Gerber-файла.\n"
+#: ../src/hid/gtk/ghid-route-style-selector.c:243
+msgid "New (this session only)"
+msgstr "Новый (только для этой сессии)"
 
-#: ../src/hid/gtk/gtkhid-main.c:109
+#: ../src/hid/gtk/gtkhid-main.c:156
 msgid "Various zoom factor changes."
 msgstr "Различные изменения коэффициента увеличения."
 
-#: ../src/hid/gtk/gtkhid-main.c:431
+#: ../src/hid/gtk/gtkhid-main.c:239
 #, c-format
 msgid "ghid_calibrate() -- not implemented\n"
-msgstr "ghid_calibrate() -- не реализовано\n"
+msgstr "ghid_calibrate() — не реализовано\n"
 
-#: ../src/hid/gtk/gtkhid-main.c:802 ../src/hid/gtk/gui-dialog.c:165
+#: ../src/hid/gtk/gtkhid-main.c:565 ../src/hid/gtk/gui-dialog.c:168
 msgid "_Cancel"
 msgstr "О_тмена"
 
-#: ../src/hid/gtk/gtkhid-main.c:803 ../src/hid/gtk/gui-dialog.c:169
+#: ../src/hid/gtk/gtkhid-main.c:566 ../src/hid/gtk/gui-dialog.c:172
 msgid "_OK"
 msgstr "_Да"
 
-#: ../src/hid/gtk/gtkhid-main.c:1206
+#: ../src/hid/gtk/gtkhid-main.c:720
+msgid "Progress"
+msgstr "Выполнение"
+
+#: ../src/hid/gtk/gtkhid-main.c:1090
 msgid "Tell the user about this version of PCB."
 msgstr "Сообщить пользователю об этой версии PCB."
 
-#: ../src/hid/gtk/gtkhid-main.c:1228
+#: ../src/hid/gtk/gtkhid-main.c:1112
 msgid "Get a coordinate."
 msgstr "Получить координаты."
 
-#: ../src/hid/gtk/gtkhid-main.c:1295
+#: ../src/hid/gtk/gtkhid-main.c:1189
 #, c-format
 msgid "LayerGroupsChanged -- not implemented\n"
-msgstr "LayerGroupsChanged -- не реализовано\n"
+msgstr "LayerGroupsChanged — не реализовано\n"
 
-#. in case we have a dialog for loading a footprint file
-#: ../src/hid/gtk/gtkhid-main.c:1345 ../src/hid/gtk/gui-dialog.c:291
-msgid "Load element to buffer"
-msgstr "Загрузить элемент в буфер"
+#. in case we have a dialog for loading a netlist file
+#: ../src/hid/gtk/gtkhid-main.c:1233 ../src/hid/gtk/gui-dialog.c:319
+#: ../src/pcb-menu.res:40
+msgid "Load netlist file"
+msgstr "Загрузить файл списка соединений"
 
-#: ../src/hid/gtk/gtkhid-main.c:1351 ../src/hid/gtk/gui-dialog.c:305
+#: ../src/hid/gtk/gtkhid-main.c:1245 ../src/hid/gtk/gui-dialog.c:306
 msgid "Load layout file to buffer"
 msgstr "Загрузить файл трассировки в буфер"
 
 #. in case we have a dialog for loading a layout file
-#: ../src/hid/gtk/gtkhid-main.c:1357 ../src/hid/gtk/gui-dialog.c:304
+#: ../src/hid/gtk/gtkhid-main.c:1251 ../src/hid/gtk/gui-dialog.c:305
 msgid "Load layout file"
 msgstr "Загрузить файл трассировки"
 
-#: ../src/hid/gtk/gtkhid-main.c:1383
+#: ../src/hid/gtk/gtkhid-main.c:1277
 msgid "Save layout and/or element data to a user-selected file."
 msgstr "Сохранить трассировку и/или элемент в указанный пользователем файл."
 
-#: ../src/hid/gtk/gtkhid-main.c:1414
+#: ../src/hid/gtk/gtkhid-main.c:1308
 msgid "Save element as"
 msgstr "Сохранить элемент как"
 
-#: ../src/hid/gtk/gtkhid-main.c:1416
+#: ../src/hid/gtk/gtkhid-main.c:1310
 msgid "Save layout as"
 msgstr "Сохранить трассировку как"
 
-#: ../src/hid/gtk/gtkhid-main.c:1432
-#, c-format
-msgid "Overwriting %s\n"
-msgstr "%s перезаписан\n"
-
-#: ../src/hid/gtk/gtkhid-main.c:1475
+#: ../src/hid/gtk/gtkhid-main.c:1352
 msgid "Swaps the side of the board you're looking at."
-msgstr "Переставить переднюю сторону платы."
+msgstr "Изменить видимую сторону платы"
 
-#: ../src/hid/gtk/gtkhid-main.c:1600
+#: ../src/hid/gtk/gtkhid-main.c:1440
 msgid "Print the layout."
 msgstr "Печатать трассировку."
 
-#: ../src/hid/gtk/gtkhid-main.c:1625
+#: ../src/hid/gtk/gtkhid-main.c:1465
 msgid "Can't find a suitable printer HID"
 msgstr "Невозможно найти подходящий HID принтера"
 
-#: ../src/hid/gtk/gtkhid-main.c:1635
+#: ../src/hid/gtk/gtkhid-main.c:1475
 msgid "Can't print empty layout"
 msgstr "Невозможно печатать пустую трассировку"
 
-#: ../src/hid/gtk/gtkhid-main.c:1645
+#: ../src/hid/gtk/gtkhid-main.c:1485
 msgid "Enter Values here:"
 msgstr "Введите значения:"
 
-#: ../src/hid/gtk/gtkhid-main.c:1647
+#: ../src/hid/gtk/gtkhid-main.c:1487
 msgid "x-calibration"
 msgstr "x-калибровка"
 
-#: ../src/hid/gtk/gtkhid-main.c:1647
+#: ../src/hid/gtk/gtkhid-main.c:1487
 msgid "X scale for calibrating your printer"
 msgstr "Коэффициент по X калибровки вашего принтера"
 
-#: ../src/hid/gtk/gtkhid-main.c:1649
+#: ../src/hid/gtk/gtkhid-main.c:1489
 msgid "y-calibration"
 msgstr "y-калибровка"
 
-#: ../src/hid/gtk/gtkhid-main.c:1649
+#: ../src/hid/gtk/gtkhid-main.c:1489
 msgid "Y scale for calibrating your printer"
 msgstr "Коэффициент по Y калибровки вашего принтера"
 
-#: ../src/hid/gtk/gtkhid-main.c:1658
+#: ../src/hid/gtk/gtkhid-main.c:1498
 msgid "Calibrate the printer."
 msgstr "Калибровать принтер."
 
-#: ../src/hid/gtk/gtkhid-main.c:1675
+#: ../src/hid/gtk/gtkhid-main.c:1515
 msgid "Printer Calibration Values"
 msgstr "Калибровочные значения принтера"
 
-#: ../src/hid/gtk/gtkhid-main.c:1676
+#: ../src/hid/gtk/gtkhid-main.c:1516
 msgid "Enter calibration values for your printer"
 msgstr "Введите калибровочные значения вашего принтера"
 
-#: ../src/hid/gtk/gtkhid-main.c:1695
+#: ../src/hid/gtk/gtkhid-main.c:1535
 msgid "Can't export empty layout"
 msgstr "Невозможно экспортировать пустую трассировку"
 
-#: ../src/hid/gtk/gtkhid-main.c:1728
+#: ../src/hid/gtk/gtkhid-main.c:1563
 #, c-format
 msgid "%g redraws per second\n"
 msgstr "%g перерисовок в секунду\n"
 
-#: ../src/hid/gtk/gtkhid-main.c:1739
+#: ../src/hid/gtk/gtkhid-main.c:1574
 msgid "Moves the pointer to the center of the window."
 msgstr "Переместить указатель в центр окна."
 
-#: ../src/hid/gtk/gtkhid-main.c:1845
+#: ../src/hid/gtk/gtkhid-main.c:1626
 msgid "Move the cursor."
 msgstr "Переместить курсор."
 
-#: ../src/hid/gtk/gtkhid-main.c:1939
+#: ../src/hid/gtk/gtkhid-main.c:1710
 msgid "Open various GUI windows."
 msgstr "Открыть различные окна графического пользовательского интерфейса."
 
-#: ../src/hid/gtk/gtkhid-main.c:2015
+#: ../src/hid/gtk/gtkhid-main.c:1786
 msgid "Set the default measurement units."
 msgstr "Установить единицы измерения по умолчанию."
 
-#: ../src/hid/gtk/gtkhid-main.c:2057
+#: ../src/hid/gtk/gtkhid-main.c:1833
 msgid "Scroll the viewport."
 msgstr "Прокрутить область просмотра."
 
-#: ../src/hid/gtk/gtkhid-main.c:2111
+#: ../src/hid/gtk/gtkhid-main.c:1883
 msgid ""
 "Start or stop panning (Mode = 1 to start, 0 to stop)\n"
 "Optional thumb argument is ignored for now in gtk hid.\n"
@@ -2863,7 +3100,7 @@ msgstr ""
 "Начать (Mode = 1) или остановить (Mode = 0) режим панорамирования\n"
 "Необязательный аргумент thumb сейчас игнорируется в gtk hid.\n"
 
-#: ../src/hid/gtk/gtkhid-main.c:2139
+#: ../src/hid/gtk/gtkhid-main.c:1909
 msgid ""
 "The gtk gui currently ignores the optional first argument to the Pan "
 "action.\n"
@@ -2873,7 +3110,7 @@ msgstr ""
 "необязательный первый аргумент действия Pan (прокрутки).\n"
 "Не стесняйтесь предоставлять патчи.\n"
 
-#: ../src/hid/gtk/gtkhid-main.c:2165
+#: ../src/hid/gtk/gtkhid-main.c:1923
 msgid ""
 "Bring up the popup menu specified by @code{MenuName}.\n"
 "If called by a mouse event then the mouse button number\n"
@@ -2883,53 +3120,40 @@ msgstr ""
 "Если вызывается по событию мыши, то номер кнопки мышки\n"
 "должен быть указан как второй аргумент."
 
-#: ../src/hid/gtk/gtkhid-main.c:2196
-#, c-format
-msgid "Popup():  malloc failed\n"
-msgstr "Popup(): ошибка malloc\n"
-
-#: ../src/hid/gtk/gtkhid-main.c:2201
-#, c-format
-msgid "Loading popup \"%s\". Button = %u\n"
-msgstr "Загрузка выпадающего меню \"%s\". Button = %u\n"
-
-#: ../src/hid/gtk/gtkhid-main.c:2208
+#: ../src/hid/gtk/gtkhid-main.c:1948
 #, c-format
 msgid "The specified popup menu \"%s\" has not been defined.\n"
-msgstr "Указанное выпадающее меню \"%s\" не было определено.\n"
+msgstr "Указанное выпадающее меню «%s» не было определено.\n"
 
-#: ../src/hid/gtk/gtkhid-main.c:2225
+#: ../src/hid/gtk/gtkhid-main.c:1965
 msgid "Asks user which schematics to import into PCB.\n"
 msgstr "Спросить пользователя, какую схему импортировать в PCB.\n"
 
-#: ../src/hid/gtk/gtkhid-main.c:2246
+#. in case we have a dialog for loading schematic files
+#: ../src/hid/gtk/gtkhid-main.c:1988 ../src/hid/gtk/gui-dialog.c:402
 msgid "Load schematics"
 msgstr "Импортировать схему"
 
-#: ../src/hid/gtk/gtkhid-main.c:2276
+#: ../src/hid/gtk/gtkhid-main.c:2029
 msgid "Click on a location to center"
 msgstr "Щёлкните на месте центровки"
 
-#: ../src/hid/gtk/gtkhid-main.c:2286
-msgid "Click on a place to pan"
-msgstr "Укажите позицию для панорамирования"
-
-#: ../src/hid/gtk/gtkhid-main.c:2296
+#: ../src/hid/gtk/gtkhid-main.c:2049
 msgid "Click on a place to scroll"
 msgstr "Укажите позицию для прокрутки"
 
-#: ../src/hid/gtk/gtkhid-main.c:2299
+#: ../src/hid/gtk/gtkhid-main.c:2052
 msgid "Click on zoom focus"
 msgstr "Щёлкните центре масштабирования"
 
-#: ../src/hid/gtk/gui-command-window.c:80
+#: ../src/hid/gtk/gui-command-window.c:76
 msgid ""
 "Common commands easily accessible via the gui may not be included here.\n"
 msgstr ""
 "Общие команды, доступные через графический интерфейс, не могут быть "
 "использованы здесь.\n"
 
-#: ../src/hid/gtk/gui-command-window.c:82
+#: ../src/hid/gtk/gui-command-window.c:78
 msgid ""
 "In user commands below, 'size' values may be absolute or relative\n"
 "if preceded by a '+' or '-'.  Where 'units' are indicated, use \n"
@@ -2939,95 +3163,91 @@ msgstr ""
 "(начинается на '+' или '-'). Если указана размерность, используйте\n"
 "'мил' или 'мм', иначе будет использована внутренняя размерность PCB.\n"
 
-#: ../src/hid/gtk/gui-command-window.c:96
+#: ../src/hid/gtk/gui-command-window.c:92
 msgid "\tChanges the clearance of objects.\n"
 msgstr "\tИзменить отступы для объектов.\n"
 
-#: ../src/hid/gtk/gui-command-window.c:101
+#: ../src/hid/gtk/gui-command-window.c:97
 msgid "\tChanges values.  Omit 'units' for 'grid' and 'zoom'.\n"
 msgstr ""
 "\tИзменить значения. Для 'grid' и 'zoom' размерность 'units' не "
 "указывается.\n"
 
-#: ../src/hid/gtk/gui-command-window.c:105
+#: ../src/hid/gtk/gui-command-window.c:101
 msgid "\tChanges the join (clearance through polygons) of objects.\n"
 msgstr "\tИзменить стык (зазор между полигонами) объектов.\n"
 
-#: ../src/hid/gtk/gui-command-window.c:111
+#: ../src/hid/gtk/gui-command-window.c:107
 msgid "\tToggles, sets, or clears the square flag of objects.\n"
 msgstr "\tПереключить, установить или убрать флаг прямоугольных объектов.\n"
 
-#: ../src/hid/gtk/gui-command-window.c:117
+#: ../src/hid/gtk/gui-command-window.c:113
 msgid "\tToggles, sets, or clears the octagon flag of objects.\n"
 msgstr "\tПереключить, установить или убрать флаг восьмиугольных объектов.\n"
 
-#: ../src/hid/gtk/gui-command-window.c:121
+#: ../src/hid/gtk/gui-command-window.c:117
 msgid "\tChanges the hole flag of objects.\n"
 msgstr "\tИзменить флаг отверстия для объектов.\n"
 
-#: ../src/hid/gtk/gui-command-window.c:125
+#: ../src/hid/gtk/gui-command-window.c:121
 msgid "\tFlip elements to the opposite side of the board.\n"
-msgstr "\tПереставить элементы на противоположную сторону платы.\n"
+msgstr "\tПеренести элементы на противоположную сторону платы.\n"
 
-#: ../src/hid/gtk/gui-command-window.c:131
+#: ../src/hid/gtk/gui-command-window.c:127
 msgid ""
 "\tToggle, set or clear a thermal (on the current layer) to pins or vias.\n"
 msgstr ""
 "\tПереключить, установить или убрать термобарьеры (на текущем слое) для "
 "выводов или переходов.\n"
 
-#: ../src/hid/gtk/gui-command-window.c:135
+#: ../src/hid/gtk/gui-command-window.c:131
 msgid ""
 "\tLoad a vendor file.  If 'filename' omitted, pop up file select dialog.\n"
 msgstr ""
 "\tЗагрузить файл производителя. Если название файла не указано, отобразить "
 "диалог выбора файла.\n"
 
-#: ../src/hid/gtk/gui-command-window.c:318
+#: ../src/hid/gtk/gui-command-window.c:312
 msgid "PCB Command Entry"
 msgstr "PCB ввод команд"
 
 #. Make the command reference scrolled text view.  Use high level
 #. |  utility functions in gui-utils.c
 #.
-#: ../src/hid/gtk/gui-command-window.c:336
+#: ../src/hid/gtk/gui-command-window.c:330
 msgid "Command Reference"
 msgstr "Справка по командам"
 
-#: ../src/hid/gtk/gui-command-window.c:466
+#: ../src/hid/gtk/gui-command-window.c:455
 msgid "Enter command:"
 msgstr "Введите команду:"
 
-#: ../src/hid/gtk/gui-config.c:883
+#: ../src/hid/gtk/gui-config.c:896
 msgid "Enables"
 msgstr "Разрешения"
 
-#: ../src/hid/gtk/gui-config.c:888
+#: ../src/hid/gtk/gui-config.c:901
 msgid "Use separate window for command entry"
 msgstr "Использовать отдельное окно для ввода команд"
 
-#: ../src/hid/gtk/gui-config.c:893
+#: ../src/hid/gtk/gui-config.c:906
 msgid "Alternate window layout to allow smaller horizontal size"
-msgstr "Изменить расположение окон для меньшего размера по горизонтали"
+msgstr "Изменить расположение окон для экономии места по горизонтали"
 
-#: ../src/hid/gtk/gui-config.c:898
+#: ../src/hid/gtk/gui-config.c:911
 msgid "Alternate window layout to allow smaller vertical size"
-msgstr "Изменить расположение окон для меньшего размера по вертикали"
+msgstr "Изменить расположение окон для экономии места по вертикали"
 
-#: ../src/hid/gtk/gui-config.c:903
-msgid "Put layout name on the window title bar"
-msgstr "Отображать название слоя в заголовке окна"
-
-#: ../src/hid/gtk/gui-config.c:905
+#: ../src/hid/gtk/gui-config.c:913
 msgid "Backups"
 msgstr "Резервные копии"
 
-#: ../src/hid/gtk/gui-config.c:909
+#: ../src/hid/gtk/gui-config.c:917
 #, c-format
 msgid "If layout is modified at exit, save into PCB.%i.save"
 msgstr "При выходе сохранять изменения трассировки в файл PCB.%i.save"
 
-#: ../src/hid/gtk/gui-config.c:912
+#: ../src/hid/gtk/gui-config.c:920
 msgid ""
 "Seconds between auto backups\n"
 "(set to zero to disable auto backups)"
@@ -3035,97 +3255,86 @@ msgstr ""
 "Количество секунд между автосохранениями\n"
 "(нуль для отключения)"
 
-#: ../src/hid/gtk/gui-config.c:915
+#: ../src/hid/gtk/gui-config.c:923
 msgid "Misc"
 msgstr "Прочее"
 
-#: ../src/hid/gtk/gui-config.c:919
+#: ../src/hid/gtk/gui-config.c:927
 msgid "Number of commands to remember in the history list"
 msgstr "Количество команд в истории"
 
-#: ../src/hid/gtk/gui-config.c:923
-msgid "Auto pan speed"
-msgstr "Скорость автопрокрутки"
-
-#: ../src/hid/gtk/gui-config.c:1021 ../src/hid/gtk/gui-dialog-size.c:173
-#, c-format
-msgid "<b>%s</b> grid units are selected"
-msgstr "Единица измерения сетки: <b>%s</b>"
-
 #. ---- Board Size ----
-#: ../src/hid/gtk/gui-config.c:1032
+#: ../src/hid/gtk/gui-config.c:1027
 msgid "Board Size"
 msgstr "Размер платы"
 
-#: ../src/hid/gtk/gui-config.c:1048
+#: ../src/hid/gtk/gui-config.c:1041
 msgid "Width"
 msgstr "Ширина"
 
-#: ../src/hid/gtk/gui-config.c:1055
+#: ../src/hid/gtk/gui-config.c:1046
 msgid "Height"
 msgstr "Высота"
 
-#: ../src/hid/gtk/gui-config.c:1059
+#: ../src/hid/gtk/gui-config.c:1049
 msgid "Use this board size as the default for new layouts"
 msgstr "Использовать этот размер по умолчанию"
 
 #. ---- Text Scale ----
-#: ../src/hid/gtk/gui-config.c:1062
+#: ../src/hid/gtk/gui-config.c:1052
 msgid "Text Scale"
 msgstr "Масштаб текста"
 
 #. ---- DRC Sizes ----
-#: ../src/hid/gtk/gui-config.c:1080
+#: ../src/hid/gtk/gui-config.c:1070
 msgid "Design Rule Checking"
 msgstr "Проверка проектных норм"
 
-#: ../src/hid/gtk/gui-config.c:1095
+#: ../src/hid/gtk/gui-config.c:1083
 msgid "Minimum copper spacing"
 msgstr "Минимальный отступ для проводника"
 
-#: ../src/hid/gtk/gui-config.c:1103
+#: ../src/hid/gtk/gui-config.c:1089
 msgid "Minimum copper width"
 msgstr "Минимальная толщина проводника"
 
-#: ../src/hid/gtk/gui-config.c:1111
+#: ../src/hid/gtk/gui-config.c:1095
 msgid "Minimum touching copper overlap"
 msgstr "Минимальное перекрытие проводника"
 
-#: ../src/hid/gtk/gui-config.c:1119
+#: ../src/hid/gtk/gui-config.c:1101
 msgid "Minimum silk width"
 msgstr "Минимальная толщина шёлкографии"
 
-#: ../src/hid/gtk/gui-config.c:1127
+#: ../src/hid/gtk/gui-config.c:1107
 msgid "Minimum drill diameter"
 msgstr "Минимальный диаметр отверстия"
 
-#: ../src/hid/gtk/gui-config.c:1135
+#: ../src/hid/gtk/gui-config.c:1113
 msgid "Minimum annular ring"
 msgstr "Минимальное кольцо"
 
-#: ../src/hid/gtk/gui-config.c:1140
+#: ../src/hid/gtk/gui-config.c:1118
 msgid "Use DRC values as the default for new layouts"
 msgstr "Использовать эти значения по умолчанию"
 
-#: ../src/hid/gtk/gui-config.c:1185
-#, c-format
-msgid "Increment/Decrement values to use in <b>%s</b> units mode.\n"
-msgstr ""
-"Значения увеличения/уменьшения для использования при измерении в <b>%s</b>.\n"
+#: ../src/hid/gtk/gui-config.c:1170
+msgid "Metric Increment Settings"
+msgstr "Приращения в метрической системе мер"
 
-#: ../src/hid/gtk/gui-config.c:1197
-msgid "Grid Increment/Decrement"
-msgstr "Увеличение/уменьшение сетки"
+#: ../src/hid/gtk/gui-config.c:1178 ../src/hid/gtk/gui-config.c:1199
+msgid "Grid:"
+msgstr "Сетка:"
 
-#: ../src/hid/gtk/gui-config.c:1214
+#: ../src/hid/gtk/gui-config.c:1179 ../src/hid/gtk/gui-config.c:1200
 msgid "For 'g' and '<shift>g' grid change actions"
 msgstr "Для изменения сетки нажатием 'g' и '<shift>g'"
 
-#: ../src/hid/gtk/gui-config.c:1219
-msgid "Size Increment/Decrement"
-msgstr "Увеличение/уменьшение размера"
+#: ../src/hid/gtk/gui-config.c:1180 ../src/hid/gtk/gui-config.c:1201
+msgid "Size:"
+msgstr "Размер:"
 
-#: ../src/hid/gtk/gui-config.c:1236
+#: ../src/hid/gtk/gui-config.c:1181 ../src/hid/gtk/gui-config.c:1202
 msgid ""
 "For 's' and '<shift>s' size change actions on lines,\n"
 "pads, pins and text.\n"
@@ -3135,19 +3344,19 @@ msgstr ""
 "нажатии 's' и '<shift>s'.\n"
 "Для изменения отверстий используйте '<ctrl>s' и <shift><ctrl>s'."
 
-#: ../src/hid/gtk/gui-config.c:1242
-msgid "Line Increment/Decrement"
-msgstr "Увеличение/уменьшение линии"
+#: ../src/hid/gtk/gui-config.c:1184 ../src/hid/gtk/gui-config.c:1205
+msgid "Line:"
+msgstr "Линия:"
 
-#: ../src/hid/gtk/gui-config.c:1261
+#: ../src/hid/gtk/gui-config.c:1185 ../src/hid/gtk/gui-config.c:1206
 msgid "For 'l' and '<shift>l' routing line width change actions"
 msgstr "Для изменения толщины линии трассировки нажатием 'l' и '<shift>l'"
 
-#: ../src/hid/gtk/gui-config.c:1265
-msgid "Clear Increment/Decrement"
-msgstr "Увеличение/уменьшение зазора"
+#: ../src/hid/gtk/gui-config.c:1186 ../src/hid/gtk/gui-config.c:1207
+msgid "Clear:"
+msgstr "Зазор:"
 
-#: ../src/hid/gtk/gui-config.c:1285
+#: ../src/hid/gtk/gui-config.c:1187 ../src/hid/gtk/gui-config.c:1208
 msgid ""
 "For 'k' and '<shift>k' line clearance inside polygon size\n"
 "change actions"
@@ -3155,35 +3364,47 @@ msgstr ""
 "Для изменения отступа внутри полигона нажатием 'k' и '<shift>k'\n"
 "при изменении размера"
 
-#: ../src/hid/gtk/gui-config.c:1310
+#: ../src/hid/gtk/gui-config.c:1191
+msgid "Imperial Increment Settings"
+msgstr "Приращения в английской системе мер"
+
+#: ../src/hid/gtk/gui-config.c:1213
+msgid "Save as Default"
+msgstr "Сохранить по умолчанию"
+
+#: ../src/hid/gtk/gui-config.c:1216
+msgid "Use values as the default for new layouts"
+msgstr "Использовать как значения по умолчанию для новых чертежей"
+
+#: ../src/hid/gtk/gui-config.c:1239
 msgid "Element Directories"
 msgstr "Каталог элементов"
 
-#: ../src/hid/gtk/gui-config.c:1316
+#: ../src/hid/gtk/gui-config.c:1245
 msgid "<small>Enter a \""
 msgstr "<small>Введите \""
 
-#: ../src/hid/gtk/gui-config.c:1357
+#: ../src/hid/gtk/gui-config.c:1286
 msgid "<h>Layer Names\n"
 msgstr "<h>Названия слоёв\n"
 
-#: ../src/hid/gtk/gui-config.c:1358
+#: ../src/hid/gtk/gui-config.c:1287
 msgid ""
 "You may enter layer names for the layers drawn on the screen.\n"
-"The special 'component side' and 'solder side' are layers which\n"
+"The special 'top side' and 'bottom side' are layers which\n"
 "will be printed out, so they must have in their group at least one\n"
 "of the other layers that are drawn on the screen.\n"
 msgstr ""
 "Вы можете указать названия для отображаемых слоёв.\n"
-"Специальные слои 'сторона компонентов' и 'сторона пайки'\n"
+"Специальные слои 'верхняя сторона' и 'нижняя сторона'\n"
 "будут напечатаны, поэтому должны содержать в своих группах\n"
 "хотя бы по одному другому отображаемому слою.\n"
 
-#: ../src/hid/gtk/gui-config.c:1363
+#: ../src/hid/gtk/gui-config.c:1292
 msgid "<h>Layer Groups\n"
 msgstr "<h>Группы слоёв\n"
 
-#: ../src/hid/gtk/gui-config.c:1364
+#: ../src/hid/gtk/gui-config.c:1293
 msgid ""
 "Each layer on the screen may be in its own group which allows the\n"
 "maximum number of board layers.  However, for boards with fewer\n"
@@ -3198,11 +3419,11 @@ msgstr ""
 "даст один слой. Это позволяет задавать цветовое различие при отображении\n"
 "для групп сигналов при выводе формирующих один слой.\n"
 
-#: ../src/hid/gtk/gui-config.c:1371
+#: ../src/hid/gtk/gui-config.c:1300
 msgid ""
 "For example, for a 4 layer board a useful layer group arrangement\n"
 "can be to have 3 screen displayed layers grouped into the same group\n"
-"as the 'component side' and 'solder side' printout layers.  Then\n"
+"as the 'top side' and 'bottom side' printout layers.  Then\n"
 "groups such as signals, ground, and supply traces can be color\n"
 "coded on the screen while printing as a single layer.  For this\n"
 "you would select buttons and enter names on the Setup page to\n"
@@ -3210,585 +3431,511 @@ msgid ""
 msgstr ""
 "Например, для платы с четырьмя слоями полезной группировкой слоёв\n"
 "может быть три отображаемых слоя сгруппированных вместе с выводимыми\n"
-"слоями 'сторона компонентов' и 'сторона пайки'. Такие группы как\n"
+"слоями 'верхняя сторона' и 'нижняя сторона'. Такие группы как\n"
 "сигнальные трассы, трассы земли и питания могут быть отмечены различным\n"
 "цветом при отображении, но выводиться на один слой. Для этого выберите\n"
 "кнопки и укажите названия на странице настроек для задания структуры\n"
 "четырёх групп слоев наподобие этой:\n"
 
-#: ../src/hid/gtk/gui-config.c:1379
+#: ../src/hid/gtk/gui-config.c:1308
 msgid "<b>Group 1:"
 msgstr "<b>Группа 1:"
 
-#: ../src/hid/gtk/gui-config.c:1381 ../src/hid/gtk/gui-misc.c:511
-#: ../src/hid/gtk/gui-misc.c:535
-msgid "solder"
-msgstr "пайка"
+#: ../src/hid/gtk/gui-config.c:1310 ../src/hid/gtk/gui-misc.c:415
+msgid "top"
+msgstr "top"
 
-#: ../src/hid/gtk/gui-config.c:1383
-msgid "GND-solder"
-msgstr "GND-пайка"
+#: ../src/hid/gtk/gui-config.c:1312
+msgid "GND-top"
+msgstr "GND-top"
 
-#: ../src/hid/gtk/gui-config.c:1385
-msgid "Vcc-solder"
-msgstr "Vcc-пайка"
+#: ../src/hid/gtk/gui-config.c:1314
+msgid "Vcc-top"
+msgstr "Vcc-top"
 
-#: ../src/hid/gtk/gui-config.c:1387 ../src/hid/gtk/gui-config.c:1639
-msgid "solder side"
-msgstr "сторона пайки"
+#: ../src/hid/gtk/gui-config.c:1316 ../src/hid/gtk/gui-config.c:1566
+msgid "top side"
+msgstr "верхняя сторона"
 
-#: ../src/hid/gtk/gui-config.c:1389
+#: ../src/hid/gtk/gui-config.c:1318
 msgid "<b>Group 2:"
 msgstr "<b>Группа 2:"
 
-#: ../src/hid/gtk/gui-config.c:1391 ../src/hid/gtk/gui-misc.c:511
-#: ../src/hid/gtk/gui-misc.c:535
-msgid "component"
-msgstr "компонент"
+#: ../src/hid/gtk/gui-config.c:1320 ../src/hid/gtk/gui-misc.c:415
+msgid "bottom"
+msgstr "bottom"
 
-#: ../src/hid/gtk/gui-config.c:1393
-msgid "GND-component"
-msgstr "GND-компонент"
+#: ../src/hid/gtk/gui-config.c:1322
+msgid "GND-bottom"
+msgstr "GND-bottom"
 
-#: ../src/hid/gtk/gui-config.c:1395
-msgid "Vcc-component"
-msgstr "Vcc-компонент"
+#: ../src/hid/gtk/gui-config.c:1324
+msgid "Vcc-bottom"
+msgstr "Vcc-bottom"
 
-#: ../src/hid/gtk/gui-config.c:1397 ../src/hid/gtk/gui-config.c:1637
-msgid "component side"
-msgstr "сторона компонентов"
+#: ../src/hid/gtk/gui-config.c:1326 ../src/hid/gtk/gui-config.c:1568
+msgid "bottom side"
+msgstr "нижняя сторона"
 
-#: ../src/hid/gtk/gui-config.c:1399
+#: ../src/hid/gtk/gui-config.c:1328
 msgid "<b>Group 3:"
 msgstr "<b>Группа 3:"
 
-#: ../src/hid/gtk/gui-config.c:1401
+#: ../src/hid/gtk/gui-config.c:1330
 msgid "signal1"
-msgstr "сигнал1"
+msgstr "signal1"
 
-#: ../src/hid/gtk/gui-config.c:1403
+#: ../src/hid/gtk/gui-config.c:1332
 msgid "<b>Group 4:"
 msgstr "<b>Группа 4:"
 
-#: ../src/hid/gtk/gui-config.c:1405
+#: ../src/hid/gtk/gui-config.c:1334
 msgid "signal2"
-msgstr "сигнал2"
+msgstr "signal2"
 
-#: ../src/hid/gtk/gui-config.c:1519
+#: ../src/hid/gtk/gui-config.c:1448
 msgid ""
-"Both 'solder side' or 'component side' layers must have at least\n"
+"Both, 'top side' and 'bottom side' layer must have at least\n"
 "\tone other layer in their group.\n"
 msgstr ""
-"Каждый из слоёв 'сторона пайки' и 'сторона компонентов' должен содержать\n"
+"Каждый из слоёв 'верхняя сторона' и 'нижняя сторона' должен содержать\n"
 "\tхотя бы один другой слой в своей группе.\n"
 
-#: ../src/hid/gtk/gui-config.c:1526
+#: ../src/hid/gtk/gui-config.c:1455
 msgid ""
-"The 'solder side' and 'component side' layers are not allowed\n"
+"The 'top side' and 'bottom side' layers are not allowed\n"
 "\tto be in the same layer group #\n"
 msgstr ""
-"Слои 'сторона пайки' и 'сторона компонентов' не могут быть в\n"
-"\tодной группе слоёв\n"
+"Слои 'верхняя сторона' и 'нижняя сторона' не могут быть в\n"
+"\tодной группе слоёв #\n"
 
 #. working copy
 #. So can know if PCB changes on us
-#: ../src/hid/gtk/gui-config.c:1617
+#: ../src/hid/gtk/gui-config.c:1546
 msgid "Group #"
 msgstr "Группа №"
 
 #. -- Change tab
-#: ../src/hid/gtk/gui-config.c:1705
+#: ../src/hid/gtk/gui-config.c:1634
 msgid "Change"
 msgstr "Изменить"
 
-#: ../src/hid/gtk/gui-config.c:1707
+#: ../src/hid/gtk/gui-config.c:1636
 msgid "Operations on currently selected layer:"
 msgstr "Действия над выбранными слоями:"
 
-#: ../src/hid/gtk/gui-config.c:1736
+#: ../src/hid/gtk/gui-config.c:1665
 msgid "Add new layer above currently selected layer:"
 msgstr "Добавить новый слой перед выбранным слоем:"
 
 #. -- Groups tab
-#: ../src/hid/gtk/gui-config.c:1746
+#: ../src/hid/gtk/gui-config.c:1675
 msgid "Groups"
 msgstr "Группы"
 
-#: ../src/hid/gtk/gui-config.c:1811
+#: ../src/hid/gtk/gui-config.c:1740
 #, c-format
 msgid "Current colors loaded: <b>%s</b>"
 msgstr "Текущие загруженные цвета: <b>%s</b>"
 
-#: ../src/hid/gtk/gui-config.c:1856
+#: ../src/hid/gtk/gui-config.c:1785
 msgid "Load Color File"
 msgstr "Загрузить файл цветов"
 
-#: ../src/hid/gtk/gui-config.c:1885
+#: ../src/hid/gtk/gui-config.c:1815
 msgid "Save Color File"
 msgstr "Сохранить файл цветов"
 
-#: ../src/hid/gtk/gui-config.c:1891
+#: ../src/hid/gtk/gui-config.c:1821
 msgid "Sorry, not overwriting the default color file!"
 msgstr "Файл цветов по умолчанию не будет перезаписан!"
 
-#: ../src/hid/gtk/gui-config.c:1945
+#: ../src/hid/gtk/gui-config.c:1875
 #, c-format
 msgid "PCB %s Color"
 msgstr "PCB цвет %s"
 
 #. ---- Main colors ----
-#: ../src/hid/gtk/gui-config.c:1975
+#: ../src/hid/gtk/gui-config.c:1905
 msgid "Main colors"
 msgstr "Основные цвета"
 
 #. ---- Layer colors ----
-#: ../src/hid/gtk/gui-config.c:1990
+#: ../src/hid/gtk/gui-config.c:1920
 msgid "Layer colors"
 msgstr "Цвета слоёв"
 
 #. ---- Selected colors ----
-#: ../src/hid/gtk/gui-config.c:2005
+#: ../src/hid/gtk/gui-config.c:1935
 msgid "Selected colors"
 msgstr "Цвета выбранного"
 
-#: ../src/hid/gtk/gui-config.c:2031
+#: ../src/hid/gtk/gui-config.c:1961
 msgid "<b>Warning:</b> unsaved color changes will be lost at program exit."
 msgstr ""
 "<b>Предупреждение:</b> несохранённые изменения цвета будут утеряны при "
 "выходе из программы."
 
-#: ../src/hid/gtk/gui-config.c:2046
+#: ../src/hid/gtk/gui-config.c:1976
 msgid "Load"
 msgstr "Загрузить"
 
-#: ../src/hid/gtk/gui-config.c:2049
-msgid "Save"
-msgstr "Сохранить"
-
-#: ../src/hid/gtk/gui-config.c:2051
+#: ../src/hid/gtk/gui-config.c:1981
 msgid "Defaults"
 msgstr "По умолчанию"
 
-#: ../src/hid/gtk/gui-config.c:2091
-msgid "<b>mm</b> "
-msgstr "<b>мм</b> "
-
-#: ../src/hid/gtk/gui-config.c:2091
-msgid "<b>mil</b> "
-msgstr "<b>мил</b> "
-
-#: ../src/hid/gtk/gui-config.c:2183
+#: ../src/hid/gtk/gui-config.c:2115
 msgid "PCB Preferences"
 msgstr "PCB настройки"
 
-#: ../src/hid/gtk/gui-config.c:2208
-msgid "General"
-msgstr "Общие"
-
-#. XXX not used yet
-#: ../src/hid/gtk/gui-config.c:2215 ../src/hid/gtk/gui-dialog-size.c:190
-msgid "Sizes"
-msgstr "Размеры"
-
-#: ../src/hid/gtk/gui-config.c:2221
-msgid "Increments"
-msgstr "Приращения"
-
-#: ../src/hid/gtk/gui-config.c:2233
-msgid "Layers"
-msgstr "Слои"
-
-#: ../src/hid/gtk/gui-config.c:2240
-msgid "Colors"
-msgstr "Цвета"
-
-#. non-zero means cancel was picked
-#: ../src/hid/gtk/gui-dialog-print.c:342
-msgid "PCB Print Layout"
-msgstr "PCB печать трассировки"
-
-#: ../src/hid/gtk/gui-dialog-print.c:374
-msgid "PCB Export Layout"
-msgstr "PCB экспорт трассировки"
-
-#: ../src/hid/gtk/gui-dialog-print.c:410
-msgid "Can't find a suitable exporter HID"
-msgstr "Не найден подходящее экспортёр-HID"
-
-#: ../src/hid/gtk/gui-dialog-size.c:160
-#, c-format
-msgid "%s Sizes"
-msgstr "Размеры %s"
-
-#: ../src/hid/gtk/gui-dialog-size.c:183
-msgid "Route style name"
-msgstr "Название стиля трассировки"
-
-#: ../src/hid/gtk/gui-dialog-size.c:202
-msgid "Line width"
-msgstr "Толщина линии"
-
-#: ../src/hid/gtk/gui-dialog-size.c:209
-msgid "Via hole"
-msgstr "Переходное отверстие"
-
-#: ../src/hid/gtk/gui-dialog-size.c:216
-msgid "Via size"
-msgstr "Размер перехода"
-
-#: ../src/hid/gtk/gui-dialog-size.c:222
-msgid "Clearance"
-msgstr "Зазор"
-
-#: ../src/hid/gtk/gui-dialog-size.c:227
-msgid "Temporary Styles"
-msgstr "Временные стили"
-
-#: ../src/hid/gtk/gui-dialog-size.c:231
-#, c-format
-msgid ""
-"<small>Use values in a temporary route style instead of <b>%s</b>.</small>"
-msgstr ""
-"<small>Использовать значения из временного стиля трассировки вместо <b>%s</"
-"b>.</small>"
-
-#: ../src/hid/gtk/gui-dialog-size.c:241
-msgid "Temp1"
-msgstr "Временный1"
+#: ../src/hid/gtk/gui-config.c:2140
+msgid "General"
+msgstr "Общие"
 
-#: ../src/hid/gtk/gui-dialog-size.c:244
-msgid "Temp2"
-msgstr "Временный2"
+#: ../src/hid/gtk/gui-config.c:2147
+msgid "Sizes"
+msgstr "Размеры"
 
-#: ../src/hid/gtk/gui-dialog-size.c:246
-msgid "Default Style"
-msgstr "Стиль по умолчанию"
+#: ../src/hid/gtk/gui-config.c:2153
+msgid "Increments"
+msgstr "Приращения"
 
-#: ../src/hid/gtk/gui-dialog-size.c:249
-#, c-format
-msgid "<small>Use values as the default route style for new layouts.</small>"
-msgstr "<small>Использовать эти значения по умолчанию.</small>"
+#: ../src/hid/gtk/gui-config.c:2165
+msgid "Layers"
+msgstr "Слои"
 
-#: ../src/hid/gtk/gui-dialog-size.c:257
-msgid "Set as default"
-msgstr "Установить по умолчанию"
+#: ../src/hid/gtk/gui-config.c:2172
+msgid "Colors"
+msgstr "Цвета"
 
-#: ../src/hid/gtk/gui-dialog.c:209
+#: ../src/hid/gtk/gui-dialog.c:212
 #, c-format
 msgid "Save the changes to layout before closing?"
 msgstr "Сохранить изменения трассировки перед закрытием?"
 
-#: ../src/hid/gtk/gui-dialog.c:212
+#: ../src/hid/gtk/gui-dialog.c:215
 #, c-format
 msgid "Save the changes to layout \"%s\" before closing?"
-msgstr "Сохранить в \"%s\" изменения трассировки перед закрытием?"
+msgstr "Сохранить в «%s» изменения трассировки перед закрытием?"
 
-#: ../src/hid/gtk/gui-dialog.c:217
+#: ../src/hid/gtk/gui-dialog.c:220
 msgid "If you don't save, all your changes will be permanently lost."
 msgstr "Если изменения не будут сохранены, они будут безвозвратно утеряны."
 
-#: ../src/hid/gtk/gui-dialog.c:227
+#: ../src/hid/gtk/gui-dialog.c:230
 msgid "Close _without saving"
-msgstr "Закрыть без сохранения"
+msgstr "_Закрыть без сохранения"
+
+#. non-zero means cancel was picked
+#: ../src/hid/gtk/gui-dialog-print.c:387
+msgid "PCB Print Layout"
+msgstr "PCB печать трассировки"
+
+#: ../src/hid/gtk/gui-dialog-print.c:417
+msgid "PCB Export Layout"
+msgstr "PCB экспорт трассировки"
+
+#: ../src/hid/gtk/gui-dialog-print.c:455
+msgid "Can't find a suitable exporter HID"
+msgstr "Не найден подходящее экспортёр-HID"
 
-#: ../src/hid/gtk/gui-drc-window.c:228
+#: ../src/hid/gtk/gui-drc-window.c:135
 #, c-format
 msgid "Object ID %i identified during DRC was not found. Stale DRC window?\n"
 msgstr ""
 "Не найден объект %i идентифицированный при проверке проектных норм. Окно "
 "проектных норм устарело?\n"
 
-#: ../src/hid/gtk/gui-drc-window.c:896
+#: ../src/hid/gtk/gui-drc-window.c:772
 msgid "PCB DRC"
 msgstr "Проектные нормы платы"
 
 #. APPEND
-#: ../src/hid/gtk/gui-drc-window.c:930
+#: ../src/hid/gtk/gui-drc-window.c:806
 msgid "No."
 msgstr "№"
 
 #. APPEND
-#: ../src/hid/gtk/gui-drc-window.c:938
+#: ../src/hid/gtk/gui-drc-window.c:814
 msgid "Violation details"
 msgstr "Описание нарушения"
 
-#: ../src/hid/gtk/gui-keyref-window.c:48
+#: ../src/hid/gtk/gui-keyref-window.c:44
 msgid "Keyboard\n"
 msgstr "Клавиатура\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:49
+#: ../src/hid/gtk/gui-keyref-window.c:45
 msgid "Keyboard shortcuts and actions available in PCB.\n"
 msgstr "Клавиатурные комбинации и действия доступные в PCB.\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:50
+#: ../src/hid/gtk/gui-keyref-window.c:46
 msgid "In below key actions, <s> is <shift>, <c> is <ctrl>\n"
 msgstr ""
-"В приведённых ниже действиях клавишами <s> обозначает <shift>, <c> -- "
-"<ctrl>\n"
+"В приведённых ниже действиях клавишами <s> обозначает <shift>, <c> — <ctrl>\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:51
+#: ../src/hid/gtk/gui-keyref-window.c:47
 msgid "and <a> is <alt> or <mod>\n"
-msgstr "и <a> -- <alt> или <mod>\n"
+msgstr "и <a> — <alt> или <mod>\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:55
+#: ../src/hid/gtk/gui-keyref-window.c:51
 msgid "Set layer and size from line or arc\n"
 msgstr "Установить слой и размер по линии или дуге\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:59
+#: ../src/hid/gtk/gui-keyref-window.c:55
 msgid "Unselect all objects\n"
 msgstr "Снять выделение всех объектов\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:63
+#: ../src/hid/gtk/gui-keyref-window.c:59
 msgid "Flip element to opposite side of the board\n"
-msgstr "Переставить элемент на противоположную сторону платы\n"
+msgstr "Перенести элемент на противоположную сторону платы\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:65
+#: ../src/hid/gtk/gui-keyref-window.c:61
 msgid "Flip selected objects to opposite side of the board\n"
-msgstr "Переставить выбранные объекты на противоположную сторону платы\n"
+msgstr "Перенести выбранные объекты на противоположную сторону платы\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:69
+#: ../src/hid/gtk/gui-keyref-window.c:65
 msgid "Copy selected to buffer and unselect\n"
 msgstr "Скопировать выбранное в буфер и снять выделение\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:73
+#: ../src/hid/gtk/gui-keyref-window.c:69
 msgid "Display pin/pad names (numbers with View->Enable pinout shows number)\n"
 msgstr ""
 "Отображать названия выводов/площадок (номера при Вид->Нумерация выводов)\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:75
+#: ../src/hid/gtk/gui-keyref-window.c:71
 msgid "Open pinout window for element under cursor\n"
 msgstr "Открыть окно нумерации выводов элемента под курсором\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:79
+#: ../src/hid/gtk/gui-keyref-window.c:75
 msgid "Delete all rats\n"
 msgstr "Удалить все соединения\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:81
+#: ../src/hid/gtk/gui-keyref-window.c:77
 msgid "Delete selected rats\n"
 msgstr "Удалить выбранные соединения\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:85
+#: ../src/hid/gtk/gui-keyref-window.c:81
 msgid "Highlight connections to object\n"
 msgstr "Подсветить соединения объекта\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:87
+#: ../src/hid/gtk/gui-keyref-window.c:83
 msgid "Reset highlighted connections\n"
 msgstr "Сбросить подсвеченные соединения\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:89
+#: ../src/hid/gtk/gui-keyref-window.c:85
 msgid "Cumulative highlight connections to object\n"
 msgstr "Дополнительно подсветить соединения объекта\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:93
+#: ../src/hid/gtk/gui-keyref-window.c:89
 msgid "Increment grid by configured grid increment\n"
 msgstr "Увеличить шаг сетки на заданную величину\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:96
+#: ../src/hid/gtk/gui-keyref-window.c:92
 msgid "Decrement grid by configured grid increment\n"
 msgstr "Уменьшить шаг сетки на заданную величину\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:100
+#: ../src/hid/gtk/gui-keyref-window.c:96
 msgid "Toggle visibility of element name under cursor\n"
 msgstr "Переключить отображение названия элемента под курсором\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:103
+#: ../src/hid/gtk/gui-keyref-window.c:99
 msgid "Toggle visibility of selected element names\n"
 msgstr "Переключить отображение названий выбранных элементов\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:106
+#: ../src/hid/gtk/gui-keyref-window.c:102
 msgid "Toggle the hole flag of object under cursor\n"
 msgstr "Переключить флаг отверстия объекта под курсором\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:110
+#: ../src/hid/gtk/gui-keyref-window.c:106
 msgid "Toggle line/arc should clear polygons flag of object under cursor\n"
 msgstr ""
 "Переключить флаг очистки линии/дуги полигона для объекта под курсором\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:113
+#: ../src/hid/gtk/gui-keyref-window.c:109
 msgid "Toggle line/arc should clear polygons flag of selected\n"
 msgstr "Переключить флаг очистки линии/дуги полигона для выбранного\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:117
+#: ../src/hid/gtk/gui-keyref-window.c:113
 msgid "Increase clearance of object by configured clearance\n"
 msgstr "Увеличить отступ от объекта на заданное значение\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:120
+#: ../src/hid/gtk/gui-keyref-window.c:116
 msgid "Decrease clearance of object by configured clearance\n"
 msgstr "Уменьшить отступ от объекта на заданное значение\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:123
+#: ../src/hid/gtk/gui-keyref-window.c:119
 msgid "Increase clearance of selected objects by configured clearance\n"
 msgstr "Увеличить отступ выбранных объектов на заданное значение\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:126
+#: ../src/hid/gtk/gui-keyref-window.c:122
 msgid "Decrease clearance of selected objects by configured clearance\n"
 msgstr "Уменьшить отступ выбранных объектов на заданное значение\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:130
+#: ../src/hid/gtk/gui-keyref-window.c:126
 msgid "Increment current route style line size by configured line increment\n"
 msgstr ""
 "Увеличить толщину линии текущего стиля трассировка на заданное значение\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:133
+#: ../src/hid/gtk/gui-keyref-window.c:129
 msgid "Decrement current route style line size by configured line increment\n"
 msgstr ""
 "Уменьшить толщину линии текущего стиля трассировка на заданное значение\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:137
+#: ../src/hid/gtk/gui-keyref-window.c:133
 msgid "Move object to current layer\n"
 msgstr "Переместить объект на текущий слой\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:140
+#: ../src/hid/gtk/gui-keyref-window.c:136
 msgid "Move selected objects to current layer\n"
 msgstr "Переместить выбранные объекты на текущий слой\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:143
+#: ../src/hid/gtk/gui-keyref-window.c:139
 msgid "Mark at cursor location for showing relative offsets\n"
 msgstr "Отметить расположение курсора для отображения относительных смещений\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:147
+#: ../src/hid/gtk/gui-keyref-window.c:143
 msgid "Select the shortest unselected rat on the board\n"
 msgstr "Выбрать кратчайшее невыбранное соединение на плате\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:151
+#: ../src/hid/gtk/gui-keyref-window.c:147
 msgid "Optimize and draw all rats\n"
 msgstr "Оптимизировать и отобразить все соединения\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:154
+#: ../src/hid/gtk/gui-keyref-window.c:150
 msgid "Optimize and draw selected rats\n"
 msgstr "Оптимизировать и отобразить выбранные соединения\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:158
+#: ../src/hid/gtk/gui-keyref-window.c:154
 msgid "Change octagon flag of object\n"
 msgstr "Изменить флаг восьмиугольного объекта\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:162
+#: ../src/hid/gtk/gui-keyref-window.c:158
 msgid "Backup polygon drawing to previous point\n"
 msgstr "Вернуть полигон к предыдущей вершине\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:165
+#: ../src/hid/gtk/gui-keyref-window.c:161
 msgid "Close polygon\n"
 msgstr "Завершить полигон\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:169
+#: ../src/hid/gtk/gui-keyref-window.c:165
 msgid "Toggle the square flag of an object\n"
 msgstr "Изменить флаг прямоугольного объекта\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:173
+#: ../src/hid/gtk/gui-keyref-window.c:169
 msgid "Redo last undone operation\n"
-msgstr "Повторить последнее отменённое действие\n"
+msgstr "Вернуть последнее отменённое действие\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:177
+#: ../src/hid/gtk/gui-keyref-window.c:173
 msgid "Increment size of an object by configured size increment\n"
 msgstr "Увеличить размер объекта на заданную величину\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:179
+#: ../src/hid/gtk/gui-keyref-window.c:175
 msgid "Decrement size of an object by configured size increment\n"
 msgstr "Уменьшить размер объекта на заданную величину\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:181
+#: ../src/hid/gtk/gui-keyref-window.c:177
 msgid "Increment drill size of a pin or via\n"
 msgstr "Увеличить размер отверстия вывода или перехода\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:183
+#: ../src/hid/gtk/gui-keyref-window.c:179
 msgid "Decrement drill size of a pin or via\n"
 msgstr "Уменьшить размер отверстия вывода или перехода\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:187
+#: ../src/hid/gtk/gui-keyref-window.c:183
 msgid ""
 "Adjust text scale so new text increases by the configured size increment\n"
 msgstr "Увеличить размер текста на заданное значение\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:189
+#: ../src/hid/gtk/gui-keyref-window.c:185
 msgid ""
 "Adjust text scale so new text decreases by the configured size increment\n"
 msgstr "Уменьшить размер текста на заданное значение\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:193
+#: ../src/hid/gtk/gui-keyref-window.c:189
 msgid "Undo last operation\n"
 msgstr "Отменить последнее действие\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:197
+#: ../src/hid/gtk/gui-keyref-window.c:193
 msgid "Zoom to board extents\n"
 msgstr "Масштабировать до границ платы\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:199
+#: ../src/hid/gtk/gui-keyref-window.c:195
 msgid "Increment current route style via size\n"
 msgstr "Увеличить размер перехода текущего стиля трассировки\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:201
+#: ../src/hid/gtk/gui-keyref-window.c:197
 msgid "Decrement current route style via size\n"
 msgstr "Уменьшить размер перехода текущего стиля трассировки\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:203
+#: ../src/hid/gtk/gui-keyref-window.c:199
 msgid "Increment current route style via hole size\n"
 msgstr "Увеличить размер переходного отверстия текущего стиля трассировки\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:205
+#: ../src/hid/gtk/gui-keyref-window.c:201
 msgid "Decrement current route style via hole size\n"
 msgstr "Уменьшить размер переходного отверстия текущего стиля трассировки\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:209
+#: ../src/hid/gtk/gui-keyref-window.c:205
 msgid "Copy selection to buffer and enter pastebuffer mode\n"
 msgstr "Копировать выбранное в буфер и перейти в режим вставки\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:211
+#: ../src/hid/gtk/gui-keyref-window.c:207
 msgid "Cut selection to buffer and enter pastebuffer mode\n"
 msgstr "Вырезать выбранное в буфер и перейти в режим вставки\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:215
+#: ../src/hid/gtk/gui-keyref-window.c:211
 msgid "Zoom in\n"
 msgstr "Увеличить\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:217
+#: ../src/hid/gtk/gui-keyref-window.c:213
 msgid "Zoom out\n"
 msgstr "Уменьшить\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:221
+#: ../src/hid/gtk/gui-keyref-window.c:217
 msgid "Toggle thin draw mode\n"
 msgstr "Переключить режим эскиза\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:225
+#: ../src/hid/gtk/gui-keyref-window.c:221
 msgid "Cycle multiline mode (Using <s> overrides)\n"
 msgstr "Переключить режим соединения линий (<s> для противоположного)\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:229
+#: ../src/hid/gtk/gui-keyref-window.c:225
 msgid "Toggle all direction lines mode\n"
 msgstr "Переключить режим линий любого направления\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:233
+#: ../src/hid/gtk/gui-keyref-window.c:229
 msgid "If drawing an object, return to a neutral state.\n"
 msgstr "Перейти в нейтральное состояние при рисовании объекта\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:237
+#: ../src/hid/gtk/gui-keyref-window.c:233
 msgid "Switch view to other side\n"
 msgstr "Переключить вид на противоположную сторону\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:241
+#: ../src/hid/gtk/gui-keyref-window.c:237
 msgid "Switch to select mode\n"
 msgstr "Переключиться в режим выбора\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:245
+#: ../src/hid/gtk/gui-keyref-window.c:241
 msgid "Enter user command or pop up command window\n"
 msgstr "Ввести пользовательскую команду или показать командное окно\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:249
+#: ../src/hid/gtk/gui-keyref-window.c:245
 msgid "Delete object\n"
 msgstr "Удалить объект\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:253
+#: ../src/hid/gtk/gui-keyref-window.c:249
 msgid "Select drawing layers\n"
 msgstr "Выбрать рабочие слои\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:257
+#: ../src/hid/gtk/gui-keyref-window.c:253
 msgid "Select current buffer\n"
 msgstr "Выбрать текущий буфер\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:261
+#: ../src/hid/gtk/gui-keyref-window.c:257
 msgid "Mouse\n"
 msgstr "Мышь\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:262
+#: ../src/hid/gtk/gui-keyref-window.c:258
 msgid ""
 "Modifier key use can be combined with mouse button presses\n"
 "to modify mouse button actions.\n"
@@ -3796,26 +3943,26 @@ msgstr ""
 "Модификатор использования клавиши может сочетаться с нажатием\n"
 "кнопки мыши для изменения действия по этому нажатию.\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:265
+#: ../src/hid/gtk/gui-keyref-window.c:261
 msgid "<b>Left button\n"
 msgstr "<b>Левая кнопка\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:266
+#: ../src/hid/gtk/gui-keyref-window.c:262
 msgid "\tPerform or initiate action determined by current mode.\n"
 msgstr "\tНачать или выполнить действие в соответствии с текущим режимом.\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:269
-#: ../src/hid/gtk/gui-keyref-window.c:275
-#: ../src/hid/gtk/gui-keyref-window.c:289
-#: ../src/hid/gtk/gui-keyref-window.c:295
+#: ../src/hid/gtk/gui-keyref-window.c:265
+#: ../src/hid/gtk/gui-keyref-window.c:271
+#: ../src/hid/gtk/gui-keyref-window.c:285
+#: ../src/hid/gtk/gui-keyref-window.c:291
 msgid "<b><shift>"
 msgstr "<b><shift>"
 
-#: ../src/hid/gtk/gui-keyref-window.c:270
+#: ../src/hid/gtk/gui-keyref-window.c:266
 msgid " - change rotation direction for rotation tool actions.\n"
 msgstr " - изменить направление инструмента вращения.\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:272
+#: ../src/hid/gtk/gui-keyref-window.c:268
 msgid ""
 "\tAfter a draw operation has been left mouse button initiated,\n"
 "\tmodifier key effects:\n"
@@ -3823,15 +3970,15 @@ msgstr ""
 "\tДействия модификаторов после завершения операции рисования\n"
 "\tначатой по левой кнопке мыши:\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:276
+#: ../src/hid/gtk/gui-keyref-window.c:272
 msgid " - change line 45 degree direction and arc angle direction,\n"
 msgstr " - изменить направление линии 45° и дуги.\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:278
+#: ../src/hid/gtk/gui-keyref-window.c:274
 msgid "<b>Middle button\n"
 msgstr "<b>Средняя кнопка\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:279
+#: ../src/hid/gtk/gui-keyref-window.c:275
 msgid ""
 "\tIf a line, arc, rectangle, or polygon draw operation has been\n"
 "\tinitiated, a click restarts the draw operation at the cursor position.\n"
@@ -3839,7 +3986,7 @@ msgstr ""
 "\tЕсли было начато рисование линии, дуги, прямоугольника или полигона\n"
 "\tщелчок начинает рисование с текущей позиции курсора.\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:282
+#: ../src/hid/gtk/gui-keyref-window.c:278
 msgid ""
 "\tIf such a draw has not been initiated, a click selects objects and\n"
 "\ta press and drag moves objects.\n"
@@ -3847,11 +3994,11 @@ msgstr ""
 "\tЕсли операция рисования не была начата, щелчок выбирает объекты, а\n"
 "\tнажатие и перетаскивание перемещает объекты.\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:285
+#: ../src/hid/gtk/gui-keyref-window.c:281
 msgid "<b>Right button\n"
 msgstr "<b>Правая кнопка\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:286
+#: ../src/hid/gtk/gui-keyref-window.c:282
 msgid ""
 "\tPress and drag to pan.\n"
 "\tWhile drawing or moving, a click without a drag toggles auto pan mode.\n"
@@ -3860,35 +4007,35 @@ msgstr ""
 "\tПри прокрутке или перемещении, щелчок без перетаскивания переключает\n"
 "\tрежим автопрокрутки.\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:290
+#: ../src/hid/gtk/gui-keyref-window.c:286
 msgid " - Popup a menu.\n"
 msgstr " - Выпадающее меню.\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:292
+#: ../src/hid/gtk/gui-keyref-window.c:288
 msgid "<b>Scroll wheel\n"
 msgstr "<b>Колесо прокрутки\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:293
+#: ../src/hid/gtk/gui-keyref-window.c:289
 msgid "\tZoom in/out.\n"
 msgstr "\tУвеличть/уменьшить.\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:296
+#: ../src/hid/gtk/gui-keyref-window.c:292
 msgid " - pan vertically.\n"
 msgstr " - вертикальная прокрутка.\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:298
+#: ../src/hid/gtk/gui-keyref-window.c:294
 msgid "<b><ctrl>"
 msgstr "<b><ctrl>"
 
-#: ../src/hid/gtk/gui-keyref-window.c:299
+#: ../src/hid/gtk/gui-keyref-window.c:295
 msgid " - pan horizontally.\n"
 msgstr " - горизонтальная прокрутка.\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:301
+#: ../src/hid/gtk/gui-keyref-window.c:297
 msgid "<b>Usage:\n"
 msgstr "<b>Использование:\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:302
+#: ../src/hid/gtk/gui-keyref-window.c:298
 msgid ""
 "\tMouse actions can typically be combined.  For example: while moving\n"
 "\tan object (with left or middle press and drag), the right button may\n"
@@ -3897,39 +4044,39 @@ msgid ""
 "\tkey actions.\n"
 msgstr ""
 "\tОперации выполняемые мышью обычно могут сочетаться. Например: при\n"
-"\tперемещениее объекта (с зажатой левой или средней кнопками) правая\n"
+"\tперемещении объекта (с зажатой левой или средней кнопками) правая\n"
 "\tкнопка может быть нажата для переключения автопрокрутки или нажата и\n"
 "\tудержана для ручной прокрутки. Перемещения мышью и рисование также\n"
 "\tмогут сочетаться с действиями клавишами.\n"
 
-#: ../src/hid/gtk/gui-keyref-window.c:354
+#: ../src/hid/gtk/gui-keyref-window.c:353
 msgid "PCB Key Reference"
 msgstr "Справка по действиям PCB"
 
-#: ../src/hid/gtk/gui-library-window.c:168
+#: ../src/hid/gtk/gui-library-window.c:169
 msgid "PCB Library"
 msgstr "Библиотека PCB"
 
 #. GtkTreeViewColumn
-#: ../src/hid/gtk/gui-library-window.c:624
+#: ../src/hid/gtk/gui-library-window.c:685
 msgid "Components"
 msgstr "Компоненты"
 
 #. GtkLabel
-#: ../src/hid/gtk/gui-library-window.c:650
+#: ../src/hid/gtk/gui-library-window.c:711
 msgid "Filter:"
 msgstr "Фильтр:"
 
-#: ../src/hid/gtk/gui-library-window.c:744
+#: ../src/hid/gtk/gui-library-window.c:805
 msgid "Select Footprint..."
 msgstr "Выберите посадочное место..."
 
-#: ../src/hid/gtk/gui-library-window.c:766
+#: ../src/hid/gtk/gui-library-window.c:827
 msgid "Libraries"
 msgstr "Библиотеки"
 
 #. GtkFrame
-#: ../src/hid/gtk/gui-library-window.c:775
+#: ../src/hid/gtk/gui-library-window.c:836
 msgid "Preview"
 msgstr "Предпросмотр"
 
@@ -3937,395 +4084,490 @@ msgstr "Предпросмотр"
 msgid "PCB Log"
 msgstr "Журнал PCB"
 
-#: ../src/hid/gtk/gui-misc.c:502
-#, c-format
-msgid ""
-"<b>%c  view</b>=%s  <b>grid</b>=%.1f:%i  %s%s  <b>line</b>=%.1f  <b>via</b>="
-"%.1f(%.1f)  %s<b>clearance</b>=%.1f  <b>text</b>=%i%%  <b>buffer</b>=#%i"
-msgstr ""
-"<b>%c  вид</b>=%s  <b>сетка</b>=%.1f:%i  %s%s  <b>трасса</b>=%.1f  "
-"<b>переход</b>=%.1f(%.1f)  %s<b>зазор</b>=%.1f  <b>текст</b>=%i%%  <b>буфер</"
-"b>=№%i"
-
-#: ../src/hid/gtk/gui-misc.c:526
-#, c-format
+#: ../src/hid/gtk/gui-misc.c:406
 msgid ""
-"<b>%c  view</b>=%s  <b>grid</b>=%5.3f:%i  %s%s  <b>line</b>=%5.3f  <b>via</"
-"b>=%5.3f(%5.3f)  %s<b>clearance</b>=%5.3f  <b>text</b>=%i%%  <b>buffer</b>=#%"
-"i"
+"%m+<b>view</b>=%s  <b>grid</b>=%$mS  %s%s  <b>line</b>=%mS  <b>via</b>=%mS "
+"(%mS)  %s<b>clearance</b>=%mS  <b>text</b>=%i%%  <b>buffer</b>=#%i"
 msgstr ""
-"<b>%c  вид</b>=%s  <b>сетка</b>=%5.3f:%i  %s%s  <b>трасса</b>=%5.3f  "
-"<b>переход</b>=%5.3f(%5.3f)  %s<b>зазор</b>=%5.3f  <b>текст</b>=%i%%  "
-"<b>буфер</b>=№%i"
+"%m+<b>вид</b>=%s  <b>сетка</b>=%$mS  %s%s  <b>линия</b>=%mS  <b>отверстие</"
+"b>=%mS (%mS)  %s<b>зазор</b>=%mS  <b>текст</b>=%i%%  <b>буфер</b>=#%i"
 
-#: ../src/hid/gtk/gui-netlist-window.c:672
+#: ../src/hid/gtk/gui-netlist-window.c:708
 msgid "PCB Netlist"
 msgstr "PCB список соединений"
 
-#: ../src/hid/gtk/gui-netlist-window.c:699
+#: ../src/hid/gtk/gui-netlist-window.c:735
 msgid " "
 msgstr " "
 
-#: ../src/hid/gtk/gui-netlist-window.c:705
+#: ../src/hid/gtk/gui-netlist-window.c:741
 msgid "Net Name"
 msgstr "Название соединения"
 
-#: ../src/hid/gtk/gui-netlist-window.c:736
+#: ../src/hid/gtk/gui-netlist-window.c:772
 msgid "Nodes"
 msgstr "n"
 
-#: ../src/hid/gtk/gui-netlist-window.c:749
+#: ../src/hid/gtk/gui-netlist-window.c:784
 msgid "Operations on selected 'Net Name':"
 msgstr "Действия над выбранными соединениями:"
 
-#: ../src/hid/gtk/gui-netlist-window.c:761
+#: ../src/hid/gtk/gui-netlist-window.c:796
 msgid "Unselect"
 msgstr "Снять выделение"
 
-#: ../src/hid/gtk/gui-netlist-window.c:766
+#: ../src/hid/gtk/gui-netlist-window.c:801
 msgid "Find"
 msgstr "Найти"
 
-#: ../src/hid/gtk/gui-netlist-window.c:771
+#: ../src/hid/gtk/gui-netlist-window.c:806
 msgid "Rip Up"
 msgstr "Разорвать"
 
-#: ../src/hid/gtk/gui-netlist-window.c:778
+#: ../src/hid/gtk/gui-netlist-window.c:813
 msgid "Disable all nets for adding rats"
 msgstr "Отключить все соединения"
 
-#: ../src/hid/gtk/gui-top-window.c:279
+#: ../src/hid/gtk/gui-top-window.c:248
+msgid "Reload"
+msgstr "Перезагрузить"
+
+#: ../src/hid/gtk/gui-top-window.c:269
+msgid "Do you want to drop your changes and reload the file?"
+msgstr "Хотите отбросить ваши изменения и перезагрузить файл?"
+
+#: ../src/hid/gtk/gui-top-window.c:270
+msgid "Do you want to reload the file?"
+msgstr "Перезагрузить файл?"
+
+#: ../src/hid/gtk/gui-top-window.c:272
 #, c-format
 msgid ""
-"Duplicate accelerator found: \"%s\"\n"
-"The second occurance will be dropped\n"
+"<b>The file %s has changed on disk</b>\n"
+"\n"
+"%s"
 msgstr ""
-"Найден повторяющийся акселератор: \"%s\"\n"
-"Второй акселератор будет удалён\n"
+"<b>Файл %s на диске изменён</b>\n"
+"\n"
+"%s"
 
-#: ../src/hid/gtk/gui-top-window.c:1001
+#: ../src/hid/gtk/gui-top-window.c:491
 msgid "silk"
 msgstr "шёлкография"
 
-#: ../src/hid/gtk/gui-top-window.c:1006
+#: ../src/hid/gtk/gui-top-window.c:496
 msgid "rat lines"
 msgstr "соединения"
 
-#: ../src/hid/gtk/gui-top-window.c:1011
+#: ../src/hid/gtk/gui-top-window.c:501
 msgid "pins/pads"
 msgstr "выводы/площадки"
 
-#: ../src/hid/gtk/gui-top-window.c:1016
+#: ../src/hid/gtk/gui-top-window.c:506
 msgid "vias"
 msgstr "переходы"
 
-#: ../src/hid/gtk/gui-top-window.c:1021
+#: ../src/hid/gtk/gui-top-window.c:511
 msgid "far side"
-msgstr "нижняя сторона"
+msgstr "обратная сторона"
 
-#: ../src/hid/gtk/gui-top-window.c:1026
+#: ../src/hid/gtk/gui-top-window.c:516
 msgid "solder mask"
 msgstr "маска"
 
-#: ../src/hid/gtk/gui-top-window.c:1219
+#: ../src/hid/gtk/gui-top-window.c:689
 msgid "Unnamed"
 msgstr "Безымянный"
 
-#: ../src/hid/gtk/gui-top-window.c:1851
-msgid "Route Style"
-msgstr "Стиль трассировки"
+#: ../src/hid/gtk/gui-top-window.c:692
+msgid "Unsaved.pcb"
+msgstr "Несохранённый.pcb"
 
-#: ../src/hid/gtk/gui-top-window.c:1870
-#, c-format
-msgid "Temp%d"
-msgstr "Временный%d"
+#: ../src/hid/gtk/gui-top-window.c:1609
+msgid "Read end of pipe died!\n"
+msgstr "Прекращено чтение канала!\n"
 
-#: ../src/hid/gtk/gui-top-window.c:3202
-#, c-format
-msgid ""
-"Don't know how to parse \"%s\" as an accelerator in the menu resource file.\n"
-msgstr "Невозможно разобрать \"%s\" как акселератор в файле ресурсов меню.\n"
+#: ../src/hid/gtk/gui-top-window.c:1624
+msgid "ERROR status from g_io_channel_read_line\n"
+msgstr "ОШИБКА-статус из g_io_channel_read_line\n"
 
-#: ../src/hid/gtk/gui-top-window.c:3208
+#: ../src/hid/gtk/gui-top-window.c:1629
 msgid ""
-"Format is:\n"
-"modifiers<Key>k\n"
-"where \"modifiers\" is a space separated list of key modifiers\n"
-"and \"k\" is the name of the key.\n"
-"Allowed modifiers are:\n"
-"   Ctrl\n"
-"   Shift\n"
-"   Alt\n"
-"Please note that case is important.\n"
+"Input pipe returned EOF.  The --listen option is \n"
+"probably not running anymore in this session.\n"
 msgstr ""
-"Формат следующий:\n"
-"модификаторы<Key>к\n"
-"где \"модификаторы\" это разделённый пробелами список модификаторов клавиш\n"
-"и \"к\" название клавиши.\n"
-"Допустимые модификаторы:\n"
-"   Ctrl\n"
-"   Shift\n"
-"   Alt\n"
-"Учтите, что регистр символов важен.\n"
+"Входной канал вернул символ конца фала (EOF).\n"
+"Параметр --listen, вероятно, более не работает в этой сессии.\n"
 
-#. if we got this far it is supposed to be an X
-#. * resource.  For now ignore it and warn the user
-#.
-#: ../src/hid/gtk/gui-top-window.c:3536
+#: ../src/hid/gtk/gui-top-window.c:1635
+msgid "AGAIN status from g_io_channel_read_line\n"
+msgstr "ПОВТОР-статус из g_io_channel_read_line\n"
+
+#: ../src/hid/gtk/gui-top-window.c:1640
 #, c-format
-msgid ""
-"The gtk gui currently ignores \"%s\"as part of a menuitem resource.\n"
-"Feel free to provide patches\n"
-msgstr ""
-"В настоящее время графический пользовательский интерфейс GTK игнорирует\n"
-"\"%s\" как часть ресурса элемента меню.\n"
-"Не стесняйтесь предоставлять патчи\n"
+msgid "ERROR:  unhandled case in ghid_listener_cb\n"
+msgstr "ОШИБКА: необработанный case в ghid_listener_cb\n"
+
+#: ../src/hid/gtk/gui-top-window.c:1647
+#, c-format
+msgid "Unknown condition in ghid_listener_cb\n"
+msgstr "Неизвестное условие в ghid_listener_cb\n"
 
-#: ../src/hid/gtk/gui-top-window.c:3609
+#: ../src/hid/gtk/gui-top-window.c:2059
 #, c-format
 msgid ""
-"GTK GUI currently ignores \"%s\" in the menu\n"
-"resource file.\n"
+"ERROR:  overflow of the ghid_hotkey_actions array.  Index = %d\n"
+"Please report this.\n"
 msgstr ""
-"В настоящее время графический пользовательский интерфейс GTK игнорирует\n"
-"\"%s\" в файле ресурсов меню.\n"
+"ERROR:  overflow of the ghid_hotkey_actions array.  Index = %d\n"
+"Пожалуйста, сообщите об этой ошибке.\n"
+
+#: ../src/hid/gtk/gui-top-window.c:2083
+#, c-format
+msgid "Note:  home directory is \"%s\"\n"
+msgstr "Замечание: домашний каталог «%s»\n"
+
+#: ../src/hid/gtk/gui-top-window.c:2088
+msgid "Warning:  could not determine home directory\n"
+msgstr "Предупреждение: невозможно определить домашний каталог\n"
+
+#: ../src/hid/gtk/gui-top-window.c:2118
+#, c-format
+msgid "Error: internal menu resource didn't parse\n"
+msgstr "Ошибка: внутренние ресурсы меню не обработаны\n"
+
+#: ../src/hid/gtk/gui-top-window.c:2125
+#, c-format
+msgid "Loading menus from %s\n"
+msgstr "Загрузка меню из %s\n"
+
+#: ../src/hid/gtk/gui-top-window.c:2131
+msgid "Using default menus\n"
+msgstr "Использую меню по умолчанию\n"
+
+#: ../src/hid/lesstif/dialogs.c:1186
+#, c-format
+msgid "Units are %s."
+msgstr "Единицы измерения — %s."
+
+#: ../src/hid/ps/ps.c:1456
+msgid "Print Calibration Page"
+msgstr "Печатать страницу калибровки"
+
+#: ../src/hid/ps/ps.c:1456
+msgid "Generates a printer calibration page"
+msgstr "Создать страницу калибровки принтера"
+
+#: ../src/hid/gtk/gui-trackball.c:259
+msgid "2D View"
+msgstr "2D-вид"
+
+#: ../src/main.c:2031
+#, c-format
+msgid "Executing startup script file %s\n"
+msgstr "Выполнение скрипта запуска из файла %s\n"
+
+#: ../src/main.c:2037
+#, c-format
+msgid "Executing startup action %s\n"
+msgstr "Выполнение действия запуска %s\n"
+
+#: ../src/netlist.c:448 ../src/report.c:832 ../src/select.c:845
+#, c-format
+msgid "regexp error: %s\n"
+msgstr "Ошибка regexp: %s\n"
+
+#: ../src/netlist.c:456 ../src/report.c:840 ../src/select.c:857
+#, c-format
+msgid "re_comp error: %s\n"
+msgstr "Ошибка re_comp: %s\n"
+
+#: ../src/pcb-menu.res:33
+msgid "Save layout"
+msgstr "Сохранить трассировку"
+
+#: ../src/pcb-menu.res:34
+msgid "Save layout as..."
+msgstr "Сохранить трассировку как..."
+
+#: ../src/pcb-menu.res:37
+msgid "Load layout"
+msgstr "Загрузить трассировку"
+
+#: ../src/pcb-menu.res:38
+msgid "Load element data to paste-buffer"
+msgstr "Загрузить элемент в буфер обмена"
+
+#: ../src/pcb-menu.res:39
+msgid "Load layout data to paste-buffer"
+msgstr "Загрузить трассировку в буфер обмена"
+
+#: ../src/pcb-menu.res:42
+msgid "Print layout..."
+msgstr "Печатать трассировку..."
+
+#: ../src/pcb-menu.res:43
+msgid "Export layout..."
+msgstr "Экспортировать трассировку..."
+
+#: ../src/pcb-menu.res:46
+msgid "Save connection data of..."
+msgstr "Сохранить данные соединений для..."
+
+#: ../src/pcb-menu.res:51
+msgid "Start new layout"
+msgstr "Начать новую трассировку"
+
+#: ../src/pcb-menu.res:53
+msgid "Quit Program"
+msgstr "Выйти из программы"
+
+#: ../src/pcb-menu.res:58
+msgid "Spin 180"
+msgstr "Повернуть на 180°"
 
-#: ../src/hid/gtk/gui-top-window.c:3731
-msgid "Warning:  could not determine home directory\n"
-msgstr "Предупреждение: невозможно определить домашний каталог\n"
+#: ../src/pcb-menu.res:61
+msgid "Show soldermask"
+msgstr "Отобразить маску"
 
-#: ../src/hid/gtk/gui-top-window.c:3735
-#, c-format
-msgid "Note:  home directory is \"%s\"\n"
-msgstr "Замечание: домашний каталог \"%s\"\n"
+#: ../src/pcb-menu.res:63
+msgid "Displayed element-name..."
+msgstr "Отображаемые названия элемента..."
 
-#: ../src/hid/gtk/gui-top-window.c:3752
-#, c-format
-msgid "Error: internal menu resource didn't parse\n"
-msgstr "Ошибка: внутренние ресурсы меню не обработаны\n"
+#: ../src/pcb-menu.res:208
+msgid "Pinout shows number"
+msgstr "Отображать номера на выводах"
 
-#: ../src/hid/ps/ps.c:1286
-msgid "Print Calibration Page"
-msgstr "Печатать страницу калибровки"
+#: ../src/pcb-menu.res:72
+msgid "Open pinout menu"
+msgstr "Открыть меню нумерации выводов"
 
-#: ../src/hid/ps/ps.c:1286
-msgid "Generates a printer calibration page"
-msgstr "Создать страницу калибровки принтера"
+#: ../src/pcb-menu.res:83
+msgid "Zoom Toggle"
+msgstr "Переключить масштаб"
 
-#: ../src/main.c:1023
-#, c-format
-msgid "Executing startup script file %s\n"
-msgstr "Выполнение скрипта запуска из файла %s\n"
+#: ../src/pcb-menu.res:83
+msgid "`"
+msgstr "`"
 
-#: ../src/main.c:1029
-#, c-format
-msgid "Executing startup action %s\n"
-msgstr "Выполнение действия запуска %s\n"
+#: ../src/pcb-menu.res:83
+msgid "<Key>`"
+msgstr "<Key>`"
 
-#: ../src/netlist.c:454 ../src/select.c:887
-#, c-format
-msgid "regexp error: %s\n"
-msgstr "Ошибка regexp: %s\n"
+#: ../src/pcb-menu.res:96
+msgid "Display grid"
+msgstr "Отображать сетку"
 
-#: ../src/netlist.c:462 ../src/select.c:899
-#, c-format
-msgid "re_comp error: %s\n"
-msgstr "Ошибка re_comp: %s\n"
+#: ../src/pcb-menu.res:277
+msgid "Paste buffer to layout"
+msgstr "Вставить трассировку из буфера"
 
-#: ../src/pcb-menu.res:154
+#: ../src/pcb-menu.res:149
+msgid "Edit Names..."
+msgstr "Редактировать названия..."
+
+#: ../src/pcb-menu.res:150
 msgid " Change text on layout"
 msgstr "Изменит текст на трассировке"
 
-#: ../src/pcb-menu.res:159
-msgid " CurrentLayer"
-msgstr "Текущий слой"
+#: ../src/pcb-menu.res:151
+msgid " Edit name of layout"
+msgstr "Изменить название трассировки"
 
-#: ../src/pcb-menu.res:156
+#: ../src/pcb-menu.res:152
 msgid " Edit name of active layer"
 msgstr "Изменить название текущего слоя"
 
+#: ../src/pcb-menu.res:153
+msgid "Edit Attributes..."
+msgstr "Изменить атрибуты..."
+
+#: ../src/pcb-menu.res:154
+msgid " Layout"
+msgstr "Трассировки"
+
 #: ../src/pcb-menu.res:155
-msgid " Edit name of layout"
-msgstr "Изменить название трассировки"
+msgid " CurrentLayer"
+msgstr "Текущий слой"
 
-#: ../src/pcb-menu.res:160
+#: ../src/pcb-menu.res:156
 msgid " Element"
 msgstr "Элемент"
 
 #: ../src/pcb-menu.res:158
-msgid " Layout"
-msgstr "Трассировка"
+msgid "Board Sizes"
+msgstr "Размеры платы"
 
-#: ../src/pcb-menu.res:82
-msgid "<Key>`"
-msgstr "<Key>`"
+#: ../src/pcb-menu.res:185
+msgid "Command"
+msgstr "Команда"
 
-#: ../src/pcb-menu.res:331
-msgid "<Key>r"
-msgstr "<Key>r"
+#: ../src/pcb-menu.res:188
+msgid "Layer groups"
+msgstr "Группы слоёв"
 
-#: ../src/pcb-menu.res:408
-msgid "Alt-Z"
-msgstr "Alt-Z"
+#: ../src/pcb-menu.res:189
+msgid "Edit layer groupings"
+msgstr "Редактировать группы слоёв"
 
-#: ../src/pcb-menu.res:408
-msgid "Alt<Key>z"
-msgstr "Alt<Key>z"
+#: ../src/pcb-menu.res:210
+msgid "Enable vendor drill mapping"
+msgstr "Использовать карту производственных отверстий"
 
-#: ../src/pcb-menu.res:426
-msgid "Board Layout"
-msgstr "Трассировка платы"
+#: ../src/pcb-menu.res:211
+msgid "Import Settings"
+msgstr "Импортировать настройки"
 
-#: ../src/pcb-menu.res:162
-msgid "Board Sizes"
-msgstr "Размеры платы"
+#: ../src/pcb-menu.res:212
+msgid "New elements added at..."
+msgstr "Новые элементы добавлять по..."
 
-#: ../src/pcb-menu.res:188
-msgid "Command"
-msgstr "Команда"
+#: ../src/pcb-menu.res:222
+msgid "Select all visible objects"
+msgstr "Выбрать все видимые объекты"
 
-#: ../src/pcb-menu.res:234
-msgid "Delete selected objects"
-msgstr "Удалить выбранные объекты"
+#: ../src/pcb-menu.res:223
+msgid "Select all found objects"
+msgstr "Выбрать все найденные объекты"
 
-#: ../src/pcb-menu.res:95
-msgid "Display grid"
-msgstr "Отображать сетку"
+#: ../src/pcb-menu.res:224
+msgid "Select all connected objects"
+msgstr "Выбрать все соединённые объекты"
 
-#: ../src/pcb-menu.res:62
-msgid "Displayed element-name..."
-msgstr "Отображаемые названия элемента..."
+#: ../src/pcb-menu.res:227
+msgid "unselect all found objects"
+msgstr "Снять выделение со всех найденных объектов"
 
-#: ../src/pcb-menu.res:157
-msgid "Edit Attributes..."
-msgstr "Изменить атрибуты..."
+#: ../src/pcb-menu.res:228
+msgid "unselect all connected objects"
+msgstr "Снять выделение со всех соединённых объектов"
 
-#: ../src/pcb-menu.res:153
-msgid "Edit Names..."
-msgstr "Редактировать названия..."
+#: ../src/pcb-menu.res:235
+msgid "Text Objects"
+msgstr "Текстовый объект"
 
-#: ../src/pcb-menu.res:192
-msgid "Edit layer groupings"
-msgstr "Редактировать группы слоёв"
+#: ../src/pcb-menu.res:242
+msgid "Delete selected objects"
+msgstr "Удалить выбранные объекты"
 
-#: ../src/pcb-menu.res:213
-msgid "Enable vendor drill mapping"
-msgstr "Использовать карту производственных отверстий"
+#: ../src/pcb-menu.res:292
+msgid "Select current buffer"
+msgstr "Выбрать текущий буфер"
 
-#: ../src/pcb-menu.res:299
-msgid "Erase rats-nest"
-msgstr "Удалить соединения"
+#: ../src/pcb-menu.res:293
+msgid "#1"
+msgstr "№1"
 
-#: ../src/pcb-menu.res:191
-msgid "Layer groups"
-msgstr "Группы слоёв"
+#: ../src/pcb-menu.res:294
+msgid "#2"
+msgstr "№2"
 
-#: ../src/pcb-menu.res:71
-msgid "Open pinout menu"
-msgstr "Открыть меню нумерации выводов"
+#: ../src/pcb-menu.res:295
+msgid "#3"
+msgstr "№3"
+
+#: ../src/pcb-menu.res:296
+msgid "#4"
+msgstr "№4"
 
 #: ../src/pcb-menu.res:297
+msgid "#5"
+msgstr "№5"
+
+#: ../src/pcb-menu.res:301
+msgid "Lookup connection to object"
+msgstr "Поиск соединений с объектом"
+
+#: ../src/pcb-menu.res:306
 msgid "Optimize rats-nest"
 msgstr "Оптимизировать соединения"
 
-#: ../src/pcb-menu.res:311
+#: ../src/pcb-menu.res:308
+msgid "Erase rats-nest"
+msgstr "Удалить соединения"
+
+#: ../src/pcb-menu.res:320
 msgid "Orthopull"
 msgstr "Вытяжка под 90°"
 
-#: ../src/pcb-menu.res:211
-msgid "Pinout shows number"
-msgstr "Отображать номера на выводах"
-
-#: ../src/pcb-menu.res:331
-msgid "R"
-msgstr "R"
+#: ../src/pcb-menu.res:321
+msgid "SimpleOpts"
+msgstr "Простая оптимизация"
 
-#: ../src/pcb-menu.res:331
+#: ../src/pcb-menu.res:340
 msgid "Report net length"
 msgstr "Отчёт о длине соединения"
 
-#: ../src/pcb-menu.res:45
-msgid "Save connection data of..."
-msgstr "Сохранить данные соединений для..."
-
-#: ../src/pcb-menu.res:60
-msgid "Show soldermask"
-msgstr "Отобразить маску"
-
-#: ../src/pcb-menu.res:312
-msgid "SimpleOpts"
-msgstr "Простая оптимизация"
-
-#: ../src/pcb-menu.res:57
-msgid "Spin 180"
-msgstr "Повернуть на 180°"
+#: ../src/pcb-menu.res:340
+msgid "R"
+msgstr "R"
 
-#: ../src/pcb-menu.res:228
-msgid "Text Objects"
-msgstr "Текстовый объект"
+#: ../src/pcb-menu.res:340
+msgid "<Key>r"
+msgstr "<Key>r"
 
-#: ../src/pcb-menu.res:408
-msgid "Undo"
-msgstr "Отменить"
+#: ../src/pcb-menu.res:418
+msgid "Alt-Z"
+msgstr "Alt-Z"
 
-#: ../src/pcb-menu.res:82
-msgid "Zoom Toggle"
-msgstr "Переключить масштаб"
+#: ../src/pcb-menu.res:418
+msgid "Alt<Key>z"
+msgstr "Alt<Key>z"
 
-#: ../src/pcb-menu.res:82
-msgid "`"
-msgstr "`"
+#: ../src/pcb-menu.res:436
+msgid "Board Layout"
+msgstr "Трассировка платы"
 
-#: ../src/polygon.c:1226
+#: ../src/polygon.c:1378
 msgid "Cannot close polygon because 45 degree lines are requested.\n"
 msgstr "Невозможно завершить полигон, так как требуется линия под 45°.\n"
 
-#: ../src/polygon.c:1234
+#: ../src/polygon.c:1386
 msgid "A polygon has to have at least 3 points\n"
 msgstr "Полигон должен содержать минимум три вершины\n"
 
-#: ../src/rats.c:113
+#: ../src/rats.c:108
 #, c-format
 msgid "Bad net-list format encountered near: \"%s\"\n"
-msgstr "Ошибка формата списка соединений около: \"%s\"\n"
+msgstr "Ошибка формата списка соединений около: «%s»\n"
 
-#: ../src/rats.c:194
+#: ../src/rats.c:189
 #, c-format
 msgid ""
 "Error! Netlist file is missing pin!\n"
 "white space after \"%s-\"\n"
 msgstr ""
 "Ошибка! В файле списка соединений пропущен вывод!\n"
-"Пробел после \"%s-\"\n"
+"Пробел после «%s-»\n"
 
-#: ../src/rats.c:211
+#: ../src/rats.c:206
 #, c-format
 msgid "Can't find %s pin %s called for in netlist.\n"
 msgstr "Невозможно найти в %s вывод %s указанный в списке соединений.\n"
 
-#: ../src/rats.c:282
+#: ../src/rats.c:276
 #, c-format
 msgid "Error! Element %s pin %s appears multiple times in the netlist file.\n"
 msgstr ""
 "Ошибка! В элементе %s вывод %s повторяется несколько раз в файле списка "
 "соединений.\n"
 
-#: ../src/rats.c:379
+#: ../src/rats.c:373
 #, c-format
 msgid "Warning! Net \"%s\" is shorted to %s pin %s\n"
-msgstr "Внимание! Соединение \"%s\" замкнуто накоротко с %s выводом %s\n"
+msgstr "Внимание! Соединение «%s» замкнуто накоротко с %s выводом %s\n"
 
-#: ../src/rats.c:400 ../src/rats.c:436
+#: ../src/rats.c:394 ../src/rats.c:430
 #, c-format
 msgid "Warning! Net \"%s\" is shorted to net \"%s\"\n"
-msgstr "Внимание! Соединение \"%s\" замкнуто накоротко с соединением \"%s\"\n"
+msgstr "Внимание! Соединение «%s» замкнуто накоротко с соединением «%s»\n"
 
-#: ../src/rats.c:415
+#: ../src/rats.c:409
 #, c-format
 msgid "Warning! Net \"%s\" is shorted  to %s pad %s\n"
-msgstr "Внимание! Соединение \"%s\" замкнуто накоротко с %s площадкой %s\n"
+msgstr "Внимание! Соединение «%s» замкнуто накоротко с %s площадкой %s\n"
 
-#: ../src/rats.c:756
+#: ../src/rats.c:802
 msgid ""
 "Congratulations!!\n"
 "The layout is complete and has no shorted nets.\n"
@@ -4333,7 +4575,7 @@ msgstr ""
 "Поздравляем!\n"
 "Трассировка завершена и нет замкнутых накоротко цепей.\n"
 
-#: ../src/rats.c:759
+#: ../src/rats.c:805
 msgid ""
 "Nothing more to add, but there are\n"
 "either rat-lines in the layout, disabled nets\n"
@@ -4343,36 +4585,36 @@ msgstr ""
 "неотрассированные соединения, или отключённые соединения\n"
 "в списке соединений, или отсутствующие компоненты\n"
 
-#: ../src/rats.c:871 ../src/rats.c:891
+#: ../src/rats.c:915 ../src/rats.c:935
 msgid "No pad/pin under rat line\n"
 msgstr "Под линией соединения нет площадки/вывода\n"
 
-#: ../src/rats.c:877
+#: ../src/rats.c:921
 msgid "You must name the starting element first\n"
 msgstr "Сначала нужно указать название начального элемента\n"
 
-#: ../src/rats.c:897
+#: ../src/rats.c:941
 msgid "You must name the ending element first\n"
 msgstr "Сначала нужно указать название конечного элемента\n"
 
-#: ../src/rats.c:911
+#: ../src/rats.c:955
 msgid "Both connections already in netlist - cannot merge nets\n"
-msgstr "Оба соединения уже в списке соединений -- невозможно объединить\n"
+msgstr "Оба соединения уже в списке соединений — невозможно объединить\n"
 
-#: ../src/report.c:490
+#: ../src/report.c:498
 msgid "Nothing found to report on\n"
 msgstr "Для отчёта ничего не найдено\n"
 
-#: ../src/set.c:259
+#: ../src/set.c:261
 msgid "That mode is NOT allowed when drawing ratlines!\n"
 msgstr "Этот режим недопустим при создании соединений!\n"
 
-#: ../src/toporouter.c:1272
+#: ../src/toporouter.c:1121
 #, c-format
-msgid "Elapsed time: %d.%02d seconds\n"
-msgstr "Время выполнения: %d.%02d с\n"
+msgid "Elapsed time: %.2f seconds\n"
+msgstr "Время выполнения: %.2f с\n"
 
-#: ../src/toporouter.c:6824
+#: ../src/toporouter.c:6503
 msgid ""
 "Reticulating splines... successful\n"
 "\n"
@@ -4380,76 +4622,108 @@ msgstr ""
 "Штриховка сплайнов... успешно\n"
 "\n"
 
-#: ../src/toporouter.c:6825
+#. NB: We could use the %$mS specifier to print these distances, but we would
+#. *     have to cast to Coord, which might overflow for complex routing when
+#. *     PCB is built with Coord as a 32-bit integer.
+#.
+#: ../src/toporouter.c:6508
 #, c-format
 msgid "Wiring cost: %f inches\n"
 msgstr "Оценка соединений: %f дюймов\n"
 
-#: ../src/toporouter.c:7613
+#: ../src/toporouter.c:7296
 msgid "ROAR router: "
 msgstr "Трассировщик ROAR:"
 
-#: ../src/toporouter.c:7627
+#: ../src/toporouter.c:7310
 #, c-format
 msgid "%d nets remaining\n"
 msgstr "Осталось %d соединений\n"
 
-#: ../src/toporouter.c:7630
+#: ../src/toporouter.c:7313
 #, c-format
 msgid "%d -> "
 msgstr "%d -> "
 
-#: ../src/toporouter.c:7806
+#: ../src/toporouter.c:7489
 #, c-format
 msgid "RUBIX router: %d nets remaining\n"
 msgstr "Трассировщик RUBIX: осталось %d соединений\n"
 
-#: ../src/toporouter.c:7892
+#: ../src/toporouter.c:7573
 msgid "Topological Autorouter\n"
 msgstr "Топологический автотрассировщик\n"
 
-#: ../src/toporouter.c:7893
+#: ../src/toporouter.c:7574
 #, c-format
 msgid "Started %s"
 msgstr "Начало %s"
 
-#: ../src/toporouter.c:7894
+#: ../src/toporouter.c:7575
 msgid "-------------------------------------\n"
 msgstr "-------------------------------------\n"
 
-#: ../src/toporouter.c:7895
-msgid ""
-"Copyright 2009 Anthony Blake (tonyb33 at gmail.com)\n"
-"\n"
-msgstr ""
-"Copyright 2009 Anthony Blake (tonyb33 at gmail.com)\n"
-"\n"
-
-#: ../src/undo.c:230
+#: ../src/undo.c:221
 #, c-format
 msgid "Size of 'undo-list' exceeds %li kb\n"
-msgstr "Размер списка отмен превышает %li кб\n"
+msgstr "Размер списка отмен превышает %li кБайт\n"
+
+#: ../src/undo.c:937
+msgid ""
+"ERROR: Attempt to Undo() with Serial == 0\n"
+"       Please save your work and report this bug.\n"
+msgstr ""
+"ERROR: Attempt to Undo() with Serial == 0\n"
+"       Пожалуйста, сохраните файл и сообщите об ошибке.\n"
 
-#: ../src/undo.c:902
+#: ../src/undo.c:944
 msgid "Nothing to undo - buffer is empty\n"
-msgstr "Отменять нечего - буфер пуст\n"
+msgstr "Отменять нечего — буфер пуст\n"
 
-#: ../src/undo.c:914
+#: ../src/undo.c:954
 #, c-format
-msgid "Undo bad serial number %d expecting %d\n"
-msgstr "Неверный номер отмены %d, ожидался %d\n"
+msgid ""
+"ERROR: Bad undo serial number %d in undo stack - expecting %d or lower\n"
+"       Please save your work and report this bug.\n"
+msgstr ""
+"ERROR: Bad undo serial number %d in undo stack - expecting %d or lower\n"
+"       Пожалуйста, сохраните файл и сообщите об ошибке.\n"
 
-#: ../src/undo.c:1053
+#: ../src/undo.c:983
+msgid "ERROR: Failed to undo some operations\n"
+msgstr "ОШИБКА: невозможно отменить некоторые действия\n"
+
+#: ../src/undo.c:1119
 msgid "Nothing to redo. Perhaps changes have been made since last undo\n"
 msgstr ""
 "Повторять нечего. Возможно, со времени последней отмены были сделаны "
 "изменения\n"
 
-#: ../src/vendor.c:284
+#: ../src/undo.c:1127
+#, c-format
+msgid ""
+"ERROR: Bad undo serial number %d in redo stack - expecting %d or higher\n"
+"       Please save your work and report this bug.\n"
+msgstr ""
+"ERROR: Bad undo serial number %d in redo stack - expecting %d or higher\n"
+"       Пожалуйста, сохраните файл и сообщите об ошибке.\n"
+
+#: ../src/undo.c:1159
+msgid "ERROR: Failed to redo some operations\n"
+msgstr "ОШИБКА: невозможно повторить некоторые действия\n"
+
+#: ../src/undo.c:1174
+msgid ""
+"ERROR: Operations were added to the Undo stack with an incorrect serial "
+"number\n"
+msgstr ""
+"ОШИБКА: действия были добавлены с стек отмены с неверным порядковым номером\n"
+
+#: ../src/vendor.c:281
 msgid "Load Vendor Resource File..."
 msgstr "Загрузить файл ресурсов производителя..."
 
-#: ../src/vendor.c:285
+#: ../src/vendor.c:282
 msgid ""
 "Picks a vendor resource file to load.\n"
 "This file can contain drc settings for a\n"
@@ -4461,58 +4735,58 @@ msgstr ""
 "конкретного производителя и список допустимых\n"
 "сверловочных отверстий."
 
-#: ../src/vendor.c:319
+#: ../src/vendor.c:315
 #, c-format
 msgid "Could not load vendor resource file \"%s\"\n"
-msgstr "Невозможно загрузить файл \"%s\" ресурсов производителя\n"
+msgstr "Невозможно загрузить файл «%s» ресурсов производителя\n"
 
-#: ../src/vendor.c:363
+#: ../src/vendor.c:355
 msgid "No drillmap resource found\n"
 msgstr "Не найдены ресурсы карты производственных отверстий\n"
 
-#: ../src/vendor.c:381
+#: ../src/vendor.c:373
 #, c-format
 msgid "\"%s\" is not a valid rounding type.  Defaulting to up\n"
-msgstr "\"%s\" не может быть типом скругления. Используется верхний\n"
+msgstr "«%s» не может быть типом скругления. Используется верхний\n"
 
-#: ../src/vendor.c:412 ../src/vendor.c:428
+#: ../src/vendor.c:404 ../src/vendor.c:420
 #, c-format
 msgid "Set DRC minimum copper spacing to %.2f mils\n"
 msgstr "Установка проектной нормы минимальной ширины проводника %.2f мил\n"
 
-#: ../src/vendor.c:420
+#: ../src/vendor.c:412
 #, c-format
 msgid "Set DRC minimum copper overlap to %.2f mils\n"
 msgstr ""
 "Установка проектной нормы минимального перекрытия проводника %.2f мил\n"
 
-#: ../src/vendor.c:436
+#: ../src/vendor.c:428
 #, c-format
 msgid "Set DRC minimum silk width to %.2f mils\n"
 msgstr ""
 "Установка проектной нормы минимальной толщины линии шёлкографии %.2f мил\n"
 
-#: ../src/vendor.c:444
+#: ../src/vendor.c:436
 #, c-format
 msgid "Set DRC minimum drill diameter to %.2f mils\n"
 msgstr "Установка проектной нормы минимального диаметра отверстия %.2f мил\n"
 
-#: ../src/vendor.c:452
+#: ../src/vendor.c:444
 #, c-format
 msgid "Set DRC minimum annular ring to %.2f mils\n"
 msgstr "Установка проектной нормы минимального кольца %.2f мил\n"
 
-#: ../src/vendor.c:456
+#: ../src/vendor.c:448
 #, c-format
 msgid "Loaded %d vendor drills from %s\n"
 msgstr "Загружено %d производственных отверстий из %s\n"
 
-#: ../src/vendor.c:457
+#: ../src/vendor.c:449
 #, c-format
 msgid "Loaded %d RefDes skips, %d Value skips, %d Descr skips\n"
 msgstr "Пропущено загруженных %d поз.обозн., %d номинал., %d описан.\n"
 
-#: ../src/vendor.c:502
+#: ../src/vendor.c:495
 #, c-format
 msgid ""
 "Via at %.2f, %.2f not changed.  Possible reasons:\n"
@@ -4523,12 +4797,12 @@ msgstr ""
 "\t- размер площадки слишком мал\n"
 "\t- новый размер будет слишком велик или мал\n"
 
-#: ../src/vendor.c:510
+#: ../src/vendor.c:503
 #, c-format
 msgid "Locked via at %.2f, %.2f not changed.\n"
 msgstr "Заблокированный переход %.2f, %.2f не изменён.\n"
 
-#: ../src/vendor.c:542
+#: ../src/vendor.c:535
 #, c-format
 msgid ""
 "Pin %s (%s) at %.2f, %.2f (element %s, %s, %s) not changed.\n"
@@ -4541,32 +4815,32 @@ msgstr ""
 "\t- размер площадки слишком мал\n"
 "\t- новый размер будет слишком велик или мал\n"
 
-#: ../src/vendor.c:556
+#: ../src/vendor.c:549
 #, c-format
 msgid "Locked pin at %-6.2f, %-6.2f not changed.\n"
 msgstr "Заблокированный вывод %-6.2f, %-6.2f не изменён.\n"
 
-#: ../src/vendor.c:566
+#: ../src/vendor.c:559
 #, c-format
 msgid "Updated %d drill sizes out of %d total\n"
 msgstr "Изменено %d отверстий из %d\n"
 
-#: ../src/vendor.c:575
+#: ../src/vendor.c:568
 #, c-format
 msgid "Adjusted active via hole size to be %6.2f mils\n"
 msgstr "Изменено текущее переходное отверстие %6.2f мил\n"
 
-#: ../src/vendor.c:589
+#: ../src/vendor.c:582
 #, c-format
 msgid "Adjusted %s routing style via hole size to be %6.2f mils\n"
 msgstr "Для стиля трассировки %s изменено переходное отверстие до %6.2f мил\n"
 
-#: ../src/vendor.c:598
+#: ../src/vendor.c:591
 #, c-format
 msgid "Increased %s routing style via diameter to %6.2f mils\n"
 msgstr "Для стиля трассировки %s увеличено переходное отверстие до %6.2f мил\n"
 
-#: ../src/vendor.c:649
+#: ../src/vendor.c:642
 #, c-format
 msgid ""
 "Vendor drill list does not contain a drill >= %6.2f mil\n"
@@ -4575,39 +4849,196 @@ msgstr ""
 "Список отверстий не содержит отверстия >= %6.2f мил\n"
 "Использую %6.2f мил.\n"
 
-#: ../src/vendor.c:814
+#: ../src/vendor.c:807
 #, c-format
 msgid "Ignored resource type = %d in skips= section\n"
 msgstr "Пропущен ресурс типа = %d из раздела skips=\n"
 
-#: ../src/vendor.c:837
+#: ../src/vendor.c:830
 #, c-format
 msgid "Vendor mapping skipped because refdes = %s matches %s\n"
 msgstr ""
 "Пропущено применение карты производственных отверстий,\n"
 "так как refdes = %s совпадает с %s\n"
 
-#: ../src/vendor.c:849
+#: ../src/vendor.c:842
 #, c-format
 msgid "Vendor mapping skipped because value = %s matches %s\n"
 msgstr ""
 "Пропущено применение карты производственных отверстий,\n"
 "так как value = %s совпадает с %s\n"
 
-#: ../src/vendor.c:864
+#: ../src/vendor.c:857
 #, c-format
 msgid "Vendor mapping skipped because descr = %s matches %s\n"
 msgstr ""
 "Пропущено применение карты производственных отверстий,\n"
 "так как descr = %s совпадает с %s\n"
 
-#: ../src/vendor.c:872
+#: ../src/vendor.c:865
 #, c-format
 msgid "Vendor mapping skipped because element %s is locked\n"
 msgstr ""
 "Пропущено применение карты производственных отверстий,\n"
 "так как элемент %s заблокирован\n"
 
+#~ msgid "Command to use for printing"
+#~ msgstr "Команда используемая для печати"
+
+#~ msgid "Postscript print"
+#~ msgstr "Печать Postscript"
+
+#~ msgid "psfile"
+#~ msgstr "файл PS"
+
+#~ msgid "Postscript output file"
+#~ msgstr "Выходной файл Postscript"
+
+#~ msgid "drill-helper"
+#~ msgstr "вспомогательные отверстия"
+
+#~ msgid "align-marks"
+#~ msgstr "маркеры"
+
+#~ msgid "Print alignment marks on each sheet"
+#~ msgstr "Печатать макреры выравнивания на каждой странице"
+
+#~ msgid "mirror"
+#~ msgstr "отразить"
+
+#~ msgid "Print mirror image of every page"
+#~ msgstr "Печатать изображение отражённым на каждой странице"
+
+#~ msgid "Don't combine metric/English grids like that!\n"
+#~ msgstr "Не объединяйте таким образом метрические и дюймовые сетки!\n"
+
+#~ msgid "near (%.*f, %.*f)\n"
+#~ msgstr "в области (%.*f, %.*f)\n"
+
+#~ msgid "Ctrl-G"
+#~ msgstr "Ctrl-G"
+
+#~ msgid "Ctrl<Key>g"
+#~ msgstr "Ctrl<Key>g"
+
+#~ msgid "Grid +0.05mm"
+#~ msgstr "Сетка +0.05 мм"
+
+#~ msgid "Grid -0.05mm"
+#~ msgstr "Сетка -0.05 мм"
+
+#~ msgid "Move to current layer"
+#~ msgstr "Перенести на текущий слой"
+
+#~ msgid "Error, too many apertures needed for Gerber file.\n"
+#~ msgstr "Ошибка, слишком много апертур для Gerber-файла.\n"
+
+#~ msgid "Overwriting %s\n"
+#~ msgstr "%s перезаписан\n"
+
+#~ msgid "Loading popup \"%s\". Button = %u\n"
+#~ msgstr "Загрузка выпадающего меню \"%s\". Button = %u\n"
+
+#~ msgid "Click on a place to pan"
+#~ msgstr "Укажите позицию для панорамирования"
+
+#~ msgid "Put layout name on the window title bar"
+#~ msgstr "Отображать название слоя в заголовке окна"
+
+#~ msgid "Auto pan speed"
+#~ msgstr "Скорость автопрокрутки"
+
+#~ msgid "<b>%s</b> grid units are selected"
+#~ msgstr "Единица измерения сетки: <b>%s</b>"
+
+#~ msgid "Increment/Decrement values to use in <b>%s</b> units mode.\n"
+#~ msgstr ""
+#~ "Значения увеличения/уменьшения для использования при измерении в <b>%s</"
+#~ "b>.\n"
+
+#~ msgid "Grid Increment/Decrement"
+#~ msgstr "Увеличение/уменьшение сетки"
+
+#~ msgid "Size Increment/Decrement"
+#~ msgstr "Увеличение/уменьшение размера"
+
+#~ msgid "Line Increment/Decrement"
+#~ msgstr "Увеличение/уменьшение линии"
+
+#~ msgid "Clear Increment/Decrement"
+#~ msgstr "Увеличение/уменьшение зазора"
+
+#~ msgid "solder"
+#~ msgstr "пайка"
+
+#~ msgid "GND-solder"
+#~ msgstr "GND-пайка"
+
+#~ msgid "Vcc-solder"
+#~ msgstr "Vcc-пайка"
+
+#~ msgid "solder side"
+#~ msgstr "сторона пайки"
+
+#~ msgid "component"
+#~ msgstr "компонент"
+
+#~ msgid "<b>mm</b> "
+#~ msgstr "<b>мм</b> "
+
+#~ msgid "<b>mil</b> "
+#~ msgstr "<b>мил</b> "
+
+#~ msgid "%s Sizes"
+#~ msgstr "Размеры %s"
+
+#~ msgid "Route style name"
+#~ msgstr "Название стиля трассировки"
+
+#~ msgid "Temporary Styles"
+#~ msgstr "Временные стили"
+
+#~ msgid ""
+#~ "<small>Use values in a temporary route style instead of <b>%s</b>.</small>"
+#~ msgstr ""
+#~ "<small>Использовать значения из временного стиля трассировки вместо <b>"
+#~ "%s</b>.</small>"
+
+#~ msgid "Temp1"
+#~ msgstr "Временный1"
+
+#~ msgid "Temp2"
+#~ msgstr "Временный2"
+
+#~ msgid "Default Style"
+#~ msgstr "Стиль по умолчанию"
+
+#~ msgid ""
+#~ "<small>Use values as the default route style for new layouts.</small>"
+#~ msgstr "<small>Использовать эти значения по умолчанию.</small>"
+
+#~ msgid ""
+#~ "<b>%c  view</b>=%s  <b>grid</b>=%5.3f:%i  %s%s  <b>line</b>=%5.3f  "
+#~ "<b>via</b>=%5.3f(%5.3f)  %s<b>clearance</b>=%5.3f  <b>text</b>=%i%%  "
+#~ "<b>buffer</b>=#%i"
+#~ msgstr ""
+#~ "<b>%c  вид</b>=%s  <b>сетка</b>=%5.3f:%i  %s%s  <b>трасса</b>=%5.3f  "
+#~ "<b>переход</b>=%5.3f(%5.3f)  %s<b>зазор</b>=%5.3f  <b>текст</b>=%i%%  "
+#~ "<b>буфер</b>=№%i"
+
+#~ msgid "Temp%d"
+#~ msgstr "Временный%d"
+
+#~ msgid ""
+#~ "Copyright 2009 Anthony Blake (tonyb33 at gmail.com)\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Copyright 2009 Anthony Blake (tonyb33 at gmail.com)\n"
+#~ "\n"
+
+#~ msgid "Undo bad serial number %d expecting %d\n"
+#~ msgstr "Неверный номер отмены %d, ожидался %d\n"
+
 #~ msgid ""
 #~ "Please save your PCB first, so that it has a\n"
 #~ "file name, or manually add an import::src0 attribute with\n"
diff --git a/src/Makefile.am b/src/Makefile.am
index 7adb424..033dae8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,11 +1,8 @@
 ## -*- makefile -*-
-## $Id$
-##
 
 SUBDIRS=	icons
 
 CC = @CC_OR_CXX@
-AM_CFLAGS = @CC_OR_CXX_FLAGS@
 
 pcbtreedir=	@PCBTREEDIR@
 pcblibdir=	@PCBLIBDIR@
@@ -28,7 +25,7 @@ bin_PROGRAMS=	pcb
 if DEBUG_BUILD
 # don't disable assert()
 else
-AM_CFLAGS += -DNDEBUG
+AM_CFLAGS= -DNDEBUG
 endif
 
 PCB_SRCS = \
@@ -77,10 +74,12 @@ PCB_SRCS = \
 	fontmode.c \
 	free_atexit.c \
 	free_atexit.h \
+	gettext.h \
 	global.h \
 	heap.c \
 	heap.h \
 	hid.h \
+	hid_draw.h \
 	insert.c \
 	insert.h \
 	intersect.c \
@@ -171,11 +170,16 @@ LIBGTK_GDK_SRCS= \
 	hid/gtk/gtkhid-gdk.c
 
 LIBGTK_GL_SRCS= \
-	hid/gtk/gtkhid-gl.c
+	hid/gtk/gtkhid-gl.c \
+	hid/gtk/gui-trackball.c \
+	hid/gtk/gui-trackball.h
 
 GL_SRCS= \
 	hid/common/hidgl.c \
-	hid/common/hidgl.h
+	hid/common/hidgl.h \
+	hid/common/trackball.c \
+	hid/common/trackball.h
+
 
 BUILT_SOURCES = \
 	core_lists.h \
@@ -232,6 +236,8 @@ EXTRA_DIST= \
 	$(srcdir)/hid/ps/hid.conf \
 	gpcb-menu.res.in \
 	pcb-menu.res.in \
+	gpcb-menu.res.h \
+	pcb-menu.res.h \
 	pcbtest.sh.in \
 	dbus.xml
 
@@ -259,6 +265,10 @@ gpcb-menu.h : gpcb-menu.res
 	sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/",/' < gpcb-menu.res >> $@
 	echo '0};' >> $@
 
+# Menus i18n
+%.res.h : %.res
+	$(INTLTOOL_EXTRACT) --type=gettext/quoted $^
+
 hid/common/hidlist.h : Makefile
 	$(MKDIR_P) hid/common
 	true > $@
@@ -420,7 +430,6 @@ LIBGCODE_SRCS = \
 	dolists.h \
 	hid/hidint.h \
 	hid/gcode/gcode.c \
-	hid/gcode/gcode.h \
 	hid/gcode/decompose.c \
 	hid/gcode/decompose.h \
 	hid/gcode/trace.c \
@@ -468,7 +477,9 @@ DISTCLEANFILES= pcbtest.sh gpcb-menu.h pcb-menu.h \
 	core_lists.h \
 	dbus-introspect.h \
 	gpcb-menu.res \
-	pcb-menu.res
+	pcb-menu.res \
+	gpcb-menu.res.h \
+	pcb-menu.res.h
 
 # create wrapper script that lets you test pcb prior to installation
 pcbtest.sh:	$(srcdir)/pcbtest.sh.in Makefile
diff --git a/src/Makefile.in b/src/Makefile.in
index d88b190..b0bd740 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -18,6 +18,23 @@
 
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -37,21 +54,18 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 bin_PROGRAMS = pcb$(EXEEXT)
-
-# don't disable assert()
- at DEBUG_BUILD_FALSE@am__append_1 = -DNDEBUG
- at WITH_TOPOROUTER_TRUE@am__append_2 = toporouter.c toporouter.h
+ at WITH_TOPOROUTER_TRUE@am__append_1 = toporouter.c toporouter.h
+ at WITH_TOPOROUTER_TRUE@am__append_2 = ../gts/libgts.a
 @WITH_TOPOROUTER_TRUE at am__append_3 = ../gts/libgts.a
- at WITH_TOPOROUTER_TRUE@am__append_4 = ../gts/libgts.a
- at WITH_DBUS_TRUE@am__append_5 = ${DBUS_SRCS}
- at WITH_DBUS_TRUE@am__append_6 = dbus-introspect.h
+ at WITH_DBUS_TRUE@am__append_4 = ${DBUS_SRCS}
+ at WITH_DBUS_TRUE@am__append_5 = dbus-introspect.h
 
 # If we are building with GL support, we need some extra files
- at USE_GL_TRUE@am__append_7 = ${GL_SRCS}
- at USE_GL_TRUE@am__append_8 = ${LIBGTK_GL_SRCS}
- at USE_GL_FALSE@am__append_9 = ${LIBGTK_GDK_SRCS}
+ at USE_GL_TRUE@am__append_6 = ${GL_SRCS}
+ at USE_GL_TRUE@am__append_7 = ${LIBGTK_GL_SRCS}
+ at USE_GL_FALSE@am__append_8 = ${LIBGTK_GDK_SRCS}
+ at WIN32_TRUE@am__append_9 = pcb_icon.o
 @WIN32_TRUE at am__append_10 = pcb_icon.o
- at WIN32_TRUE@am__append_11 = pcb_icon.o
 subdir = src
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in edif.c \
 	edif.h parse_l.c parse_y.c parse_y.h res_lex.c res_parse.c \
@@ -127,9 +141,11 @@ am__libgtk_a_SOURCES_DIST = dolists.h hid/hidint.h \
 	hid/gtk/gui-netlist-window.c hid/gtk/gui-output-events.c \
 	hid/gtk/gui-pinout-preview.c hid/gtk/gui-pinout-preview.h \
 	hid/gtk/gui-pinout-window.c hid/gtk/gui-top-window.c \
-	hid/gtk/gui-utils.c hid/gtk/gtkhid-gl.c hid/gtk/gtkhid-gdk.c \
-	hid/gtk/gtk_lists.h
-am__objects_3 = hid/gtk/libgtk_a-gtkhid-gl.$(OBJEXT)
+	hid/gtk/gui-utils.c hid/gtk/gtkhid-gl.c \
+	hid/gtk/gui-trackball.c hid/gtk/gui-trackball.h \
+	hid/gtk/gtkhid-gdk.c hid/gtk/gtk_lists.h
+am__objects_3 = hid/gtk/libgtk_a-gtkhid-gl.$(OBJEXT) \
+	hid/gtk/libgtk_a-gui-trackball.$(OBJEXT)
 @USE_GL_TRUE at am__objects_4 = $(am__objects_3)
 am__objects_5 = hid/gtk/libgtk_a-gtkhid-gdk.$(OBJEXT)
 @USE_GL_FALSE at am__objects_6 = $(am__objects_5)
@@ -197,29 +213,32 @@ am__pcb_SOURCES_DIST = action.c action.h autoplace.c autoplace.h \
 	crosshair.h data.c data.h djopt.c djopt.h dolists.h draw.c \
 	draw.h drill.c drill.h edif.y edif_parse.h error.c error.h \
 	file.c file.h find.c find.h flags.c fontmode.c free_atexit.c \
-	free_atexit.h global.h heap.c heap.h hid.h insert.c insert.h \
-	intersect.c intersect.h line.c line.h lrealpath.c lrealpath.h \
-	macro.h main.c mirror.c mirror.h misc.c misc.h move.c move.h \
-	mtspace.c mtspace.h mymem.c mymem.h netlist.c parse_l.h \
-	parse_l.l parse_y.h parse_y.y pcb-printf.c pcb-printf.h \
-	polygon.c polygon.h polygon1.c polyarea.h puller.c print.c \
-	print.h rats.c rats.h remove.c remove.h report.c report.h \
-	res_parse.y res_lex.l resource.h rotate.c rotate.h rtree.c \
-	rtree.h rubberband.c rubberband.h search.c search.h select.c \
-	select.h set.c set.h strflags.c strflags.h thermal.c thermal.h \
-	undo.c undo.h vector.c vector.h vendor.c vendor.h \
-	hid/common/actions.c hid/common/actions.h hid/common/flags.c \
-	hid/common/hidinit.c hid/common/hidinit.h \
-	hid/common/hidnogui.c hid/common/hidnogui.h \
-	hid/common/extents.c hid/common/draw_helpers.c \
-	hid/common/draw_helpers.h hid/common/hid_resource.c \
-	hid/common/hid_resource.h hid/hidint.h toporouter.c \
-	toporouter.h dbus-pcbmain.c dbus-pcbmain.h dbus.h dbus.c \
-	hid/common/hidgl.c hid/common/hidgl.h core_lists.h
+	free_atexit.h gettext.h global.h heap.c heap.h hid.h \
+	hid_draw.h insert.c insert.h intersect.c intersect.h line.c \
+	line.h lrealpath.c lrealpath.h macro.h main.c mirror.c \
+	mirror.h misc.c misc.h move.c move.h mtspace.c mtspace.h \
+	mymem.c mymem.h netlist.c parse_l.h parse_l.l parse_y.h \
+	parse_y.y pcb-printf.c pcb-printf.h polygon.c polygon.h \
+	polygon1.c polyarea.h puller.c print.c print.h rats.c rats.h \
+	remove.c remove.h report.c report.h res_parse.y res_lex.l \
+	resource.h rotate.c rotate.h rtree.c rtree.h rubberband.c \
+	rubberband.h search.c search.h select.c select.h set.c set.h \
+	strflags.c strflags.h thermal.c thermal.h undo.c undo.h \
+	vector.c vector.h vendor.c vendor.h hid/common/actions.c \
+	hid/common/actions.h hid/common/flags.c hid/common/hidinit.c \
+	hid/common/hidinit.h hid/common/hidnogui.c \
+	hid/common/hidnogui.h hid/common/extents.c \
+	hid/common/draw_helpers.c hid/common/draw_helpers.h \
+	hid/common/hid_resource.c hid/common/hid_resource.h \
+	hid/hidint.h toporouter.c toporouter.h dbus-pcbmain.c \
+	dbus-pcbmain.h dbus.h dbus.c hid/common/hidgl.c \
+	hid/common/hidgl.h hid/common/trackball.c \
+	hid/common/trackball.h core_lists.h
 @WITH_TOPOROUTER_TRUE at am__objects_12 = toporouter.$(OBJEXT)
 am__objects_13 = dbus-pcbmain.$(OBJEXT) dbus.$(OBJEXT)
 @WITH_DBUS_TRUE at am__objects_14 = $(am__objects_13)
-am__objects_15 = hid/common/hidgl.$(OBJEXT)
+am__objects_15 = hid/common/hidgl.$(OBJEXT) \
+	hid/common/trackball.$(OBJEXT)
 @USE_GL_TRUE at am__objects_16 = $(am__objects_15)
 am__objects_17 = action.$(OBJEXT) autoplace.$(OBJEXT) \
 	autoroute.$(OBJEXT) buffer.$(OBJEXT) change.$(OBJEXT) \
@@ -256,10 +275,10 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 CCLD = $(CC)
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 @MAINTAINER_MODE_FALSE at am__skiplex = test -f $@ ||
-LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
+LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS)
 YLWRAP = $(top_srcdir)/ylwrap
 @MAINTAINER_MODE_FALSE at am__skipyacc = test -f $@ ||
-YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
+YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS)
 SOURCES = $(libbatch_a_SOURCES) $(libbom_a_SOURCES) \
 	$(libgcode_a_SOURCES) $(libgerber_a_SOURCES) \
 	$(libgtk_a_SOURCES) $(liblesstif_a_SOURCES) \
@@ -278,6 +297,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	install-pdf-recursive install-ps-recursive install-recursive \
 	installcheck-recursive installdirs-recursive pdf-recursive \
 	ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -299,6 +323,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 DATA = $(pcblib_DATA)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
   distclean-recursive maintainer-clean-recursive
@@ -338,6 +368,7 @@ ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -350,7 +381,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC_OR_CXX@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -416,6 +446,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -524,6 +558,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -544,7 +580,6 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 SUBDIRS = icons
-AM_CFLAGS = @CC_OR_CXX_FLAGS@ $(am__append_1)
 pcbtreedir = @PCBTREEDIR@
 pcblibdir = @PCBLIBDIR@
 AUTOMAKE_OPTIONS = subdir-objects
@@ -559,30 +594,34 @@ pcblib_DATA = \
 	gpcb-menu.res \
 	pcb-menu.res
 
+
+# don't disable assert()
+ at DEBUG_BUILD_FALSE@AM_CFLAGS = -DNDEBUG
 PCB_SRCS = action.c action.h autoplace.c autoplace.h autoroute.c \
 	autoroute.h box.h buffer.c buffer.h change.c change.h clip.c \
 	clip.h command.c command.h compat.c compat.h const.h copy.c \
 	copy.h create.c create.h crosshair.c crosshair.h data.c data.h \
 	djopt.c djopt.h dolists.h draw.c draw.h drill.c drill.h edif.y \
 	edif_parse.h error.c error.h file.c file.h find.c find.h \
-	flags.c fontmode.c free_atexit.c free_atexit.h global.h heap.c \
-	heap.h hid.h insert.c insert.h intersect.c intersect.h line.c \
-	line.h lrealpath.c lrealpath.h macro.h main.c mirror.c \
-	mirror.h misc.c misc.h move.c move.h mtspace.c mtspace.h \
-	mymem.c mymem.h netlist.c parse_l.h parse_l.l parse_y.h \
-	parse_y.y pcb-printf.c pcb-printf.h polygon.c polygon.h \
-	polygon1.c polyarea.h puller.c print.c print.h rats.c rats.h \
-	remove.c remove.h report.c report.h res_parse.y res_lex.l \
-	resource.h rotate.c rotate.h rtree.c rtree.h rubberband.c \
-	rubberband.h search.c search.h select.c select.h set.c set.h \
-	strflags.c strflags.h thermal.c thermal.h undo.c undo.h \
-	vector.c vector.h vendor.c vendor.h hid/common/actions.c \
-	hid/common/actions.h hid/common/flags.c hid/common/hidinit.c \
-	hid/common/hidinit.h hid/common/hidnogui.c \
-	hid/common/hidnogui.h hid/common/extents.c \
-	hid/common/draw_helpers.c hid/common/draw_helpers.h \
-	hid/common/hid_resource.c hid/common/hid_resource.h \
-	hid/hidint.h $(am__append_2) $(am__append_5) $(am__append_7)
+	flags.c fontmode.c free_atexit.c free_atexit.h gettext.h \
+	global.h heap.c heap.h hid.h hid_draw.h insert.c insert.h \
+	intersect.c intersect.h line.c line.h lrealpath.c lrealpath.h \
+	macro.h main.c mirror.c mirror.h misc.c misc.h move.c move.h \
+	mtspace.c mtspace.h mymem.c mymem.h netlist.c parse_l.h \
+	parse_l.l parse_y.h parse_y.y pcb-printf.c pcb-printf.h \
+	polygon.c polygon.h polygon1.c polyarea.h puller.c print.c \
+	print.h rats.c rats.h remove.c remove.h report.c report.h \
+	res_parse.y res_lex.l resource.h rotate.c rotate.h rtree.c \
+	rtree.h rubberband.c rubberband.h search.c search.h select.c \
+	select.h set.c set.h strflags.c strflags.h thermal.c thermal.h \
+	undo.c undo.h vector.c vector.h vendor.c vendor.h \
+	hid/common/actions.c hid/common/actions.h hid/common/flags.c \
+	hid/common/hidinit.c hid/common/hidinit.h \
+	hid/common/hidnogui.c hid/common/hidnogui.h \
+	hid/common/extents.c hid/common/draw_helpers.c \
+	hid/common/draw_helpers.h hid/common/hid_resource.c \
+	hid/common/hid_resource.h hid/hidint.h $(am__append_1) \
+	$(am__append_4) $(am__append_6)
 EXTRA_pcb_SOURCES = ${DBUS_SRCS} ${GL_SRCS} toporouter.c toporouter.h
 DBUS_SRCS = \
 	dbus-pcbmain.c \
@@ -594,19 +633,23 @@ LIBGTK_GDK_SRCS = \
 	hid/gtk/gtkhid-gdk.c
 
 LIBGTK_GL_SRCS = \
-	hid/gtk/gtkhid-gl.c
+	hid/gtk/gtkhid-gl.c \
+	hid/gtk/gui-trackball.c \
+	hid/gtk/gui-trackball.h
 
 GL_SRCS = \
 	hid/common/hidgl.c \
-	hid/common/hidgl.h
+	hid/common/hidgl.h \
+	hid/common/trackball.c \
+	hid/common/trackball.h
 
 BUILT_SOURCES = core_lists.h gpcb-menu.h hid/gtk/gtk_lists.h \
 	hid/lesstif/lesstif_lists.h hid/batch/batch_lists.h \
 	hid/png/png_lists.h hid/gcode/gcode_lists.h \
 	hid/nelma/nelma_lists.h hid/ps/ps_lists.h parse_y.h pcb-menu.h \
-	res_parse.h hid/common/hidlist.h $(am__append_6)
-pcb_LDADD = @HIDLIBS@ $(am__append_3) $(am__append_10)
-pcb_DEPENDENCIES = @HIDLIBS@ $(am__append_4) $(am__append_11)
+	res_parse.h hid/common/hidlist.h $(am__append_5)
+pcb_LDADD = @HIDLIBS@ $(am__append_2) $(am__append_9)
+pcb_DEPENDENCIES = @HIDLIBS@ $(am__append_3) $(am__append_10)
 pcb_SOURCES = ${PCB_SRCS} core_lists.h
 
 # for globalconst.h
@@ -629,6 +672,8 @@ EXTRA_DIST = \
 	$(srcdir)/hid/ps/hid.conf \
 	gpcb-menu.res.in \
 	pcb-menu.res.in \
+	gpcb-menu.res.h \
+	pcb-menu.res.h \
 	pcbtest.sh.in \
 	dbus.xml
 
@@ -651,7 +696,7 @@ LIBGTK_SRCS = dolists.h hid/hidint.h \
 	hid/gtk/gui-netlist-window.c hid/gtk/gui-output-events.c \
 	hid/gtk/gui-pinout-preview.c hid/gtk/gui-pinout-preview.h \
 	hid/gtk/gui-pinout-window.c hid/gtk/gui-top-window.c \
-	hid/gtk/gui-utils.c $(am__append_8) $(am__append_9)
+	hid/gtk/gui-utils.c $(am__append_7) $(am__append_8)
 libgtk_a_SOURCES = ${LIBGTK_SRCS} hid/gtk/gtk_lists.h
 liblesstif_a_CPPFLAGS = -I./hid/lesstif
 LIBLESSTIF_SRCS = \
@@ -703,7 +748,6 @@ LIBGCODE_SRCS = \
 	dolists.h \
 	hid/hidint.h \
 	hid/gcode/gcode.c \
-	hid/gcode/gcode.h \
 	hid/gcode/decompose.c \
 	hid/gcode/decompose.h \
 	hid/gcode/trace.c \
@@ -739,7 +783,9 @@ DISTCLEANFILES = pcbtest.sh gpcb-menu.h pcb-menu.h \
 	core_lists.h \
 	dbus-introspect.h \
 	gpcb-menu.res \
-	pcb-menu.res
+	pcb-menu.res \
+	gpcb-menu.res.h \
+	pcb-menu.res.h
 
 all: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -787,7 +833,7 @@ hid/batch/$(DEPDIR)/$(am__dirstamp):
 	@: > hid/batch/$(DEPDIR)/$(am__dirstamp)
 hid/batch/libbatch_a-batch.$(OBJEXT): hid/batch/$(am__dirstamp) \
 	hid/batch/$(DEPDIR)/$(am__dirstamp)
-libbatch.a: $(libbatch_a_OBJECTS) $(libbatch_a_DEPENDENCIES) 
+libbatch.a: $(libbatch_a_OBJECTS) $(libbatch_a_DEPENDENCIES) $(EXTRA_libbatch_a_DEPENDENCIES) 
 	-rm -f libbatch.a
 	$(libbatch_a_AR) libbatch.a $(libbatch_a_OBJECTS) $(libbatch_a_LIBADD)
 	$(RANLIB) libbatch.a
@@ -799,7 +845,7 @@ hid/bom/$(DEPDIR)/$(am__dirstamp):
 	@: > hid/bom/$(DEPDIR)/$(am__dirstamp)
 hid/bom/bom.$(OBJEXT): hid/bom/$(am__dirstamp) \
 	hid/bom/$(DEPDIR)/$(am__dirstamp)
-libbom.a: $(libbom_a_OBJECTS) $(libbom_a_DEPENDENCIES) 
+libbom.a: $(libbom_a_OBJECTS) $(libbom_a_DEPENDENCIES) $(EXTRA_libbom_a_DEPENDENCIES) 
 	-rm -f libbom.a
 	$(libbom_a_AR) libbom.a $(libbom_a_OBJECTS) $(libbom_a_LIBADD)
 	$(RANLIB) libbom.a
@@ -817,7 +863,7 @@ hid/gcode/libgcode_a-trace.$(OBJEXT): hid/gcode/$(am__dirstamp) \
 	hid/gcode/$(DEPDIR)/$(am__dirstamp)
 hid/gcode/libgcode_a-curve.$(OBJEXT): hid/gcode/$(am__dirstamp) \
 	hid/gcode/$(DEPDIR)/$(am__dirstamp)
-libgcode.a: $(libgcode_a_OBJECTS) $(libgcode_a_DEPENDENCIES) 
+libgcode.a: $(libgcode_a_OBJECTS) $(libgcode_a_DEPENDENCIES) $(EXTRA_libgcode_a_DEPENDENCIES) 
 	-rm -f libgcode.a
 	$(libgcode_a_AR) libgcode.a $(libgcode_a_OBJECTS) $(libgcode_a_LIBADD)
 	$(RANLIB) libgcode.a
@@ -829,7 +875,7 @@ hid/gerber/$(DEPDIR)/$(am__dirstamp):
 	@: > hid/gerber/$(DEPDIR)/$(am__dirstamp)
 hid/gerber/gerber.$(OBJEXT): hid/gerber/$(am__dirstamp) \
 	hid/gerber/$(DEPDIR)/$(am__dirstamp)
-libgerber.a: $(libgerber_a_OBJECTS) $(libgerber_a_DEPENDENCIES) 
+libgerber.a: $(libgerber_a_OBJECTS) $(libgerber_a_DEPENDENCIES) $(EXTRA_libgerber_a_DEPENDENCIES) 
 	-rm -f libgerber.a
 	$(libgerber_a_AR) libgerber.a $(libgerber_a_OBJECTS) $(libgerber_a_LIBADD)
 	$(RANLIB) libgerber.a
@@ -883,9 +929,11 @@ hid/gtk/libgtk_a-gui-utils.$(OBJEXT): hid/gtk/$(am__dirstamp) \
 	hid/gtk/$(DEPDIR)/$(am__dirstamp)
 hid/gtk/libgtk_a-gtkhid-gl.$(OBJEXT): hid/gtk/$(am__dirstamp) \
 	hid/gtk/$(DEPDIR)/$(am__dirstamp)
+hid/gtk/libgtk_a-gui-trackball.$(OBJEXT): hid/gtk/$(am__dirstamp) \
+	hid/gtk/$(DEPDIR)/$(am__dirstamp)
 hid/gtk/libgtk_a-gtkhid-gdk.$(OBJEXT): hid/gtk/$(am__dirstamp) \
 	hid/gtk/$(DEPDIR)/$(am__dirstamp)
-libgtk.a: $(libgtk_a_OBJECTS) $(libgtk_a_DEPENDENCIES) 
+libgtk.a: $(libgtk_a_OBJECTS) $(libgtk_a_DEPENDENCIES) $(EXTRA_libgtk_a_DEPENDENCIES) 
 	-rm -f libgtk.a
 	$(libgtk_a_AR) libgtk.a $(libgtk_a_OBJECTS) $(libgtk_a_LIBADD)
 	$(RANLIB) libgtk.a
@@ -911,7 +959,7 @@ hid/lesstif/liblesstif_a-netlist.$(OBJEXT):  \
 hid/lesstif/liblesstif_a-styles.$(OBJEXT):  \
 	hid/lesstif/$(am__dirstamp) \
 	hid/lesstif/$(DEPDIR)/$(am__dirstamp)
-liblesstif.a: $(liblesstif_a_OBJECTS) $(liblesstif_a_DEPENDENCIES) 
+liblesstif.a: $(liblesstif_a_OBJECTS) $(liblesstif_a_DEPENDENCIES) $(EXTRA_liblesstif_a_DEPENDENCIES) 
 	-rm -f liblesstif.a
 	$(liblesstif_a_AR) liblesstif.a $(liblesstif_a_OBJECTS) $(liblesstif_a_LIBADD)
 	$(RANLIB) liblesstif.a
@@ -923,7 +971,7 @@ hid/lpr/$(DEPDIR)/$(am__dirstamp):
 	@: > hid/lpr/$(DEPDIR)/$(am__dirstamp)
 hid/lpr/lpr.$(OBJEXT): hid/lpr/$(am__dirstamp) \
 	hid/lpr/$(DEPDIR)/$(am__dirstamp)
-liblpr.a: $(liblpr_a_OBJECTS) $(liblpr_a_DEPENDENCIES) 
+liblpr.a: $(liblpr_a_OBJECTS) $(liblpr_a_DEPENDENCIES) $(EXTRA_liblpr_a_DEPENDENCIES) 
 	-rm -f liblpr.a
 	$(liblpr_a_AR) liblpr.a $(liblpr_a_OBJECTS) $(liblpr_a_LIBADD)
 	$(RANLIB) liblpr.a
@@ -935,7 +983,7 @@ hid/nelma/$(DEPDIR)/$(am__dirstamp):
 	@: > hid/nelma/$(DEPDIR)/$(am__dirstamp)
 hid/nelma/libnelma_a-nelma.$(OBJEXT): hid/nelma/$(am__dirstamp) \
 	hid/nelma/$(DEPDIR)/$(am__dirstamp)
-libnelma.a: $(libnelma_a_OBJECTS) $(libnelma_a_DEPENDENCIES) 
+libnelma.a: $(libnelma_a_OBJECTS) $(libnelma_a_DEPENDENCIES) $(EXTRA_libnelma_a_DEPENDENCIES) 
 	-rm -f libnelma.a
 	$(libnelma_a_AR) libnelma.a $(libnelma_a_OBJECTS) $(libnelma_a_LIBADD)
 	$(RANLIB) libnelma.a
@@ -947,7 +995,7 @@ hid/png/$(DEPDIR)/$(am__dirstamp):
 	@: > hid/png/$(DEPDIR)/$(am__dirstamp)
 hid/png/libpng_a-png.$(OBJEXT): hid/png/$(am__dirstamp) \
 	hid/png/$(DEPDIR)/$(am__dirstamp)
-libpng.a: $(libpng_a_OBJECTS) $(libpng_a_DEPENDENCIES) 
+libpng.a: $(libpng_a_OBJECTS) $(libpng_a_DEPENDENCIES) $(EXTRA_libpng_a_DEPENDENCIES) 
 	-rm -f libpng.a
 	$(libpng_a_AR) libpng.a $(libpng_a_OBJECTS) $(libpng_a_LIBADD)
 	$(RANLIB) libpng.a
@@ -961,14 +1009,17 @@ hid/ps/libps_a-ps.$(OBJEXT): hid/ps/$(am__dirstamp) \
 	hid/ps/$(DEPDIR)/$(am__dirstamp)
 hid/ps/libps_a-eps.$(OBJEXT): hid/ps/$(am__dirstamp) \
 	hid/ps/$(DEPDIR)/$(am__dirstamp)
-libps.a: $(libps_a_OBJECTS) $(libps_a_DEPENDENCIES) 
+libps.a: $(libps_a_OBJECTS) $(libps_a_DEPENDENCIES) $(EXTRA_libps_a_DEPENDENCIES) 
 	-rm -f libps.a
 	$(libps_a_AR) libps.a $(libps_a_OBJECTS) $(libps_a_LIBADD)
 	$(RANLIB) libps.a
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
 	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+	fi; \
 	for p in $$list; do echo "$$p $$p"; done | \
 	sed 's/$(EXEEXT)$$//' | \
 	while read p p1; do if test -f $$p; \
@@ -1003,20 +1054,14 @@ uninstall-binPROGRAMS:
 clean-binPROGRAMS:
 	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
 edif.h: edif.c
-	@if test ! -f $@; then \
-	  rm -f edif.c; \
-	  $(MAKE) $(AM_MAKEFLAGS) edif.c; \
-	else :; fi
+	@if test ! -f $@; then rm -f edif.c; else :; fi
+	@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) edif.c; else :; fi
 parse_y.h: parse_y.c
-	@if test ! -f $@; then \
-	  rm -f parse_y.c; \
-	  $(MAKE) $(AM_MAKEFLAGS) parse_y.c; \
-	else :; fi
+	@if test ! -f $@; then rm -f parse_y.c; else :; fi
+	@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) parse_y.c; else :; fi
 res_parse.h: res_parse.c
-	@if test ! -f $@; then \
-	  rm -f res_parse.c; \
-	  $(MAKE) $(AM_MAKEFLAGS) res_parse.c; \
-	else :; fi
+	@if test ! -f $@; then rm -f res_parse.c; else :; fi
+	@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) res_parse.c; else :; fi
 hid/common/$(am__dirstamp):
 	@$(MKDIR_P) hid/common
 	@: > hid/common/$(am__dirstamp)
@@ -1039,7 +1084,9 @@ hid/common/hid_resource.$(OBJEXT): hid/common/$(am__dirstamp) \
 	hid/common/$(DEPDIR)/$(am__dirstamp)
 hid/common/hidgl.$(OBJEXT): hid/common/$(am__dirstamp) \
 	hid/common/$(DEPDIR)/$(am__dirstamp)
-pcb$(EXEEXT): $(pcb_OBJECTS) $(pcb_DEPENDENCIES) 
+hid/common/trackball.$(OBJEXT): hid/common/$(am__dirstamp) \
+	hid/common/$(DEPDIR)/$(am__dirstamp)
+pcb$(EXEEXT): $(pcb_OBJECTS) $(pcb_DEPENDENCIES) $(EXTRA_pcb_DEPENDENCIES) 
 	@rm -f pcb$(EXEEXT)
 	$(LINK) $(pcb_OBJECTS) $(pcb_LDADD) $(LIBS)
 
@@ -1055,6 +1102,7 @@ mostlyclean-compile:
 	-rm -f hid/common/hidgl.$(OBJEXT)
 	-rm -f hid/common/hidinit.$(OBJEXT)
 	-rm -f hid/common/hidnogui.$(OBJEXT)
+	-rm -f hid/common/trackball.$(OBJEXT)
 	-rm -f hid/gcode/libgcode_a-curve.$(OBJEXT)
 	-rm -f hid/gcode/libgcode_a-decompose.$(OBJEXT)
 	-rm -f hid/gcode/libgcode_a-gcode.$(OBJEXT)
@@ -1082,6 +1130,7 @@ mostlyclean-compile:
 	-rm -f hid/gtk/libgtk_a-gui-pinout-preview.$(OBJEXT)
 	-rm -f hid/gtk/libgtk_a-gui-pinout-window.$(OBJEXT)
 	-rm -f hid/gtk/libgtk_a-gui-top-window.$(OBJEXT)
+	-rm -f hid/gtk/libgtk_a-gui-trackball.$(OBJEXT)
 	-rm -f hid/gtk/libgtk_a-gui-utils.$(OBJEXT)
 	-rm -f hid/lesstif/liblesstif_a-dialogs.$(OBJEXT)
 	-rm -f hid/lesstif/liblesstif_a-library.$(OBJEXT)
@@ -1168,6 +1217,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at hid/common/$(DEPDIR)/hidgl.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at hid/common/$(DEPDIR)/hidinit.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at hid/common/$(DEPDIR)/hidnogui.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at hid/common/$(DEPDIR)/trackball.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at hid/gcode/$(DEPDIR)/libgcode_a-curve.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at hid/gcode/$(DEPDIR)/libgcode_a-decompose.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at hid/gcode/$(DEPDIR)/libgcode_a-gcode.Po at am__quote@
@@ -1195,6 +1245,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at hid/gtk/$(DEPDIR)/libgtk_a-gui-pinout-preview.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at hid/gtk/$(DEPDIR)/libgtk_a-gui-pinout-window.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at hid/gtk/$(DEPDIR)/libgtk_a-gui-top-window.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at hid/gtk/$(DEPDIR)/libgtk_a-gui-trackball.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at hid/gtk/$(DEPDIR)/libgtk_a-gui-utils.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at hid/lesstif/$(DEPDIR)/liblesstif_a-dialogs.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at hid/lesstif/$(DEPDIR)/liblesstif_a-library.Po at am__quote@
@@ -1602,6 +1653,20 @@ hid/gtk/libgtk_a-gtkhid-gl.obj: hid/gtk/gtkhid-gl.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgtk_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hid/gtk/libgtk_a-gtkhid-gl.obj `if test -f 'hid/gtk/gtkhid-gl.c'; then $(CYGPATH_W) 'hid/gtk/gtkhid-gl.c'; else $(CYGPATH_W) '$(srcdir)/hid/gtk/gtkhid-gl.c'; fi`
 
+hid/gtk/libgtk_a-gui-trackball.o: hid/gtk/gui-trackball.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgtk_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hid/gtk/libgtk_a-gui-trackball.o -MD -MP -MF hid/gtk/$(DEPDIR)/libgtk_a-gui-trackball.Tpo -c -o hid/gtk/libgtk_a-gui-trackball.o `test -f 'hid/gtk/gui-trackball.c' || echo '$(srcdir)/'`hid/gtk/gui-trackball.c
+ at am__fastdepCC_TRUE@	$(am__mv) hid/gtk/$(DEPDIR)/libgtk_a-gui-trackball.Tpo hid/gtk/$(DEPDIR)/libgtk_a-gui-trackball.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='hid/gtk/gui-trackball.c' object='hid/gtk/libgtk_a-gui-trackball.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgtk_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hid/gtk/libgtk_a-gui-trackball.o `test -f 'hid/gtk/gui-trackball.c' || echo '$(srcdir)/'`hid/gtk/gui-trackball.c
+
+hid/gtk/libgtk_a-gui-trackball.obj: hid/gtk/gui-trackball.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgtk_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hid/gtk/libgtk_a-gui-trackball.obj -MD -MP -MF hid/gtk/$(DEPDIR)/libgtk_a-gui-trackball.Tpo -c -o hid/gtk/libgtk_a-gui-trackball.obj `if test -f 'hid/gtk/gui-trackball.c'; then $(CYGPATH_W) 'hid/gtk/gui-trackball.c'; else $(CYGPATH_W) '$(srcdir)/hid/gtk/gui-trackball.c'; fi`
+ at am__fastdepCC_TRUE@	$(am__mv) hid/gtk/$(DEPDIR)/libgtk_a-gui-trackball.Tpo hid/gtk/$(DEPDIR)/libgtk_a-gui-trackball.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='hid/gtk/gui-trackball.c' object='hid/gtk/libgtk_a-gui-trackball.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgtk_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hid/gtk/libgtk_a-gui-trackball.obj `if test -f 'hid/gtk/gui-trackball.c'; then $(CYGPATH_W) 'hid/gtk/gui-trackball.c'; else $(CYGPATH_W) '$(srcdir)/hid/gtk/gui-trackball.c'; fi`
+
 hid/gtk/libgtk_a-gtkhid-gdk.o: hid/gtk/gtkhid-gdk.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgtk_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hid/gtk/libgtk_a-gtkhid-gdk.o -MD -MP -MF hid/gtk/$(DEPDIR)/libgtk_a-gtkhid-gdk.Tpo -c -o hid/gtk/libgtk_a-gtkhid-gdk.o `test -f 'hid/gtk/gtkhid-gdk.c' || echo '$(srcdir)/'`hid/gtk/gtkhid-gdk.c
 @am__fastdepCC_TRUE@	$(am__mv) hid/gtk/$(DEPDIR)/libgtk_a-gtkhid-gdk.Tpo hid/gtk/$(DEPDIR)/libgtk_a-gtkhid-gdk.Po
@@ -1763,8 +1828,11 @@ hid/ps/libps_a-eps.obj: hid/ps/eps.c
 	$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE)
 install-pcblibDATA: $(pcblib_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(pcblibdir)" || $(MKDIR_P) "$(DESTDIR)$(pcblibdir)"
 	@list='$(pcblib_DATA)'; test -n "$(pcblibdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pcblibdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pcblibdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -1778,9 +1846,7 @@ uninstall-pcblibDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(pcblib_DATA)'; test -n "$(pcblibdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(pcblibdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(pcblibdir)" && rm -f $$files
+	dir='$(DESTDIR)$(pcblibdir)'; $(am__uninstall_files_from_dir)
 
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
@@ -1949,13 +2015,10 @@ distdir: $(DISTFILES)
 	done
 	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(MKDIR_P) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
+	    $(am__make_dryrun) \
+	      || test -d "$(distdir)/$$subdir" \
+	      || $(MKDIR_P) "$(distdir)/$$subdir" \
+	      || exit 1; \
 	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
 	    $(am__relativize); \
 	    new_distdir=$$reldir; \
@@ -1995,10 +2058,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
@@ -2161,6 +2229,10 @@ gpcb-menu.h : gpcb-menu.res
 	sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/",/' < gpcb-menu.res >> $@
 	echo '0};' >> $@
 
+# Menus i18n
+%.res.h : %.res
+	$(INTLTOOL_EXTRACT) --type=gettext/quoted $^
+
 hid/common/hidlist.h : Makefile
 	$(MKDIR_P) hid/common
 	true > $@
diff --git a/src/action.c b/src/action.c
index 2edb9a9..e496820 100644
--- a/src/action.c
+++ b/src/action.c
@@ -1,5 +1,3 @@
-/* 15 Oct 2008 Ineiev: add CycleCrosshair action */
-
 /*
  *                            COPYRIGHT
  *
@@ -109,6 +107,7 @@ typedef enum
   F_ClearAndRedraw,
   F_ClearList,
   F_Close,
+  F_Found,
   F_Connection,
   F_Convert,
   F_Copy,
@@ -218,7 +217,7 @@ typedef struct			/* used to identify subfunctions */
   char *Identifier;
   FunctionID ID;
 }
-FunctionType, *FunctionTypePtr;
+FunctionType;
 
 /* --------------------------------------------------------------------------- */
 
@@ -297,10 +296,10 @@ either round or, if the octagon flag is set, octagonal.
  * some local identifiers
  */
 static PointType InsertedPoint;
-static LayerTypePtr lastLayer;
+static LayerType *lastLayer;
 static struct
 {
-  PolygonTypePtr poly;
+  PolygonType *poly;
   LineType line;
 }
 fake;
@@ -343,6 +342,7 @@ static FunctionType Functions[] = {
   {"ClearAndRedraw", F_ClearAndRedraw},
   {"ClearList", F_ClearList},
   {"Close", F_Close},
+  {"Found", F_Found},
   {"Connection", F_Connection},
   {"Convert", F_Convert},
   {"Copy", F_Copy},
@@ -532,7 +532,7 @@ FinishStroke (void)
 	case 96521:
 	case 96541:
 	case 98541:
-	  SetZoom (1000);	/* special zoom extents */
+	  /* XXX: FIXME: Call a zoom-extents action */
 	  break;
 	case 159:
 	case 1269:
@@ -543,28 +543,8 @@ FinishStroke (void)
 	case 12569:
 	case 12589:
 	case 14589:
-	  {
-	    Coord x = (StrokeBox.X1 + StrokeBox.X2) / 2;
-	    Coord y = (StrokeBox.Y1 + StrokeBox.Y2) / 2;
-	    double z;
-	    /* XXX: PCB->MaxWidth and PCB->MaxHeight may be the wrong
-	     *      divisors below. The old code WAS broken, but this
-             *      replacement has not been tested for correctness.
-	     */
-	    z =
-	      1 +
-	      log (fabs (StrokeBox.X2 - StrokeBox.X1) / PCB->MaxWidth) /
-	      log (2.0);
-	    z =
-	      MAX (z,
-		   1 +
-		   log (fabs (StrokeBox.Y2 - StrokeBox.Y1) / PCB->MaxHeight) /
-		   log (2.0));
-	    SetZoom (z);
-
-	    CenterDisplay (x, y);
-	    break;
-	  }
+	  /* XXX: FIXME: Zoom to fit the box StrokeBox.[X1,Y1] - StrokeBox.[X2,Y2] */
+	  break;
 
 	default:
 	  Message (_("Unknown stroke %s\n"), msg);
@@ -604,6 +584,12 @@ ClearWarnings ()
   Draw ();
 }
 
+/* ---------------------------------------------------------------------------
+ *
+ * This is called a clicktime after a mouse down, to we can distinguish
+ * between short clicks (typically: select or create something) and long
+ * clicks. Long clicks typically drag something.
+ */
 static void
 click_cb (hidval hv)
 {
@@ -656,6 +642,11 @@ click_cb (hidval hv)
     }
 }
 
+/* ---------------------------------------------------------------------------
+ *
+ * This is typically called when the mouse has moved or the mouse
+ * button was released.
+ */
 static void
 ReleaseMode (void)
 {
@@ -825,7 +816,7 @@ AdjustAttachedBox (void)
 void
 AdjustAttachedObjects (void)
 {
-  PointTypePtr pnt;
+  PointType *pnt;
   switch (Settings.Mode)
     {
       /* update at least an attached block (selection) */
@@ -893,19 +884,19 @@ NotifyLine (void)
 	  type = SearchScreen (Crosshair.X, Crosshair.Y,
 			       PIN_TYPE | PAD_TYPE | VIA_TYPE, &ptr1, &ptr2,
 			       &ptr3);
-	  LookupConnection (Crosshair.X, Crosshair.Y, true, 1,
-			    FOUNDFLAG);
+	  LookupConnection (Crosshair.X, Crosshair.Y, true, 1, CONNECTEDFLAG, false);
+	  LookupConnection (Crosshair.X, Crosshair.Y, true, 1, FOUNDFLAG, true);
 	}
       if (type == PIN_TYPE || type == VIA_TYPE)
 	{
 	  Crosshair.AttachedLine.Point1.X =
-	    Crosshair.AttachedLine.Point2.X = ((PinTypePtr) ptr2)->X;
+	    Crosshair.AttachedLine.Point2.X = ((PinType *) ptr2)->X;
 	  Crosshair.AttachedLine.Point1.Y =
-	    Crosshair.AttachedLine.Point2.Y = ((PinTypePtr) ptr2)->Y;
+	    Crosshair.AttachedLine.Point2.Y = ((PinType *) ptr2)->Y;
 	}
       else if (type == PAD_TYPE)
 	{
-	  PadTypePtr pad = (PadTypePtr) ptr2;
+	  PadType *pad = (PadType *) ptr2;
 	  double d1 = Distance (Crosshair.X, Crosshair.Y, pad->Point1.X, pad->Point1.Y);
 	  double d2 = Distance (Crosshair.X, Crosshair.Y, pad->Point2.X, pad->Point2.Y);
 	  if (d2 < d1)
@@ -965,8 +956,10 @@ NotifyBlock (void)
 
 /* ---------------------------------------------------------------------------
  *
- * does what's appropriate for the current mode setting. This normally
- * means creation of an object at the current crosshair location.
+ * This is called after every mode change, like mouse button pressed,
+ * mouse button released, dragging something started or a different tool
+ * selected. It does what's appropriate for the current mode setting.
+ * This can also mean creation of an object at the current crosshair location.
  *
  * new created objects are added to the create undo list of course
  */
@@ -998,7 +991,7 @@ NotifyMode (void)
 	  {
 	    type = SearchScreen (Note.X, Note.Y, test, &ptr1, &ptr2, &ptr3);
 	    if (!Note.Hit && (type & MOVE_TYPES) &&
-		!TEST_FLAG (LOCKFLAG, (PinTypePtr) ptr2))
+		!TEST_FLAG (LOCKFLAG, (PinType *) ptr2))
 	      {
 		Note.Hit = type;
 		Note.ptr1 = ptr1;
@@ -1006,7 +999,7 @@ NotifyMode (void)
 		Note.ptr3 = ptr3;
 	      }
 	    if (!Note.Moving && (type & SELECT_TYPES) &&
-		TEST_FLAG (SELECTEDFLAG, (PinTypePtr) ptr2))
+		TEST_FLAG (SELECTEDFLAG, (PinType *) ptr2))
 	      Note.Moving = true;
 	    if ((Note.Hit && Note.Moving) || type == NO_TYPE)
 	      break;
@@ -1016,7 +1009,7 @@ NotifyMode (void)
 
     case VIA_MODE:
       {
-	PinTypePtr via;
+	PinType *via;
 
 	if (!PCB->ViaOn)
 	  {
@@ -1054,7 +1047,7 @@ NotifyMode (void)
 	  case STATE_SECOND:
 	  case STATE_THIRD:
 	    {
-	      ArcTypePtr arc;
+	      ArcType *arc;
 	      Coord wx, wy;
 	      Angle sa, dir;
 
@@ -1107,7 +1100,7 @@ NotifyMode (void)
 							       CLEARLINEFLAG :
 							       0))))
 		{
-		  BoxTypePtr bx;
+		  BoxType *bx;
 
 		  bx = GetArcEnds (arc);
 		  Crosshair.AttachedBox.Point1.X =
@@ -1131,7 +1124,7 @@ NotifyMode (void)
 	type = SearchScreen (Note.X, Note.Y, LOCK_TYPES, &ptr1, &ptr2, &ptr3);
 	if (type == ELEMENT_TYPE)
 	  {
-	    ElementTypePtr element = (ElementTypePtr) ptr2;
+	    ElementType *element = (ElementType *) ptr2;
 
 	    TOGGLE_FLAG (LOCKFLAG, element);
 	    PIN_LOOP (element);
@@ -1152,11 +1145,12 @@ NotifyMode (void)
 	     */
 	    DrawElement (element);
 	    Draw ();
+	    SetChangedFlag (true);
 	    hid_actionl ("Report", "Object", NULL);
 	  }
 	else if (type != NO_TYPE)
 	  {
-	    TextTypePtr thing = (TextTypePtr) ptr3;
+	    TextType *thing = (TextType *) ptr3;
 	    TOGGLE_FLAG (LOCKFLAG, thing);
 	    if (TEST_FLAG (LOCKFLAG, thing)
 		&& TEST_FLAG (SELECTEDFLAG, thing))
@@ -1166,6 +1160,7 @@ NotifyMode (void)
 		DrawObject (type, ptr1, ptr2);
 		Draw ();
 	      }
+	    SetChangedFlag (true);
 	    hid_actionl ("Report", "Object", NULL);
 	  }
 	break;
@@ -1176,17 +1171,17 @@ NotifyMode (void)
 	      =
 	      SearchScreen (Note.X, Note.Y, PIN_TYPES, &ptr1, &ptr2,
 			    &ptr3)) != NO_TYPE)
-	    && !TEST_FLAG (HOLEFLAG, (PinTypePtr) ptr3))
+	    && !TEST_FLAG (HOLEFLAG, (PinType *) ptr3))
 	  {
 	    if (gui->shift_is_pressed ())
 	      {
-		int tstyle = GET_THERM (INDEXOFCURRENT, (PinTypePtr) ptr3);
+		int tstyle = GET_THERM (INDEXOFCURRENT, (PinType *) ptr3);
 		tstyle++;
 		if (tstyle > 5)
 		  tstyle = 1;
 		ChangeObjectThermal (type, ptr1, ptr2, ptr3, tstyle);
 	      }
-	    else if (GET_THERM (INDEXOFCURRENT, (PinTypePtr) ptr3))
+	    else if (GET_THERM (INDEXOFCURRENT, (PinType *) ptr3))
 	      ChangeObjectThermal (type, ptr1, ptr2, ptr3, 0);
 	    else
 	      ChangeObjectThermal (type, ptr1, ptr2, ptr3, PCB->ThermStyle);
@@ -1215,7 +1210,7 @@ NotifyMode (void)
 
       if (PCB->RatDraw)
 	{
-	  RatTypePtr line;
+	  RatType *line;
 	  if ((line = AddNet ()))
 	    {
 	      addedLines++;
@@ -1233,8 +1228,14 @@ NotifyMode (void)
       else
 	/* create line if both ends are determined && length != 0 */
 	{
-	  LineTypePtr line;
-	  int maybe_found_flag;
+	  LineType *line;
+	  int line_flags = 0;
+
+	  if (TEST_FLAG (AUTODRCFLAG, PCB) && !TEST_SILK_LAYER (CURRENT))
+	    line_flags |= CONNECTEDFLAG | FOUNDFLAG;
+
+	  if (TEST_FLAG (CLEARNEWFLAG, PCB))
+	    line_flags |= CLEARLINEFLAG;
 
 	  if (PCB->Clipping
 	      && Crosshair.AttachedLine.Point1.X ==
@@ -1251,12 +1252,6 @@ NotifyMode (void)
 	      Crosshair.AttachedLine.Point2.Y = Note.Y;
 	    }
 
-	  if (TEST_FLAG (AUTODRCFLAG, PCB)
-	      && ! TEST_SILK_LAYER (CURRENT))
-	    maybe_found_flag = FOUNDFLAG;
-	  else
-	    maybe_found_flag = 0;
-
 	  if ((Crosshair.AttachedLine.Point1.X !=
 	       Crosshair.AttachedLine.Point2.X
 	       || Crosshair.AttachedLine.Point1.Y !=
@@ -1269,13 +1264,9 @@ NotifyMode (void)
 					  Crosshair.AttachedLine.Point2.Y,
 					  Settings.LineThickness,
 					  2 * Settings.Keepaway,
-					  MakeFlags (maybe_found_flag |
-						     (TEST_FLAG
-						      (CLEARNEWFLAG,
-						       PCB) ? CLEARLINEFLAG :
-						      0)))) != NULL)
+					  MakeFlags (line_flags))) != NULL)
 	    {
-	      PinTypePtr via;
+	      PinType *via;
 
 	      addedLines++;
 	      AddObjectToCreateUndoList (LINE_TYPE, CURRENT, line, line);
@@ -1320,13 +1311,7 @@ NotifyMode (void)
 					  Note.X, Note.Y,
 					  Settings.LineThickness,
 					  2 * Settings.Keepaway,
-					  MakeFlags ((TEST_FLAG
-						      (AUTODRCFLAG,
-						       PCB) ? FOUNDFLAG : 0) |
-						     (TEST_FLAG
-						      (CLEARNEWFLAG,
-						       PCB) ? CLEARLINEFLAG :
-						      0)))) != NULL)
+					  MakeFlags (line_flags))) != NULL)
 	    {
 	      addedLines++;
 	      AddObjectToCreateUndoList (LINE_TYPE, CURRENT, line, line);
@@ -1342,6 +1327,8 @@ NotifyMode (void)
 		  PCB->Clipping ^= 3;
 		}
 	    }
+	  if (TEST_FLAG (AUTODRCFLAG, PCB) && !TEST_SILK_LAYER (CURRENT))
+	    LookupConnection (Note.X, Note.Y, true, 1, CONNECTEDFLAG, false);
 	  Draw ();
 	}
       break;
@@ -1357,7 +1344,7 @@ NotifyMode (void)
 	  Crosshair.AttachedBox.Point1.X != Crosshair.AttachedBox.Point2.X &&
 	  Crosshair.AttachedBox.Point1.Y != Crosshair.AttachedBox.Point2.Y)
 	{
-	  PolygonTypePtr polygon;
+	  PolygonType *polygon;
 
 	  int flags = CLEARPOLYFLAG;
 	  if (TEST_FLAG (NEWFULLPOLYFLAG, PCB))
@@ -1395,7 +1382,7 @@ NotifyMode (void)
 	  {
 	    if (strlen(string) > 0)
 	      {
-		TextTypePtr text;
+		TextType *text;
 		int flag = CLEARLINEFLAG;
 
 		if (GetLayerGroupNumberByNumber (INDEXOFCURRENT) ==
@@ -1418,7 +1405,7 @@ NotifyMode (void)
 
     case POLYGON_MODE:
       {
-	PointTypePtr points = Crosshair.AttachedPolygon.Points;
+	PointType *points = Crosshair.AttachedPolygon.Points;
 	Cardinal n = Crosshair.AttachedPolygon.PointN;
 
 	/* do update of position; use the 'LINE_MODE' mechanism */
@@ -1466,7 +1453,7 @@ NotifyMode (void)
 
 	    if (Crosshair.AttachedObject.Type != NO_TYPE)
 	      {
-		if (TEST_FLAG (LOCKFLAG, (PolygonTypePtr)
+		if (TEST_FLAG (LOCKFLAG, (PolygonType *)
 			       Crosshair.AttachedObject.Ptr2))
 		  {
 		    Message (_("Sorry, the object is locked\n"));
@@ -1481,7 +1468,7 @@ NotifyMode (void)
             /* second notify, insert new point into object */
           case STATE_SECOND:
             {
-	      PointTypePtr points = Crosshair.AttachedPolygon.Points;
+	      PointType *points = Crosshair.AttachedPolygon.Points;
 	      Cardinal n = Crosshair.AttachedPolygon.PointN;
 	      POLYAREA *original, *new_hole, *result;
 	      FlagType Flags;
@@ -1550,7 +1537,7 @@ NotifyMode (void)
     case PASTEBUFFER_MODE:
       {
 	TextType estr[MAX_ELEMENTNAMES];
-	ElementTypePtr e = 0;
+	ElementType *e = 0;
 
 	if (gui->shift_is_pressed ())
 	  {
@@ -1559,7 +1546,7 @@ NotifyMode (void)
 			    &ptr3);
 	    if (type == ELEMENT_TYPE)
 	      {
-		e = (ElementTypePtr) ptr1;
+		e = (ElementType *) ptr1;
 		if (e)
 		  {
 		    int i;
@@ -1582,7 +1569,7 @@ NotifyMode (void)
 	    if (type == ELEMENT_TYPE && ptr1)
 	      {
 		int i, save_n;
-		e = (ElementTypePtr) ptr1;
+		e = (ElementType *) ptr1;
 
 		save_n = NAME_INDEX (PCB);
 
@@ -1610,14 +1597,14 @@ NotifyMode (void)
 	   SearchScreen (Note.X, Note.Y, REMOVE_TYPES, &ptr1, &ptr2,
 			 &ptr3)) != NO_TYPE)
 	{
-	  if (TEST_FLAG (LOCKFLAG, (LineTypePtr) ptr2))
+	  if (TEST_FLAG (LOCKFLAG, (LineType *) ptr2))
 	    {
 	      Message (_("Sorry, the object is locked\n"));
 	      break;
 	    }
 	  if (type == ELEMENT_TYPE)
 	    {
-	      RubberbandTypePtr ptr;
+	      RubberbandType *ptr;
 	      int i;
 
 	      Crosshair.AttachedObject.RubberbandN = 0;
@@ -1626,7 +1613,7 @@ NotifyMode (void)
 	      for (i = 0; i < Crosshair.AttachedObject.RubberbandN; i++)
 		{
 		  if (PCB->RatOn)
-		    EraseRat ((RatTypePtr) ptr->Line);
+		    EraseRat ((RatType *) ptr->Line);
                   if (TEST_FLAG (RUBBERENDFLAG, ptr->Line))
 		    MoveObjectToRemoveUndoList (RATLINE_TYPE,
 					        ptr->Line, ptr->Line,
@@ -1668,7 +1655,7 @@ NotifyMode (void)
 	    if (Crosshair.AttachedObject.Type != NO_TYPE)
 	      {
 		if (Settings.Mode == MOVE_MODE &&
-		    TEST_FLAG (LOCKFLAG, (PinTypePtr)
+		    TEST_FLAG (LOCKFLAG, (PinType *)
 			       Crosshair.AttachedObject.Ptr2))
 		  {
 		    Message (_("Sorry, the object is locked\n"));
@@ -1722,7 +1709,7 @@ NotifyMode (void)
 
 	  if (Crosshair.AttachedObject.Type != NO_TYPE)
 	    {
-	      if (TEST_FLAG (LOCKFLAG, (PolygonTypePtr)
+	      if (TEST_FLAG (LOCKFLAG, (PolygonType *)
 			     Crosshair.AttachedObject.Ptr2))
 		{
 		  Message (_("Sorry, the object is locked\n"));
@@ -1735,7 +1722,7 @@ NotifyMode (void)
 		  if (Crosshair.AttachedObject.Type == POLYGON_TYPE)
 		    {
 		      fake.poly =
-			(PolygonTypePtr) Crosshair.AttachedObject.Ptr2;
+			(PolygonType *) Crosshair.AttachedObject.Ptr2;
 		      polyIndex =
 			GetLowestDistancePolygonPoint (fake.poly, Note.X,
 						       Note.Y);
@@ -1778,9 +1765,9 @@ NotifyMode (void)
 
 /* --------------------------------------------------------------------------- */
 
-static const char atomic_syntax[] = "Atomic(Save|Restore|Close|Block)";
+static const char atomic_syntax[] = N_("Atomic(Save|Restore|Close|Block)");
 
-static const char atomic_help[] = "Save or restore the undo serial number.";
+static const char atomic_help[] = N_("Save or restore the undo serial number.");
 
 /* %start-doc actions Atomic
 
@@ -1843,9 +1830,9 @@ ActionAtomic (int argc, char **argv, Coord x, Coord y)
 
 /* -------------------------------------------------------------------------- */
 
-static const char drc_syntax[] = "DRC()";
+static const char drc_syntax[] = N_("DRC()");
 
-static const char drc_help[] = "Invoke the DRC check.";
+static const char drc_help[] = N_("Invoke the DRC check.");
 
 /* %start-doc actions DRC
 
@@ -1884,10 +1871,10 @@ ActionDRCheck (int argc, char **argv, Coord x, Coord y)
 
 /* -------------------------------------------------------------------------- */
 
-static const char dumplibrary_syntax[] = "DumpLibrary()";
+static const char dumplibrary_syntax[] = N_("DumpLibrary()");
 
 static const char dumplibrary_help[] =
-  "Display the entire contents of the libraries.";
+  N_("Display the entire contents of the libraries.");
 
 /* %start-doc actions DumpLibrary
 
@@ -1938,10 +1925,10 @@ ActionDumpLibrary (int argc, char **argv, Coord x, Coord y)
 
 /* -------------------------------------------------------------------------- */
 
-static const char flip_syntax[] = "Flip(Object|Selected|SelectedElements)";
+static const char flip_syntax[] = N_("Flip(Object|Selected|SelectedElements)");
 
 static const char flip_help[] =
-  "Flip an element to the opposite side of the board.";
+  N_("Flip an element to the opposite side of the board.");
 
 /* %start-doc actions Flip
 
@@ -1957,7 +1944,7 @@ static int
 ActionFlip (int argc, char **argv, Coord x, Coord y)
 {
   char *function = ARG (0);
-  ElementTypePtr element;
+  ElementType *element;
   void *ptrtmp;
   int err = 0;
 
@@ -1969,7 +1956,7 @@ ActionFlip (int argc, char **argv, Coord x, Coord y)
 	  if ((SearchScreen (x, y, ELEMENT_TYPE,
 			     &ptrtmp, &ptrtmp, &ptrtmp)) != NO_TYPE)
 	    {
-	      element = (ElementTypePtr) ptrtmp;
+	      element = (ElementType *) ptrtmp;
 	      ChangeElementSide (element, 2 * Crosshair.Y - PCB->MaxHeight);
 	      IncrementUndoSerialNumber ();
 	      Draw ();
@@ -1992,9 +1979,9 @@ ActionFlip (int argc, char **argv, Coord x, Coord y)
 
 /* -------------------------------------------------------------------------- */
 
-static const char message_syntax[] = "Message(message)";
+static const char message_syntax[] = N_("Message(message)");
 
-static const char message_help[] = "Writes a message to the log window.";
+static const char message_help[] = N_("Writes a message to the log window.");
 
 /* %start-doc actions Message
 
@@ -2029,13 +2016,13 @@ static const char setthermal_syntax[] =
   "SetThermal(Object|SelectedPins|SelectedVias|Selected, Style)";
 
 static const char setthermal_help[] =
-  "Set the thermal (on the current layer) of pins or vias to the given style.\n"
+  N_("Set the thermal (on the current layer) of pins or vias to the given style.\n"
   "Style = 0 means no thermal.\n"
   "Style = 1 has diagonal fingers with sharp edges.\n"
   "Style = 2 has horizontal and vertical fingers with sharp edges.\n"
   "Style = 3 is a solid connection to the plane."
   "Style = 4 has diagonal fingers with rounded edges.\n"
-  "Style = 5 has horizontal and vertical fingers with rounded edges.\n";
+  "Style = 5 has horizontal and vertical fingers with rounded edges.\n");
 
 /* %start-doc actions SetThermal
 
@@ -2134,10 +2121,11 @@ EventMoveCrosshair (int ev_x, int ev_y)
 /* --------------------------------------------------------------------------- */
 
 static const char setvalue_syntax[] =
-  "SetValue(Grid|Line|LineSize|Text|TextScale|ViaDrillingHole|Via|ViaSize, delta)";
+  N_("SetValue(Grid|Line|LineSize|Text|TextScale|ViaDrillingHole|Via|ViaSize, "
+      "delta)");
 
 static const char setvalue_help[] =
-  "Change various board-wide values and sizes.";
+  N_("Change various board-wide values and sizes.");
 
 /* %start-doc actions SetValue
 
@@ -2173,6 +2161,7 @@ ActionSetValue (int argc, char **argv, Coord x, Coord y)
   char *units = ARG (2);
   bool absolute;			/* flag for 'absolute' value */
   double value;
+  int text_scale;
   int err = 0;
 
   if (function && val)
@@ -2192,6 +2181,9 @@ ActionSetValue (int argc, char **argv, Coord x, Coord y)
 	    SetGrid (value, false);
 	  else
 	    {
+              if (value == 0)
+                value = val[0] == '-' ? -Settings.increments->grid
+                                      :  Settings.increments->grid;
               /* On the way down, short against the minimum 
                * PCB drawing unit */
               if ((value + PCB->Grid) < 1)
@@ -2205,6 +2197,9 @@ ActionSetValue (int argc, char **argv, Coord x, Coord y)
 
 	case F_LineSize:
 	case F_Line:
+          if (!absolute && value == 0)
+            value = val[0] == '-' ? -Settings.increments->line
+                                  :  Settings.increments->line;
 	  SetLineSize (absolute ? value : value + Settings.LineThickness);
 	  hid_action ("RouteStylesChanged");
 	  break;
@@ -2217,8 +2212,10 @@ ActionSetValue (int argc, char **argv, Coord x, Coord y)
 
 	case F_Text:
 	case F_TextScale:
-	  value /= 45;
-	  SetTextScale (absolute ? value : value + Settings.TextScale);
+	  text_scale = value / (double)FONT_CAPHEIGHT * 100.;
+	  if (!absolute)
+	    text_scale += Settings.TextScale;
+	  SetTextScale (text_scale);
 	  break;
 	default:
 	  err = 1;
@@ -2234,9 +2231,9 @@ ActionSetValue (int argc, char **argv, Coord x, Coord y)
 
 /* --------------------------------------------------------------------------- */
 
-static const char quit_syntax[] = "Quit()";
+static const char quit_syntax[] = N_("Quit()");
 
-static const char quit_help[] = "Quits the application after confirming.";
+static const char quit_help[] = N_("Quits the application after confirming.");
 
 /* %start-doc actions Quit
 
@@ -2262,10 +2259,10 @@ ActionQuit (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char connection_syntax[] =
-  "Connection(Find|ResetLinesAndPolygons|ResetPinsAndVias|Reset)";
+  N_("Connection(Find|ResetLinesAndPolygons|ResetPinsAndVias|Reset)");
 
 static const char connection_help[] =
-  "Searches connections of the object at the cursor position.";
+  N_("Searches connections of the object at the cursor position.");
 
 /* %start-doc actions Connection
 
@@ -2301,12 +2298,13 @@ ActionConnection (int argc, char **argv, Coord x, Coord y)
 	case F_Find:
 	  {
 	    gui->get_coords (_("Click on a connection"), &x, &y);
-	    LookupConnection (x, y, true, 1, FOUNDFLAG);
+	    LookupConnection (x, y, true, 1, CONNECTEDFLAG, false);
+	    LookupConnection (x, y, true, 1, FOUNDFLAG, true);
 	    break;
 	  }
 
 	case F_ResetLinesAndPolygons:
-	  if (ResetFoundLinesAndPolygons (true))
+	  if (ClearFlagOnLinesAndPolygons (true, CONNECTEDFLAG | FOUNDFLAG))
 	    {
 	      IncrementUndoSerialNumber ();
 	      Draw ();
@@ -2314,7 +2312,7 @@ ActionConnection (int argc, char **argv, Coord x, Coord y)
 	  break;
 
 	case F_ResetPinsViasAndPads:
-	  if (ResetFoundPinsViasAndPads (true))
+	  if (ClearFlagOnPinsViasAndPads (true, CONNECTEDFLAG | FOUNDFLAG))
 	    {
 	      IncrementUndoSerialNumber ();
 	      Draw ();
@@ -2322,7 +2320,7 @@ ActionConnection (int argc, char **argv, Coord x, Coord y)
 	  break;
 
 	case F_Reset:
-	  if (ResetConnections (true))
+	  if (ClearFlagOnAllObjects (true, CONNECTEDFLAG | FOUNDFLAG))
 	    {
 	      IncrementUndoSerialNumber ();
 	      Draw ();
@@ -2338,9 +2336,9 @@ ActionConnection (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char disperseelements_syntax[] =
-  "DisperseElements(All|Selected)";
+  N_("DisperseElements(All|Selected)");
 
-static const char disperseelements_help[] = "Disperses elements.";
+static const char disperseelements_help[] = N_("Disperses elements.");
 
 /* %start-doc actions DisperseElements
 
@@ -2463,7 +2461,7 @@ ActionDisperseElements (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char display_syntax[] =
-  "Display(NameOnPCB|Description|Value)\n"
+  N_("Display(NameOnPCB|Description|Value)\n"
   "Display(Grid|Redraw)\n"
   "Display(CycleClip|CycleCrosshair|Toggle45Degree|ToggleStartDirection)\n"
   "Display(ToggleGrid|ToggleRubberBandMode|ToggleUniqueNames)\n"
@@ -2471,9 +2469,9 @@ static const char display_syntax[] =
   "Display(ToggleThindraw|ToggleThindrawPoly|ToggleOrthoMove|ToggleLocalRef)\n"
   "Display(ToggleCheckPlanes|ToggleShowDRC|ToggleAutoDRC)\n"
   "Display(ToggleLiveRoute|LockNames|OnlyNames)\n"
-  "Display(Pinout|PinOrPadName)";
+  "Display(Pinout|PinOrPadName)");
 
-static const char display_help[] = "Several display-related actions.";
+static const char display_help[] = N_("Several display-related actions.");
 
 /* %start-doc actions Display
 
@@ -2676,8 +2674,7 @@ ActionDisplay (int argc, char **argv, Coord childX, Coord childY)
 
 	case F_CycleClip:
 	  notify_crosshair_change (false);
-	  if TEST_FLAG
-	    (ALLDIRECTIONFLAG, PCB)
+	  if (TEST_FLAG (ALLDIRECTIONFLAG, PCB))
 	    {
 	      TOGGLE_FLAG (ALLDIRECTIONFLAG, PCB);
 	      PCB->Clipping = 0;
@@ -2760,15 +2757,20 @@ ActionDisplay (int argc, char **argv, Coord childX, Coord childY)
 	  TOGGLE_FLAG (AUTODRCFLAG, PCB);
 	  if (TEST_FLAG (AUTODRCFLAG, PCB) && Settings.Mode == LINE_MODE)
 	    {
-	      if (ResetConnections (true))
+	      if (ClearFlagOnAllObjects (true, CONNECTEDFLAG | FOUNDFLAG))
 		{
 		  IncrementUndoSerialNumber ();
 		  Draw ();
 		}
 	      if (Crosshair.AttachedLine.State != STATE_FIRST)
-		LookupConnection (Crosshair.AttachedLine.Point1.X,
-				  Crosshair.AttachedLine.Point1.Y, true, 1,
-				  FOUNDFLAG);
+		{
+		  LookupConnection (Crosshair.AttachedLine.Point1.X,
+		                    Crosshair.AttachedLine.Point1.Y,
+		                    true, 1, CONNECTEDFLAG, false);
+		  LookupConnection (Crosshair.AttachedLine.Point1.X,
+		                    Crosshair.AttachedLine.Point1.Y,
+		                    true, 1, FOUNDFLAG, true);
+		}
 	    }
 	  notify_crosshair_change (true);
 	  break;
@@ -2821,7 +2823,7 @@ ActionDisplay (int argc, char **argv, Coord childX, Coord childY)
 	  /* display the pinout of an element */
 	case F_Pinout:
 	  {
-	    ElementTypePtr element;
+	    ElementType *element;
 	    void *ptrtmp;
 	    Coord x, y;
 
@@ -2830,7 +2832,7 @@ ActionDisplay (int argc, char **argv, Coord childX, Coord childY)
 		 (x, y, ELEMENT_TYPE, &ptrtmp,
 		  &ptrtmp, &ptrtmp)) != NO_TYPE)
 	      {
-		element = (ElementTypePtr) ptrtmp;
+		element = (ElementType *) ptrtmp;
 		gui->show_item (element);
 	      }
 	    break;
@@ -2847,7 +2849,7 @@ ActionDisplay (int argc, char **argv, Coord childX, Coord childY)
 				  (void **) &ptr3))
 	      {
 	      case ELEMENT_TYPE:
-		PIN_LOOP ((ElementTypePtr) ptr1);
+		PIN_LOOP ((ElementType *) ptr1);
 		{
 		  if (TEST_FLAG (DISPLAYNAMEFLAG, pin))
 		    ErasePinName (pin);
@@ -2857,7 +2859,7 @@ ActionDisplay (int argc, char **argv, Coord childX, Coord childY)
 		  TOGGLE_FLAG (DISPLAYNAMEFLAG, pin);
 		}
 		END_LOOP;
-		PAD_LOOP ((ElementTypePtr) ptr1);
+		PAD_LOOP ((ElementType *) ptr1);
 		{
 		  if (TEST_FLAG (DISPLAYNAMEFLAG, pad))
 		    ErasePadName (pad);
@@ -2873,35 +2875,35 @@ ActionDisplay (int argc, char **argv, Coord childX, Coord childY)
 		break;
 
 	      case PIN_TYPE:
-		if (TEST_FLAG (DISPLAYNAMEFLAG, (PinTypePtr) ptr2))
-		  ErasePinName ((PinTypePtr) ptr2);
+		if (TEST_FLAG (DISPLAYNAMEFLAG, (PinType *) ptr2))
+		  ErasePinName ((PinType *) ptr2);
 		else
-		  DrawPinName ((PinTypePtr) ptr2);
+		  DrawPinName ((PinType *) ptr2);
 		AddObjectToFlagUndoList (PIN_TYPE, ptr1, ptr2, ptr3);
-		TOGGLE_FLAG (DISPLAYNAMEFLAG, (PinTypePtr) ptr2);
+		TOGGLE_FLAG (DISPLAYNAMEFLAG, (PinType *) ptr2);
 		SetChangedFlag (true);
 		IncrementUndoSerialNumber ();
 		Draw ();
 		break;
 
 	      case PAD_TYPE:
-		if (TEST_FLAG (DISPLAYNAMEFLAG, (PadTypePtr) ptr2))
-		  ErasePadName ((PadTypePtr) ptr2);
+		if (TEST_FLAG (DISPLAYNAMEFLAG, (PadType *) ptr2))
+		  ErasePadName ((PadType *) ptr2);
 		else
-		  DrawPadName ((PadTypePtr) ptr2);
+		  DrawPadName ((PadType *) ptr2);
 		AddObjectToFlagUndoList (PAD_TYPE, ptr1, ptr2, ptr3);
-		TOGGLE_FLAG (DISPLAYNAMEFLAG, (PadTypePtr) ptr2);
+		TOGGLE_FLAG (DISPLAYNAMEFLAG, (PadType *) ptr2);
 		SetChangedFlag (true);
 		IncrementUndoSerialNumber ();
 		Draw ();
 		break;
 	      case VIA_TYPE:
-		if (TEST_FLAG (DISPLAYNAMEFLAG, (PinTypePtr) ptr2))
-		  EraseViaName ((PinTypePtr) ptr2);
+		if (TEST_FLAG (DISPLAYNAMEFLAG, (PinType *) ptr2))
+		  EraseViaName ((PinType *) ptr2);
 		else
-		  DrawViaName ((PinTypePtr) ptr2);
+		  DrawViaName ((PinType *) ptr2);
 		AddObjectToFlagUndoList (VIA_TYPE, ptr1, ptr2, ptr3);
-		TOGGLE_FLAG (DISPLAYNAMEFLAG, (PinTypePtr) ptr2);
+		TOGGLE_FLAG (DISPLAYNAMEFLAG, (PinType *) ptr2);
 		SetChangedFlag (true);
 		IncrementUndoSerialNumber ();
 		Draw ();
@@ -2942,12 +2944,12 @@ ActionDisplay (int argc, char **argv, Coord childX, Coord childY)
 /* --------------------------------------------------------------------------- */
 
 static const char mode_syntax[] =
-  "Mode(Arc|Arrow|Copy|InsertPoint|Line|Lock|Move|None|PasteBuffer)\n"
+  N_("Mode(Arc|Arrow|Copy|InsertPoint|Line|Lock|Move|None|PasteBuffer)\n"
   "Mode(Polygon|Rectangle|Remove|Rotate|Text|Thermal|Via)\n"
   "Mode(Notify|Release|Cancel|Stroke)\n"
-  "Mode(Save|Restore)";
+  "Mode(Save|Restore)");
 
-static const char mode_help[] = "Change or use the tool mode.";
+static const char mode_help[] = N_("Change or use the tool mode.");
 
 /* %start-doc actions Mode
 
@@ -3215,9 +3217,9 @@ ActionMode (int argc, char **argv, Coord x, Coord y)
 
 /* --------------------------------------------------------------------------- */
 
-static const char removeselected_syntax[] = "RemoveSelected()";
+static const char removeselected_syntax[] = N_("RemoveSelected()");
 
-static const char removeselected_help[] = "Removes any selected objects.";
+static const char removeselected_help[] = N_("Removes any selected objects.");
 
 /* %start-doc actions RemoveSelected
 
@@ -3233,12 +3235,12 @@ ActionRemoveSelected (int argc, char **argv, Coord x, Coord y)
 
 /* --------------------------------------------------------------------------- */
 
-static const char renumber_syntax[] = "Renumber()\n"
-                                      "Renumber(filename)";
+static const char renumber_syntax[] = N_("Renumber()\n"
+                                      "Renumber(filename)");
 
 static const char renumber_help[] =
-  "Renumber all elements.  The changes will be recorded to filename\n"
-  "for use in backannotating these changes to the schematic.";
+  N_("Renumber all elements.  The changes will be recorded to filename\n"
+  "for use in backannotating these changes to the schematic.");
 
 /* %start-doc actions Renumber
 
@@ -3248,8 +3250,8 @@ static int
 ActionRenumber (int argc, char **argv, Coord x, Coord y)
 {
   bool changed = false;
-  ElementTypePtr *element_list;
-  ElementTypePtr *locked_element_list;
+  ElementType **element_list;
+  ElementType **locked_element_list;
   unsigned int i, j, k, cnt, lock_cnt;
   unsigned int tmpi;
   size_t sz;
@@ -3329,8 +3331,8 @@ ActionRenumber (int argc, char **argv, Coord x, Coord y)
    *
    * We'll actually renumber things in the 2nd pass.
    */
-  element_list = (ElementType **)calloc (PCB->Data->ElementN, sizeof (ElementTypePtr));
-  locked_element_list = (ElementType **)calloc (PCB->Data->ElementN, sizeof (ElementTypePtr));
+  element_list = (ElementType **)calloc (PCB->Data->ElementN, sizeof (ElementType *));
+  locked_element_list = (ElementType **)calloc (PCB->Data->ElementN, sizeof (ElementType *));
   was = (char **)calloc (PCB->Data->ElementN, sizeof (char *));
   is = (char **)calloc (PCB->Data->ElementN, sizeof (char *));
   if (element_list == NULL || locked_element_list == NULL || was == NULL
@@ -3427,7 +3429,7 @@ ActionRenumber (int argc, char **argv, Coord x, Coord y)
 	      cnt_list = (struct _cnt_list *)realloc (cnt_list, cnt_list_sz);
 	      if (cnt_list == NULL)
 		{
-		  fprintf (stderr, "realloc failed() in %s\n", __FUNCTION__);
+		  fprintf (stderr, _("realloc failed() in %s\n"), __FUNCTION__);
 		  exit (1);
 		}
 	      /* zero out the memory that we added */
@@ -3589,10 +3591,10 @@ ActionRenumber (int argc, char **argv, Coord x, Coord y)
 
 /* --------------------------------------------------------------------------- */
 
-static const char ripup_syntax[] = "RipUp(All|Selected|Element)";
+static const char ripup_syntax[] = N_("RipUp(All|Selected|Element)");
 
 static const char ripup_help[] =
-  "Ripup auto-routed tracks, or convert an element to parts.";
+  N_("Ripup auto-routed tracks, or convert an element to parts.");
 
 /* %start-doc actions RipUp
 
@@ -3718,9 +3720,10 @@ ActionRipUp (int argc, char **argv, Coord x, Coord y)
 
 /* --------------------------------------------------------------------------- */
 
-static const char addrats_syntax[] = "AddRats(AllRats|SelectedRats|Close)";
+static const char addrats_syntax[] = N_("AddRats(AllRats|SelectedRats|Close)");
 
-static const char addrats_help[] = "Add one or more rat lines to the board.";
+static const char addrats_help[] =
+  N_("Add one or more rat lines to the board.");
 
 /* %start-doc actions AddRats
 
@@ -3745,7 +3748,7 @@ static int
 ActionAddRats (int argc, char **argv, Coord x, Coord y)
 {
   char *function = ARG (0);
-  RatTypePtr shorty;
+  RatType *shorty;
   float len, small;
 
   if (function)
@@ -3797,10 +3800,10 @@ ActionAddRats (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char delete_syntax[] =
-  "Delete(Object|Selected)\n"
-  "Delete(AllRats|SelectedRats)";
+  N_("Delete(Object|Selected)\n"
+  "Delete(AllRats|SelectedRats)");
 
-static const char delete_help[] = "Delete stuff.";
+static const char delete_help[] = N_("Delete stuff.");
 
 /* %start-doc actions Delete
 
@@ -3848,9 +3851,9 @@ ActionDelete (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char deleterats_syntax[] =
-  "DeleteRats(AllRats|Selected|SelectedRats)";
+  N_("DeleteRats(AllRats|Selected|SelectedRats)");
 
-static const char deleterats_help[] = "Delete rat lines.";
+static const char deleterats_help[] = N_("Delete rat lines.");
 
 /* %start-doc actions DeleteRats
 
@@ -3882,9 +3885,9 @@ ActionDeleteRats (int argc, char **argv, Coord x, Coord y)
 
 /* --------------------------------------------------------------------------- */
 
-static const char autoplace_syntax[] = "AutoPlaceSelected()";
+static const char autoplace_syntax[] = N_("AutoPlaceSelected()");
 
-static const char autoplace_help[] = "Auto-place selected components.";
+static const char autoplace_help[] = N_("Auto-place selected components.");
 
 /* %start-doc actions AutoPlaceSelected
 
@@ -3908,9 +3911,9 @@ ActionAutoPlaceSelected (int argc, char **argv, Coord x, Coord y)
 
 /* --------------------------------------------------------------------------- */
 
-static const char autoroute_syntax[] = "AutoRoute(AllRats|SelectedRats)";
+static const char autoroute_syntax[] = N_("AutoRoute(AllRats|SelectedRats)");
 
-static const char autoroute_help[] = "Auto-route some or all rat lines.";
+static const char autoroute_help[] = N_("Auto-route some or all rat lines.");
 
 /* %start-doc actions AutoRoute
 
@@ -3961,10 +3964,10 @@ ActionAutoRoute (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char markcrosshair_syntax[] =
-  "MarkCrosshair()\n"
-  "MarkCrosshair(Center)";
+  N_("MarkCrosshair()\n"
+  "MarkCrosshair(Center)");
 
-static const char markcrosshair_help[] = "Set/Reset the Crosshair mark.";
+static const char markcrosshair_help[] = N_("Set/Reset the Crosshair mark.");
 
 /* %start-doc actions MarkCrosshair
 
@@ -4016,13 +4019,13 @@ ActionMarkCrosshair (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char changesize_syntax[] =
-  "ChangeSize(Object, delta)\n"
+  N_("ChangeSize(Object, delta)\n"
   "ChangeSize(SelectedObjects|Selected, delta)\n"
   "ChangeSize(SelectedLines|SelectedPins|SelectedVias, delta)\n"
   "ChangeSize(SelectedPads|SelectedTexts|SelectedNames, delta)\n"
-  "ChangeSize(SelectedElements, delta)";
+  "ChangeSize(SelectedElements, delta)");
 
-static const char changesize_help[] = "Changes the size of objects.";
+static const char changesize_help[] = N_("Changes the size of objects.");
 
 /* %start-doc actions ChangeSize
 
@@ -4046,6 +4049,9 @@ ActionChangeSize (int argc, char **argv, Coord x, Coord y)
   if (function && delta)
     {
       value = GetValue (delta, units, &absolute);
+      if (value == 0)
+        value = delta[0] == '-' ? -Settings.increments->size
+                                :  Settings.increments->size;
       switch (GetFunctionID (function))
 	{
 	case F_Object:
@@ -4056,7 +4062,7 @@ ActionChangeSize (int argc, char **argv, Coord x, Coord y)
 	    if ((type =
 		 SearchScreen (Crosshair.X, Crosshair.Y, CHANGESIZE_TYPES,
 			       &ptr1, &ptr2, &ptr3)) != NO_TYPE)
-	      if (TEST_FLAG (LOCKFLAG, (PinTypePtr) ptr2))
+	      if (TEST_FLAG (LOCKFLAG, (PinType *) ptr2))
 		Message (_("Sorry, the object is locked\n"));
 	    if (ChangeObjectSize (type, ptr1, ptr2, ptr3, value, absolute))
 	      SetChangedFlag (true);
@@ -4116,11 +4122,11 @@ ActionChangeSize (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char changedrillsize_syntax[] =
-  "ChangeDrillSize(Object, delta)\n"
-  "ChangeDrillSize(SelectedPins|SelectedVias|Selected|SelectedObjects, delta)";
+  N_("ChangeDrillSize(Object, delta)\n"
+  "ChangeDrillSize(SelectedPins|SelectedVias|Selected|SelectedObjects, delta)");
 
 static const char changedrillsize_help[] =
-  "Changes the drilling hole size of objects.";
+  N_("Changes the drilling hole size of objects.");
 
 /* %start-doc actions ChangeDrillSize
 
@@ -4177,13 +4183,13 @@ ActionChange2ndSize (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char changeclearsize_syntax[] =
-  "ChangeClearSize(Object, delta)\n"
+  N_("ChangeClearSize(Object, delta)\n"
   "ChangeClearSize(SelectedPins|SelectedPads|SelectedVias, delta)\n"
   "ChangeClearSize(SelectedLines|SelectedArcs, delta\n"
-  "ChangeClearSize(Selected|SelectedObjects, delta)";
+  "ChangeClearSize(Selected|SelectedObjects, delta)");
 
 static const char changeclearsize_help[] =
-  "Changes the clearance size of objects.";
+  N_("Changes the clearance size of objects.");
 
 /* %start-doc actions ChangeClearSize
 
@@ -4205,6 +4211,9 @@ ActionChangeClearSize (int argc, char **argv, Coord x, Coord y)
   if (function && delta)
     {
       value = 2 * GetValue (delta, units, &absolute);
+      if (value == 0)
+        value = delta[0] == '-' ? -Settings.increments->clear
+                                :  Settings.increments->clear;
       switch (GetFunctionID (function))
 	{
 	case F_Object:
@@ -4254,11 +4263,11 @@ ActionChangeClearSize (int argc, char **argv, Coord x, Coord y)
 /* ---------------------------------------------------------------------------  */
 
 static const char minmaskgap_syntax[] =
-  "MinMaskGap(delta)\n"
-  "MinMaskGap(Selected, delta)";
+  N_("MinMaskGap(delta)\n"
+  "MinMaskGap(Selected, delta)");
 
 static const char minmaskgap_help[] =
-  "Ensures the mask is a minimum distance from pins and pads.";
+  N_("Ensures the mask is a minimum distance from pins and pads.");
 
 /* %start-doc actions MinMaskGap
 
@@ -4338,11 +4347,11 @@ ActionMinMaskGap (int argc, char **argv, Coord x, Coord y)
 /* ---------------------------------------------------------------------------  */
 
 static const char mincleargap_syntax[] =
-  "MinClearGap(delta)\n"
-  "MinClearGap(Selected, delta)";
+  N_("MinClearGap(delta)\n"
+  "MinClearGap(Selected, delta)");
 
 static const char mincleargap_help[] =
-  "Ensures that polygons are a minimum distance from objects.";
+  N_("Ensures that polygons are a minimum distance from objects.");
 
 /* %start-doc actions MinClearGap
 
@@ -4444,10 +4453,10 @@ ActionMinClearGap (int argc, char **argv, Coord x, Coord y)
 /* ---------------------------------------------------------------------------  */
 
 static const char changepinname_syntax[] =
-  "ChangePinName(ElementName,PinNumber,PinName)";
+  N_("ChangePinName(ElementName,PinNumber,PinName)");
 
 static const char changepinname_help[] =
-  "Sets the name of a specific pin on a specific element.";
+  N_("Sets the name of a specific pin on a specific element.");
 
 /* %start-doc actions ChangePinName
 
@@ -4537,10 +4546,10 @@ ActionChangePinName (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char changename_syntax[] =
-  "ChangeName(Object)\n"
-  "ChangeName(Layout|Layer)";
+  N_("ChangeName(Object)\n"
+  "ChangeName(Layout|Layer)");
 
-static const char changename_help[] = "Sets the name of objects.";
+static const char changename_help[] = N_("Sets the name of objects.");
 
 /* %start-doc actions ChangeName
 
@@ -4586,7 +4595,7 @@ ActionChangeName (int argc, char **argv, Coord x, Coord y)
 		    SetChangedFlag (true);
 		    if (type == ELEMENT_TYPE)
 		      {
-			RubberbandTypePtr ptr;
+			RubberbandType *ptr;
 			int i;
 
 			RestoreUndoSerialNumber ();
@@ -4597,7 +4606,7 @@ ActionChangeName (int argc, char **argv, Coord x, Coord y)
 			     i++, ptr++)
 			  {
 			    if (PCB->RatOn)
-			      EraseRat ((RatTypePtr) ptr->Line);
+			      EraseRat ((RatType *) ptr->Line);
 			    MoveObjectToRemoveUndoList (RATLINE_TYPE,
 							ptr->Line, ptr->Line,
 							ptr->Line);
@@ -4635,10 +4644,10 @@ ActionChangeName (int argc, char **argv, Coord x, Coord y)
 
 /* --------------------------------------------------------------------------- */
 
-static const char morphpolygon_syntax[] = "MorphPolygon(Object|Selected)";
+static const char morphpolygon_syntax[] = N_("MorphPolygon(Object|Selected)");
 
 static const char morphpolygon_help[] =
-  "Converts dead polygon islands into separate polygons.";
+  N_("Converts dead polygon islands into separate polygons.");
 
 /* %start-doc actions MorphPolygon 
 
@@ -4692,10 +4701,10 @@ ActionMorphPolygon (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char togglehidename_syntax[] =
-  "ToggleHideName(Object|SelectedElements)";
+  N_("ToggleHideName(Object|SelectedElements)");
 
 static const char togglehidename_help[] =
-  "Toggles the visibility of element names.";
+  N_("Toggles the visibility of element names.");
 
 /* %start-doc actions ToggleHideName
 
@@ -4722,9 +4731,9 @@ ActionToggleHideName (int argc, char **argv, Coord x, Coord y)
 				      &ptr1, &ptr2, &ptr3)) != NO_TYPE)
 	      {
 		AddObjectToFlagUndoList (type, ptr1, ptr2, ptr3);
-		EraseElementName ((ElementTypePtr) ptr2);
-		TOGGLE_FLAG (HIDENAMEFLAG, (ElementTypePtr) ptr2);
-		DrawElementName ((ElementTypePtr) ptr2);
+		EraseElementName ((ElementType *) ptr2);
+		TOGGLE_FLAG (HIDENAMEFLAG, (ElementType *) ptr2);
+		DrawElementName ((ElementType *) ptr2);
 		Draw ();
 		IncrementUndoSerialNumber ();
 	      }
@@ -4764,10 +4773,10 @@ ActionToggleHideName (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char changejoin_syntax[] =
-  "ChangeJoin(ToggleObject|SelectedLines|SelectedArcs|Selected)";
+  N_("ChangeJoin(ToggleObject|SelectedLines|SelectedArcs|Selected)");
 
 static const char changejoin_help[] =
-  "Changes the join (clearance through polygons) of objects.";
+  N_("Changes the join (clearance through polygons) of objects.");
 
 /* %start-doc actions ChangeJoin
 
@@ -4825,12 +4834,12 @@ ActionChangeJoin (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char changesquare_syntax[] =
-  "ChangeSquare(ToggleObject)\n"
+  N_("ChangeSquare(ToggleObject)\n"
   "ChangeSquare(SelectedElements|SelectedPins)\n"
-  "ChangeSquare(Selected|SelectedObjects)";
+  "ChangeSquare(Selected|SelectedObjects)");
 
 static const char changesquare_help[] =
-  "Changes the square flag of pins and pads.";
+  N_("Changes the square flag of pins and pads.");
 
 /* %start-doc actions ChangeSquare
 
@@ -4886,9 +4895,9 @@ ActionChangeSquare (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char setsquare_syntax[] =
-  "SetSquare(ToggleObject|SelectedElements|SelectedPins)";
+  N_("SetSquare(ToggleObject|SelectedElements|SelectedPins)");
 
-static const char setsquare_help[] = "sets the square-flag of objects.";
+static const char setsquare_help[] = N_("sets the square-flag of objects.");
 
 /* %start-doc actions SetSquare
 
@@ -4944,10 +4953,10 @@ ActionSetSquare (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char clearsquare_syntax[] =
-  "ClearSquare(ToggleObject|SelectedElements|SelectedPins)";
+  N_("ClearSquare(ToggleObject|SelectedElements|SelectedPins)");
 
 static const char clearsquare_help[] =
-  "Clears the square-flag of pins and pads.";
+  N_("Clears the square-flag of pins and pads.");
 
 /* %start-doc actions ClearSquare
 
@@ -5003,11 +5012,11 @@ ActionClearSquare (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char changeoctagon_syntax[] =
-  "ChangeOctagon(Object|ToggleObject|SelectedObjects|Selected)\n"
-  "ChangeOctagon(SelectedElements|SelectedPins|SelectedVias)";
+  N_("ChangeOctagon(Object|ToggleObject|SelectedObjects|Selected)\n"
+  "ChangeOctagon(SelectedElements|SelectedPins|SelectedVias)");
 
 static const char changeoctagon_help[] =
-  "Changes the octagon-flag of pins and vias.";
+  N_("Changes the octagon-flag of pins and vias.");
 
 /* %start-doc actions ChangeOctagon
 
@@ -5066,9 +5075,9 @@ ActionChangeOctagon (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char setoctagon_syntax[] =
-  "SetOctagon(Object|ToggleObject|SelectedElements|Selected)";
+  N_("SetOctagon(Object|ToggleObject|SelectedElements|Selected)");
 
-static const char setoctagon_help[] = "Sets the octagon-flag of objects.";
+static const char setoctagon_help[] = N_("Sets the octagon-flag of objects.");
 
 /* %start-doc actions SetOctagon
 
@@ -5127,11 +5136,11 @@ ActionSetOctagon (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char clearoctagon_syntax[] =
-  "ClearOctagon(ToggleObject|Object|SelectedObjects|Selected)\n"
-  "ClearOctagon(SelectedElements|SelectedPins|SelectedVias)";
+  N_("ClearOctagon(ToggleObject|Object|SelectedObjects|Selected)\n"
+  "ClearOctagon(SelectedElements|SelectedPins|SelectedVias)");
 
 static const char clearoctagon_help[] =
-  "Clears the octagon-flag of pins and vias.";
+  N_("Clears the octagon-flag of pins and vias.");
 
 /* %start-doc actions ClearOctagon
 
@@ -5190,9 +5199,9 @@ ActionClearOctagon (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char changehold_syntax[] =
-  "ChangeHole(ToggleObject|Object|SelectedVias|Selected)";
+  N_("ChangeHole(ToggleObject|Object|SelectedVias|Selected)");
 
-static const char changehold_help[] = "Changes the hole flag of objects.";
+static const char changehold_help[] = N_("Changes the hole flag of objects.");
 
 /* %start-doc actions ChangeHole
 
@@ -5218,7 +5227,7 @@ ActionChangeHole (int argc, char **argv, Coord x, Coord y)
 	    gui->get_coords (_("Select an Object"), &x, &y);
 	    if ((type = SearchScreen (x, y, VIA_TYPE,
 				      &ptr1, &ptr2, &ptr3)) != NO_TYPE
-		&& ChangeHole ((PinTypePtr) ptr3))
+		&& ChangeHole ((PinType *) ptr3))
 	      IncrementUndoSerialNumber ();
 	    break;
 	  }
@@ -5236,9 +5245,10 @@ ActionChangeHole (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char changepaste_syntax[] =
-  "ChangePaste(ToggleObject|Object|SelectedPads|Selected)";
+  N_("ChangePaste(ToggleObject|Object|SelectedPads|Selected)");
 
-static const char changepaste_help[] = "Changes the no paste flag of objects.";
+static const char changepaste_help[] =
+  N_("Changes the no paste flag of objects.");
 
 /* %start-doc actions ChangePaste
 
@@ -5266,7 +5276,7 @@ ActionChangePaste (int argc, char **argv, Coord x, Coord y)
 	    gui->get_coords (_("Select an Object"), &x, &y);
 	    if ((type = SearchScreen (x, y, PAD_TYPE,
 				      &ptr1, &ptr2, &ptr3)) != NO_TYPE
-		&& ChangePaste ((PadTypePtr) ptr3))
+		&& ChangePaste ((PadType *) ptr3))
 	      IncrementUndoSerialNumber ();
 	    break;
 	  }
@@ -5284,15 +5294,15 @@ ActionChangePaste (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char select_syntax[] =
-  "Select(Object|ToggleObject)\n"
+  N_("Select(Object|ToggleObject)\n"
   "Select(All|Block|Connection)\n"
   "Select(ElementByName|ObjectByName|PadByName|PinByName)\n"
   "Select(ElementByName|ObjectByName|PadByName|PinByName, Name)\n"
   "Select(TextByName|ViaByName|NetByName)\n"
   "Select(TextByName|ViaByName|NetByName, Name)\n"
-  "Select(Convert)";
+  "Select(Convert)");
 
-static const char select_help[] = "Toggles or sets the selection.";
+static const char select_help[] = N_("Toggles or sets the selection.");
 
 /* %start-doc actions Select
 
@@ -5321,9 +5331,12 @@ Selects all objects in a rectangle indicated by the cursor.
 @item All
 Selects all objects on the board.
 
- at item Connection
+ at item Found
 Selects all connections with the ``found'' flag set.
 
+ at item Connection
+Selects all connections with the ``connected'' flag set.
+
 @item Convert
 Converts the selected objects to an element.  This uses the highest
 numbered paste buffer.
@@ -5428,9 +5441,19 @@ ActionSelect (int argc, char **argv, Coord x, Coord y)
 	    break;
 	  }
 
-	  /* all found connections */
+	  /* all logical connections */
+	case F_Found:
+	  if (SelectByFlag (FOUNDFLAG, true))
+	    {
+              Draw ();
+	      IncrementUndoSerialNumber ();
+	      SetChangedFlag (true);
+	    }
+	  break;
+
+	  /* all physical connections */
 	case F_Connection:
-	  if (SelectConnection (true))
+	  if (SelectByFlag (CONNECTEDFLAG, true))
 	    {
               Draw ();
 	      IncrementUndoSerialNumber ();
@@ -5479,14 +5502,14 @@ FlagHaveRegex (int parm)
 /* --------------------------------------------------------------------------- */
 
 static const char unselect_syntax[] =
-  "Unselect(All|Block|Connection)\n"
+  N_("Unselect(All|Block|Connection)\n"
   "Unselect(ElementByName|ObjectByName|PadByName|PinByName)\n"
   "Unselect(ElementByName|ObjectByName|PadByName|PinByName, Name)\n"
   "Unselect(TextByName|ViaByName)\n"
-  "Unselect(TextByName|ViaByName, Name)\n";
+  "Unselect(TextByName|ViaByName, Name)\n");
 
 static const char unselect_help[] =
-  "Unselects the object at the pointer location or the specified objects.";
+  N_("Unselects the object at the pointer location or the specified objects.");
 
 /* %start-doc actions Unselect
 
@@ -5607,9 +5630,19 @@ ActionUnselect (int argc, char **argv, Coord x, Coord y)
 	    break;
 	  }
 
-	  /* all found connections */
+	  /* all logical connections */
+	case F_Found:
+	  if (SelectByFlag (FOUNDFLAG, false))
+	    {
+              Draw ();
+	      IncrementUndoSerialNumber ();
+	      SetChangedFlag (true);
+	    }
+	  break;
+
+	  /* all physical connections */
 	case F_Connection:
-	  if (SelectConnection (false))
+	  if (SelectByFlag (CONNECTEDFLAG, false))
 	    {
               Draw ();
 	      IncrementUndoSerialNumber ();
@@ -5629,11 +5662,11 @@ ActionUnselect (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char saveto_syntax[] =
-  "SaveTo(Layout|LayoutAs,filename)\n"
+  N_("SaveTo(Layout|LayoutAs,filename)\n"
   "SaveTo(AllConnections|AllUnusedPins|ElementConnections,filename)\n"
-  "SaveTo(PasteBuffer,filename)";
+  "SaveTo(PasteBuffer,filename)");
 
-static const char saveto_help[] = "Saves data to a file.";
+static const char saveto_help[] = N_("Saves data to a file.");
 
 /* %start-doc actions SaveTo
 
@@ -5721,7 +5754,7 @@ ActionSaveTo (int argc, char **argv, Coord x, Coord y)
 
   if (strcasecmp (function, "ElementConnections") == 0)
     {
-      ElementTypePtr element;
+      ElementType *element;
       void *ptrtmp;
       FILE *fp;
       bool result;
@@ -5729,7 +5762,7 @@ ActionSaveTo (int argc, char **argv, Coord x, Coord y)
       if ((SearchScreen (Crosshair.X, Crosshair.Y, ELEMENT_TYPE,
 			 &ptrtmp, &ptrtmp, &ptrtmp)) != NO_TYPE)
 	{
-	  element = (ElementTypePtr) ptrtmp;
+	  element = (ElementType *) ptrtmp;
 	  if ((fp =
 	       CheckAndOpenFile (name, true, false, &result, NULL)) != NULL)
 	    {
@@ -5752,10 +5785,10 @@ ActionSaveTo (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char savesettings_syntax[] =
-  "SaveSettings()\n"
-  "SaveSettings(local)";
+  N_("SaveSettings()\n"
+  "SaveSettings(local)");
 
-static const char savesettings_help[] = "Saves settings.";
+static const char savesettings_help[] = N_("Saves settings.");
 
 /* %start-doc actions SaveSettings
 
@@ -5776,9 +5809,9 @@ ActionSaveSettings (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char loadfrom_syntax[] =
-  "LoadFrom(Layout|LayoutToBuffer|ElementToBuffer|Netlist|Revert,filename)";
+  N_("LoadFrom(Layout|LayoutToBuffer|ElementToBuffer|Netlist|Revert,filename)");
 
-static const char loadfrom_help[] = "Load layout data from a file.";
+static const char loadfrom_help[] = N_("Load layout data from a file.");
 
 /* %start-doc actions LoadFrom
 
@@ -5852,8 +5885,8 @@ ActionLoadFrom (int argc, char **argv, Coord x, Coord y)
 	free (PCB->Netlistname);
       PCB->Netlistname = StripWhiteSpaceAndDup (name);
       FreeLibraryMemory (&PCB->NetlistLib);
-      if (!ImportNetlist (PCB->Netlistname))
-	NetlistChanged (1);
+      ImportNetlist (PCB->Netlistname);
+      NetlistChanged (1);
     }
   else if (strcasecmp (function, "Revert") == 0 && PCB->Filename
 	   && (!PCB->Changed
@@ -5867,9 +5900,9 @@ ActionLoadFrom (int argc, char **argv, Coord x, Coord y)
 
 /* --------------------------------------------------------------------------- */
 
-static const char new_syntax[] = "New([name])";
+static const char new_syntax[] = N_("New([name])");
 
-static const char new_help[] = "Starts a new layout.";
+static const char new_help[] = N_("Starts a new layout.");
 
 /* %start-doc actions New
 
@@ -5899,6 +5932,7 @@ ActionNew (int argc, char **argv, Coord x, Coord y)
       if (PCB->Changed && Settings.SaveInTMP)
 	SaveInTMP ();
       RemovePCB (PCB);
+      PCB = NULL;
       PCB = CreateNewPCB (true);
       PCB->Data->LayerN = DEF_LAYER;
       CreateNewPCBPost (PCB, 1);
@@ -5932,13 +5966,13 @@ ActionBell (char *volume)
 /* --------------------------------------------------------------------------- */
 
 static const char pastebuffer_syntax[] =
-  "PasteBuffer(AddSelected|Clear|1..MAX_BUFFER)\n"
+  N_("PasteBuffer(AddSelected|Clear|1..MAX_BUFFER)\n"
   "PasteBuffer(Rotate, 1..3)\n"
   "PasteBuffer(Convert|Save|Restore|Mirror)\n"
-  "PasteBuffer(ToLayout, X, Y, units)";
+  "PasteBuffer(ToLayout, X, Y, units)");
 
 static const char pastebuffer_help[] =
-  "Various operations on the paste buffer.";
+  N_("Various operations on the paste buffer.");
 
 /* %start-doc actions PasteBuffer
 
@@ -6136,10 +6170,10 @@ ActionPasteBuffer (int argc, char **argv, Coord x, Coord y)
 
 /* --------------------------------------------------------------------------- */
 
-static const char undo_syntax[] = "Undo()\n"
-                                  "Undo(ClearList)";
+static const char undo_syntax[] = N_("Undo()\n"
+                                  "Undo(ClearList)");
 
-static const char undo_help[] = "Undo recent changes.";
+static const char undo_help[] = N_("Undo recent changes.");
 
 /* %start-doc actions Undo
 
@@ -6196,13 +6230,13 @@ ActionUndo (int argc, char **argv, Coord x, Coord y)
 	    {
 	      int type;
 	      void *ptr1, *ptr3, *ptrtmp;
-	      LineTypePtr ptr2;
+	      LineType *ptr2;
 	      /* this search is guaranteed to succeed */
 	      SearchObjectByLocation (LINE_TYPE | RATLINE_TYPE, &ptr1,
 				      &ptrtmp, &ptr3,
 				      Crosshair.AttachedLine.Point1.X,
 				      Crosshair.AttachedLine.Point1.Y, 0);
-	      ptr2 = (LineTypePtr) ptrtmp;
+	      ptr2 = (LineType *) ptrtmp;
 
 	      /* save both ends of line */
 	      Crosshair.AttachedLine.Point2.X = ptr2->Point1.X;
@@ -6234,10 +6268,11 @@ ActionUndo (int argc, char **argv, Coord x, Coord y)
 					  &ptr3,
 					  Crosshair.AttachedLine.Point2.X,
 					  Crosshair.AttachedLine.Point2.Y, 0);
-		  ptr2 = (LineTypePtr) ptrtmp;
+		  ptr2 = (LineType *) ptrtmp;
 	          if (TEST_FLAG (AUTODRCFLAG, PCB))
 		    {
-		      /* undo loses FOUNDFLAG */
+		      /* undo loses CONNECTEDFLAG and FOUNDFLAG */
+		      SET_FLAG(CONNECTEDFLAG, ptr2);
 		      SET_FLAG(FOUNDFLAG, ptr2);
 		      DrawLine (CURRENT, ptr2);
 		    }
@@ -6261,8 +6296,8 @@ ActionUndo (int argc, char **argv, Coord x, Coord y)
 					  &ptr3,
 					  Crosshair.AttachedLine.Point1.X,
 					  Crosshair.AttachedLine.Point1.Y, 0);
-		  ptr2 = (LineTypePtr) ptrtmp;
-		  lastLayer = (LayerTypePtr) ptr1;
+		  ptr2 = (LineType *) ptrtmp;
+		  lastLayer = (LayerType *) ptr1;
 		}
 	      notify_crosshair_change (true);
 	      return 0;
@@ -6279,12 +6314,12 @@ ActionUndo (int argc, char **argv, Coord x, Coord y)
 	  if (Crosshair.AttachedBox.State == STATE_THIRD)
 	    {
 	      void *ptr1, *ptr2, *ptr3;
-	      BoxTypePtr bx;
+	      BoxType *bx;
 	      /* guaranteed to succeed */
 	      SearchObjectByLocation (ARC_TYPE, &ptr1, &ptr2, &ptr3,
 				      Crosshair.AttachedBox.Point1.X,
 				      Crosshair.AttachedBox.Point1.Y, 0);
-	      bx = GetArcEnds ((ArcTypePtr) ptr2);
+	      bx = GetArcEnds ((ArcType *) ptr2);
 	      Crosshair.AttachedBox.Point1.X =
 		Crosshair.AttachedBox.Point2.X = bx->X1;
 	      Crosshair.AttachedBox.Point1.Y =
@@ -6314,9 +6349,9 @@ ActionUndo (int argc, char **argv, Coord x, Coord y)
 
 /* --------------------------------------------------------------------------- */
 
-static const char redo_syntax[] = "Redo()";
+static const char redo_syntax[] = N_("Redo()");
 
-static const char redo_help[] = "Redo recent \"undo\" operations.";
+static const char redo_help[] = N_("Redo recent \"undo\" operations.");
 
 /* %start-doc actions Redo
 
@@ -6362,9 +6397,9 @@ ActionRedo (int argc, char **argv, Coord x, Coord y)
 
 /* --------------------------------------------------------------------------- */
 
-static const char polygon_syntax[] = "Polygon(Close|PreviousPoint)";
+static const char polygon_syntax[] = N_("Polygon(Close|PreviousPoint)");
 
-static const char polygon_help[] = "Some polygon related stuff.";
+static const char polygon_help[] = N_("Some polygon related stuff.");
 
 /* %start-doc actions Polygon
 
@@ -6410,10 +6445,10 @@ ActionPolygon (int argc, char **argv, Coord x, Coord y)
 
 /* --------------------------------------------------------------------------- */
 
-static const char routestyle_syntax[] = "RouteStyle(1|2|3|4)";
+static const char routestyle_syntax[] = N_("RouteStyle(1|2|3|4)");
 
 static const char routestyle_help[] =
-  "Copies the indicated routing style into the current sizes.";
+  N_("Copies the indicated routing style into the current sizes.");
 
 /* %start-doc actions RouteStyle
 
@@ -6445,9 +6480,10 @@ ActionRouteStyle (int argc, char **argv, Coord x, Coord y)
 
 /* --------------------------------------------------------------------------- */
 
-static const char moveobject_syntax[] = "MoveObject(X,Y,dim)";
+static const char moveobject_syntax[] = N_("MoveObject(X,Y,dim)");
 
-static const char moveobject_help[] = "Moves the object under the crosshair.";
+static const char moveobject_help[] =
+  N_("Moves the object under the crosshair.");
 
 /* %start-doc actions MoveObject
 
@@ -6496,10 +6532,10 @@ ActionMoveObject (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char movetocurrentlayer_syntax[] =
-  "MoveToCurrentLayer(Object|SelectedObjects)";
+  N_("MoveToCurrentLayer(Object|SelectedObjects)");
 
 static const char movetocurrentlayer_help[] =
-  "Moves objects to the current layer.";
+  N_("Moves objects to the current layer.");
 
 /* %start-doc actions MoveToCurrentLayer
 
@@ -6542,10 +6578,10 @@ ActionMoveToCurrentLayer (int argc, char **argv, Coord x, Coord y)
 }
 
 
-static const char setsame_syntax[] = "SetSame()";
+static const char setsame_syntax[] = N_("SetSame()");
 
 static const char setsame_help[] =
-  "Sets current layer and sizes to match indicated item.";
+  N_("Sets current layer and sizes to match indicated item.");
 
 /* %start-doc actions SetSame
 
@@ -6560,7 +6596,7 @@ ActionSetSame (int argc, char **argv, Coord x, Coord y)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
-  LayerTypePtr layer = CURRENT;
+  LayerType *layer = CURRENT;
 
   type = SearchScreen (x, y, CLONE_TYPES, &ptr1, &ptr2, &ptr3);
 /* set layer current and size from line or arc */
@@ -6568,9 +6604,9 @@ ActionSetSame (int argc, char **argv, Coord x, Coord y)
     {
     case LINE_TYPE:
       notify_crosshair_change (false);
-      Settings.LineThickness = ((LineTypePtr) ptr2)->Thickness;
-      Settings.Keepaway = ((LineTypePtr) ptr2)->Clearance / 2;
-      layer = (LayerTypePtr) ptr1;
+      Settings.LineThickness = ((LineType *) ptr2)->Thickness;
+      Settings.Keepaway = ((LineType *) ptr2)->Clearance / 2;
+      layer = (LayerType *) ptr1;
       if (Settings.Mode != LINE_MODE)
 	SetMode (LINE_MODE);
       notify_crosshair_change (true);
@@ -6579,9 +6615,9 @@ ActionSetSame (int argc, char **argv, Coord x, Coord y)
 
     case ARC_TYPE:
       notify_crosshair_change (false);
-      Settings.LineThickness = ((ArcTypePtr) ptr2)->Thickness;
-      Settings.Keepaway = ((ArcTypePtr) ptr2)->Clearance / 2;
-      layer = (LayerTypePtr) ptr1;
+      Settings.LineThickness = ((ArcType *) ptr2)->Thickness;
+      Settings.Keepaway = ((ArcType *) ptr2)->Clearance / 2;
+      layer = (LayerType *) ptr1;
       if (Settings.Mode != ARC_MODE)
 	SetMode (ARC_MODE);
       notify_crosshair_change (true);
@@ -6589,14 +6625,14 @@ ActionSetSame (int argc, char **argv, Coord x, Coord y)
       break;
 
     case POLYGON_TYPE:
-      layer = (LayerTypePtr) ptr1;
+      layer = (LayerType *) ptr1;
       break;
 
     case VIA_TYPE:
       notify_crosshair_change (false);
-      Settings.ViaThickness = ((PinTypePtr) ptr2)->Thickness;
-      Settings.ViaDrillingHole = ((PinTypePtr) ptr2)->DrillingHole;
-      Settings.Keepaway = ((PinTypePtr) ptr2)->Clearance / 2;
+      Settings.ViaThickness = ((PinType *) ptr2)->Thickness;
+      Settings.ViaDrillingHole = ((PinType *) ptr2)->DrillingHole;
+      Settings.Keepaway = ((PinType *) ptr2)->Clearance / 2;
       if (Settings.Mode != VIA_MODE)
 	SetMode (VIA_MODE);
       notify_crosshair_change (true);
@@ -6618,13 +6654,13 @@ ActionSetSame (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char setflag_syntax[] =
-  "SetFlag(Object|Selected|SelectedObjects, flag)\n"
+  N_("SetFlag(Object|Selected|SelectedObjects, flag)\n"
   "SetFlag(SelectedLines|SelectedPins|SelectedVias, flag)\n"
   "SetFlag(SelectedPads|SelectedTexts|SelectedNames, flag)\n"
   "SetFlag(SelectedElements, flag)\n"
-  "flag = square | octagon | thermal | join";
+  "flag = square | octagon | thermal | join");
 
-static const char setflag_help[] = "Sets flags on objects.";
+static const char setflag_help[] = N_("Sets flags on objects.");
 
 /* %start-doc actions SetFlag
 
@@ -6649,13 +6685,13 @@ ActionSetFlag (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char clrflag_syntax[] =
-  "ClrFlag(Object|Selected|SelectedObjects, flag)\n"
+  N_("ClrFlag(Object|Selected|SelectedObjects, flag)\n"
   "ClrFlag(SelectedLines|SelectedPins|SelectedVias, flag)\n"
   "ClrFlag(SelectedPads|SelectedTexts|SelectedNames, flag)\n"
   "ClrFlag(SelectedElements, flag)\n"
-  "flag = square | octagon | thermal | join";
+  "flag = square | octagon | thermal | join");
 
-static const char clrflag_help[] = "Clears flags on objects.";
+static const char clrflag_help[] = N_("Clears flags on objects.");
 
 /* %start-doc actions ClrFlag
 
@@ -6680,14 +6716,14 @@ ActionClrFlag (int argc, char **argv, Coord x, Coord y)
 /* --------------------------------------------------------------------------- */
 
 static const char changeflag_syntax[] =
-  "ChangeFlag(Object|Selected|SelectedObjects, flag, value)\n"
+  N_("ChangeFlag(Object|Selected|SelectedObjects, flag, value)\n"
   "ChangeFlag(SelectedLines|SelectedPins|SelectedVias, flag, value)\n"
   "ChangeFlag(SelectedPads|SelectedTexts|SelectedNames, flag, value)\n"
   "ChangeFlag(SelectedElements, flag, value)\n"
   "flag = square | octagon | thermal | join\n"
-  "value = 0 | 1";
+  "value = 0 | 1");
 
-static const char changeflag_help[] = "Sets or clears flags on objects.";
+static const char changeflag_help[] = N_("Sets or clears flags on objects.");
 
 /* %start-doc actions ChangeFlag
 
@@ -6751,7 +6787,7 @@ ChangeFlag (char *what, char *flag_name, int value, char *cmd_name)
 	if ((type =
 	     SearchScreen (Crosshair.X, Crosshair.Y, CHANGESIZE_TYPES,
 			   &ptr1, &ptr2, &ptr3)) != NO_TYPE)
-	  if (TEST_FLAG (LOCKFLAG, (PinTypePtr) ptr2))
+	  if (TEST_FLAG (LOCKFLAG, (PinType *) ptr2))
 	    Message (_("Sorry, the object is locked\n"));
 	if (set_object (type, ptr1, ptr2, ptr3))
 	  SetChangedFlag (true);
@@ -6803,9 +6839,9 @@ ChangeFlag (char *what, char *flag_name, int value, char *cmd_name)
 
 /* --------------------------------------------------------------------------- */
 
-static const char executefile_syntax[] = "ExecuteFile(filename)";
+static const char executefile_syntax[] = N_("ExecuteFile(filename)");
 
-static const char executefile_help[] = "Run actions from the given file.";
+static const char executefile_help[] = N_("Run actions from the given file.");
 
 /* %start-doc actions ExecuteFile
 
@@ -6908,7 +6944,7 @@ find_element_by_refdes (char *refdes)
 }
 
 static AttributeType *
-lookup_attr (AttributeListTypePtr list, const char *name)
+lookup_attr (AttributeListType *list, const char *name)
 {
   int i;
   for (i=0; i<list->Number; i++)
@@ -6918,7 +6954,7 @@ lookup_attr (AttributeListTypePtr list, const char *name)
 }
 
 static void
-delete_attr (AttributeListTypePtr list, AttributeType *attr)
+delete_attr (AttributeListType *list, AttributeType *attr)
 {
   int idx = attr - list->List;
   if (idx < 0 || idx >= list->Number)
@@ -6929,9 +6965,11 @@ delete_attr (AttributeListTypePtr list, AttributeType *attr)
 }
 
 /* ---------------------------------------------------------------- */
-static const char elementlist_syntax[] = "ElementList(Start|Done|Need,<refdes>,<footprint>,<value>)";
+static const char elementlist_syntax[] =
+  N_("ElementList(Start|Done|Need,<refdes>,<footprint>,<value>)");
 
-static const char elementlist_help[] = "Adds the given element if it doesn't already exist.";
+static const char elementlist_help[] =
+  N_("Adds the given element if it doesn't already exist.");
 
 /* %start-doc actions elementlist
 
@@ -7009,8 +7047,8 @@ ActionElementList (int argc, char **argv, Coord x, Coord y)
       }
       END_LOOP;
       if (number_of_footprints_not_found > 0)
-	gui->confirm_dialog ("Not all requested footprints were found.\n"
-			     "See the message log for details",
+	gui->confirm_dialog (_("Not all requested footprints were found.\n"
+			     "See the message log for details"),
 			     "Ok", NULL);
       return 0;
     }
@@ -7082,7 +7120,7 @@ ActionElementList (int argc, char **argv, Coord x, Coord y)
 	SetChangedFlag (true);
     }
 
-  else if (e && strcmp (DESCRIPTION_NAME(e), footprint) != 0)
+  else if (e && DESCRIPTION_NAME(e) && strcmp (DESCRIPTION_NAME(e), footprint) != 0)
     {
 #ifdef DEBUG
       printf("  ... Footprint on board, but different from footprint loaded.\n");
@@ -7145,9 +7183,11 @@ ActionElementList (int argc, char **argv, Coord x, Coord y)
 }
 
 /* ---------------------------------------------------------------- */
-static const char elementsetattr_syntax[] = "ElementSetAttr(refdes,name[,value])";
+static const char elementsetattr_syntax[] =
+  N_("ElementSetAttr(refdes,name[,value])");
 
-static const char elementsetattr_help[] = "Sets or clears an element-specific attribute.";
+static const char elementsetattr_help[] =
+  N_("Sets or clears an element-specific attribute.");
 
 /* %start-doc actions elementsetattr
 
@@ -7209,9 +7249,9 @@ ActionElementSetAttr (int argc, char **argv, Coord x, Coord y)
 }
 
 /* ---------------------------------------------------------------- */
-static const char execcommand_syntax[] = "ExecCommand(command)";
+static const char execcommand_syntax[] = N_("ExecCommand(command)");
 
-static const char execcommand_help[] = "Runs a command.";
+static const char execcommand_help[] = N_("Runs a command.");
 
 /* %start-doc actions execcommand
 
@@ -7444,12 +7484,12 @@ tempfile_unlink (char * name)
 
 /* ---------------------------------------------------------------- */
 static const char import_syntax[] =
-  "Import()\n"
+  N_("Import()\n"
   "Import([gnetlist|make[,source,source,...]])\n"
   "Import(setnewpoint[,(mark|center|X,Y)])\n"
-  "Import(setdisperse,D,units)\n";
+  "Import(setdisperse,D,units)\n");
 
-static const char import_help[] = "Import schematics.";
+static const char import_help[] = N_("Import schematics.");
 
 /* %start-doc actions Import
 
@@ -7619,11 +7659,11 @@ ActionImport (int argc, char **argv, Coord x, Coord y)
 	}
       else if (strcasecmp (xs, "mark") == 0)
 	{
-	  if (Marked.status)
-	    {
-	      x = Marked.X;
-	      y = Marked.Y;
-	    }
+	  if (!Marked.status)
+	    return 0;
+
+	  x = Marked.X;
+	  y = Marked.Y;
 	}
       else if (ys)
 	{
@@ -7703,7 +7743,10 @@ ActionImport (int argc, char **argv, Coord x, Coord y)
       strcat (schname, ".sch");
 
       if (access (schname, F_OK))
-	return hid_action("ImportGUI");
+        {
+          free (schname);
+          return hid_action("ImportGUI");
+        }
 
       sources = (char **) malloc (2 * sizeof (char *));
       sources[0] = schname;
@@ -7852,12 +7895,12 @@ ActionImport (int argc, char **argv, Coord x, Coord y)
 /* ------------------------------------------------------------ */
 
 static const char attributes_syntax[] =
-"Attributes(Layout|Layer|Element)\n"
-"Attributes(Layer,layername)";
+  N_("Attributes(Layout|Layer|Element)\n"
+  "Attributes(Layer,layername)");
 
 static const char attributes_help[] =
-"Let the user edit the attributes of the layout, current or given\n"
-"layer, or selected element.";
+  N_("Let the user edit the attributes of the layout, current or given\n"
+  "layer, or selected element.");
 
 /* %start-doc actions Attributes
 
@@ -7887,7 +7930,7 @@ ActionAttributes (int argc, char **argv, Coord x, Coord y)
     {
     case F_Layout:
       {
-	gui->edit_attributes("Layout Attributes", &(PCB->Attributes));
+	gui->edit_attributes(_("Layout Attributes"), &(PCB->Attributes));
 	return 0;
       }
 
@@ -7910,8 +7953,9 @@ ActionAttributes (int argc, char **argv, Coord x, Coord y)
 		return 1;
 	      }
 	  }
-	buf = (char *) malloc (strlen (layer->Name) + strlen ("Layer X Attributes"));
-	sprintf (buf, "Layer %s Attributes", layer->Name);
+	buf = (char *) malloc (strlen (layer->Name) +
+	    strlen (_("Layer %s Attributes")));
+	sprintf (buf, _("Layer %s Attributes"), layer->Name);
 	gui->edit_attributes(buf, &(layer->Attributes));
 	free (buf);
 	return 0;
@@ -7942,7 +7986,7 @@ ActionAttributes (int argc, char **argv, Coord x, Coord y)
 	    if ((SearchScreen
 		 (x, y, ELEMENT_TYPE, &ptrtmp,
 		  &ptrtmp, &ptrtmp)) != NO_TYPE)
-	      e = (ElementTypePtr) ptrtmp;
+	      e = (ElementType *) ptrtmp;
 	    else
 	      {
 		Message (_("No element found there\n"));
@@ -7952,12 +7996,13 @@ ActionAttributes (int argc, char **argv, Coord x, Coord y)
 
 	if (NAMEONPCB_NAME(e))
 	  {
-	    buf = (char *) malloc (strlen (NAMEONPCB_NAME(e)) + strlen ("Element X Attributes"));
-	    sprintf(buf, "Element %s Attributes", NAMEONPCB_NAME(e));
+	    buf = (char *) malloc (strlen (NAMEONPCB_NAME(e)) +
+		strlen (_("Element %s Attributes")));
+	    sprintf(buf, _("Element %s Attributes"), NAMEONPCB_NAME(e));
 	  }
 	else
 	  {
-	    buf = strdup ("Unnamed Element Attributes");
+	    buf = strdup (_("Unnamed Element Attributes"));
 	  }
 	gui->edit_attributes(buf, &(e->Attributes));
 	free (buf);
diff --git a/src/action.h b/src/action.h
index 83089f3..4b93ef8 100644
--- a/src/action.h
+++ b/src/action.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for action routines
diff --git a/src/autoplace.c b/src/autoplace.c
index 0e74b66..21ab5f2 100644
--- a/src/autoplace.c
+++ b/src/autoplace.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -67,8 +65,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 #define EXPANDRECTXY(r1, x1, y1, x2, y2) { \
   r1->X1=MIN(r1->X1, x1); r1->Y1=MIN(r1->Y1, y1); \
   r1->X2=MAX(r1->X2, x2); r1->Y2=MAX(r1->Y2, y2); \
@@ -78,7 +74,7 @@ RCSID ("$Id$");
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static double ComputeCost (NetListTypePtr Nets, double T0, double T);
+static double ComputeCost (NetListType *Nets, double T0, double T);
 
 /* ---------------------------------------------------------------------------
  * some local types
@@ -127,7 +123,7 @@ CostParameter =
 
 typedef struct
 {
-  ElementTypePtr *element;
+  ElementType **element;
   Cardinal elementN;
 }
 ElementPtrListType;
@@ -137,11 +133,11 @@ enum ewhich
 
 typedef struct
 {
-  ElementTypePtr element;
+  ElementType *element;
   enum ewhich which;
   Coord DX, DY;			/* for shift */
   unsigned rotate;		/* for rotate/flip */
-  ElementTypePtr other;		/* for exchange */
+  ElementType *other;		/* for exchange */
 }
 PerturbationType;
 
@@ -154,7 +150,7 @@ PerturbationType;
  * elements have possibly been moved, rotated, flipped, etc.
  */
 static void
-UpdateXY (NetListTypePtr Nets)
+UpdateXY (NetListType *Nets)
 {
   Cardinal SLayer, CLayer;
   Cardinal i, j;
@@ -166,20 +162,20 @@ UpdateXY (NetListTypePtr Nets)
     {
       for (j = 0; j < Nets->Net[i].ConnectionN; j++)
 	{
-	  ConnectionTypePtr c = &(Nets->Net[i].Connection[j]);
+	  ConnectionType *c = &(Nets->Net[i].Connection[j]);
 	  switch (c->type)
 	    {
 	    case PAD_TYPE:
 	      c->group = TEST_FLAG (ONSOLDERFLAG,
-				    (ElementTypePtr) c->ptr1)
+				    (ElementType *) c->ptr1)
 		? SLayer : CLayer;
-	      c->X = ((PadTypePtr) c->ptr2)->Point1.X;
-	      c->Y = ((PadTypePtr) c->ptr2)->Point1.Y;
+	      c->X = ((PadType *) c->ptr2)->Point1.X;
+	      c->Y = ((PadType *) c->ptr2)->Point1.Y;
 	      break;
 	    case PIN_TYPE:
 	      c->group = SLayer;	/* any layer will do */
-	      c->X = ((PinTypePtr) c->ptr2)->X;
-	      c->Y = ((PinTypePtr) c->ptr2)->Y;
+	      c->X = ((PinType *) c->ptr2)->X;
+	      c->Y = ((PinType *) c->ptr2)->Y;
 	      break;
 	    default:
 	      Message ("Odd connection type encountered in " "UpdateXY");
@@ -200,7 +196,7 @@ collectSelectedElements ()
   {
     if (TEST_FLAG (SELECTEDFLAG, element))
       {
-	ElementTypePtr *epp = (ElementTypePtr *) GetPointerMemory (&list);
+	ElementType **epp = (ElementType **) GetPointerMemory (&list);
 	*epp = element;
       }
   }
@@ -212,10 +208,10 @@ collectSelectedElements ()
 #include "create.h"
 /* makes a line on the solder layer surrounding all boxes in blist */
 static void
-showboxes (BoxListTypePtr blist)
+showboxes (BoxListType *blist)
 {
   Cardinal i;
-  LayerTypePtr SLayer = &(PCB->Data->Layer[solder_silk_layer]);
+  LayerType *SLayer = &(PCB->Data->Layer[solder_silk_layer]);
   for (i = 0; i < blist->BoxN; i++)
     {
       CreateNewLineOnLayer (SLayer, blist->Box[i].X1, blist->Box[i].Y1,
@@ -327,7 +323,7 @@ r_find_neighbor (rtree_t * rtree, const BoxType * box,
  *  Marcel Dekker, Inc. 1993.  ISBN: 0-8247-8916-4 TK7868.P7.P57 1993
  */
 static double
-ComputeCost (NetListTypePtr Nets, double T0, double T)
+ComputeCost (NetListType *Nets, double T0, double T)
 {
   double W = 0;			/* wire cost */
   double delta1 = 0;		/* wire congestion penalty function */
@@ -350,7 +346,7 @@ ComputeCost (NetListTypePtr Nets, double T0, double T)
    * the "layer height" of the net. */
   for (i = 0; i < Nets->NetN; i++)
     {
-      NetTypePtr n = &Nets->Net[i];
+      NetType *n = &Nets->Net[i];
       if (n->ConnectionN < 2)
 	continue;		/* no cost to go nowhere */
       minx = maxx = n->Connection[0].X;
@@ -360,7 +356,7 @@ ComputeCost (NetListTypePtr Nets, double T0, double T)
       allsameside = true;
       for (j = 1; j < n->ConnectionN; j++)
 	{
-	  ConnectionTypePtr c = &(n->Connection[j]);
+	  ConnectionType *c = &(n->Connection[j]);
 	  MAKEMIN (minx, c->X);
 	  MAKEMAX (maxx, c->X);
 	  MAKEMIN (miny, c->Y);
@@ -372,7 +368,7 @@ ComputeCost (NetListTypePtr Nets, double T0, double T)
 	}
       /* save bounding rectangle */
       {
-	BoxTypePtr box = GetBoxMemory (&bounds);
+	BoxType *box = GetBoxMemory (&bounds);
 	box->X1 = minx;
 	box->Y1 = miny;
 	box->X2 = maxx;
@@ -397,10 +393,10 @@ ComputeCost (NetListTypePtr Nets, double T0, double T)
 
   ELEMENT_LOOP (PCB->Data);
   {
-    BoxListTypePtr thisside;
-    BoxListTypePtr otherside;
-    BoxTypePtr box;
-    BoxTypePtr lastbox = NULL;
+    BoxListType *thisside;
+    BoxListType *otherside;
+    BoxType *box;
+    BoxType *lastbox = NULL;
     Coord thickness;
     Coord clearance;
     if (TEST_FLAG (ONSOLDERFLAG, element))
@@ -518,7 +514,7 @@ ComputeCost (NetListTypePtr Nets, double T0, double T)
     struct ebox
     {
       BoxType box;
-      ElementTypePtr element;
+      ElementType *element;
     };
     direction_t dir[4] = { NORTH, EAST, SOUTH, WEST };
     struct ebox **boxpp, *boxp;
@@ -617,11 +613,11 @@ ComputeCost (NetListTypePtr Nets, double T0, double T)
  *  -- Only perturb selected elements (need count/list of selected?) --
  */
 PerturbationType
-createPerturbation (PointerListTypePtr selected, double T)
+createPerturbation (PointerListType *selected, double T)
 {
   PerturbationType pt = { 0 };
   /* pick element to perturb */
-  pt.element = (ElementTypePtr) selected->Ptr[random () % selected->PtrN];
+  pt.element = (ElementType *) selected->Ptr[random () % selected->PtrN];
   /* exchange, flip/rotate or shift? */
   switch (random () % ((selected->PtrN > 1) ? 3 : 2))
     {
@@ -659,10 +655,10 @@ createPerturbation (PointerListTypePtr selected, double T)
     case 2:
       {				/* exchange! */
 	pt.which = EXCHANGE;
-	pt.other = (ElementTypePtr)
+	pt.other = (ElementType *)
 	  selected->Ptr[random () % (selected->PtrN - 1)];
 	if (pt.other == pt.element)
-	  pt.other = (ElementTypePtr) selected->Ptr[selected->PtrN - 1];
+	  pt.other = (ElementType *) selected->Ptr[selected->PtrN - 1];
 	/* don't allow exchanging a solderside-side SMD component
 	 * with a non-SMD component. */
 	if ((pt.element->PinN != 0 /* non-SMD */  &&
@@ -752,7 +748,7 @@ doPerturb (PerturbationType * pt, bool undo)
 bool
 AutoPlaceSelected (void)
 {
-  NetListTypePtr Nets;
+  NetListType *Nets;
   PointerListType Selected = { 0, 0, NULL };
   PerturbationType pt;
   double C0, T0;
diff --git a/src/autoplace.h b/src/autoplace.h
index 5133cf0..75e4c8f 100644
--- a/src/autoplace.h
+++ b/src/autoplace.h
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
diff --git a/src/autoroute.c b/src/autoroute.c
index 34e01dc..ce75794 100644
--- a/src/autoroute.c
+++ b/src/autoroute.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -86,8 +84,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 /* #defines to enable some debugging output */
 /*
 #define ROUTE_VERBOSE
@@ -235,12 +231,12 @@ typedef struct routebox
   BoxType box, sbox;
   union
   {
-    PadTypePtr pad;
-    PinTypePtr pin;
-    PinTypePtr via;
+    PadType *pad;
+    PinType *pin;
+    PinType *via;
     struct routebox *via_shadow;	/* points to the via in r-tree which
 					 * points to the PinType in the PCB. */
-    LineTypePtr line;
+    LineType *line;
     void *generic;		/* 'other' is polygon, arc, text */
     struct routebox *expansion_area;	/* previous expansion area in search */
   }
@@ -643,7 +639,7 @@ point_in_shrunk_box (const routebox_t * box, Coord X, Coord Y)
  */
 
 static routebox_t *
-AddPin (PointerListType layergroupboxes[], PinTypePtr pin, bool is_via,
+AddPin (PointerListType layergroupboxes[], PinType *pin, bool is_via,
 	RouteStyleType * style)
 {
   routebox_t **rbpp, *lastrb = NULL;
@@ -691,7 +687,7 @@ AddPin (PointerListType layergroupboxes[], PinTypePtr pin, bool is_via,
 }
 static routebox_t *
 AddPad (PointerListType layergroupboxes[],
-	ElementTypePtr element, PadTypePtr pad, RouteStyleType * style)
+	ElementType *element, PadType *pad, RouteStyleType * style)
 {
   Coord halfthick;
   routebox_t **rbpp;
@@ -725,8 +721,8 @@ AddPad (PointerListType layergroupboxes[],
   return *rbpp;
 }
 static routebox_t *
-AddLine (PointerListType layergroupboxes[], int layergroup, LineTypePtr line,
-	 LineTypePtr ptr, RouteStyleType * style)
+AddLine (PointerListType layergroupboxes[], int layergroup, LineType *line,
+	 LineType *ptr, RouteStyleType * style)
 {
   routebox_t **rbpp;
   assert (layergroupboxes && line);
@@ -798,7 +794,7 @@ AddIrregularObstacle (PointerListType layergroupboxes[],
 
 static routebox_t *
 AddPolygon (PointerListType layergroupboxes[], Cardinal layer,
-	    PolygonTypePtr polygon, RouteStyleType * style)
+	    PolygonType *polygon, RouteStyleType * style)
 {
   int is_not_rectangle = 1;
   int layergroup = GetLayerGroupNumberByNumber (layer);
@@ -834,7 +830,7 @@ AddPolygon (PointerListType layergroupboxes[], Cardinal layer,
 }
 static void
 AddText (PointerListType layergroupboxes[], Cardinal layergroup,
-	 TextTypePtr text, RouteStyleType * style)
+	 TextType *text, RouteStyleType * style)
 {
   AddIrregularObstacle (layergroupboxes,
 			text->BoundingBox.X1, text->BoundingBox.Y1,
@@ -843,7 +839,7 @@ AddText (PointerListType layergroupboxes[], Cardinal layergroup,
 }
 static routebox_t *
 AddArc (PointerListType layergroupboxes[], Cardinal layergroup,
-	ArcTypePtr arc, RouteStyleType * style)
+	ArcType *arc, RouteStyleType * style)
 {
   return AddIrregularObstacle (layergroupboxes,
 			       arc->BoundingBox.X1, arc->BoundingBox.Y1,
@@ -1028,7 +1024,6 @@ CreateRouteData ()
    * this saves on searching the trees to find the nets
    */
   /* use the DRCFLAG to mark objects as they are entered */
-  ResetConnections (false);
   Nets = CollectSubnets (false);
   {
     routebox_t *last_net = NULL;
@@ -1046,7 +1041,7 @@ CreateRouteData ()
 	CONNECTION_LOOP (net);
 	{
 	  routebox_t *rb = NULL;
-	  SET_FLAG (DRCFLAG, (PinTypePtr) connection->ptr2);
+	  SET_FLAG (DRCFLAG, (PinType *) connection->ptr2);
 	  if (connection->type == LINE_TYPE)
 	    {
 	      LineType *line = (LineType *) connection->ptr2;
@@ -1464,8 +1459,8 @@ bloat_routebox (routebox_t * rb)
 void
 showbox (BoxType b, Dimension thickness, int group)
 {
-  LineTypePtr line;
-  LayerTypePtr SLayer = LAYER_PTR (group);
+  LineType *line;
+  LayerType *SLayer = LAYER_PTR (group);
   if (showboxen < -1)
     return;
   if (showboxen != -1 && showboxen != group)
@@ -1473,14 +1468,14 @@ showbox (BoxType b, Dimension thickness, int group)
 
   if (ddraw != NULL)
     {
-      ddraw->set_line_width (ar_gc, thickness);
-      ddraw->set_line_cap (ar_gc, Trace_Cap);
-      ddraw->set_color (ar_gc, SLayer->Color);
-
-      ddraw->draw_line (ar_gc, b.X1, b.Y1, b.X2, b.Y1);
-      ddraw->draw_line (ar_gc, b.X1, b.Y2, b.X2, b.Y2);
-      ddraw->draw_line (ar_gc, b.X1, b.Y1, b.X1, b.Y2);
-      ddraw->draw_line (ar_gc, b.X2, b.Y1, b.X2, b.Y2);
+      ddraw->graphics->set_line_width (ar_gc, thickness);
+      ddraw->graphics->set_line_cap (ar_gc, Trace_Cap);
+      ddraw->graphics->set_color (ar_gc, SLayer->Color);
+
+      ddraw->graphics->draw_line (ar_gc, b.X1, b.Y1, b.X2, b.Y1);
+      ddraw->graphics->draw_line (ar_gc, b.X1, b.Y2, b.X2, b.Y2);
+      ddraw->graphics->draw_line (ar_gc, b.X1, b.Y1, b.X1, b.Y2);
+      ddraw->graphics->draw_line (ar_gc, b.X2, b.Y1, b.X2, b.Y2);
     }
 
 #if 1
@@ -1529,23 +1524,23 @@ showedge (edge_t * e)
   if (ddraw == NULL)
     return;
 
-  ddraw->set_line_cap (ar_gc, Trace_Cap);
-  ddraw->set_line_width (ar_gc, 1);
-  ddraw->set_color (ar_gc, Settings.MaskColor);
+  ddraw->graphics->set_line_cap (ar_gc, Trace_Cap);
+  ddraw->graphics->set_line_width (ar_gc, 1);
+  ddraw->graphics->set_color (ar_gc, Settings.MaskColor);
 
   switch (e->expand_dir)
     {
     case NORTH:
-      ddraw->draw_line (ar_gc, b->X1, b->Y1, b->X2, b->Y1);
+      ddraw->graphics->draw_line (ar_gc, b->X1, b->Y1, b->X2, b->Y1);
       break;
     case SOUTH:
-      ddraw->draw_line (ar_gc, b->X1, b->Y2, b->X2, b->Y2);
+      ddraw->graphics->draw_line (ar_gc, b->X1, b->Y2, b->X2, b->Y2);
       break;
     case WEST:
-      ddraw->draw_line (ar_gc, b->X1, b->Y1, b->X1, b->Y2);
+      ddraw->graphics->draw_line (ar_gc, b->X1, b->Y1, b->X1, b->Y2);
       break;
     case EAST:
-      ddraw->draw_line (ar_gc, b->X2, b->Y1, b->X2, b->Y2);
+      ddraw->graphics->draw_line (ar_gc, b->X2, b->Y1, b->X2, b->Y2);
       break;
     default:
       break;
@@ -4967,7 +4962,7 @@ out:
 
 struct fpin_info
 {
-  PinTypePtr pin;
+  PinType *pin;
   Coord X, Y;
   jmp_buf env;
 };
@@ -4975,18 +4970,18 @@ struct fpin_info
 static int
 fpin_rect (const BoxType * b, void *cl)
 {
-  PinTypePtr pin = (PinTypePtr) b;
+  PinType *pin = (PinType *) b;
   struct fpin_info *info = (struct fpin_info *) cl;
   if (pin->X == info->X && pin->Y == info->Y)
     {
-      info->pin = (PinTypePtr) b;
+      info->pin = (PinType *) b;
       longjmp (info->env, 1);
     }
   return 0;
 }
 
 static int
-FindPin (const BoxType * box, PinTypePtr * pin)
+FindPin (const BoxType * box, PinType ** pin)
 {
   struct fpin_info info;
 
@@ -5018,7 +5013,7 @@ bool
 IronDownAllUnfixedPaths (routedata_t * rd)
 {
   bool changed = false;
-  LayerTypePtr layer;
+  LayerType *layer;
   routebox_t *net, *p;
   int i;
   LIST_LOOP (rd->first_net, different_net, net);
@@ -5127,7 +5122,7 @@ IronDownAllUnfixedPaths (routedata_t * rd)
     {
       if (p->type == THERMAL)
 	{
-	  PinTypePtr pin = NULL;
+	  PinType *pin = NULL;
 	  /* thermals are alread a single point search, no need to shrink */
 	  int type = FindPin (&p->box, &pin);
 	  if (pin)
@@ -5170,8 +5165,8 @@ AutoRoute (bool selected)
   ddraw = gui->request_debug_draw ();
   if (ddraw != NULL)
     {
-      ar_gc = ddraw->make_gc ();
-      ddraw->set_line_cap (ar_gc, Round_Cap);
+      ar_gc = ddraw->graphics->make_gc ();
+      ddraw->graphics->set_line_cap (ar_gc, Round_Cap);
     }
 #endif
 
@@ -5188,7 +5183,6 @@ AutoRoute (bool selected)
     }
   if (PCB->Data->RatN == 0)
     return (false);
-  SaveFindFlag (DRCFLAG);
   rd = CreateRouteData ();
 
   if (1)
@@ -5214,29 +5208,26 @@ AutoRoute (bool selected)
 	  if (!selected || TEST_FLAG (SELECTEDFLAG, line))
 	    {
 	      /* look up the end points of this rat line */
-	      routebox_t *a;
-	      routebox_t *b;
-	      a =
+	      routebox_t *a =
 		FindRouteBoxOnLayerGroup (rd, line->Point1.X,
 					  line->Point1.Y, line->group1);
-	      b =
+	      routebox_t *b =
 		FindRouteBoxOnLayerGroup (rd, line->Point2.X,
 					  line->Point2.Y, line->group2);
-	      assert (a != NULL && b != NULL);
-	      assert (a->style == b->style);
-/*
-	      if (a->type != PAD && b->type == PAD)
-	        {
-	          routebox_t *t = a;
-		  a = b;
-		  b = t;
-	        }
-*/
-	      /* route exactly one net, without allowing conflicts */
-	      InitAutoRouteParameters (0, a->style, false, true, true);
-	      /* hace planes work better as sources than targets */
-	      changed = RouteOne (rd, a, b, 150000).found_route || changed;
-	      goto donerouting;
+
+              /* If the rat starts or ends at a non-straight pad (i.e., at a
+               * rotated SMD), a or b will be NULL since the autorouter can't
+               * handle these.
+               */
+              if (a != NULL && b != NULL)
+                {
+                  assert (a->style == b->style);
+                  /* route exactly one net, without allowing conflicts */
+                  InitAutoRouteParameters (0, a->style, false, true, true);
+                  /* hace planes work better as sources than targets */
+                  changed = RouteOne (rd, a, b, 150000).found_route || changed;
+                  goto donerouting;
+                }
 	    }
 	  END_LOOP;
 	}
@@ -5340,7 +5331,10 @@ donerouting:
     }
 #ifdef ROUTE_DEBUG
   if (ddraw != NULL)
-    ddraw->finish_debug_draw ();
+    {
+      ddraw->graphics->destroy_gc (ar_gc);
+      ddraw->finish_debug_draw ();
+    }
 #endif
 
   if (changed)
@@ -5362,7 +5356,6 @@ donerouting:
 
       Redraw ();
     }
-  RestoreFindFlag ();
 #if defined (ROUTE_DEBUG)
   aabort = 0;
 #endif
diff --git a/src/autoroute.h b/src/autoroute.h
index d659349..256a495 100644
--- a/src/autoroute.h
+++ b/src/autoroute.h
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
diff --git a/src/box.h b/src/box.h
index 1c8311a..943b316 100644
--- a/src/box.h
+++ b/src/box.h
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
diff --git a/src/buffer.c b/src/buffer.c
index ac2aa54..f675add 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -62,33 +60,31 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static void *AddViaToBuffer (PinTypePtr);
-static void *AddLineToBuffer (LayerTypePtr, LineTypePtr);
-static void *AddArcToBuffer (LayerTypePtr, ArcTypePtr);
-static void *AddRatToBuffer (RatTypePtr);
-static void *AddTextToBuffer (LayerTypePtr, TextTypePtr);
-static void *AddPolygonToBuffer (LayerTypePtr, PolygonTypePtr);
-static void *AddElementToBuffer (ElementTypePtr);
-static void *MoveViaToBuffer (PinTypePtr);
-static void *MoveLineToBuffer (LayerTypePtr, LineTypePtr);
-static void *MoveArcToBuffer (LayerTypePtr, ArcTypePtr);
-static void *MoveRatToBuffer (RatTypePtr);
-static void *MoveTextToBuffer (LayerTypePtr, TextTypePtr);
-static void *MovePolygonToBuffer (LayerTypePtr, PolygonTypePtr);
-static void *MoveElementToBuffer (ElementTypePtr);
-static void SwapBuffer (BufferTypePtr);
+static void *AddViaToBuffer (PinType *);
+static void *AddLineToBuffer (LayerType *, LineType *);
+static void *AddArcToBuffer (LayerType *, ArcType *);
+static void *AddRatToBuffer (RatType *);
+static void *AddTextToBuffer (LayerType *, TextType *);
+static void *AddPolygonToBuffer (LayerType *, PolygonType *);
+static void *AddElementToBuffer (ElementType *);
+static void *MoveViaToBuffer (PinType *);
+static void *MoveLineToBuffer (LayerType *, LineType *);
+static void *MoveArcToBuffer (LayerType *, ArcType *);
+static void *MoveRatToBuffer (RatType *);
+static void *MoveTextToBuffer (LayerType *, TextType *);
+static void *MovePolygonToBuffer (LayerType *, PolygonType *);
+static void *MoveElementToBuffer (ElementType *);
+static void SwapBuffer (BufferType *);
 
 #define ARG(n) (argc > (n) ? argv[n] : 0)
 
 /* ---------------------------------------------------------------------------
  * some local identifiers
  */
-static DataTypePtr Dest, Source;
+static DataType *Dest, *Source;
 
 static ObjectFunctionType AddBufferFunctions = {
   AddLineToBuffer,
@@ -119,39 +115,39 @@ static int ExtraFlag = 0;
  * copies a via to paste buffer
  */
 static void *
-AddViaToBuffer (PinTypePtr Via)
+AddViaToBuffer (PinType *Via)
 {
   return (CreateNewVia (Dest, Via->X, Via->Y, Via->Thickness, Via->Clearance,
 			Via->Mask, Via->DrillingHole, Via->Name,
-			MaskFlags (Via->Flags, FOUNDFLAG | ExtraFlag)));
+			MaskFlags (Via->Flags, NOCOPY_FLAGS | ExtraFlag)));
 }
 
 /* ---------------------------------------------------------------------------
  * copies a rat-line to paste buffer
  */
 static void *
-AddRatToBuffer (RatTypePtr Rat)
+AddRatToBuffer (RatType *Rat)
 {
   return (CreateNewRat (Dest, Rat->Point1.X, Rat->Point1.Y,
 			Rat->Point2.X, Rat->Point2.Y, Rat->group1,
 			Rat->group2, Rat->Thickness,
-			MaskFlags (Rat->Flags, FOUNDFLAG | ExtraFlag)));
+			MaskFlags (Rat->Flags, NOCOPY_FLAGS | ExtraFlag)));
 }
 
 /* ---------------------------------------------------------------------------
  * copies a line to buffer  
  */
 static void *
-AddLineToBuffer (LayerTypePtr Layer, LineTypePtr Line)
+AddLineToBuffer (LayerType *Layer, LineType *Line)
 {
-  LineTypePtr line;
-  LayerTypePtr layer = &Dest->Layer[GetLayerNumber (Source, Layer)];
+  LineType *line;
+  LayerType *layer = &Dest->Layer[GetLayerNumber (Source, Layer)];
 
   line = CreateNewLineOnLayer (layer, Line->Point1.X, Line->Point1.Y,
 			       Line->Point2.X, Line->Point2.Y,
 			       Line->Thickness, Line->Clearance,
 			       MaskFlags (Line->Flags,
-					  FOUNDFLAG | ExtraFlag));
+					  NOCOPY_FLAGS | ExtraFlag));
   if (line && Line->Number)
     line->Number = strdup (Line->Number);
   return (line);
@@ -161,24 +157,24 @@ AddLineToBuffer (LayerTypePtr Layer, LineTypePtr Line)
  * copies an arc to buffer  
  */
 static void *
-AddArcToBuffer (LayerTypePtr Layer, ArcTypePtr Arc)
+AddArcToBuffer (LayerType *Layer, ArcType *Arc)
 {
-  LayerTypePtr layer = &Dest->Layer[GetLayerNumber (Source, Layer)];
+  LayerType *layer = &Dest->Layer[GetLayerNumber (Source, Layer)];
 
   return (CreateNewArcOnLayer (layer, Arc->X, Arc->Y,
 			       Arc->Width, Arc->Height, Arc->StartAngle, Arc->Delta,
 			       Arc->Thickness, Arc->Clearance,
 			       MaskFlags (Arc->Flags,
-					  FOUNDFLAG | ExtraFlag)));
+					  NOCOPY_FLAGS | ExtraFlag)));
 }
 
 /* ---------------------------------------------------------------------------
  * copies a text to buffer
  */
 static void *
-AddTextToBuffer (LayerTypePtr Layer, TextTypePtr Text)
+AddTextToBuffer (LayerType *Layer, TextType *Text)
 {
-  LayerTypePtr layer = &Dest->Layer[GetLayerNumber (Source, Layer)];
+  LayerType *layer = &Dest->Layer[GetLayerNumber (Source, Layer)];
 
   return (CreateNewText (layer, &PCB->Font, Text->X, Text->Y,
 			 Text->Direction, Text->Scale, Text->TextString,
@@ -189,10 +185,10 @@ AddTextToBuffer (LayerTypePtr Layer, TextTypePtr Text)
  * copies a polygon to buffer
  */
 static void *
-AddPolygonToBuffer (LayerTypePtr Layer, PolygonTypePtr Polygon)
+AddPolygonToBuffer (LayerType *Layer, PolygonType *Polygon)
 {
-  LayerTypePtr layer = &Dest->Layer[GetLayerNumber (Source, Layer)];
-  PolygonTypePtr polygon;
+  LayerType *layer = &Dest->Layer[GetLayerNumber (Source, Layer)];
+  PolygonType *polygon;
 
   polygon = CreateNewPolygon (layer, Polygon->Flags);
   CopyPolygonLowLevel (polygon, Polygon);
@@ -205,7 +201,7 @@ AddPolygonToBuffer (LayerTypePtr Layer, PolygonTypePtr Polygon)
     layer->polygon_tree = r_create_tree (NULL, 0, 0);
   r_insert_entry (layer->polygon_tree, (BoxType *)polygon, 0);
 
-  CLEAR_FLAG (FOUNDFLAG | ExtraFlag, polygon);
+  CLEAR_FLAG (NOCOPY_FLAGS | ExtraFlag, polygon);
   return (polygon);
 }
 
@@ -213,32 +209,9 @@ AddPolygonToBuffer (LayerTypePtr Layer, PolygonTypePtr Polygon)
  * copies a element to buffer
  */
 static void *
-AddElementToBuffer (ElementTypePtr Element)
+AddElementToBuffer (ElementType *Element)
 {
-  ElementTypePtr element;
-
-  element = GetElementMemory (Dest);
-  CopyElementLowLevel (Dest, element, Element, false, 0, 0);
-  CLEAR_FLAG (ExtraFlag, element);
-  if (ExtraFlag)
-    {
-      ELEMENTTEXT_LOOP (element);
-      {
-	CLEAR_FLAG (ExtraFlag, text);
-      }
-      END_LOOP;
-      PIN_LOOP (element);
-      {
-	CLEAR_FLAG (FOUNDFLAG | ExtraFlag, pin);
-      }
-      END_LOOP;
-      PAD_LOOP (element);
-      {
-	CLEAR_FLAG (FOUNDFLAG | ExtraFlag, pad);
-      }
-      END_LOOP;
-    }
-  return (element);
+  return CopyElementLowLevel (Dest, Element, false, 0, 0, NOCOPY_FLAGS | ExtraFlag);
 }
 
 /* ---------------------------------------------------------------------------
@@ -255,7 +228,7 @@ MoveViaToBuffer (PinType *via)
   Dest->Via = g_list_append (Dest->Via, via);
   Dest->ViaN ++;
 
-  CLEAR_FLAG (WARNFLAG | FOUNDFLAG, via);
+  CLEAR_FLAG (WARNFLAG | NOCOPY_FLAGS, via);
 
   if (!Dest->via_tree)
     Dest->via_tree = r_create_tree (NULL, 0, 0);
@@ -277,7 +250,7 @@ MoveRatToBuffer (RatType *rat)
   Dest->Rat = g_list_append (Dest->Rat, rat);
   Dest->RatN ++;
 
-  CLEAR_FLAG (FOUNDFLAG, rat);
+  CLEAR_FLAG (NOCOPY_FLAGS, rat);
 
   if (!Dest->rat_tree)
     Dest->rat_tree = r_create_tree (NULL, 0, 0);
@@ -291,7 +264,7 @@ MoveRatToBuffer (RatType *rat)
 static void *
 MoveLineToBuffer (LayerType *layer, LineType *line)
 {
-  LayerTypePtr lay = &Dest->Layer[GetLayerNumber (Source, layer)];
+  LayerType *lay = &Dest->Layer[GetLayerNumber (Source, layer)];
 
   RestoreToPolygon (Source, LINE_TYPE, layer, line);
   r_delete_entry (layer->line_tree, (BoxType *)line);
@@ -301,7 +274,7 @@ MoveLineToBuffer (LayerType *layer, LineType *line)
   lay->Line = g_list_append (lay->Line, line);
   lay->LineN ++;
 
-  CLEAR_FLAG (FOUNDFLAG, line);
+  CLEAR_FLAG (NOCOPY_FLAGS, line);
 
   if (!lay->line_tree)
     lay->line_tree = r_create_tree (NULL, 0, 0);
@@ -326,7 +299,7 @@ MoveArcToBuffer (LayerType *layer, ArcType *arc)
   lay->Arc = g_list_append (lay->Arc, arc);
   lay->ArcN ++;
 
-  CLEAR_FLAG (FOUNDFLAG, arc);
+  CLEAR_FLAG (NOCOPY_FLAGS, arc);
 
   if (!lay->arc_tree)
     lay->arc_tree = r_create_tree (NULL, 0, 0);
@@ -373,7 +346,7 @@ MovePolygonToBuffer (LayerType *layer, PolygonType *polygon)
   lay->Polygon = g_list_append (lay->Polygon, polygon);
   lay->PolygonN ++;
 
-  CLEAR_FLAG (FOUNDFLAG, polygon);
+  CLEAR_FLAG (NOCOPY_FLAGS, polygon);
 
   if (!lay->polygon_tree)
     lay->polygon_tree = r_create_tree (NULL, 0, 0);
@@ -401,13 +374,13 @@ MoveElementToBuffer (ElementType *element)
   PIN_LOOP (element);
   {
     RestoreToPolygon(Source, PIN_TYPE, element, pin);
-    CLEAR_FLAG (WARNFLAG | FOUNDFLAG, pin);
+    CLEAR_FLAG (WARNFLAG | NOCOPY_FLAGS, pin);
   }
   END_LOOP;
   PAD_LOOP (element);
   {
     RestoreToPolygon(Source, PAD_TYPE, element, pad);
-    CLEAR_FLAG (WARNFLAG | FOUNDFLAG, pad);
+    CLEAR_FLAG (WARNFLAG | NOCOPY_FLAGS, pad);
   }
   END_LOOP;
   SetElementBoundingBox (Dest, element, &PCB->Font);
@@ -432,9 +405,9 @@ MoveElementToBuffer (ElementType *element)
  * calculates the bounding box of the buffer
  */
 void
-SetBufferBoundingBox (BufferTypePtr Buffer)
+SetBufferBoundingBox (BufferType *Buffer)
 {
-  BoxTypePtr box = GetDataBoundingBox (Buffer->Data);
+  BoxType *box = GetDataBoundingBox (Buffer->Data);
 
   if (box)
     Buffer->BoundingBox = *box;
@@ -444,7 +417,7 @@ SetBufferBoundingBox (BufferTypePtr Buffer)
  * clears the contents of the paste buffer
  */
 void
-ClearBuffer (BufferTypePtr Buffer)
+ClearBuffer (BufferType *Buffer)
 {
   if (Buffer && Buffer->Data)
     {
@@ -458,7 +431,7 @@ ClearBuffer (BufferTypePtr Buffer)
  * returns true if any objects have been removed
  */
 void
-AddSelectedToBuffer (BufferTypePtr Buffer, Coord X, Coord Y, bool LeaveSelected)
+AddSelectedToBuffer (BufferType *Buffer, Coord X, Coord Y, bool LeaveSelected)
 {
   /* switch crosshair off because adding objects to the pastebuffer
    * may change the 'valid' area for the cursor
@@ -492,9 +465,9 @@ AddSelectedToBuffer (BufferTypePtr Buffer, Coord X, Coord Y, bool LeaveSelected)
  * if successful, update some other stuff and reposition the pastebuffer
  */
 bool
-LoadElementToBuffer (BufferTypePtr Buffer, char *Name, bool FromFile)
+LoadElementToBuffer (BufferType *Buffer, char *Name, bool FromFile)
 {
-  ElementTypePtr element;
+  ElementType *element;
 
   ClearBuffer (Buffer);
   if (FromFile)
@@ -720,7 +693,7 @@ search_footprint_hash (const char *footprint)
 
 /* Returns zero on success, non-zero on error.  */
 int
-LoadFootprintByName (BufferTypePtr Buffer, char *Footprint)
+LoadFootprintByName (BufferType *Buffer, char *Footprint)
 {
   int i;
   FootprintHashEntry *fpe;
@@ -741,7 +714,7 @@ LoadFootprintByName (BufferTypePtr Buffer, char *Footprint)
     }
   if (!fpe)
     {
-      Message("Unable to load footprint %s\n", Footprint);
+      Message(_("Unable to load footprint %s\n"), Footprint);
       return 1;
     }
 
@@ -802,9 +775,11 @@ LoadFootprintByName (BufferTypePtr Buffer, char *Footprint)
 }
 
 
-static const char loadfootprint_syntax[] = "LoadFootprint(filename[,refdes,value])";
+static const char loadfootprint_syntax[] =
+  N_("LoadFootprint(filename[,refdes,value])");
 
-static const char loadfootprint_help[] = "Loads a single footprint by name.";
+static const char loadfootprint_help[] =
+  N_("Loads a single footprint by name.");
 
 /* %start-doc actions LoadFootprint
 
@@ -820,7 +795,7 @@ LoadFootprint (int argc, char **argv, Coord x, Coord y)
   char *name = ARG(0);
   char *refdes = ARG(1);
   char *value = ARG(2);
-  ElementTypePtr e;
+  ElementType *e;
 
   if (!name)
     AFAIL (loadfootprint);
@@ -830,12 +805,12 @@ LoadFootprint (int argc, char **argv, Coord x, Coord y)
 
   if (PASTEBUFFER->Data->ElementN == 0)
     {
-      Message("Footprint %s contains no elements", name);
+      Message(_("Footprint %s contains no elements"), name);
       return 1;
     }
   if (PASTEBUFFER->Data->ElementN > 1)
     {
-      Message("Footprint %s contains multiple elements", name);
+      Message(_("Footprint %s contains multiple elements"), name);
       return 1;
     }
 
@@ -861,11 +836,11 @@ LoadFootprint (int argc, char **argv, Coord x, Coord y)
  * break buffer element into pieces
  */
 bool
-SmashBufferElement (BufferTypePtr Buffer)
+SmashBufferElement (BufferType *Buffer)
 {
-  ElementTypePtr element;
+  ElementType *element;
   Cardinal group;
-  LayerTypePtr clayer, slayer;
+  LayerType *clayer, *slayer;
 
   if (Buffer->Data->ElementN != 1)
     {
@@ -924,7 +899,7 @@ SmashBufferElement (BufferTypePtr Buffer)
   slayer = &Buffer->Data->Layer[PCB->LayerGroups.Entries[group][0]];
   PAD_LOOP (element);
   {
-    LineTypePtr line;
+    LineType *line;
     line = CreateNewLineOnLayer (TEST_FLAG (ONSOLDERFLAG, pad) ? slayer : clayer,
 				 pad->Point1.X, pad->Point1.Y,
 				 pad->Point2.X, pad->Point2.Y,
@@ -944,7 +919,7 @@ SmashBufferElement (BufferTypePtr Buffer)
  */
 
 static int
-polygon_is_rectangle (PolygonTypePtr poly)
+polygon_is_rectangle (PolygonType *poly)
 {
   int i, best;
   PointType temp[4];
@@ -980,9 +955,9 @@ polygon_is_rectangle (PolygonTypePtr poly)
  * convert buffer contents into an element
  */
 bool
-ConvertBufferToElement (BufferTypePtr Buffer)
+ConvertBufferToElement (BufferType *Buffer)
 {
-  ElementTypePtr Element;
+  ElementType *Element;
   Cardinal group;
   Cardinal pin_n = 1;
   bool hasParts = false, crooked = false;
@@ -992,7 +967,7 @@ ConvertBufferToElement (BufferTypePtr Buffer)
   if (Buffer->Data->pcb == 0)
     Buffer->Data->pcb = PCB;
 
-  Element = CreateNewElement (PCB->Data, NULL, &PCB->Font, NoFlags (),
+  Element = CreateNewElement (PCB->Data, &PCB->Font, NoFlags (),
 			      NULL, NULL, NULL, PASTEBUFFER->X,
 			      PASTEBUFFER->Y, 0, 100,
 			      MakeFlags (SWAP_IDENT ? ONSOLDERFLAG : NOFLAG),
@@ -1008,7 +983,7 @@ ConvertBufferToElement (BufferTypePtr Buffer)
       CreateNewPin (Element, via->X, via->Y, via->Thickness,
 		    via->Clearance, via->Mask, via->DrillingHole,
 		    NULL, via->Name, MaskFlags (via->Flags,
-						VIAFLAG | FOUNDFLAG |
+						VIAFLAG | NOCOPY_FLAGS |
 						SELECTEDFLAG | WARNFLAG));
     else
       {
@@ -1016,7 +991,7 @@ ConvertBufferToElement (BufferTypePtr Buffer)
 	CreateNewPin (Element, via->X, via->Y, via->Thickness,
 		      via->Clearance, via->Mask, via->DrillingHole,
 		      NULL, num, MaskFlags (via->Flags,
-					    VIAFLAG | FOUNDFLAG | SELECTEDFLAG
+					    VIAFLAG | NOCOPY_FLAGS | SELECTEDFLAG
 					    | WARNFLAG));
       }
     hasParts = true;
@@ -1148,9 +1123,9 @@ ConvertBufferToElement (BufferTypePtr Buffer)
  * if successful, update some other stuff
  */
 bool
-LoadLayoutToBuffer (BufferTypePtr Buffer, char *Filename)
+LoadLayoutToBuffer (BufferType *Buffer, char *Filename)
 {
-  PCBTypePtr newPCB = CreateNewPCB (false);
+  PCBType *newPCB = CreateNewPCB (false);
 
   /* new data isn't added to the undo list */
   if (!ParsePCB (newPCB, Filename))
@@ -1177,7 +1152,7 @@ LoadLayoutToBuffer (BufferTypePtr Buffer, char *Filename)
  * rotates the contents of the pastebuffer
  */
 void
-RotateBuffer (BufferTypePtr Buffer, BYTE Number)
+RotateBuffer (BufferType *Buffer, BYTE Number)
 {
   /* rotate vias */
   VIA_LOOP (Buffer->Data);
@@ -1230,6 +1205,7 @@ RotateBuffer (BufferTypePtr Buffer, BYTE Number)
   /* finally the origin and the bounding box */
   ROTATE (Buffer->X, Buffer->Y, Buffer->X, Buffer->Y, Number);
   RotateBoxLowLevel (&Buffer->BoundingBox, Buffer->X, Buffer->Y, Number);
+  SetCrosshairRangeToBuffer ();
 }
 
 static void
@@ -1247,7 +1223,7 @@ free_rotate (Coord *x, Coord *y, Coord cx, Coord cy, double cosa, double sina)
 }
 
 void
-FreeRotateElementLowLevel (DataTypePtr Data, ElementTypePtr Element,
+FreeRotateElementLowLevel (DataType *Data, ElementType *Element,
 			   Coord X, Coord Y,
 			   double cosa, double sina, Angle angle)
 {
@@ -1306,7 +1282,7 @@ FreeRotateElementLowLevel (DataTypePtr Data, ElementTypePtr Element,
 }
 
 void
-FreeRotateBuffer (BufferTypePtr Buffer, Angle angle)
+FreeRotateBuffer (BufferType *Buffer, Angle angle)
 {
   double cosa, sina;
 
@@ -1364,18 +1340,19 @@ FreeRotateBuffer (BufferTypePtr Buffer, Angle angle)
   ENDALL_LOOP;
 
   SetBufferBoundingBox (Buffer);
+  SetCrosshairRangeToBuffer ();
 }
 
 
 /* -------------------------------------------------------------------------- */
 
 static const char freerotatebuffer_syntax[] =
-  "FreeRotateBuffer([Angle])";
+  N_("FreeRotateBuffer([Angle])");
 
 static const char freerotatebuffer_help[] =
-  "Rotates the current paste buffer contents by the specified angle.  The\n"
+  N_("Rotates the current paste buffer contents by the specified angle.  The\n"
   "angle is given in degrees.  If no angle is given, the user is prompted\n"
-  "for one.\n";
+  "for one.\n");
 
 /* %start-doc actions FreeRotateBuffer
    
@@ -1390,7 +1367,7 @@ ActionFreeRotateBuffer(int argc, char **argv, Coord x, Coord y)
   char *angle_s;
 
   if (argc < 1)
-    angle_s = gui->prompt_for ("Enter Rotation (degrees, CCW):", "0");
+    angle_s = gui->prompt_for (_("Enter Rotation (degrees, CCW):"), "0");
   else
     angle_s = argv[0];
 
@@ -1423,7 +1400,7 @@ SwapBuffers (void)
 }
 
 void
-MirrorBuffer (BufferTypePtr Buffer)
+MirrorBuffer (BufferType *Buffer)
 {
   int i;
 
@@ -1434,7 +1411,7 @@ MirrorBuffer (BufferTypePtr Buffer)
     }
   for (i = 0; i < max_copper_layer + 2; i++)
     {
-      LayerTypePtr layer = Buffer->Data->Layer + i;
+      LayerType *layer = Buffer->Data->Layer + i;
       if (layer->TextN)
 	{
 	  Message (_("You can't mirror a buffer that has text!\n"));
@@ -1479,6 +1456,7 @@ MirrorBuffer (BufferTypePtr Buffer)
   }
   ENDALL_LOOP;
   SetBufferBoundingBox (Buffer);
+  SetCrosshairRangeToBuffer ();
 }
 
 
@@ -1486,7 +1464,7 @@ MirrorBuffer (BufferTypePtr Buffer)
  * flip components/tracks from one side to the other
  */
 static void
-SwapBuffer (BufferTypePtr Buffer)
+SwapBuffer (BufferType *Buffer)
 {
   int j, k;
   Cardinal sgroup, cgroup;
@@ -1605,6 +1583,7 @@ SwapBuffer (BufferTypePtr Buffer)
 	}
     }
   SetBufferBoundingBox (Buffer);
+  SetCrosshairRangeToBuffer ();
 }
 
 /* ----------------------------------------------------------------------
@@ -1612,7 +1591,7 @@ SwapBuffer (BufferTypePtr Buffer)
  * from its original place
  */
 void *
-MoveObjectToBuffer (DataTypePtr Destination, DataTypePtr Src,
+MoveObjectToBuffer (DataType *Destination, DataType *Src,
 		    int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 {
   /* setup local identifiers used by move operations */
@@ -1625,7 +1604,7 @@ MoveObjectToBuffer (DataTypePtr Destination, DataTypePtr Src,
  * Adds the passed object to the passed buffer
  */
 void *
-CopyObjectToBuffer (DataTypePtr Destination, DataTypePtr Src,
+CopyObjectToBuffer (DataType *Destination, DataType *Src,
 		    int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 {
   /* setup local identifiers used by Add operations */
diff --git a/src/buffer.h b/src/buffer.h
index e589fd4..6a264ea 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for buffer handling routines
@@ -36,20 +35,20 @@
 /* ---------------------------------------------------------------------------
  * prototypes
  */
-void SetBufferBoundingBox (BufferTypePtr);
-void ClearBuffer (BufferTypePtr);
-void AddSelectedToBuffer (BufferTypePtr, Coord, Coord, bool);
-bool LoadElementToBuffer (BufferTypePtr, char *, bool);
-bool ConvertBufferToElement (BufferTypePtr);
-bool SmashBufferElement (BufferTypePtr);
-bool LoadLayoutToBuffer (BufferTypePtr, char *);
-void RotateBuffer (BufferTypePtr, BYTE);
+void SetBufferBoundingBox (BufferType *);
+void ClearBuffer (BufferType *);
+void AddSelectedToBuffer (BufferType *, Coord, Coord, bool);
+bool LoadElementToBuffer (BufferType *, char *, bool);
+bool ConvertBufferToElement (BufferType *);
+bool SmashBufferElement (BufferType *);
+bool LoadLayoutToBuffer (BufferType *, char *);
+void RotateBuffer (BufferType *, BYTE);
 void SelectPasteBuffer (int);
 void SwapBuffers (void);
-void MirrorBuffer (BufferTypePtr);
+void MirrorBuffer (BufferType *);
 void InitBuffers (void);
-void *MoveObjectToBuffer (DataTypePtr, DataTypePtr, int, void *, void *, void *); 
-void *CopyObjectToBuffer (DataTypePtr, DataTypePtr, int,
+void *MoveObjectToBuffer (DataType *, DataType *, int, void *, void *, void *); 
+void *CopyObjectToBuffer (DataType *, DataType *, int,
 			  void *, void *, void *);
 
 /* This action is called from ActionElementAddIf() */
diff --git a/src/change.c b/src/change.c
index eca110e..7e95672 100644
--- a/src/change.c
+++ b/src/change.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -63,73 +61,71 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static void *ChangePinSize (ElementTypePtr, PinTypePtr);
-static void *ChangePinClearSize (ElementTypePtr, PinTypePtr);
-static void *ChangePinMaskSize (ElementTypePtr, PinTypePtr);
-static void *ChangePadSize (ElementTypePtr, PadTypePtr);
-static void *ChangePadClearSize (ElementTypePtr, PadTypePtr);
-static void *ChangePadMaskSize (ElementTypePtr, PadTypePtr);
-static void *ChangePin2ndSize (ElementTypePtr, PinTypePtr);
-static void *ChangeElement2ndSize (ElementTypePtr);
-static void *ChangeViaSize (PinTypePtr);
-static void *ChangeVia2ndSize (PinTypePtr);
-static void *ChangeViaClearSize (PinTypePtr);
-static void *ChangeViaMaskSize (PinTypePtr);
-static void *ChangeLineSize (LayerTypePtr, LineTypePtr);
-static void *ChangeLineClearSize (LayerTypePtr, LineTypePtr);
-static void *ChangePolygonClearSize (LayerTypePtr, PolygonTypePtr);
-static void *ChangeArcSize (LayerTypePtr, ArcTypePtr);
-static void *ChangeArcClearSize (LayerTypePtr, ArcTypePtr);
-static void *ChangeTextSize (LayerTypePtr, TextTypePtr);
-static void *ChangeElementSize (ElementTypePtr);
-static void *ChangeElementNameSize (ElementTypePtr);
-static void *ChangePinName (ElementTypePtr, PinTypePtr);
-static void *ChangePadName (ElementTypePtr, PadTypePtr);
-static void *ChangeViaName (PinTypePtr);
-static void *ChangeLineName (LayerTypePtr, LineTypePtr);
-static void *ChangeElementName (ElementTypePtr);
-static void *ChangeTextName (LayerTypePtr, TextTypePtr);
-static void *ChangeElementSquare (ElementTypePtr);
-static void *SetElementSquare (ElementTypePtr);
-static void *ClrElementSquare (ElementTypePtr);
-static void *ChangeElementOctagon (ElementTypePtr);
-static void *SetElementOctagon (ElementTypePtr);
-static void *ClrElementOctagon (ElementTypePtr);
-static void *ChangePinSquare (ElementTypePtr, PinTypePtr);
-static void *SetPinSquare (ElementTypePtr, PinTypePtr);
-static void *ClrPinSquare (ElementTypePtr, PinTypePtr);
-static void *ChangePinOctagon (ElementTypePtr, PinTypePtr);
-static void *SetPinOctagon (ElementTypePtr, PinTypePtr);
-static void *ClrPinOctagon (ElementTypePtr, PinTypePtr);
-static void *ChangeViaOctagon (PinTypePtr);
-static void *SetViaOctagon (PinTypePtr);
-static void *ClrViaOctagon (PinTypePtr);
-static void *ChangePadSquare (ElementTypePtr, PadTypePtr);
-static void *SetPadSquare (ElementTypePtr, PadTypePtr);
-static void *ClrPadSquare (ElementTypePtr, PadTypePtr);
-static void *ChangeViaThermal (PinTypePtr);
-static void *ChangePinThermal (ElementTypePtr, PinTypePtr);
-static void *ChangeLineJoin (LayerTypePtr, LineTypePtr);
-static void *SetLineJoin (LayerTypePtr, LineTypePtr);
-static void *ClrLineJoin (LayerTypePtr, LineTypePtr);
-static void *ChangeArcJoin (LayerTypePtr, ArcTypePtr);
-static void *SetArcJoin (LayerTypePtr, ArcTypePtr);
-static void *ClrArcJoin (LayerTypePtr, ArcTypePtr);
-static void *ChangeTextJoin (LayerTypePtr, TextTypePtr);
-static void *SetTextJoin (LayerTypePtr, TextTypePtr);
-static void *ClrTextJoin (LayerTypePtr, TextTypePtr);
-static void *ChangePolyClear (LayerTypePtr, PolygonTypePtr);
+static void *ChangePinSize (ElementType *, PinType *);
+static void *ChangePinClearSize (ElementType *, PinType *);
+static void *ChangePinMaskSize (ElementType *, PinType *);
+static void *ChangePadSize (ElementType *, PadType *);
+static void *ChangePadClearSize (ElementType *, PadType *);
+static void *ChangePadMaskSize (ElementType *, PadType *);
+static void *ChangePin2ndSize (ElementType *, PinType *);
+static void *ChangeElement2ndSize (ElementType *);
+static void *ChangeViaSize (PinType *);
+static void *ChangeVia2ndSize (PinType *);
+static void *ChangeViaClearSize (PinType *);
+static void *ChangeViaMaskSize (PinType *);
+static void *ChangeLineSize (LayerType *, LineType *);
+static void *ChangeLineClearSize (LayerType *, LineType *);
+static void *ChangePolygonClearSize (LayerType *, PolygonType *);
+static void *ChangeArcSize (LayerType *, ArcType *);
+static void *ChangeArcClearSize (LayerType *, ArcType *);
+static void *ChangeTextSize (LayerType *, TextType *);
+static void *ChangeElementSize (ElementType *);
+static void *ChangeElementNameSize (ElementType *);
+static void *ChangePinName (ElementType *, PinType *);
+static void *ChangePadName (ElementType *, PadType *);
+static void *ChangeViaName (PinType *);
+static void *ChangeLineName (LayerType *, LineType *);
+static void *ChangeElementName (ElementType *);
+static void *ChangeTextName (LayerType *, TextType *);
+static void *ChangeElementSquare (ElementType *);
+static void *SetElementSquare (ElementType *);
+static void *ClrElementSquare (ElementType *);
+static void *ChangeElementOctagon (ElementType *);
+static void *SetElementOctagon (ElementType *);
+static void *ClrElementOctagon (ElementType *);
+static void *ChangePinSquare (ElementType *, PinType *);
+static void *SetPinSquare (ElementType *, PinType *);
+static void *ClrPinSquare (ElementType *, PinType *);
+static void *ChangePinOctagon (ElementType *, PinType *);
+static void *SetPinOctagon (ElementType *, PinType *);
+static void *ClrPinOctagon (ElementType *, PinType *);
+static void *ChangeViaOctagon (PinType *);
+static void *SetViaOctagon (PinType *);
+static void *ClrViaOctagon (PinType *);
+static void *ChangePadSquare (ElementType *, PadType *);
+static void *SetPadSquare (ElementType *, PadType *);
+static void *ClrPadSquare (ElementType *, PadType *);
+static void *ChangeViaThermal (PinType *);
+static void *ChangePinThermal (ElementType *, PinType *);
+static void *ChangeLineJoin (LayerType *, LineType *);
+static void *SetLineJoin (LayerType *, LineType *);
+static void *ClrLineJoin (LayerType *, LineType *);
+static void *ChangeArcJoin (LayerType *, ArcType *);
+static void *SetArcJoin (LayerType *, ArcType *);
+static void *ClrArcJoin (LayerType *, ArcType *);
+static void *ChangeTextJoin (LayerType *, TextType *);
+static void *SetTextJoin (LayerType *, TextType *);
+static void *ClrTextJoin (LayerType *, TextType *);
+static void *ChangePolyClear (LayerType *, PolygonType *);
 
 /* ---------------------------------------------------------------------------
  * some local identifiers
  */
-static Coord Delta;		/* change of size */
-static Coord Absolute;		/* Absolute size */
+static int Delta;		/* change of size */
+static int Absolute;		/* Absolute size */
 static char *NewName;		/* new name */
 static ObjectFunctionType ChangeSizeFunctions = {
   ChangeLineSize,
@@ -351,7 +347,7 @@ static ObjectFunctionType ClrOctagonFunctions = {
  * returns TRUE if changed
  */
 static void *
-ChangeViaThermal (PinTypePtr Via)
+ChangeViaThermal (PinType *Via)
 {
   AddObjectToClearPolyUndoList (VIA_TYPE, Via, Via, Via, false);
   RestoreToPolygon (PCB->Data, VIA_TYPE, CURRENT, Via);
@@ -371,7 +367,7 @@ ChangeViaThermal (PinTypePtr Via)
  * returns TRUE if changed
  */
 static void *
-ChangePinThermal (ElementTypePtr element, PinTypePtr Pin)
+ChangePinThermal (ElementType *element, PinType *Pin)
 {
   AddObjectToClearPolyUndoList (PIN_TYPE, element, Pin, Pin, false);
   RestoreToPolygon (PCB->Data, VIA_TYPE, CURRENT, Pin);
@@ -391,7 +387,7 @@ ChangePinThermal (ElementTypePtr element, PinTypePtr Pin)
  * returns TRUE if changed
  */
 static void *
-ChangeViaSize (PinTypePtr Via)
+ChangeViaSize (PinType *Via)
 {
   Coord value = Absolute ? Absolute : Via->Thickness + Delta;
 
@@ -426,7 +422,7 @@ ChangeViaSize (PinTypePtr Via)
  * returns TRUE if changed
  */
 static void *
-ChangeVia2ndSize (PinTypePtr Via)
+ChangeVia2ndSize (PinType *Via)
 {
   Coord value = (Absolute) ? Absolute : Via->DrillingHole + Delta;
 
@@ -459,7 +455,7 @@ ChangeVia2ndSize (PinTypePtr Via)
  * returns TRUE if changed
  */
 static void *
-ChangeViaClearSize (PinTypePtr Via)
+ChangeViaClearSize (PinType *Via)
 {
   Coord value = (Absolute) ? Absolute : Via->Clearance + Delta;
 
@@ -493,7 +489,7 @@ ChangeViaClearSize (PinTypePtr Via)
  * returns TRUE if changed
  */
 static void *
-ChangePinSize (ElementTypePtr Element, PinTypePtr Pin)
+ChangePinSize (ElementType *Element, PinType *Pin)
 {
   Coord value = (Absolute) ? Absolute : Pin->Thickness + Delta;
 
@@ -525,7 +521,7 @@ ChangePinSize (ElementTypePtr Element, PinTypePtr Pin)
  * returns TRUE if changed
  */
 static void *
-ChangePinClearSize (ElementTypePtr Element, PinTypePtr Pin)
+ChangePinClearSize (ElementType *Element, PinType *Pin)
 {
   Coord value = (Absolute) ? Absolute : Pin->Clearance + Delta;
 
@@ -557,7 +553,7 @@ ChangePinClearSize (ElementTypePtr Element, PinTypePtr Pin)
  * returns TRUE if changed
  */
 static void *
-ChangePadSize (ElementTypePtr Element, PadTypePtr Pad)
+ChangePadSize (ElementType *Element, PadType *Pad)
 {
   Coord value = (Absolute) ? Absolute : Pad->Thickness + Delta;
 
@@ -586,7 +582,7 @@ ChangePadSize (ElementTypePtr Element, PadTypePtr Pad)
  * returns TRUE if changed
  */
 static void *
-ChangePadClearSize (ElementTypePtr Element, PadTypePtr Pad)
+ChangePadClearSize (ElementType *Element, PadType *Pad)
 {
   Coord value = (Absolute) ? Absolute : Pad->Clearance + Delta;
 
@@ -618,7 +614,7 @@ ChangePadClearSize (ElementTypePtr Element, PadTypePtr Pad)
  * returns TRUE if changed
  */
 static void *
-ChangeElement2ndSize (ElementTypePtr Element)
+ChangeElement2ndSize (ElementType *Element)
 {
   bool changed = false;
   Coord value;
@@ -661,7 +657,7 @@ ChangeElement2ndSize (ElementTypePtr Element)
  * returns TRUE if changed
  */
 static void *
-ChangePin2ndSize (ElementTypePtr Element, PinTypePtr Pin)
+ChangePin2ndSize (ElementType *Element, PinType *Pin)
 {
   Coord value = (Absolute) ? Absolute : Pin->DrillingHole + Delta;
 
@@ -694,7 +690,7 @@ ChangePin2ndSize (ElementTypePtr Element, PinTypePtr Pin)
  * returns TRUE if changed
  */
 static void *
-ChangeLineSize (LayerTypePtr Layer, LineTypePtr Line)
+ChangeLineSize (LayerType *Layer, LineType *Line)
 {
   Coord value = (Absolute) ? Absolute : Line->Thickness + Delta;
 
@@ -705,11 +701,11 @@ ChangeLineSize (LayerTypePtr Layer, LineTypePtr Line)
     {
       AddObjectToSizeUndoList (LINE_TYPE, Layer, Line, Line);
       EraseLine (Line);
-      r_delete_entry (Layer->line_tree, (BoxTypePtr) Line);
+      r_delete_entry (Layer->line_tree, (BoxType *) Line);
       RestoreToPolygon (PCB->Data, LINE_TYPE, Layer, Line);
       Line->Thickness = value;
       SetLineBoundingBox (Line);
-      r_insert_entry (Layer->line_tree, (BoxTypePtr) Line, 0);
+      r_insert_entry (Layer->line_tree, (BoxType *) Line, 0);
       ClearFromPolygon (PCB->Data, LINE_TYPE, Layer, Line);
       DrawLine (Layer, Line);
       return (Line);
@@ -722,7 +718,7 @@ ChangeLineSize (LayerTypePtr Layer, LineTypePtr Line)
  * returns TRUE if changed
  */
 static void *
-ChangeLineClearSize (LayerTypePtr Layer, LineTypePtr Line)
+ChangeLineClearSize (LayerType *Layer, LineType *Line)
 {
   Coord value = (Absolute) ? Absolute : Line->Clearance + Delta;
 
@@ -734,7 +730,7 @@ ChangeLineClearSize (LayerTypePtr Layer, LineTypePtr Line)
       AddObjectToClearSizeUndoList (LINE_TYPE, Layer, Line, Line);
       RestoreToPolygon (PCB->Data, LINE_TYPE, Layer, Line);
       EraseLine (Line);
-      r_delete_entry (Layer->line_tree, (BoxTypePtr) Line);
+      r_delete_entry (Layer->line_tree, (BoxType *) Line);
       Line->Clearance = value;
       if (Line->Clearance == 0)
 	{
@@ -742,7 +738,7 @@ ChangeLineClearSize (LayerTypePtr Layer, LineTypePtr Line)
 	  Line->Clearance = MIL_TO_COORD(10);
 	}
       SetLineBoundingBox (Line);
-      r_insert_entry (Layer->line_tree, (BoxTypePtr) Line, 0);
+      r_insert_entry (Layer->line_tree, (BoxType *) Line, 0);
       ClearFromPolygon (PCB->Data, LINE_TYPE, Layer, Line);
       DrawLine (Layer, Line);
       return (Line);
@@ -754,7 +750,7 @@ ChangeLineClearSize (LayerTypePtr Layer, LineTypePtr Line)
  * Handle attepts to change the clearance of a polygon.
  */
 static void *
-ChangePolygonClearSize (LayerTypePtr Layer, PolygonTypePtr poly)
+ChangePolygonClearSize (LayerType *Layer, PolygonType *poly)
 {
   static int shown_this_message = 0;
   if (!shown_this_message)
@@ -775,7 +771,7 @@ ChangePolygonClearSize (LayerTypePtr Layer, PolygonTypePtr poly)
  * returns TRUE if changed
  */
 static void *
-ChangeArcSize (LayerTypePtr Layer, ArcTypePtr Arc)
+ChangeArcSize (LayerType *Layer, ArcType *Arc)
 {
   Coord value = (Absolute) ? Absolute : Arc->Thickness + Delta;
 
@@ -786,11 +782,11 @@ ChangeArcSize (LayerTypePtr Layer, ArcTypePtr Arc)
     {
       AddObjectToSizeUndoList (ARC_TYPE, Layer, Arc, Arc);
       EraseArc (Arc);
-      r_delete_entry (Layer->arc_tree, (BoxTypePtr) Arc);
+      r_delete_entry (Layer->arc_tree, (BoxType *) Arc);
       RestoreToPolygon (PCB->Data, ARC_TYPE, Layer, Arc);
       Arc->Thickness = value;
       SetArcBoundingBox (Arc);
-      r_insert_entry (Layer->arc_tree, (BoxTypePtr) Arc, 0);
+      r_insert_entry (Layer->arc_tree, (BoxType *) Arc, 0);
       ClearFromPolygon (PCB->Data, ARC_TYPE, Layer, Arc);
       DrawArc (Layer, Arc);
       return (Arc);
@@ -803,7 +799,7 @@ ChangeArcSize (LayerTypePtr Layer, ArcTypePtr Arc)
  * returns TRUE if changed
  */
 static void *
-ChangeArcClearSize (LayerTypePtr Layer, ArcTypePtr Arc)
+ChangeArcClearSize (LayerType *Layer, ArcType *Arc)
 {
   Coord value = (Absolute) ? Absolute : Arc->Clearance + Delta;
 
@@ -814,7 +810,7 @@ ChangeArcClearSize (LayerTypePtr Layer, ArcTypePtr Arc)
     {
       AddObjectToClearSizeUndoList (ARC_TYPE, Layer, Arc, Arc);
       EraseArc (Arc);
-      r_delete_entry (Layer->arc_tree, (BoxTypePtr) Arc);
+      r_delete_entry (Layer->arc_tree, (BoxType *) Arc);
       RestoreToPolygon (PCB->Data, ARC_TYPE, Layer, Arc);
       Arc->Clearance = value;
       if (Arc->Clearance == 0)
@@ -823,7 +819,7 @@ ChangeArcClearSize (LayerTypePtr Layer, ArcTypePtr Arc)
 	  Arc->Clearance = MIL_TO_COORD(10);
 	}
       SetArcBoundingBox (Arc);
-      r_insert_entry (Layer->arc_tree, (BoxTypePtr) Arc, 0);
+      r_insert_entry (Layer->arc_tree, (BoxType *) Arc, 0);
       ClearFromPolygon (PCB->Data, ARC_TYPE, Layer, Arc);
       DrawArc (Layer, Arc);
       return (Arc);
@@ -836,10 +832,11 @@ ChangeArcClearSize (LayerTypePtr Layer, ArcTypePtr Arc)
  * returns TRUE if changed
  */
 static void *
-ChangeTextSize (LayerTypePtr Layer, TextTypePtr Text)
+ChangeTextSize (LayerType *Layer, TextType *Text)
 {
-  int value = Absolute ? COORD_TO_MIL (Absolute)
-                       : Text->Scale + COORD_TO_MIL (Delta);
+  int value = (Absolute != 0 ? 0 : Text->Scale) +
+              (double)(Absolute != 0 ? Absolute : Delta)
+                / (double)FONT_CAPHEIGHT * 100.;
 
   if (TEST_FLAG (LOCKFLAG, Text))
     return (NULL);
@@ -848,11 +845,11 @@ ChangeTextSize (LayerTypePtr Layer, TextTypePtr Text)
     {
       AddObjectToSizeUndoList (TEXT_TYPE, Layer, Text, Text);
       EraseText (Layer, Text);
-      r_delete_entry (Layer->text_tree, (BoxTypePtr) Text);
+      r_delete_entry (Layer->text_tree, (BoxType *) Text);
       RestoreToPolygon (PCB->Data, TEXT_TYPE, Layer, Text);
       Text->Scale = value;
       SetTextBoundingBox (&PCB->Font, Text);
-      r_insert_entry (Layer->text_tree, (BoxTypePtr) Text, 0);
+      r_insert_entry (Layer->text_tree, (BoxType *) Text, 0);
       ClearFromPolygon (PCB->Data, TEXT_TYPE, Layer, Text);
       DrawText (Layer, Text);
       return (Text);
@@ -865,7 +862,7 @@ ChangeTextSize (LayerTypePtr Layer, TextTypePtr Text)
  * returns TRUE if changed
  */
 static void *
-ChangeElementSize (ElementTypePtr Element)
+ChangeElementSize (ElementType *Element)
 {
   Coord value;
   bool changed = false;
@@ -912,10 +909,11 @@ ChangeElementSize (ElementTypePtr Element)
  * returns TRUE if changed
  */
 static void *
-ChangeElementNameSize (ElementTypePtr Element)
+ChangeElementNameSize (ElementType *Element)
 {
-  int value = Absolute ? COORD_TO_MIL (Absolute)
-                  : DESCRIPTION_TEXT (Element).Scale + COORD_TO_MIL (Delta);
+  int value = (Absolute != 0 ? 0 : DESCRIPTION_TEXT (Element).Scale) +
+              (double)(Absolute != 0 ? Absolute : Delta)
+                / (double)FONT_CAPHEIGHT * 100.;
 
   if (TEST_FLAG (LOCKFLAG, &Element->Name[0]))
     return (NULL);
@@ -941,7 +939,7 @@ ChangeElementNameSize (ElementTypePtr Element)
  * changes the name of a via
  */
 static void *
-ChangeViaName (PinTypePtr Via)
+ChangeViaName (PinType *Via)
 {
   char *old = Via->Name;
 
@@ -960,11 +958,11 @@ ChangeViaName (PinTypePtr Via)
  * changes the name of a pin
  */
 static void *
-ChangePinName (ElementTypePtr Element, PinTypePtr Pin)
+ChangePinName (ElementType *Element, PinType *Pin)
 {
   char *old = Pin->Name;
 
-  Element = Element;		/* get rid of 'unused...' warnings */
+  (void) Element;		/* get rid of 'unused...' warnings */
   if (TEST_FLAG (DISPLAYNAMEFLAG, Pin))
     {
       ErasePinName (Pin);
@@ -980,11 +978,11 @@ ChangePinName (ElementTypePtr Element, PinTypePtr Pin)
  * changes the name of a pad
  */
 static void *
-ChangePadName (ElementTypePtr Element, PadTypePtr Pad)
+ChangePadName (ElementType *Element, PadType *Pad)
 {
   char *old = Pad->Name;
 
-  Element = Element;		/* get rid of 'unused...' warnings */
+  (void) Element;		/* get rid of 'unused...' warnings */
   if (TEST_FLAG (DISPLAYNAMEFLAG, Pad))
     {
       ErasePadName (Pad);
@@ -1000,11 +998,11 @@ ChangePadName (ElementTypePtr Element, PadTypePtr Pad)
  * changes the name of a line
  */
 static void *
-ChangeLineName (LayerTypePtr Layer, LineTypePtr Line)
+ChangeLineName (LayerType *Layer, LineType *Line)
 {
   char *old = Line->Number;
 
-  Layer = Layer;
+  (void) Layer;
   Line->Number = NewName;
   return (old);
 }
@@ -1014,7 +1012,7 @@ ChangeLineName (LayerTypePtr Layer, LineTypePtr Line)
  */
 
 char *
-ChangeElementText (PCBType *pcb, DataType *data, ElementTypePtr Element, int which, char *new_name)
+ChangeElementText (PCBType *pcb, DataType *data, ElementType *Element, int which, char *new_name)
 {
   char *old = Element->Name[which].TextString;
 
@@ -1041,7 +1039,7 @@ ChangeElementText (PCBType *pcb, DataType *data, ElementTypePtr Element, int whi
 }
 
 static void *
-ChangeElementName (ElementTypePtr Element)
+ChangeElementName (ElementType *Element)
 {
   if (TEST_FLAG (LOCKFLAG, &Element->Name[0]))
     return (NULL);
@@ -1065,7 +1063,7 @@ ChangeElementName (ElementTypePtr Element)
  * returns true if the string has been changed
  */
 static void *
-ChangeTextName (LayerTypePtr Layer, TextTypePtr Text)
+ChangeTextName (LayerType *Layer, TextType *Text)
 {
   char *old = Text->TextString;
 
@@ -1099,7 +1097,7 @@ ChangeLayoutName (char *Name)
  * returns TRUE if done
  */
 bool
-ChangeElementSide (ElementTypePtr Element, Coord yoff)
+ChangeElementSide (ElementType *Element, Coord yoff)
 {
   if (TEST_FLAG (LOCKFLAG, Element))
     return (false);
@@ -1114,7 +1112,7 @@ ChangeElementSide (ElementTypePtr Element, Coord yoff)
  * changes the name of a layer; memory has to be already allocated
  */
 bool
-ChangeLayerName (LayerTypePtr Layer, char *Name)
+ChangeLayerName (LayerType *Layer, char *Name)
 {
   free (CURRENT->Name);
   CURRENT->Name = Name;
@@ -1126,7 +1124,7 @@ ChangeLayerName (LayerTypePtr Layer, char *Name)
  * changes the clearance flag of a line
  */
 static void *
-ChangeLineJoin (LayerTypePtr Layer, LineTypePtr Line)
+ChangeLineJoin (LayerType *Layer, LineType *Line)
 {
   if (TEST_FLAG (LOCKFLAG, Line))
     return (NULL);
@@ -1151,7 +1149,7 @@ ChangeLineJoin (LayerTypePtr Layer, LineTypePtr Line)
  * sets the clearance flag of a line
  */
 static void *
-SetLineJoin (LayerTypePtr Layer, LineTypePtr Line)
+SetLineJoin (LayerType *Layer, LineType *Line)
 {
   if (TEST_FLAG (LOCKFLAG, Line) || TEST_FLAG (CLEARLINEFLAG, Line))
     return (NULL);
@@ -1162,7 +1160,7 @@ SetLineJoin (LayerTypePtr Layer, LineTypePtr Line)
  * clears the clearance flag of a line
  */
 static void *
-ClrLineJoin (LayerTypePtr Layer, LineTypePtr Line)
+ClrLineJoin (LayerType *Layer, LineType *Line)
 {
   if (TEST_FLAG (LOCKFLAG, Line) || !TEST_FLAG (CLEARLINEFLAG, Line))
     return (NULL);
@@ -1173,7 +1171,7 @@ ClrLineJoin (LayerTypePtr Layer, LineTypePtr Line)
  * changes the clearance flag of an arc
  */
 static void *
-ChangeArcJoin (LayerTypePtr Layer, ArcTypePtr Arc)
+ChangeArcJoin (LayerType *Layer, ArcType *Arc)
 {
   if (TEST_FLAG (LOCKFLAG, Arc))
     return (NULL);
@@ -1198,7 +1196,7 @@ ChangeArcJoin (LayerTypePtr Layer, ArcTypePtr Arc)
  * sets the clearance flag of an arc
  */
 static void *
-SetArcJoin (LayerTypePtr Layer, ArcTypePtr Arc)
+SetArcJoin (LayerType *Layer, ArcType *Arc)
 {
   if (TEST_FLAG (LOCKFLAG, Arc) || TEST_FLAG (CLEARLINEFLAG, Arc))
     return (NULL);
@@ -1209,7 +1207,7 @@ SetArcJoin (LayerTypePtr Layer, ArcTypePtr Arc)
  * clears the clearance flag of an arc
  */
 static void *
-ClrArcJoin (LayerTypePtr Layer, ArcTypePtr Arc)
+ClrArcJoin (LayerType *Layer, ArcType *Arc)
 {
   if (TEST_FLAG (LOCKFLAG, Arc) || !TEST_FLAG (CLEARLINEFLAG, Arc))
     return (NULL);
@@ -1220,7 +1218,7 @@ ClrArcJoin (LayerTypePtr Layer, ArcTypePtr Arc)
  * changes the clearance flag of a text
  */
 static void *
-ChangeTextJoin (LayerTypePtr Layer, TextTypePtr Text)
+ChangeTextJoin (LayerType *Layer, TextType *Text)
 {
   if (TEST_FLAG (LOCKFLAG, Text))
     return (NULL);
@@ -1245,7 +1243,7 @@ ChangeTextJoin (LayerTypePtr Layer, TextTypePtr Text)
  * sets the clearance flag of a text
  */
 static void *
-SetTextJoin (LayerTypePtr Layer, TextTypePtr Text)
+SetTextJoin (LayerType *Layer, TextType *Text)
 {
   if (TEST_FLAG (LOCKFLAG, Text) || TEST_FLAG (CLEARLINEFLAG, Text))
     return (NULL);
@@ -1256,7 +1254,7 @@ SetTextJoin (LayerTypePtr Layer, TextTypePtr Text)
  * clears the clearance flag of a text
  */
 static void *
-ClrTextJoin (LayerTypePtr Layer, TextTypePtr Text)
+ClrTextJoin (LayerType *Layer, TextType *Text)
 {
   if (TEST_FLAG (LOCKFLAG, Text) || !TEST_FLAG (CLEARLINEFLAG, Text))
     return (NULL);
@@ -1267,7 +1265,7 @@ ClrTextJoin (LayerTypePtr Layer, TextTypePtr Text)
  * changes the square flag of all pins on an element
  */
 static void *
-ChangeElementSquare (ElementTypePtr Element)
+ChangeElementSquare (ElementType *Element)
 {
   void *ans = NULL;
 
@@ -1290,7 +1288,7 @@ ChangeElementSquare (ElementTypePtr Element)
  * sets the square flag of all pins on an element
  */
 static void *
-SetElementSquare (ElementTypePtr Element)
+SetElementSquare (ElementType *Element)
 {
   void *ans = NULL;
 
@@ -1313,7 +1311,7 @@ SetElementSquare (ElementTypePtr Element)
  * clears the square flag of all pins on an element
  */
 static void *
-ClrElementSquare (ElementTypePtr Element)
+ClrElementSquare (ElementType *Element)
 {
   void *ans = NULL;
 
@@ -1336,7 +1334,7 @@ ClrElementSquare (ElementTypePtr Element)
  * changes the octagon flags of all pins of an element
  */
 static void *
-ChangeElementOctagon (ElementTypePtr Element)
+ChangeElementOctagon (ElementType *Element)
 {
   void *result = NULL;
 
@@ -1355,7 +1353,7 @@ ChangeElementOctagon (ElementTypePtr Element)
  * sets the octagon flags of all pins of an element
  */
 static void *
-SetElementOctagon (ElementTypePtr Element)
+SetElementOctagon (ElementType *Element)
 {
   void *result = NULL;
 
@@ -1374,7 +1372,7 @@ SetElementOctagon (ElementTypePtr Element)
  * clears the octagon flags of all pins of an element
  */
 static void *
-ClrElementOctagon (ElementTypePtr Element)
+ClrElementOctagon (ElementType *Element)
 {
   void *result = NULL;
 
@@ -1393,7 +1391,7 @@ ClrElementOctagon (ElementTypePtr Element)
  * changes the square flag of a pad
  */
 static void *
-ChangePadSquare (ElementTypePtr Element, PadTypePtr Pad)
+ChangePadSquare (ElementType *Element, PadType *Pad)
 {
   if (TEST_FLAG (LOCKFLAG, Pad))
     return (NULL);
@@ -1412,7 +1410,7 @@ ChangePadSquare (ElementTypePtr Element, PadTypePtr Pad)
  * sets the square flag of a pad
  */
 static void *
-SetPadSquare (ElementTypePtr Element, PadTypePtr Pad)
+SetPadSquare (ElementType *Element, PadType *Pad)
 {
 
   if (TEST_FLAG (LOCKFLAG, Pad) || TEST_FLAG (SQUAREFLAG, Pad))
@@ -1426,7 +1424,7 @@ SetPadSquare (ElementTypePtr Element, PadTypePtr Pad)
  * clears the square flag of a pad
  */
 static void *
-ClrPadSquare (ElementTypePtr Element, PadTypePtr Pad)
+ClrPadSquare (ElementType *Element, PadType *Pad)
 {
 
   if (TEST_FLAG (LOCKFLAG, Pad) || !TEST_FLAG (SQUAREFLAG, Pad))
@@ -1440,7 +1438,7 @@ ClrPadSquare (ElementTypePtr Element, PadTypePtr Pad)
  * changes the square flag of a pin
  */
 static void *
-ChangePinSquare (ElementTypePtr Element, PinTypePtr Pin)
+ChangePinSquare (ElementType *Element, PinType *Pin)
 {
   if (TEST_FLAG (LOCKFLAG, Pin))
     return (NULL);
@@ -1459,7 +1457,7 @@ ChangePinSquare (ElementTypePtr Element, PinTypePtr Pin)
  * sets the square flag of a pin
  */
 static void *
-SetPinSquare (ElementTypePtr Element, PinTypePtr Pin)
+SetPinSquare (ElementType *Element, PinType *Pin)
 {
   if (TEST_FLAG (LOCKFLAG, Pin) || TEST_FLAG (SQUAREFLAG, Pin))
     return (NULL);
@@ -1471,7 +1469,7 @@ SetPinSquare (ElementTypePtr Element, PinTypePtr Pin)
  * clears the square flag of a pin
  */
 static void *
-ClrPinSquare (ElementTypePtr Element, PinTypePtr Pin)
+ClrPinSquare (ElementType *Element, PinType *Pin)
 {
   if (TEST_FLAG (LOCKFLAG, Pin) || !TEST_FLAG (SQUAREFLAG, Pin))
     return (NULL);
@@ -1483,7 +1481,7 @@ ClrPinSquare (ElementTypePtr Element, PinTypePtr Pin)
  * changes the octagon flag of a via 
  */
 static void *
-ChangeViaOctagon (PinTypePtr Via)
+ChangeViaOctagon (PinType *Via)
 {
   if (TEST_FLAG (LOCKFLAG, Via))
     return (NULL);
@@ -1502,7 +1500,7 @@ ChangeViaOctagon (PinTypePtr Via)
  * sets the octagon flag of a via 
  */
 static void *
-SetViaOctagon (PinTypePtr Via)
+SetViaOctagon (PinType *Via)
 {
   if (TEST_FLAG (LOCKFLAG, Via) || TEST_FLAG (OCTAGONFLAG, Via))
     return (NULL);
@@ -1514,7 +1512,7 @@ SetViaOctagon (PinTypePtr Via)
  * clears the octagon flag of a via 
  */
 static void *
-ClrViaOctagon (PinTypePtr Via)
+ClrViaOctagon (PinType *Via)
 {
   if (TEST_FLAG (LOCKFLAG, Via) || !TEST_FLAG (OCTAGONFLAG, Via))
     return (NULL);
@@ -1526,7 +1524,7 @@ ClrViaOctagon (PinTypePtr Via)
  * changes the octagon flag of a pin
  */
 static void *
-ChangePinOctagon (ElementTypePtr Element, PinTypePtr Pin)
+ChangePinOctagon (ElementType *Element, PinType *Pin)
 {
   if (TEST_FLAG (LOCKFLAG, Pin))
     return (NULL);
@@ -1545,7 +1543,7 @@ ChangePinOctagon (ElementTypePtr Element, PinTypePtr Pin)
  * sets the octagon flag of a pin
  */
 static void *
-SetPinOctagon (ElementTypePtr Element, PinTypePtr Pin)
+SetPinOctagon (ElementType *Element, PinType *Pin)
 {
   if (TEST_FLAG (LOCKFLAG, Pin) || TEST_FLAG (OCTAGONFLAG, Pin))
     return (NULL);
@@ -1557,7 +1555,7 @@ SetPinOctagon (ElementTypePtr Element, PinTypePtr Pin)
  * clears the octagon flag of a pin
  */
 static void *
-ClrPinOctagon (ElementTypePtr Element, PinTypePtr Pin)
+ClrPinOctagon (ElementType *Element, PinType *Pin)
 {
   if (TEST_FLAG (LOCKFLAG, Pin) || !TEST_FLAG (OCTAGONFLAG, Pin))
     return (NULL);
@@ -1569,7 +1567,7 @@ ClrPinOctagon (ElementTypePtr Element, PinTypePtr Pin)
  * changes the hole flag of a via
  */
 bool
-ChangeHole (PinTypePtr Via)
+ChangeHole (PinType *Via)
 {
   if (TEST_FLAG (LOCKFLAG, Via))
     return (false);
@@ -1612,7 +1610,7 @@ ChangeHole (PinTypePtr Via)
  * changes the nopaste flag of a pad
  */
 bool
-ChangePaste (PadTypePtr Pad)
+ChangePaste (PadType *Pad)
 {
   if (TEST_FLAG (LOCKFLAG, Pad))
     return (false);
@@ -1628,7 +1626,7 @@ ChangePaste (PadTypePtr Pad)
  * changes the CLEARPOLY flag of a polygon
  */
 static void *
-ChangePolyClear (LayerTypePtr Layer, PolygonTypePtr Polygon)
+ChangePolyClear (LayerType *Layer, PolygonType *Polygon)
 {
   if (TEST_FLAG (LOCKFLAG, Polygon))
     return (NULL);
@@ -2100,8 +2098,7 @@ ChangeObjectName (int Type, void *Ptr1, void *Ptr2, void *Ptr3, char *Name)
   void *result;
   /* setup identifier */
   NewName = Name;
-  if ((result =
-       ObjectOperation (&ChangeNameFunctions, Type, Ptr1, Ptr2, Ptr3)));
+  result = ObjectOperation (&ChangeNameFunctions, Type, Ptr1, Ptr2, Ptr3);
   Draw ();
   return (result);
 }
@@ -2275,33 +2272,33 @@ QueryInputAndChangeObjectName (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
     {
     case LINE_TYPE:
       name = gui->prompt_for (_("Linename:"),
-			      EMPTY (((LineTypePtr) Ptr2)->Number));
+			      EMPTY (((LineType *) Ptr2)->Number));
       break;
 
     case VIA_TYPE:
       name = gui->prompt_for (_("Vianame:"),
-			      EMPTY (((PinTypePtr) Ptr2)->Name));
+			      EMPTY (((PinType *) Ptr2)->Name));
       break;
 
     case PIN_TYPE:
-      sprintf (msg, _("%s Pin Name:"), EMPTY (((PinTypePtr) Ptr2)->Number));
-      name = gui->prompt_for (msg, EMPTY (((PinTypePtr) Ptr2)->Name));
+      sprintf (msg, _("%s Pin Name:"), EMPTY (((PinType *) Ptr2)->Number));
+      name = gui->prompt_for (msg, EMPTY (((PinType *) Ptr2)->Name));
       break;
 
     case PAD_TYPE:
-      sprintf (msg, _("%s Pad Name:"), EMPTY (((PadTypePtr) Ptr2)->Number));
-      name = gui->prompt_for (msg, EMPTY (((PadTypePtr) Ptr2)->Name));
+      sprintf (msg, _("%s Pad Name:"), EMPTY (((PadType *) Ptr2)->Number));
+      name = gui->prompt_for (msg, EMPTY (((PadType *) Ptr2)->Name));
       break;
 
     case TEXT_TYPE:
       name = gui->prompt_for (_("Enter text:"),
-			      EMPTY (((TextTypePtr) Ptr2)->TextString));
+			      EMPTY (((TextType *) Ptr2)->TextString));
       break;
 
     case ELEMENT_TYPE:
       name = gui->prompt_for (_("Elementname:"),
 			      EMPTY (ELEMENT_NAME
-				     (PCB, (ElementTypePtr) Ptr2)));
+				     (PCB, (ElementType *) Ptr2)));
       break;
     }
   if (name)
@@ -2347,15 +2344,77 @@ ChangePCBSize (Coord Width, Coord Height)
 							     Y)));
   else
     SetCrosshairRange (0, 0, Width, Height);
+
+  UpdateExtents();
   hid_action ("PCBChanged");
 }
 
 /* ---------------------------------------------------------------------------
+ * finds the maximum size of a layout
+ * according to the outline layer,
+ * if present.
+ */
+void
+UpdateExtents (void)
+{
+  Coord minX, minY, maxX, maxY;
+
+  minX = minY = COORD_MAX;
+  maxX = maxY = -COORD_MAX - 1;
+
+  LAYER_LOOP (PCB->Data, MAX_LAYER);
+    {
+      if (strcmp (layer->Name, "outline") == 0)
+        {
+          LINE_LOOP (layer);
+            {
+              if (line->Point1.X < minX)
+                minX = line->Point1.X;
+              if (line->Point1.Y < minY)
+                minY = line->Point1.Y;
+              if (line->Point2.X < minX)
+                minX = line->Point2.X;
+              if (line->Point2.Y < minY)
+                minY = line->Point2.Y;
+              if (line->Point1.X > maxX)
+                maxX = line->Point1.X;
+              if (line->Point1.Y > maxY)
+                maxY = line->Point1.Y;
+              if (line->Point2.X > maxX)
+                maxX = line->Point2.X;
+              if (line->Point2.Y > maxY)
+                maxY = line->Point2.Y;
+            }
+          END_LOOP;
+        }
+    }
+  END_LOOP;
+
+  if (minX == COORD_MAX || minY == COORD_MAX ||
+      maxX == -COORD_MAX - 1 || maxY == -COORD_MAX - 1 ||
+      maxX - minX == 0 || maxY - minY == 0)
+    {
+      // no or insufficient outline layer
+      PCB->ExtentMinX = 0;
+      PCB->ExtentMinY = 0;
+      PCB->ExtentMaxX = PCB->MaxWidth;
+      PCB->ExtentMaxY = PCB->MaxHeight;
+    }
+  else
+    {
+      PCB->ExtentMinX = minX;
+      PCB->ExtentMinY = minY;
+      PCB->ExtentMaxX = maxX;
+      PCB->ExtentMaxY = maxY;
+    }
+}
+
+/* ---------------------------------------------------------------------------
  * changes the mask size of a pad
  * returns TRUE if changed
  */
 static void *
-ChangePadMaskSize (ElementTypePtr Element, PadTypePtr Pad)
+ChangePadMaskSize (ElementType *Element, PadType *Pad)
 {
   Coord value = (Absolute) ? Absolute : Pad->Mask + Delta;
 
@@ -2380,7 +2439,7 @@ ChangePadMaskSize (ElementTypePtr Element, PadTypePtr Pad)
  * returns TRUE if changed
  */
 static void *
-ChangePinMaskSize (ElementTypePtr Element, PinTypePtr Pin)
+ChangePinMaskSize (ElementType *Element, PinType *Pin)
 {
   Coord value = (Absolute) ? Absolute : Pin->Mask + Delta;
 
@@ -2405,7 +2464,7 @@ ChangePinMaskSize (ElementTypePtr Element, PinTypePtr Pin)
  * returns TRUE if changed
  */
 static void *
-ChangeViaMaskSize (PinTypePtr Via)
+ChangeViaMaskSize (PinType *Via)
 {
   Coord value;
 
diff --git a/src/change.h b/src/change.h
index 64c44ff..5d59362 100644
--- a/src/change.h
+++ b/src/change.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes to change object properties
@@ -66,7 +65,7 @@
         (PIN_TYPE | VIA_TYPE | PAD_TYPE)
 
 bool ChangeLayoutName (char *);
-bool ChangeLayerName (LayerTypePtr, char *);
+bool ChangeLayerName (LayerType *, char *);
 bool ChangeSelectedSize (int, Coord, bool);
 bool ChangeSelectedClearSize (int, Coord, bool);
 bool ChangeSelected2ndSize (int, Coord, bool);
@@ -84,9 +83,9 @@ bool ChangeSelectedOctagon (int);
 bool SetSelectedOctagon (int);
 bool ClrSelectedOctagon (int);
 bool ChangeSelectedElementSide (void);
-bool ChangeElementSide (ElementTypePtr, Coord);
-bool ChangeHole (PinTypePtr);
-bool ChangePaste (PadTypePtr);
+bool ChangeElementSide (ElementType *, Coord);
+bool ChangeHole (PinType *);
+bool ChangePaste (PadType *);
 bool ChangeObjectSize (int, void *, void *, void *, Coord, bool);
 bool ChangeObjectThermal (int, void *, void *, void *, int);
 bool ChangeObjectClearSize (int, void *, void *, void *, Coord,
@@ -107,11 +106,12 @@ bool ClrObjectOctagon (int, void *, void *, void *);
 void *ChangeObjectName (int, void *, void *, void *, char *);
 void *QueryInputAndChangeObjectName (int, void *, void *, void *);
 void ChangePCBSize (Coord, Coord);
+void UpdateExtents (void);
 
 /* Change the specified text on an element, either on the board (give
    PCB, PCB->Data) or in a buffer (give NULL, Buffer->Data).  The old
    string is returned, and must be properly freed by the caller.  */
-char *ChangeElementText (PCBType *pcb, DataType *data, ElementTypePtr Element,
+char *ChangeElementText (PCBType *pcb, DataType *data, ElementType *Element,
 			 int which, char *new_name);
 
 #endif
diff --git a/src/clip.c b/src/clip.c
index f38c660..e4fef34 100644
--- a/src/clip.c
+++ b/src/clip.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -45,8 +43,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 /* Clip the line to the clipBox
  * return true if something to be drawn
  * false if the whole thing is clipped
diff --git a/src/clip.h b/src/clip.h
index c06d64f..aaec5a8 100644
--- a/src/clip.h
+++ b/src/clip.h
@@ -23,7 +23,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for inserting points into objects
diff --git a/src/command.c b/src/command.c
index 963ed85..8055ec8 100644
--- a/src/command.c
+++ b/src/command.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -57,8 +55,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 /* ---------------------------------------------------------------------- */
 
 /*  %start-doc actions 00macros
diff --git a/src/command.h b/src/command.h
index 5517993..5018f28 100644
--- a/src/command.h
+++ b/src/command.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for command execution
diff --git a/src/compat.c b/src/compat.c
index e3acf2f..6092764 100644
--- a/src/compat.c
+++ b/src/compat.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -34,8 +32,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 #ifndef HAVE_EXPF
 float
 expf (float x)
diff --git a/src/compat.h b/src/compat.h
index 9afa02c..ff83161 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
diff --git a/src/const.h b/src/const.h
index f029821..7cbf194 100644
--- a/src/const.h
+++ b/src/const.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* global source constants
@@ -126,6 +125,9 @@ If set, this object has been found by @code{FindConnection()}.
 @item 0x0008 hole
 For pins and vias, this flag means that the pin or via is a hole
 without a copper annulus.
+ at item 0x0008 nopaste
+For pads, set to prevent a solderpaste stencil opening for the
+pad.  Primarily used for pads used as fiducials.
 @item 0x0010 rat
 If set for a line, indicates that this line is a rat line instead of a
 copper trace.
@@ -176,45 +178,49 @@ pins, indicates that the pin is closer to a horizontal edge and thus
 pinout text should be vertical.
 @item 0x8000 marker
 Marker used internally to avoid revisiting an object.
- at item 0x10000 nopaste
-For pads, set to prevent a solderpaste stencil opening for the
-pad.  Primarily used for pads used as fiducials.
+ at item 0x10000 connected
+If set, this object has been as physically connected by @code{FindConnection()}.
 @end table
 %end-doc */
 
-#define	NOFLAG			0x0000
-#define	PINFLAG			0x0001	/* is a pin */
-#define	VIAFLAG			0x0002	/* is a via */
-#define	FOUNDFLAG		0x0004	/* used by 'FindConnection()' */
-#define HOLEFLAG		0x0008	/* pin or via is only a hole */
-#define NOPASTEFLAG		0x0008  /* pad should not receive
-					   solderpaste.  This is to
-					   support fiducials */
-#define RATFLAG                 0x0010	/* indicates line is a rat line */
-#define PININPOLYFLAG           0x0010	/* pin found inside poly - same as */
-						/* rat line since not used on lines */
-#define CLEARPOLYFLAG           0x0010	/* pins/vias clear these polygons */
-#define HIDENAMEFLAG		0x0010	/* hide the element name */
-#define	DISPLAYNAMEFLAG		0x0020	/* display the names of pins/pads */
-					/* of an element */
-#define CLEARLINEFLAG		0x0020	/* line doesn't touch polygons */
-#define FULLPOLYFLAG            0x0020	/* full polygon is drawn (i.e. all parts instead of only the biggest one) */
-#define	SELECTEDFLAG		0x0040	/* object has been selected */
-#define	ONSOLDERFLAG		0x0080	/* element is on bottom side */
-#define AUTOFLAG		0x0080	/* line/via created by auto-router */
-#define	SQUAREFLAG		0x0100	/* pin is square, not round */
-#define RUBBERENDFLAG		0x0200	/* indicates one end already rubber */
-					/* banding same as warn flag */
-					/* since pins/pads won't use it */
-#define WARNFLAG		0x0200	/* Warning for pin/via/pad */
-#define USETHERMALFLAG		0x0400	/* draw pin, via with thermal fingers */
-#define ONSILKFLAG              0x0400	/* old files use this to indicate silk */
-#define OCTAGONFLAG		0x0800	/* draw pin/via as octagon instead of round */
-#define DRCFLAG			0x1000	/* flag like FOUND flag for DRC checking */
-#define LOCKFLAG                0x2000	/* object locked in place */
-#define EDGE2FLAG               0x4000	/* Padr.Point2 is closer to outside edge */
-					/* also pinout text for pins is vertical */
-#define VISITFLAG		0x8000  /* marker to avoid re-visiting an object */
+#define NOFLAG                  0x0000
+#define PINFLAG                 0x0001  /* is a pin */
+#define VIAFLAG                 0x0002  /* is a via */
+#define FOUNDFLAG               0x0004  /* used by 'FindConnection()' */
+#define HOLEFLAG                0x0008  /* pin or via is only a hole */
+#define NOPASTEFLAG             0x0008  /* pad should not receive
+                                           solderpaste.  This is to
+                                           support fiducials */
+#define RATFLAG                 0x0010  /* indicates line is a rat line */
+#define PININPOLYFLAG           0x0010  /* pin found inside poly - same as */
+                                        /* rat line since not used on lines */
+#define CLEARPOLYFLAG           0x0010  /* pins/vias clear these polygons */
+#define HIDENAMEFLAG            0x0010  /* hide the element name */
+#define DISPLAYNAMEFLAG         0x0020  /* display the names of pins/pads */
+                                        /* of an element */
+#define CLEARLINEFLAG           0x0020  /* line doesn't touch polygons */
+#define FULLPOLYFLAG            0x0020  /* full polygon is drawn (i.e. all parts instead of only the biggest one) */
+#define SELECTEDFLAG            0x0040  /* object has been selected */
+#define ONSOLDERFLAG            0x0080  /* element is on bottom side */
+#define AUTOFLAG                0x0080  /* line/via created by auto-router */
+#define SQUAREFLAG              0x0100  /* pin is square, not round */
+#define RUBBERENDFLAG           0x0200  /* indicates one end already rubber */
+                                        /* banding same as warn flag */
+                                        /* since pins/pads won't use it */
+#define WARNFLAG                0x0200  /* Warning for pin/via/pad */
+#define USETHERMALFLAG          0x0400  /* draw pin, via with thermal fingers */
+#define ONSILKFLAG              0x0400  /* old files use this to indicate silk */
+#define OCTAGONFLAG             0x0800  /* draw pin/via as octagon instead of round */
+#define DRCFLAG                 0x1000  /* flag like FOUND flag for DRC checking */
+#define LOCKFLAG                0x2000  /* object locked in place */
+#define EDGE2FLAG               0x4000  /* Padr.Point2 is closer to outside edge */
+                                        /* also pinout text for pins is vertical */
+#define VISITFLAG               0x8000  /* marker to avoid re-visiting an object */
+#define CONNECTEDFLAG          0x10000  /* flag like FOUND flag, but used to identify physically connected objects (not rats) */
+
+
+#define NOCOPY_FLAGS (FOUNDFLAG | CONNECTEDFLAG)
+
 /* ---------------------------------------------------------------------------
  * PCB flags
  */
@@ -320,6 +326,7 @@ When set, element names are not drawn.
 
 #define LOCKED_TYPE 		0x10000	/* used to tell search to include locked items. */
 #define NET_TYPE		0x20000 /* used to select whole net. */
+#define ARCPOINT_TYPE		0x40000
 
 #define PIN_TYPES     (VIA_TYPE | PIN_TYPE)
 #define LOCK_TYPES    (VIA_TYPE | LINE_TYPE | ARC_TYPE | POLYGON_TYPE | ELEMENT_TYPE \
diff --git a/src/copy.c b/src/copy.c
index 29ac62f..b0cd9c8 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -57,17 +55,15 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static void *CopyVia (PinTypePtr);
-static void *CopyLine (LayerTypePtr, LineTypePtr);
-static void *CopyArc (LayerTypePtr, ArcTypePtr);
-static void *CopyText (LayerTypePtr, TextTypePtr);
-static void *CopyPolygon (LayerTypePtr, PolygonTypePtr);
-static void *CopyElement (ElementTypePtr);
+static void *CopyVia (PinType *);
+static void *CopyLine (LayerType *, LineType *);
+static void *CopyArc (LayerType *, ArcType *);
+static void *CopyText (LayerType *, TextType *);
+static void *CopyPolygon (LayerType *, PolygonType *);
+static void *CopyElement (ElementType *);
 
 /* ---------------------------------------------------------------------------
  * some local identifiers
@@ -92,8 +88,8 @@ static ObjectFunctionType CopyFunctions = {
  * copies data from one polygon to another
  * 'Dest' has to exist
  */
-PolygonTypePtr
-CopyPolygonLowLevel (PolygonTypePtr Dest, PolygonTypePtr Src)
+PolygonType *
+CopyPolygonLowLevel (PolygonType *Dest, PolygonType *Src)
 {
   Cardinal hole = 0;
   Cardinal n;
@@ -109,7 +105,7 @@ CopyPolygonLowLevel (PolygonTypePtr Dest, PolygonTypePtr Src)
     }
   SetPolygonBoundingBox (Dest);
   Dest->Flags = Src->Flags;
-  CLEAR_FLAG (FOUNDFLAG, Dest);
+  CLEAR_FLAG (NOCOPY_FLAGS, Dest);
   return (Dest);
 }
 
@@ -117,26 +113,23 @@ CopyPolygonLowLevel (PolygonTypePtr Dest, PolygonTypePtr Src)
  * copies data from one element to another and creates the destination 
  * if necessary
  */
-ElementTypePtr
-CopyElementLowLevel (DataTypePtr Data, ElementTypePtr Dest,
-		     ElementTypePtr Src, bool uniqueName, Coord dx,
-		     Coord dy)
+ElementType *
+CopyElementLowLevel (DataType *Data, ElementType *Src,
+                     bool uniqueName, Coord dx, Coord dy, int mask_flags)
 {
   int i;
-  /* release old memory if necessary */
-  if (Dest)
-    FreeElementMemory (Dest);
+  ElementType *Dest;
 
   /* both coordinates and flags are the same */
-  Dest = CreateNewElement (Data, Dest, &PCB->Font,
-			   MaskFlags (Src->Flags, FOUNDFLAG),
+  Dest = CreateNewElement (Data, &PCB->Font,
+			   MaskFlags (Src->Flags, mask_flags),
 			   DESCRIPTION_NAME (Src), NAMEONPCB_NAME (Src),
 			   VALUE_NAME (Src), DESCRIPTION_TEXT (Src).X + dx,
 			   DESCRIPTION_TEXT (Src).Y + dy,
 			   DESCRIPTION_TEXT (Src).Direction,
 			   DESCRIPTION_TEXT (Src).Scale,
 			   MaskFlags (DESCRIPTION_TEXT (Src).Flags,
-				      FOUNDFLAG), uniqueName);
+				      mask_flags), uniqueName);
 
   /* abort on error */
   if (!Dest)
@@ -153,7 +146,7 @@ CopyElementLowLevel (DataTypePtr Data, ElementTypePtr Dest,
   {
     CreateNewPin (Dest, pin->X + dx, pin->Y + dy, pin->Thickness,
 		  pin->Clearance, pin->Mask, pin->DrillingHole,
-		  pin->Name, pin->Number, MaskFlags (pin->Flags, FOUNDFLAG));
+		  pin->Name, pin->Number, MaskFlags (pin->Flags, mask_flags));
   }
   END_LOOP;
   PAD_LOOP (Src);
@@ -161,7 +154,7 @@ CopyElementLowLevel (DataTypePtr Data, ElementTypePtr Dest,
     CreateNewPad (Dest, pad->Point1.X + dx, pad->Point1.Y + dy,
 		  pad->Point2.X + dx, pad->Point2.Y + dy, pad->Thickness,
 		  pad->Clearance, pad->Mask, pad->Name, pad->Number,
-		  MaskFlags (pad->Flags, FOUNDFLAG));
+		  MaskFlags (pad->Flags, mask_flags));
   }
   END_LOOP;
   ARC_LOOP (Src);
@@ -188,14 +181,14 @@ CopyElementLowLevel (DataTypePtr Data, ElementTypePtr Dest,
  * copies a via 
  */
 static void *
-CopyVia (PinTypePtr Via)
+CopyVia (PinType *Via)
 {
-  PinTypePtr via;
+  PinType *via;
 
   via = CreateNewVia (PCB->Data, Via->X + DeltaX, Via->Y + DeltaY,
 		      Via->Thickness, Via->Clearance, Via->Mask,
 		      Via->DrillingHole, Via->Name,
-		      MaskFlags (Via->Flags, FOUNDFLAG));
+		      MaskFlags (Via->Flags, NOCOPY_FLAGS));
   if (!via)
     return (via);
   DrawVia (via);
@@ -207,16 +200,16 @@ CopyVia (PinTypePtr Via)
  * copies a line 
  */
 static void *
-CopyLine (LayerTypePtr Layer, LineTypePtr Line)
+CopyLine (LayerType *Layer, LineType *Line)
 {
-  LineTypePtr line;
+  LineType *line;
 
   line = CreateDrawnLineOnLayer (Layer, Line->Point1.X + DeltaX,
 				 Line->Point1.Y + DeltaY,
 				 Line->Point2.X + DeltaX,
 				 Line->Point2.Y + DeltaY, Line->Thickness,
 				 Line->Clearance,
-				 MaskFlags (Line->Flags, FOUNDFLAG));
+				 MaskFlags (Line->Flags, NOCOPY_FLAGS));
   if (!line)
     return (line);
   if (Line->Number)
@@ -230,14 +223,14 @@ CopyLine (LayerTypePtr Layer, LineTypePtr Line)
  * copies an arc
  */
 static void *
-CopyArc (LayerTypePtr Layer, ArcTypePtr Arc)
+CopyArc (LayerType *Layer, ArcType *Arc)
 {
-  ArcTypePtr arc;
+  ArcType *arc;
 
   arc = CreateNewArcOnLayer (Layer, Arc->X + DeltaX,
 			     Arc->Y + DeltaY, Arc->Width, Arc->Height, Arc->StartAngle,
 			     Arc->Delta, Arc->Thickness, Arc->Clearance,
-			     MaskFlags (Arc->Flags, FOUNDFLAG));
+			     MaskFlags (Arc->Flags, NOCOPY_FLAGS));
   if (!arc)
     return (arc);
   DrawArc (Layer, arc);
@@ -249,14 +242,14 @@ CopyArc (LayerTypePtr Layer, ArcTypePtr Arc)
  * copies a text 
  */
 static void *
-CopyText (LayerTypePtr Layer, TextTypePtr Text)
+CopyText (LayerType *Layer, TextType *Text)
 {
-  TextTypePtr text;
+  TextType *text;
 
   text = CreateNewText (Layer, &PCB->Font, Text->X + DeltaX,
 			Text->Y + DeltaY, Text->Direction,
 			Text->Scale, Text->TextString,
-			MaskFlags (Text->Flags, FOUNDFLAG));
+			MaskFlags (Text->Flags, NOCOPY_FLAGS));
   DrawText (Layer, text);
   AddObjectToCreateUndoList (TEXT_TYPE, Layer, text, text);
   return (text);
@@ -266,16 +259,16 @@ CopyText (LayerTypePtr Layer, TextTypePtr Text)
  * copies a polygon 
  */
 static void *
-CopyPolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
+CopyPolygon (LayerType *Layer, PolygonType *Polygon)
 {
-  PolygonTypePtr polygon;
+  PolygonType *polygon;
 
   polygon = CreateNewPolygon (Layer, NoFlags ());
   CopyPolygonLowLevel (polygon, Polygon);
   MovePolygonLowLevel (polygon, DeltaX, DeltaY);
   if (!Layer->polygon_tree)
     Layer->polygon_tree = r_create_tree (NULL, 0, 0);
-  r_insert_entry (Layer->polygon_tree, (BoxTypePtr) polygon, 0);
+  r_insert_entry (Layer->polygon_tree, (BoxType *) polygon, 0);
   InitClip (PCB->Data, Layer, polygon);
   DrawPolygon (Layer, polygon);
   AddObjectToCreateUndoList (POLYGON_TYPE, Layer, polygon, polygon);
@@ -286,7 +279,7 @@ CopyPolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
  * copies an element onto the PCB.  Then does a draw. 
  */
 static void *
-CopyElement (ElementTypePtr Element)
+CopyElement (ElementType *Element)
 {
 
 #ifdef DEBUG
@@ -294,11 +287,9 @@ CopyElement (ElementTypePtr Element)
 	 Element->Name[1].TextString);
 #endif
 
-  ElementTypePtr element = CopyElementLowLevel (PCB->Data,
-						NULL, Element,
-						TEST_FLAG (UNIQUENAMEFLAG,
-							   PCB), DeltaX,
-						DeltaY);
+  ElementType *element = CopyElementLowLevel (PCB->Data, Element,
+                                              TEST_FLAG (UNIQUENAMEFLAG, PCB),
+                                              DeltaX, DeltaY, NOCOPY_FLAGS);
 
   /* this call clears the polygons */
   AddObjectToCreateUndoList (ELEMENT_TYPE, element, element, element);
@@ -337,8 +328,8 @@ CopyPastebufferToLayout (Coord X, Coord Y)
   /* paste all layers */
   for (i = 0; i < max_copper_layer + 2; i++)
     {
-      LayerTypePtr sourcelayer = &PASTEBUFFER->Data->Layer[i],
-	destlayer = LAYER_PTR (i);
+      LayerType *sourcelayer = &PASTEBUFFER->Data->Layer[i];
+      LayerType *destlayer = LAYER_PTR (i);
 
       if (destlayer->On)
 	{
diff --git a/src/copy.h b/src/copy.h
index e65c272..e7f39cf 100644
--- a/src/copy.h
+++ b/src/copy.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for copy routines
@@ -41,9 +40,8 @@
 	ELEMENT_TYPE | ELEMENTNAME_TYPE | POLYGON_TYPE | ARC_TYPE)
 
 
-PolygonTypePtr CopyPolygonLowLevel (PolygonTypePtr, PolygonTypePtr);
-ElementTypePtr CopyElementLowLevel (DataTypePtr, ElementTypePtr,
-				    ElementTypePtr, bool, Coord, Coord);
+PolygonType * CopyPolygonLowLevel (PolygonType *, PolygonType *);
+ElementType * CopyElementLowLevel (DataType *, ElementType *, bool, Coord, Coord, int mask_flags);
 bool CopyPastebufferToLayout (Coord, Coord);
 void *CopyObject (int, void *, void *, void *, Coord, Coord);
 
diff --git a/src/create.c b/src/create.c
index c843582..8b5c2b9 100644
--- a/src/create.c
+++ b/src/create.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -59,8 +57,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 /* ---------------------------------------------------------------------------
  * some local identifiers
  */
@@ -72,7 +68,7 @@ static bool be_lenient = false;
 /* ----------------------------------------------------------------------
  * some local prototypes
  */
-static void AddTextToElement (TextTypePtr, FontTypePtr,
+static void AddTextToElement (TextType *, FontType *,
 			      Coord, Coord, unsigned, char *, int,
 			      FlagType);
 
@@ -89,12 +85,12 @@ CreateBeLenient (bool v)
 /* ---------------------------------------------------------------------------
  * creates a new paste buffer
  */
-DataTypePtr
+DataType *
 CreateNewBuffer (void)
 {
-  DataTypePtr data;
-  data = (DataTypePtr) calloc (1, sizeof (DataType));
-  data->pcb = (PCBTypePtr) PCB;
+  DataType *data;
+  data = (DataType *) calloc (1, sizeof (DataType));
+  data->pcb = (PCBType *) PCB;
   return data;
 }
 
@@ -103,12 +99,13 @@ CreateNewBuffer (void)
  * use this to set PCB colors so the config can reassign PCB colors.
  */
 void
-pcb_colors_from_settings (PCBTypePtr ptr)
+pcb_colors_from_settings (PCBType *ptr)
 {
   int i;
 
   /* copy default settings */
   ptr->ConnectedColor = Settings.ConnectedColor;
+  ptr->FoundColor = Settings.FoundColor;
   ptr->ElementColor = Settings.ElementColor;
   ptr->RatColor = Settings.RatColor;
   ptr->InvisibleObjectsColor = Settings.InvisibleObjectsColor;
@@ -142,16 +139,17 @@ pcb_colors_from_settings (PCBTypePtr ptr)
 /* ---------------------------------------------------------------------------
  * creates a new PCB
  */
-PCBTypePtr
+PCBType *
 CreateNewPCB (bool SetDefaultNames)
 {
-  PCBTypePtr ptr;
+  PCBType *ptr;
   int i;
 
   /* allocate memory, switch all layers on and copy resources */
-  ptr = (PCBTypePtr)calloc (1, sizeof (PCBType));
+  ptr = (PCBType *)calloc (1, sizeof (PCBType));
   ptr->Data = CreateNewBuffer ();
-  ptr->Data->pcb = (PCBTypePtr) ptr;
+  ptr->Data->pcb = (PCBType *) ptr;
+  ptr->Data->polyClip = 1;
 
   ptr->ThermStyle = 4;
   ptr->IsleArea = 2.e8;
@@ -191,8 +189,6 @@ CreateNewPCB (bool SetDefaultNames)
     style->index = n;
   }
   END_LOOP;
-  hid_action ("RouteStylesChanged");
-  ptr->Zoom = Settings.Zoom;
   ptr->MaxWidth = Settings.MaxWidth;
   ptr->MaxHeight = Settings.MaxHeight;
   ptr->ID = ID++;
@@ -217,7 +213,7 @@ CreateNewPCB (bool SetDefaultNames)
  * pre-existing PCB.
  */
 int
-CreateNewPCBPost (PCBTypePtr pcb, int use_defaults)
+CreateNewPCBPost (PCBType *pcb, int use_defaults)
 {
   /* copy default settings */
   pcb_colors_from_settings (pcb);
@@ -236,13 +232,13 @@ CreateNewPCBPost (PCBTypePtr pcb, int use_defaults)
 /* ---------------------------------------------------------------------------
  * creates a new via
  */
-PinTypePtr
-CreateNewVia (DataTypePtr Data,
+PinType *
+CreateNewVia (DataType *Data,
 	      Coord X, Coord Y,
 	      Coord Thickness, Coord Clearance, Coord Mask,
 	      Coord DrillingHole, char *Name, FlagType Flags)
 {
-  PinTypePtr Via;
+  PinType *Via;
 
   if (!be_lenient)
     {
@@ -298,7 +294,7 @@ CreateNewVia (DataTypePtr Data,
   SetPinBoundingBox (Via);
   if (!Data->via_tree)
     Data->via_tree = r_create_tree (NULL, 0, 0);
-  r_insert_entry (Data->via_tree, (BoxTypePtr) Via, 0);
+  r_insert_entry (Data->via_tree, (BoxType *) Via, 0);
   return (Via);
 }
 
@@ -306,6 +302,7 @@ struct line_info
 {
   Coord X1, X2, Y1, Y2;
   Coord Thickness;
+  Coord Clearance;
   FlagType Flags;
   LineType test, *ans;
   jmp_buf env;
@@ -314,14 +311,14 @@ struct line_info
 static int
 line_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct line_info *i = (struct line_info *) cl;
 
   if (line->Point1.X == i->X1 &&
       line->Point2.X == i->X2 &&
       line->Point1.Y == i->Y1 && line->Point2.Y == i->Y2)
     {
-      i->ans = (LineTypePtr) (-1);
+      i->ans = (LineType *) (-1);
       longjmp (i->env, 1);
     }
   /* check the other point order */
@@ -329,20 +326,22 @@ line_callback (const BoxType * b, void *cl)
       line->Point2.X == i->X2 &&
       line->Point1.Y == i->Y1 && line->Point2.Y == i->Y2)
     {
-      i->ans = (LineTypePtr) (-1);
+      i->ans = (LineType *) (-1);
       longjmp (i->env, 1);
     }
   if (line->Point2.X == i->X1 &&
       line->Point1.X == i->X2 &&
       line->Point2.Y == i->Y1 && line->Point1.Y == i->Y2)
     {
-      i->ans = (LineTypePtr) - 1;
+      i->ans = (LineType *) - 1;
       longjmp (i->env, 1);
     }
   /* remove unnecessary line points */
-  if (line->Thickness == i->Thickness
+  if (line->Thickness == i->Thickness &&
+      /* don't merge lines if the clearances differ  */
+      line->Clearance == i->Clearance &&
       /* don't merge lines if the clear flags differ  */
-      && TEST_FLAG (CLEARLINEFLAG, line) == TEST_FLAG (CLEARLINEFLAG, i))
+      TEST_FLAG (CLEARLINEFLAG, line) == TEST_FLAG (CLEARLINEFLAG, i))
     {
       if (line->Point1.X == i->X1 && line->Point1.Y == i->Y1)
 	{
@@ -400,8 +399,8 @@ line_callback (const BoxType * b, void *cl)
 /* ---------------------------------------------------------------------------
  * creates a new line on a layer and checks for overlap and extension
  */
-LineTypePtr
-CreateDrawnLineOnLayer (LayerTypePtr Layer,
+LineType *
+CreateDrawnLineOnLayer (LayerType *Layer,
 			Coord X1, Coord Y1,
 			Coord X2, Coord Y2,
 			Coord Thickness, Coord Clearance,
@@ -423,6 +422,7 @@ CreateDrawnLineOnLayer (LayerTypePtr Layer,
   info.Y1 = Y1;
   info.Y2 = Y2;
   info.Thickness = Thickness;
+  info.Clearance = Clearance;
   info.Flags = Flags;
   info.test.Thickness = 0;
   info.test.Flags = NoFlags ();
@@ -454,14 +454,14 @@ CreateDrawnLineOnLayer (LayerTypePtr Layer,
 			       Thickness, Clearance, Flags);
 }
 
-LineTypePtr
-CreateNewLineOnLayer (LayerTypePtr Layer,
+LineType *
+CreateNewLineOnLayer (LayerType *Layer,
 		      Coord X1, Coord Y1,
 		      Coord X2, Coord Y2,
 		      Coord Thickness, Coord Clearance,
 		      FlagType Flags)
 {
-  LineTypePtr Line;
+  LineType *Line;
 
   Line = GetLineMemory (Layer);
   if (!Line)
@@ -480,19 +480,19 @@ CreateNewLineOnLayer (LayerTypePtr Layer,
   SetLineBoundingBox (Line);
   if (!Layer->line_tree)
     Layer->line_tree = r_create_tree (NULL, 0, 0);
-  r_insert_entry (Layer->line_tree, (BoxTypePtr) Line, 0);
+  r_insert_entry (Layer->line_tree, (BoxType *) Line, 0);
   return (Line);
 }
 
 /* ---------------------------------------------------------------------------
  * creates a new rat-line
  */
-RatTypePtr
-CreateNewRat (DataTypePtr Data, Coord X1, Coord Y1,
+RatType *
+CreateNewRat (DataType *Data, Coord X1, Coord Y1,
 	      Coord X2, Coord Y2, Cardinal group1,
 	      Cardinal group2, Coord Thickness, FlagType Flags)
 {
-  RatTypePtr Line = GetRatMemory (Data);
+  RatType *Line = GetRatMemory (Data);
 
   if (!Line)
     return (Line);
@@ -509,7 +509,7 @@ CreateNewRat (DataTypePtr Data, Coord X1, Coord Y1,
   Line->Point2.ID = ID++;
   Line->group1 = group1;
   Line->group2 = group2;
-  SetLineBoundingBox ((LineTypePtr) Line);
+  SetLineBoundingBox ((LineType *) Line);
   if (!Data->rat_tree)
     Data->rat_tree = r_create_tree (NULL, 0, 0);
   r_insert_entry (Data->rat_tree, &Line->BoundingBox, 0);
@@ -519,8 +519,8 @@ CreateNewRat (DataTypePtr Data, Coord X1, Coord Y1,
 /* ---------------------------------------------------------------------------
  * creates a new arc on a layer
  */
-ArcTypePtr
-CreateNewArcOnLayer (LayerTypePtr Layer,
+ArcType *
+CreateNewArcOnLayer (LayerType *Layer,
 		     Coord X1, Coord Y1,
 		     Coord width,
 		     Coord height,
@@ -528,7 +528,7 @@ CreateNewArcOnLayer (LayerTypePtr Layer,
 		     Angle dir, Coord Thickness,
 		     Coord Clearance, FlagType Flags)
 {
-  ArcTypePtr Arc;
+  ArcType *Arc;
 
   ARC_LOOP (Layer);
   {
@@ -555,7 +555,7 @@ CreateNewArcOnLayer (LayerTypePtr Layer,
   SetArcBoundingBox (Arc);
   if (!Layer->arc_tree)
     Layer->arc_tree = r_create_tree (NULL, 0, 0);
-  r_insert_entry (Layer->arc_tree, (BoxTypePtr) Arc, 0);
+  r_insert_entry (Layer->arc_tree, (BoxType *) Arc, 0);
   return (Arc);
 }
 
@@ -563,13 +563,13 @@ CreateNewArcOnLayer (LayerTypePtr Layer,
 /* ---------------------------------------------------------------------------
  * creates a new polygon from the old formats rectangle data
  */
-PolygonTypePtr
-CreateNewPolygonFromRectangle (LayerTypePtr Layer,
+PolygonType *
+CreateNewPolygonFromRectangle (LayerType *Layer,
 			       Coord X1, Coord Y1,
 			       Coord X2, Coord Y2,
 			       FlagType Flags)
 {
-  PolygonTypePtr polygon = CreateNewPolygon (Layer, Flags);
+  PolygonType *polygon = CreateNewPolygon (Layer, Flags);
   if (!polygon)
     return (polygon);
 
@@ -580,15 +580,15 @@ CreateNewPolygonFromRectangle (LayerTypePtr Layer,
   SetPolygonBoundingBox (polygon);
   if (!Layer->polygon_tree)
     Layer->polygon_tree = r_create_tree (NULL, 0, 0);
-  r_insert_entry (Layer->polygon_tree, (BoxTypePtr) polygon, 0);
+  r_insert_entry (Layer->polygon_tree, (BoxType *) polygon, 0);
   return (polygon);
 }
 
 /* ---------------------------------------------------------------------------
  * creates a new text on a layer
  */
-TextTypePtr
-CreateNewText (LayerTypePtr Layer, FontTypePtr PCBFont,
+TextType *
+CreateNewText (LayerType *Layer, FontType *PCBFont,
 	       Coord X, Coord Y,
 	       unsigned Direction, int Scale, char *TextString, FlagType Flags)
 {
@@ -616,17 +616,17 @@ CreateNewText (LayerTypePtr Layer, FontTypePtr PCBFont,
   text->ID = ID++;
   if (!Layer->text_tree)
     Layer->text_tree = r_create_tree (NULL, 0, 0);
-  r_insert_entry (Layer->text_tree, (BoxTypePtr) text, 0);
+  r_insert_entry (Layer->text_tree, (BoxType *) text, 0);
   return (text);
 }
 
 /* ---------------------------------------------------------------------------
  * creates a new polygon on a layer
  */
-PolygonTypePtr
-CreateNewPolygon (LayerTypePtr Layer, FlagType Flags)
+PolygonType *
+CreateNewPolygon (LayerType *Layer, FlagType Flags)
 {
-  PolygonTypePtr polygon = GetPolygonMemory (Layer);
+  PolygonType *polygon = GetPolygonMemory (Layer);
 
   /* copy values */
   polygon->Flags = Flags;
@@ -640,10 +640,10 @@ CreateNewPolygon (LayerTypePtr Layer, FlagType Flags)
 /* ---------------------------------------------------------------------------
  * creates a new point in a polygon
  */
-PointTypePtr
-CreateNewPointInPolygon (PolygonTypePtr Polygon, Coord X, Coord Y)
+PointType *
+CreateNewPointInPolygon (PolygonType *Polygon, Coord X, Coord Y)
 {
-  PointTypePtr point = GetPointMemoryInPolygon (Polygon);
+  PointType *point = GetPointMemoryInPolygon (Polygon);
 
   /* copy values */
   point->X = X;
@@ -667,20 +667,19 @@ CreateNewHoleInPolygon (PolygonType *Polygon)
  * creates an new element
  * memory is allocated if needed
  */
-ElementTypePtr
-CreateNewElement (DataTypePtr Data, ElementTypePtr Element,
-		  FontTypePtr PCBFont,
-		  FlagType Flags,
+ElementType *
+CreateNewElement (DataType *Data, FontType *PCBFont, FlagType Flags,
 		  char *Description, char *NameOnPCB, char *Value,
 		  Coord TextX, Coord TextY, BYTE Direction,
 		  int TextScale, FlagType TextFlags, bool uniqueName)
 {
+  ElementType *Element;
+
 #ifdef DEBUG
   printf("Entered CreateNewElement.....\n");
 #endif
 
-  if (!Element)
-    Element = GetElementMemory (Data);
+  Element = GetElementMemory (Data);
 
   /* copy values and set additional information */
   TextScale = MAX (MIN_TEXTSCALE, TextScale);
@@ -708,8 +707,8 @@ CreateNewElement (DataTypePtr Data, ElementTypePtr Element,
 /* ---------------------------------------------------------------------------
  * creates a new arc in an element
  */
-ArcTypePtr
-CreateNewArcInElement (ElementTypePtr Element,
+ArcType *
+CreateNewArcInElement (ElementType *Element,
 		       Coord X, Coord Y,
 		       Coord Width, Coord Height,
 		       Angle angle, Angle delta, Coord Thickness)
@@ -746,8 +745,8 @@ CreateNewArcInElement (ElementTypePtr Element,
 /* ---------------------------------------------------------------------------
  * creates a new line for an element
  */
-LineTypePtr
-CreateNewLineInElement (ElementTypePtr Element,
+LineType *
+CreateNewLineInElement (ElementType *Element,
 			Coord X1, Coord Y1,
 			Coord X2, Coord Y2,
 			Coord Thickness)
@@ -775,14 +774,14 @@ CreateNewLineInElement (ElementTypePtr Element,
 /* ---------------------------------------------------------------------------
  * creates a new pin in an element
  */
-PinTypePtr
-CreateNewPin (ElementTypePtr Element,
+PinType *
+CreateNewPin (ElementType *Element,
 	      Coord X, Coord Y,
 	      Coord Thickness, Coord Clearance, Coord Mask,
 	      Coord DrillingHole, char *Name, char *Number,
 	      FlagType Flags)
 {
-  PinTypePtr pin = GetPinMemory (Element);
+  PinType *pin = GetPinMemory (Element);
 
   /* copy values */
   pin->X = X;
@@ -844,13 +843,13 @@ CreateNewPin (ElementTypePtr Element,
 /* ---------------------------------------------------------------------------
  * creates a new pad in an element
  */
-PadTypePtr
-CreateNewPad (ElementTypePtr Element,
+PadType *
+CreateNewPad (ElementType *Element,
 	      Coord X1, Coord Y1, Coord X2,
 	      Coord Y2, Coord Thickness, Coord Clearance,
 	      Coord Mask, char *Name, char *Number, FlagType Flags)
 {
-  PadTypePtr pad = GetPadMemory (Element);
+  PadType *pad = GetPadMemory (Element);
 
   /* copy values */
   if (X1 > X2 || (X1 == X2 && Y1 > Y2))
@@ -884,7 +883,7 @@ CreateNewPad (ElementTypePtr Element,
  * copies the values to the appropriate text object
  */
 static void
-AddTextToElement (TextTypePtr Text, FontTypePtr PCBFont,
+AddTextToElement (TextType *Text, FontType *PCBFont,
 		  Coord X, Coord Y,
 		  unsigned Direction, char *TextString, int Scale, FlagType Flags)
 {
@@ -904,18 +903,18 @@ AddTextToElement (TextTypePtr Text, FontTypePtr PCBFont,
 /* ---------------------------------------------------------------------------
  * creates a new line in a symbol
  */
-LineTypePtr
-CreateNewLineInSymbol (SymbolTypePtr Symbol,
+LineType *
+CreateNewLineInSymbol (SymbolType *Symbol,
 		       Coord X1, Coord Y1,
 		       Coord X2, Coord Y2, Coord Thickness)
 {
-  LineTypePtr line = Symbol->Line;
+  LineType *line = Symbol->Line;
 
   /* realloc new memory if necessary and clear it */
   if (Symbol->LineN >= Symbol->LineMax)
     {
       Symbol->LineMax += STEP_SYMBOLLINE;
-      line = (LineTypePtr)realloc (line, Symbol->LineMax * sizeof (LineType));
+      line = (LineType *)realloc (line, Symbol->LineMax * sizeof (LineType));
       Symbol->Line = line;
       memset (line + Symbol->LineN, 0, STEP_SYMBOLLINE * sizeof (LineType));
     }
@@ -936,7 +935,7 @@ CreateNewLineInSymbol (SymbolTypePtr Symbol,
  * if the fonts filename doesn't contain a directory component
  */
 void
-CreateDefaultFont (PCBTypePtr pcb)
+CreateDefaultFont (PCBType *pcb)
 {
   if (ParseFont (&pcb->Font, Settings.FontFile))
     Message (_("Can't find font-symbol-file '%s'\n"), Settings.FontFile);
@@ -946,11 +945,11 @@ CreateDefaultFont (PCBTypePtr pcb)
  * adds a new line to the rubberband list of 'Crosshair.AttachedObject'
  * if Layer == 0  it is a rat line
  */
-RubberbandTypePtr
-CreateNewRubberbandEntry (LayerTypePtr Layer,
-			  LineTypePtr Line, PointTypePtr MovedPoint)
+RubberbandType *
+CreateNewRubberbandEntry (LayerType *Layer,
+			  LineType *Line, PointType *MovedPoint)
 {
-  RubberbandTypePtr ptr = GetRubberbandMemory ();
+  RubberbandType *ptr = GetRubberbandMemory ();
 
   /* we toggle the RUBBERENDFLAG of the line to determine if */
   /* both points are being moved. */
@@ -964,10 +963,10 @@ CreateNewRubberbandEntry (LayerTypePtr Layer,
 /* ---------------------------------------------------------------------------
  * Add a new net to the netlist menu
  */
-LibraryMenuTypePtr
-CreateNewNet (LibraryTypePtr lib, char *name, char *style)
+LibraryMenuType *
+CreateNewNet (LibraryType *lib, char *name, char *style)
 {
-  LibraryMenuTypePtr menu;
+  LibraryMenuType *menu;
   char temp[64];
 
   sprintf (temp, "  %s", name);
@@ -984,10 +983,10 @@ CreateNewNet (LibraryTypePtr lib, char *name, char *style)
 /* ---------------------------------------------------------------------------
  * Add a connection to the net
  */
-LibraryEntryTypePtr
-CreateNewConnection (LibraryMenuTypePtr net, char *conn)
+LibraryEntryType *
+CreateNewConnection (LibraryMenuType *net, char *conn)
 {
-  LibraryEntryTypePtr entry = GetLibraryEntryMemory (net);
+  LibraryEntryType *entry = GetLibraryEntryMemory (net);
 
   entry->ListEntry = STRDUP (conn);
   return (entry);
@@ -996,8 +995,8 @@ CreateNewConnection (LibraryMenuTypePtr net, char *conn)
 /* ---------------------------------------------------------------------------
  * Add an attribute to a list.
  */
-AttributeTypePtr
-CreateNewAttribute (AttributeListTypePtr list, char *name, char *value)
+AttributeType *
+CreateNewAttribute (AttributeListType *list, char *name, char *value)
 {
   if (list->Number >= list->Max)
     {
diff --git a/src/create.h b/src/create.h
index ccab272..e9c2697 100644
--- a/src/create.h
+++ b/src/create.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for create routines
@@ -38,53 +37,32 @@
    things.  */
 void CreateBeLenient (bool);
 
-DataTypePtr CreateNewBuffer (void);
-void pcb_colors_from_settings (PCBTypePtr);
-PCBTypePtr CreateNewPCB (bool);
+DataType * CreateNewBuffer (void);
+void pcb_colors_from_settings (PCBType *);
+PCBType * CreateNewPCB (bool);
 /* Called after PCB->Data->LayerN is set.  Returns zero if no errors,
    else nonzero.  */
-int CreateNewPCBPost (PCBTypePtr, int /* set defaults */);
-PinTypePtr CreateNewVia (DataTypePtr, Coord, Coord, Coord, Coord,
-			 Coord, Coord, char *, FlagType);
-LineTypePtr CreateDrawnLineOnLayer (LayerTypePtr, Coord, Coord, Coord,
-				    Coord, Coord, Coord, FlagType);
-LineTypePtr CreateNewLineOnLayer (LayerTypePtr, Coord, Coord, Coord,
-				  Coord, Coord, Coord, FlagType);
-RatTypePtr CreateNewRat (DataTypePtr, Coord, Coord, Coord,
-			 Coord, Cardinal, Cardinal, Coord, FlagType);
-ArcTypePtr CreateNewArcOnLayer (LayerTypePtr, Coord, Coord, Coord, Coord,
-				Angle, Angle, Coord, Coord, FlagType);
-PolygonTypePtr CreateNewPolygonFromRectangle (LayerTypePtr, Coord,
-					      Coord, Coord,
-					      Coord, FlagType);
-TextTypePtr CreateNewText (LayerTypePtr, FontTypePtr, Coord,
-			   Coord, unsigned, int, char *, FlagType);
-PolygonTypePtr CreateNewPolygon (LayerTypePtr, FlagType);
-PointTypePtr CreateNewPointInPolygon (PolygonTypePtr,
-				      Coord, Coord);
-PolygonType *CreateNewHoleInPolygon (PolygonType *polygon);
-ElementTypePtr CreateNewElement (DataTypePtr, ElementTypePtr,
-				 FontTypePtr, FlagType, char *, char *,
-				 char *, Coord, Coord, BYTE,
-				 int, FlagType, bool);
-LineTypePtr CreateNewLineInElement (ElementTypePtr, Coord, Coord,
-				    Coord, Coord, Coord);
-ArcTypePtr CreateNewArcInElement (ElementTypePtr, Coord, Coord,
-				  Coord, Coord, Angle, Angle, Coord);
-PinTypePtr CreateNewPin (ElementTypePtr, Coord, Coord,
-			 Coord, Coord, Coord, Coord,
-			 char *, char *, FlagType);
-PadTypePtr CreateNewPad (ElementTypePtr, Coord, Coord,
-			 Coord, Coord, Coord, Coord,
-			 Coord, char *, char *, FlagType);
-LineTypePtr CreateNewLineInSymbol (SymbolTypePtr, Coord, Coord,
-				   Coord, Coord, Coord);
-void CreateDefaultFont (PCBTypePtr);
-RubberbandTypePtr CreateNewRubberbandEntry (LayerTypePtr,
-					    LineTypePtr, PointTypePtr);
-LibraryMenuTypePtr CreateNewNet (LibraryTypePtr, char *, char *);
-LibraryEntryTypePtr CreateNewConnection (LibraryMenuTypePtr, char *);
-
-AttributeTypePtr CreateNewAttribute (AttributeListTypePtr list, char *name, char *value);
+int CreateNewPCBPost (PCBType *, int /* set defaults */);
+PinType * CreateNewVia (DataType *, Coord, Coord, Coord, Coord, Coord, Coord, char *, FlagType);
+LineType * CreateDrawnLineOnLayer (LayerType *, Coord, Coord, Coord, Coord, Coord, Coord, FlagType);
+LineType * CreateNewLineOnLayer (LayerType *, Coord, Coord, Coord, Coord, Coord, Coord, FlagType);
+RatType * CreateNewRat (DataType *, Coord, Coord, Coord, Coord, Cardinal, Cardinal, Coord, FlagType);
+ArcType * CreateNewArcOnLayer (LayerType *, Coord, Coord, Coord, Coord, Angle, Angle, Coord, Coord, FlagType);
+PolygonType * CreateNewPolygonFromRectangle (LayerType *, Coord, Coord, Coord, Coord, FlagType);
+TextType * CreateNewText (LayerType *, FontType *, Coord, Coord, unsigned, int, char *, FlagType);
+PolygonType * CreateNewPolygon (LayerType *, FlagType);
+PointType * CreateNewPointInPolygon (PolygonType *, Coord, Coord);
+PolygonType * CreateNewHoleInPolygon (PolygonType *polygon);
+ElementType * CreateNewElement (DataType *, FontType *, FlagType, char *, char *, char *, Coord, Coord, BYTE, int, FlagType, bool);
+LineType * CreateNewLineInElement (ElementType *, Coord, Coord, Coord, Coord, Coord);
+ArcType * CreateNewArcInElement (ElementType *, Coord, Coord, Coord, Coord, Angle, Angle, Coord);
+PinType * CreateNewPin (ElementType *, Coord, Coord, Coord, Coord, Coord, Coord, char *, char *, FlagType);
+PadType * CreateNewPad (ElementType *, Coord, Coord, Coord, Coord, Coord, Coord, Coord, char *, char *, FlagType);
+LineType * CreateNewLineInSymbol (SymbolType *, Coord, Coord, Coord, Coord, Coord);
+void CreateDefaultFont (PCBType *);
+RubberbandType * CreateNewRubberbandEntry (LayerType *, LineType *, PointType *);
+LibraryMenuType * CreateNewNet (LibraryType *, char *, char *);
+LibraryEntryType * CreateNewConnection (LibraryMenuType *, char *);
+AttributeType * CreateNewAttribute (AttributeListType *list, char *name, char *value);
 
 #endif
diff --git a/src/crosshair.c b/src/crosshair.c
index d927cf8..1079c5f 100644
--- a/src/crosshair.c
+++ b/src/crosshair.c
@@ -1,6 +1,3 @@
-/* $Id$ */
-/* 15 Oct 2008 Ineiev: add different crosshair shapes */
-
 /*
  *                            COPYRIGHT
  *
@@ -39,6 +36,7 @@
 #include <math.h>
 
 #include "global.h"
+#include "hid_draw.h"
 
 #include "crosshair.h"
 #include "data.h"
@@ -54,8 +52,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 typedef struct
 {
   int x, y;
@@ -64,9 +60,9 @@ typedef struct
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static void XORPolygon (PolygonTypePtr, Coord, Coord);
-static void XORDrawElement (ElementTypePtr, Coord, Coord);
-static void XORDrawBuffer (BufferTypePtr);
+static void XORPolygon (PolygonType *, Coord, Coord);
+static void XORDrawElement (ElementType *, Coord, Coord);
+static void XORDrawBuffer (BufferType *);
 static void XORDrawInsertPointObject (void);
 static void XORDrawMoveOrCopyObject (void);
 static void XORDrawAttachedLine (Coord, Coord, Coord, Coord, Coord);
@@ -80,24 +76,24 @@ thindraw_moved_pv (PinType *pv, Coord x, Coord y)
   moved_pv.X += x;
   moved_pv.Y += y;
 
-  gui->thindraw_pcb_pv (Crosshair.GC, Crosshair.GC, &moved_pv, true, false);
+  gui->graphics->thindraw_pcb_pv (Crosshair.GC, Crosshair.GC, &moved_pv, true, false);
 }
 
 /* ---------------------------------------------------------------------------
  * creates a tmp polygon with coordinates converted to screen system
  */
 static void
-XORPolygon (PolygonTypePtr polygon, Coord dx, Coord dy)
+XORPolygon (PolygonType *polygon, Coord dx, Coord dy)
 {
   Cardinal i;
   for (i = 0; i < polygon->PointN; i++)
     {
       Cardinal next = next_contour_point (polygon, i);
-      gui->draw_line (Crosshair.GC,
-                      polygon->Points[i].X + dx,
-                      polygon->Points[i].Y + dy,
-                      polygon->Points[next].X + dx,
-                      polygon->Points[next].Y + dy);
+      gui->graphics->draw_line (Crosshair.GC,
+                                polygon->Points[i].X + dx,
+                                polygon->Points[i].Y + dy,
+                                polygon->Points[next].X + dx,
+                                polygon->Points[next].Y + dy);
     }
 }
 
@@ -108,7 +104,7 @@ static void
 XORDrawAttachedArc (Coord thick)
 {
   ArcType arc;
-  BoxTypePtr bx;
+  BoxType *bx;
   Coord wx, wy;
   Angle sa, dir;
   Coord wid = thick / 2;
@@ -148,14 +144,12 @@ XORDrawAttachedArc (Coord thick)
   arc.Width = arc.Height = wy;
   bx = GetArcEnds (&arc);
   /*  sa = sa - 180; */
-  gui->draw_arc (Crosshair.GC, arc.X, arc.Y, wy + wid, wy + wid, sa, dir);
+  gui->graphics->draw_arc (Crosshair.GC, arc.X, arc.Y, wy + wid, wy + wid, sa, dir);
   if (wid > pixel_slop)
     {
-      gui->draw_arc (Crosshair.GC, arc.X, arc.Y, wy - wid, wy - wid, sa, dir);
-      gui->draw_arc (Crosshair.GC, bx->X1, bx->Y1,
-		     wid, wid, sa, -180 * SGN (dir));
-      gui->draw_arc (Crosshair.GC, bx->X2, bx->Y2,
-		     wid, wid, sa + dir, 180 * SGN (dir));
+      gui->graphics->draw_arc (Crosshair.GC, arc.X, arc.Y, wy - wid, wy - wid, sa, dir);
+      gui->graphics->draw_arc (Crosshair.GC, bx->X1, bx->Y1, wid, wid, sa,      -180 * SGN (dir));
+      gui->graphics->draw_arc (Crosshair.GC, bx->X2, bx->Y2, wid, wid, sa + dir, 180 * SGN (dir));
     }
 }
 
@@ -176,14 +170,13 @@ XORDrawAttachedLine (Coord x1, Coord y1, Coord x2, Coord y2, Coord thick)
     h = 0.0;
   ox = dy * h + 0.5 * SGN (dy);
   oy = -(dx * h + 0.5 * SGN (dx));
-  gui->draw_line (Crosshair.GC, x1 + ox, y1 + oy, x2 + ox, y2 + oy);
+  gui->graphics->draw_line (Crosshair.GC, x1 + ox, y1 + oy, x2 + ox, y2 + oy);
   if (abs (ox) >= pixel_slop || abs (oy) >= pixel_slop)
     {
       Angle angle = atan2 (dx, dy) * 57.295779;
-      gui->draw_line (Crosshair.GC, x1 - ox, y1 - oy, x2 - ox, y2 - oy);
-      gui->draw_arc (Crosshair.GC,
-		     x1, y1, thick / 2, thick / 2, angle - 180, 180);
-      gui->draw_arc (Crosshair.GC, x2, y2, thick / 2, thick / 2, angle, 180);
+      gui->graphics->draw_line (Crosshair.GC, x1 - ox, y1 - oy, x2 - ox, y2 - oy);
+      gui->graphics->draw_arc (Crosshair.GC, x1, y1, thick / 2, thick / 2, angle - 180, 180);
+      gui->graphics->draw_arc (Crosshair.GC, x2, y2, thick / 2, thick / 2, angle, 180);
     }
 }
 
@@ -191,50 +184,51 @@ XORDrawAttachedLine (Coord x1, Coord y1, Coord x2, Coord y2, Coord thick)
  * draws the elements of a loaded circuit which is to be merged in
  */
 static void
-XORDrawElement (ElementTypePtr Element, Coord DX, Coord DY)
+XORDrawElement (ElementType *Element, Coord DX, Coord DY)
 {
   /* if no silkscreen, draw the bounding box */
   if (Element->ArcN == 0 && Element->LineN == 0)
     {
-      gui->draw_line (Crosshair.GC,
-		      DX + Element->BoundingBox.X1,
-		      DY + Element->BoundingBox.Y1,
-		      DX + Element->BoundingBox.X1,
-		      DY + Element->BoundingBox.Y2);
-      gui->draw_line (Crosshair.GC,
-		      DX + Element->BoundingBox.X1,
-		      DY + Element->BoundingBox.Y2,
-		      DX + Element->BoundingBox.X2,
-		      DY + Element->BoundingBox.Y2);
-      gui->draw_line (Crosshair.GC,
-		      DX + Element->BoundingBox.X2,
-		      DY + Element->BoundingBox.Y2,
-		      DX + Element->BoundingBox.X2,
-		      DY + Element->BoundingBox.Y1);
-      gui->draw_line (Crosshair.GC,
-		      DX + Element->BoundingBox.X2,
-		      DY + Element->BoundingBox.Y1,
-		      DX + Element->BoundingBox.X1,
-		      DY + Element->BoundingBox.Y1);
+      gui->graphics->draw_line (Crosshair.GC,
+                                DX + Element->BoundingBox.X1,
+                                DY + Element->BoundingBox.Y1,
+                                DX + Element->BoundingBox.X1,
+                                DY + Element->BoundingBox.Y2);
+      gui->graphics->draw_line (Crosshair.GC,
+                                DX + Element->BoundingBox.X1,
+                                DY + Element->BoundingBox.Y2,
+                                DX + Element->BoundingBox.X2,
+                                DY + Element->BoundingBox.Y2);
+      gui->graphics->draw_line (Crosshair.GC,
+                                DX + Element->BoundingBox.X2,
+                                DY + Element->BoundingBox.Y2,
+                                DX + Element->BoundingBox.X2,
+                                DY + Element->BoundingBox.Y1);
+      gui->graphics->draw_line (Crosshair.GC,
+                                DX + Element->BoundingBox.X2,
+                                DY + Element->BoundingBox.Y1,
+                                DX + Element->BoundingBox.X1,
+                                DY + Element->BoundingBox.Y1);
     }
   else
     {
       ELEMENTLINE_LOOP (Element);
       {
-	gui->draw_line (Crosshair.GC,
-			DX + line->Point1.X,
-			DY + line->Point1.Y,
-			DX + line->Point2.X, DY + line->Point2.Y);
+        gui->graphics->draw_line (Crosshair.GC,
+                                  DX + line->Point1.X,
+                                  DY + line->Point1.Y,
+                                  DX + line->Point2.X,
+                                  DY + line->Point2.Y);
       }
       END_LOOP;
 
       /* arc coordinates and angles have to be converted to X11 notation */
       ARC_LOOP (Element);
       {
-	gui->draw_arc (Crosshair.GC,
-		       DX + arc->X,
-		       DY + arc->Y,
-		       arc->Width, arc->Height, arc->StartAngle, arc->Delta);
+        gui->graphics->draw_arc (Crosshair.GC,
+                                 DX + arc->X,
+                                 DY + arc->Y,
+                                 arc->Width, arc->Height, arc->StartAngle, arc->Delta);
       }
       END_LOOP;
     }
@@ -256,34 +250,38 @@ XORDrawElement (ElementTypePtr Element, Coord DX, Coord DY)
         moved_pad.Point1.X += DX; moved_pad.Point1.Y += DY;
         moved_pad.Point2.X += DX; moved_pad.Point2.Y += DY;
 
-        gui->thindraw_pcb_pad (Crosshair.GC, &moved_pad, false, false);
+        gui->graphics->thindraw_pcb_pad (Crosshair.GC, &moved_pad, false, false);
       }
   }
   END_LOOP;
   /* mark */
-  gui->draw_line (Crosshair.GC,
-		  Element->MarkX + DX - EMARK_SIZE,
-		  Element->MarkY + DY,
-		  Element->MarkX + DX, Element->MarkY + DY - EMARK_SIZE);
-  gui->draw_line (Crosshair.GC,
-		  Element->MarkX + DX + EMARK_SIZE,
-		  Element->MarkY + DY,
-		  Element->MarkX + DX, Element->MarkY + DY - EMARK_SIZE);
-  gui->draw_line (Crosshair.GC,
-		  Element->MarkX + DX - EMARK_SIZE,
-		  Element->MarkY + DY,
-		  Element->MarkX + DX, Element->MarkY + DY + EMARK_SIZE);
-  gui->draw_line (Crosshair.GC,
-		  Element->MarkX + DX + EMARK_SIZE,
-		  Element->MarkY + DY,
-		  Element->MarkX + DX, Element->MarkY + DY + EMARK_SIZE);
+  gui->graphics->draw_line (Crosshair.GC,
+                            Element->MarkX + DX - EMARK_SIZE,
+                            Element->MarkY + DY,
+                            Element->MarkX + DX,
+                            Element->MarkY + DY - EMARK_SIZE);
+  gui->graphics->draw_line (Crosshair.GC,
+                            Element->MarkX + DX + EMARK_SIZE,
+                            Element->MarkY + DY,
+                            Element->MarkX + DX,
+                            Element->MarkY + DY - EMARK_SIZE);
+  gui->graphics->draw_line (Crosshair.GC,
+                            Element->MarkX + DX - EMARK_SIZE,
+                            Element->MarkY + DY,
+                            Element->MarkX + DX,
+                            Element->MarkY + DY + EMARK_SIZE);
+  gui->graphics->draw_line (Crosshair.GC,
+                            Element->MarkX + DX + EMARK_SIZE,
+                            Element->MarkY + DY,
+                            Element->MarkX + DX,
+                            Element->MarkY + DY + EMARK_SIZE);
 }
 
 /* ---------------------------------------------------------------------------
  * draws all visible and attached objects of the pastebuffer
  */
 static void
-XORDrawBuffer (BufferTypePtr Buffer)
+XORDrawBuffer (BufferType *Buffer)
 {
   Cardinal i;
   Coord x, y;
@@ -296,7 +294,7 @@ XORDrawBuffer (BufferTypePtr Buffer)
   for (i = 0; i < max_copper_layer + 2; i++)
     if (PCB->Data->Layer[i].On)
       {
-	LayerTypePtr layer = &Buffer->Data->Layer[i];
+	LayerType *layer = &Buffer->Data->Layer[i];
 
 	LINE_LOOP (layer);
 	{
@@ -305,25 +303,25 @@ XORDrawBuffer (BufferTypePtr Buffer)
 					y +line->Point1.Y, x +line->Point2.X,
 					y +line->Point2.Y, line->Thickness);
 */
-	  gui->draw_line (Crosshair.GC,
-			  x + line->Point1.X, y + line->Point1.Y,
-			  x + line->Point2.X, y + line->Point2.Y);
+	gui->graphics->draw_line (Crosshair.GC,
+	                          x + line->Point1.X, y + line->Point1.Y,
+	                          x + line->Point2.X, y + line->Point2.Y);
 	}
 	END_LOOP;
 	ARC_LOOP (layer);
 	{
-	  gui->draw_arc (Crosshair.GC,
-			 x + arc->X,
-			 y + arc->Y,
-			 arc->Width,
-			 arc->Height, arc->StartAngle, arc->Delta);
+	  gui->graphics->draw_arc (Crosshair.GC,
+	                           x + arc->X,
+	                           y + arc->Y,
+	                           arc->Width,
+	                           arc->Height, arc->StartAngle, arc->Delta);
 	}
 	END_LOOP;
 	TEXT_LOOP (layer);
 	{
-	  BoxTypePtr box = &text->BoundingBox;
-	  gui->draw_rect (Crosshair.GC,
-			  x + box->X1, y + box->Y1, x + box->X2, y + box->Y2);
+	  BoxType *box = &text->BoundingBox;
+	  gui->graphics->draw_rect (Crosshair.GC,
+	                            x + box->X1, y + box->Y1, x + box->X2, y + box->Y2);
 	}
 	END_LOOP;
 	/* the tmp polygon has n+1 points because the first
@@ -360,15 +358,13 @@ XORDrawBuffer (BufferTypePtr Buffer)
 static void
 XORDrawInsertPointObject (void)
 {
-  LineTypePtr line = (LineTypePtr) Crosshair.AttachedObject.Ptr2;
-  PointTypePtr point = (PointTypePtr) Crosshair.AttachedObject.Ptr3;
+  LineType *line = (LineType *) Crosshair.AttachedObject.Ptr2;
+  PointType *point = (PointType *) Crosshair.AttachedObject.Ptr3;
 
   if (Crosshair.AttachedObject.Type != NO_TYPE)
     {
-      gui->draw_line (Crosshair.GC,
-		      point->X, point->Y, line->Point1.X, line->Point1.Y);
-      gui->draw_line (Crosshair.GC,
-		      point->X, point->Y, line->Point2.X, line->Point2.Y);
+      gui->graphics->draw_line (Crosshair.GC, point->X, point->Y, line->Point1.X, line->Point1.Y);
+      gui->graphics->draw_line (Crosshair.GC, point->X, point->Y, line->Point2.X, line->Point2.Y);
     }
 }
 
@@ -378,7 +374,7 @@ XORDrawInsertPointObject (void)
 static void
 XORDrawMoveOrCopyObject (void)
 {
-  RubberbandTypePtr ptr;
+  RubberbandType *ptr;
   Cardinal i;
   Coord dx = Crosshair.X - Crosshair.AttachedObject.X,
     dy = Crosshair.Y - Crosshair.AttachedObject.Y;
@@ -387,14 +383,14 @@ XORDrawMoveOrCopyObject (void)
     {
     case VIA_TYPE:
       {
-        PinTypePtr via = (PinTypePtr) Crosshair.AttachedObject.Ptr1;
+        PinType *via = (PinType *) Crosshair.AttachedObject.Ptr1;
         thindraw_moved_pv (via, dx, dy);
         break;
       }
 
     case LINE_TYPE:
       {
-	LineTypePtr line = (LineTypePtr) Crosshair.AttachedObject.Ptr2;
+	LineType *line = (LineType *) Crosshair.AttachedObject.Ptr2;
 
 	XORDrawAttachedLine (line->Point1.X + dx, line->Point1.Y + dy,
 			     line->Point2.X + dx, line->Point2.Y + dy,
@@ -404,19 +400,19 @@ XORDrawMoveOrCopyObject (void)
 
     case ARC_TYPE:
       {
-	ArcTypePtr Arc = (ArcTypePtr) Crosshair.AttachedObject.Ptr2;
+	ArcType *Arc = (ArcType *) Crosshair.AttachedObject.Ptr2;
 
-	gui->draw_arc (Crosshair.GC,
-		       Arc->X + dx,
-		       Arc->Y + dy,
-		       Arc->Width, Arc->Height, Arc->StartAngle, Arc->Delta);
+	gui->graphics->draw_arc (Crosshair.GC,
+	                         Arc->X + dx,
+	                         Arc->Y + dy,
+	                         Arc->Width, Arc->Height, Arc->StartAngle, Arc->Delta);
 	break;
       }
 
     case POLYGON_TYPE:
       {
-	PolygonTypePtr polygon =
-	  (PolygonTypePtr) Crosshair.AttachedObject.Ptr2;
+	PolygonType *polygon =
+	  (PolygonType *) Crosshair.AttachedObject.Ptr2;
 
 	/* the tmp polygon has n+1 points because the first
 	 * and the last one are set to the same coordinates
@@ -427,11 +423,11 @@ XORDrawMoveOrCopyObject (void)
 
     case LINEPOINT_TYPE:
       {
-	LineTypePtr line;
-	PointTypePtr point;
+	LineType *line;
+	PointType *point;
 
-	line = (LineTypePtr) Crosshair.AttachedObject.Ptr2;
-	point = (PointTypePtr) Crosshair.AttachedObject.Ptr3;
+	line = (LineType *) Crosshair.AttachedObject.Ptr2;
+	point = (PointType *) Crosshair.AttachedObject.Ptr3;
 	if (point == &line->Point1)
 	  XORDrawAttachedLine (point->X + dx,
 			       point->Y + dy, line->Point2.X,
@@ -445,12 +441,12 @@ XORDrawMoveOrCopyObject (void)
 
     case POLYGONPOINT_TYPE:
       {
-	PolygonTypePtr polygon;
-	PointTypePtr point;
+	PolygonType *polygon;
+	PointType *point;
 	Cardinal point_idx, prev, next;
 
-	polygon = (PolygonTypePtr) Crosshair.AttachedObject.Ptr2;
-	point = (PointTypePtr) Crosshair.AttachedObject.Ptr3;
+	polygon = (PolygonType *) Crosshair.AttachedObject.Ptr2;
+	point = (PointType *) Crosshair.AttachedObject.Ptr3;
 	point_idx = polygon_point_idx (polygon, point);
 
 	/* get previous and following point */
@@ -458,33 +454,33 @@ XORDrawMoveOrCopyObject (void)
 	next = next_contour_point (polygon, point_idx);
 
 	/* draw the two segments */
-	gui->draw_line (Crosshair.GC,
-			polygon->Points[prev].X, polygon->Points[prev].Y,
-			point->X + dx, point->Y + dy);
-	gui->draw_line (Crosshair.GC,
-			point->X + dx, point->Y + dy,
-			polygon->Points[next].X, polygon->Points[next].Y);
+	gui->graphics->draw_line (Crosshair.GC,
+	                          polygon->Points[prev].X, polygon->Points[prev].Y,
+	                          point->X + dx, point->Y + dy);
+	gui->graphics->draw_line (Crosshair.GC,
+	                          point->X + dx, point->Y + dy,
+	                          polygon->Points[next].X, polygon->Points[next].Y);
 	break;
       }
 
     case ELEMENTNAME_TYPE:
       {
 	/* locate the element "mark" and draw an association line from crosshair to it */
-	ElementTypePtr element =
-	  (ElementTypePtr) Crosshair.AttachedObject.Ptr1;
+	ElementType *element =
+	  (ElementType *) Crosshair.AttachedObject.Ptr1;
 
-	gui->draw_line (Crosshair.GC,
-			element->MarkX,
-			element->MarkY, Crosshair.X, Crosshair.Y);
+	gui->graphics->draw_line (Crosshair.GC,
+	                          element->MarkX,
+	                          element->MarkY, Crosshair.X, Crosshair.Y);
 	/* fall through to move the text as a box outline */
       }
     case TEXT_TYPE:
       {
-	TextTypePtr text = (TextTypePtr) Crosshair.AttachedObject.Ptr2;
-	BoxTypePtr box = &text->BoundingBox;
-	gui->draw_rect (Crosshair.GC,
-			box->X1 + dx,
-			box->Y1 + dy, box->X2 + dx, box->Y2 + dy);
+	TextType *text = (TextType *) Crosshair.AttachedObject.Ptr2;
+	BoxType *box = &text->BoundingBox;
+	gui->graphics->draw_rect (Crosshair.GC,
+	                          box->X1 + dx,
+	                          box->Y1 + dy, box->X2 + dx, box->Y2 + dy);
 	break;
       }
 
@@ -492,7 +488,7 @@ XORDrawMoveOrCopyObject (void)
     case PAD_TYPE:
     case PIN_TYPE:
     case ELEMENT_TYPE:
-      XORDrawElement ((ElementTypePtr) Crosshair.AttachedObject.Ptr2, dx, dy);
+      XORDrawElement ((ElementType *) Crosshair.AttachedObject.Ptr2, dx, dy);
       break;
     }
 
@@ -501,7 +497,7 @@ XORDrawMoveOrCopyObject (void)
   ptr = Crosshair.AttachedObject.Rubberband;
   while (i)
     {
-      PointTypePtr point1, point2;
+      PointType *point1, *point2;
 
       if (TEST_FLAG (VIAFLAG, ptr->Line))
 	{
@@ -555,15 +551,15 @@ DrawAttached (void)
         via.Mask = 0;
         via.Flags = NoFlags ();
 
-        gui->thindraw_pcb_pv (Crosshair.GC, Crosshair.GC, &via, true, false);
+        gui->graphics->thindraw_pcb_pv (Crosshair.GC, Crosshair.GC, &via, true, false);
 
         if (TEST_FLAG (SHOWDRCFLAG, PCB))
           {
             /* XXX: Naughty cheat - use the mask to draw DRC clearance! */
             via.Mask = Settings.ViaThickness + PCB->Bloat * 2;
-            gui->set_color (Crosshair.GC, Settings.CrossColor);
-            gui->thindraw_pcb_pv (Crosshair.GC, Crosshair.GC, &via, false, true);
-            gui->set_color (Crosshair.GC, Settings.CrosshairColor);
+            gui->graphics->set_color (Crosshair.GC, Settings.CrossColor);
+            gui->graphics->thindraw_pcb_pv (Crosshair.GC, Crosshair.GC, &via, false, true);
+            gui->graphics->set_color (Crosshair.GC, Settings.CrosshairColor);
           }
         break;
       }
@@ -573,11 +569,11 @@ DrawAttached (void)
     case POLYGONHOLE_MODE:
       /* draw only if starting point is set */
       if (Crosshair.AttachedLine.State != STATE_FIRST)
-	gui->draw_line (Crosshair.GC,
-			Crosshair.AttachedLine.Point1.X,
-			Crosshair.AttachedLine.Point1.Y,
-			Crosshair.AttachedLine.Point2.X,
-			Crosshair.AttachedLine.Point2.Y);
+        gui->graphics->draw_line (Crosshair.GC,
+                                  Crosshair.AttachedLine.Point1.X,
+                                  Crosshair.AttachedLine.Point1.Y,
+                                  Crosshair.AttachedLine.Point2.X,
+                                  Crosshair.AttachedLine.Point2.Y);
 
       /* draw attached polygon only if in POLYGON_MODE or POLYGONHOLE_MODE */
       if (Crosshair.AttachedPolygon.PointN > 1)
@@ -592,10 +588,10 @@ DrawAttached (void)
 	  XORDrawAttachedArc (Settings.LineThickness);
 	  if (TEST_FLAG (SHOWDRCFLAG, PCB))
 	    {
-	      gui->set_color (Crosshair.GC, Settings.CrossColor);
+	      gui->graphics->set_color (Crosshair.GC, Settings.CrossColor);
 	      XORDrawAttachedArc (Settings.LineThickness +
 				  2 * (PCB->Bloat + 1));
-	      gui->set_color (Crosshair.GC, Settings.CrosshairColor);
+	      gui->graphics->set_color (Crosshair.GC, Settings.CrosshairColor);
 	    }
 
 	}
@@ -619,7 +615,7 @@ DrawAttached (void)
 				 PCB->RatDraw ? 10 : Settings.LineThickness);
 	  if (TEST_FLAG (SHOWDRCFLAG, PCB))
 	    {
-	      gui->set_color (Crosshair.GC, Settings.CrossColor);
+	      gui->graphics->set_color (Crosshair.GC, Settings.CrossColor);
 	      XORDrawAttachedLine (Crosshair.AttachedLine.Point1.X,
 				   Crosshair.AttachedLine.Point1.Y,
 				   Crosshair.AttachedLine.Point2.X,
@@ -632,7 +628,7 @@ DrawAttached (void)
 				     Crosshair.X, Crosshair.Y,
 				     PCB->RatDraw ? 10 : Settings.
 				     LineThickness + 2 * (PCB->Bloat + 1));
-	      gui->set_color (Crosshair.GC, Settings.CrosshairColor);
+	      gui->graphics->set_color (Crosshair.GC, Settings.CrosshairColor);
 	    }
 	}
       break;
@@ -661,7 +657,7 @@ DrawAttached (void)
       y1 = Crosshair.AttachedBox.Point1.Y;
       x2 = Crosshair.AttachedBox.Point2.X;
       y2 = Crosshair.AttachedBox.Point2.Y;
-      gui->draw_rect (Crosshair.GC, x1, y1, x2, y2);
+      gui->graphics->draw_rect (Crosshair.GC, x1, y1, x2, y2);
     }
 }
 
@@ -676,11 +672,11 @@ DrawMark (void)
   if (!Marked.status)
     return;
 
-  gui->draw_line (Crosshair.GC,
+  gui->graphics->draw_line (Crosshair.GC,
                   Marked.X - MARK_SIZE,
                   Marked.Y - MARK_SIZE,
                   Marked.X + MARK_SIZE, Marked.Y + MARK_SIZE);
-  gui->draw_line (Crosshair.GC,
+  gui->graphics->draw_line (Crosshair.GC,
                   Marked.X + MARK_SIZE,
                   Marked.Y - MARK_SIZE,
                   Marked.X - MARK_SIZE, Marked.Y + MARK_SIZE);
@@ -819,7 +815,7 @@ check_snap_object (struct snap_data *snap_data, Coord x, Coord y,
   double sq_dist;
 
   sq_dist = crosshair_sq_dist (snap_data->crosshair, x, y);
-  if (sq_dist < snap_data->nearest_sq_dist ||
+  if (sq_dist <= snap_data->nearest_sq_dist ||
       (prefer_to_grid && snap_data->nearest_is_grid && !gui->shift_is_pressed()))
     {
       snap_data->x = x;
@@ -991,7 +987,7 @@ FitCrosshairIntoGrid (Coord X, Coord Y)
        (Settings.Mode == MOVE_MODE &&
         Crosshair.AttachedObject.Type == LINEPOINT_TYPE)))
     {
-      PadTypePtr pad = (PadTypePtr) ptr2;
+      PadType *pad = (PadType *) ptr2;
       LayerType *desired_layer;
       Cardinal desired_group;
       Cardinal SLayer, CLayer;
@@ -1026,8 +1022,8 @@ FitCrosshairIntoGrid (Coord X, Coord Y)
   if (ans != NO_TYPE)
     {
       PadType *pad = (PadType *)ptr2;
-      check_snap_object (&snap_data, (pad->Point1.X + pad->Point2.X) / 2,
-                                     (pad->Point1.Y + pad->Point2.Y) / 2,
+      check_snap_object (&snap_data, pad->Point1.X + (pad->Point2.X - pad->Point1.X) / 2,
+                                     pad->Point1.Y + (pad->Point2.Y - pad->Point1.Y) / 2,
                          true);
     }
 
@@ -1069,7 +1065,8 @@ FitCrosshairIntoGrid (Coord X, Coord Y)
   ans = NO_TYPE;
   if (TEST_FLAG (SNAPPINFLAG, PCB))
     ans = SearchScreenGridSlop (Crosshair.X, Crosshair.Y,
-                                LINEPOINT_TYPE, &ptr1, &ptr2, &ptr3);
+                                LINEPOINT_TYPE | ARCPOINT_TYPE,
+                                &ptr1, &ptr2, &ptr3);
 
   if (ans != NO_TYPE)
     {
@@ -1099,7 +1096,8 @@ FitCrosshairIntoGrid (Coord X, Coord Y)
   if (Settings.Mode == ARROW_MODE)
     {
       ans = SearchScreenGridSlop (Crosshair.X, Crosshair.Y,
-                                  LINEPOINT_TYPE, &ptr1, &ptr2, &ptr3);
+                                  LINEPOINT_TYPE | ARCPOINT_TYPE,
+                                  &ptr1, &ptr2, &ptr3);
       if (ans == NO_TYPE)
         hid_action("PointCursor");
       else if (!TEST_FLAG(SELECTEDFLAG, (LineType *)ptr2))
@@ -1174,12 +1172,12 @@ SetCrosshairRange (Coord MinX, Coord MinY, Coord MaxX, Coord MaxY)
 void
 InitCrosshair (void)
 {
-  Crosshair.GC = gui->make_gc ();
+  Crosshair.GC = gui->graphics->make_gc ();
 
-  gui->set_color (Crosshair.GC, Settings.CrosshairColor);
-  gui->set_draw_xor (Crosshair.GC, 1);
-  gui->set_line_cap (Crosshair.GC, Trace_Cap);
-  gui->set_line_width (Crosshair.GC, 1);
+  gui->graphics->set_color (Crosshair.GC, Settings.CrosshairColor);
+  gui->graphics->set_draw_xor (Crosshair.GC, 1);
+  gui->graphics->set_line_cap (Crosshair.GC, Trace_Cap);
+  gui->graphics->set_line_width (Crosshair.GC, 1);
 
   /* set initial shape */
   Crosshair.shape = Basic_Crosshair_Shape;
@@ -1200,5 +1198,5 @@ void
 DestroyCrosshair (void)
 {
   FreePolygonMemory (&Crosshair.AttachedPolygon);
-  gui->destroy_gc (Crosshair.GC);
+  gui->graphics->destroy_gc (Crosshair.GC);
 }
diff --git a/src/crosshair.h b/src/crosshair.h
index 8c42067..2dd5e7e 100644
--- a/src/crosshair.h
+++ b/src/crosshair.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for crosshair routines
diff --git a/src/data.c b/src/data.c
index ebd9b29..9d6588c 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -38,8 +36,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 /* ---------------------------------------------------------------------------
  * some shared identifiers
  */
@@ -47,7 +43,7 @@ RCSID ("$Id$");
 CrosshairType Crosshair;	/* information about cursor settings */
 MarkType Marked;		/* a cross-hair mark */
 OutputType Output;		/* some widgets ... used for drawing */
-PCBTypePtr PCB;			/* pointer to layout struct */
+PCBType *PCB;			/* pointer to layout struct */
 
 char *Progname;
 SettingType Settings;
diff --git a/src/data.h b/src/data.h
index 502acdd..28cbfda 100644
--- a/src/data.h
+++ b/src/data.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* common identifiers
@@ -44,7 +43,7 @@ extern MarkType Marked;
 
 extern OutputType Output;
 
-extern PCBTypePtr PCB;
+extern PCBType *PCB;
 
 #define max_group (PCB->Data->LayerN)
 #define max_copper_layer (PCB->Data->LayerN)
diff --git a/src/djopt.c b/src/djopt.c
index 7b5a223..8508aa7 100644
--- a/src/djopt.c
+++ b/src/djopt.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -50,8 +48,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 #ifndef HAVE_RINT
 #define rint(x)  (ceil((x) - 0.5))
 #endif
@@ -147,13 +143,13 @@ djopt_set_auto_only (int argc, char **argv, Coord x, Coord y)
 }
 
 static int
-djopt_get_auto_only (int dummy)
+djopt_get_auto_only (void *data)
 {
   return autorouted_only;
 }
 
 HID_Flag djopt_flag_list[] = {
-  {"optautoonly", djopt_get_auto_only, 0}
+  {"optautoonly", djopt_get_auto_only, NULL}
 };
 
 REGISTER_FLAGS (djopt_flag_list)
@@ -872,7 +868,7 @@ move_corner (corner_s * c, int x, int y)
     }
   for (i = 0; i < c->n_lines; i++)
     {
-      LineTypePtr tl = c->lines[i]->line;
+      LineType *tl = c->lines[i]->line;
       if (tl)
 	{
 	  if (c->lines[i]->s == c)
@@ -1301,7 +1297,7 @@ orthopull_1 (corner_s * c, int fdir, int rdir, int any_sel)
       if (cn >= cm)
 	{
 	  cm = cn + 10;
-	  cs = (corner_s **) realloc (cs, cm * sizeof (corner_s));
+	  cs = (corner_s **) realloc (cs, cm * sizeof (corner_s *));
 	}
       cs[cn++] = c2;
       r2 = corner_radius (c2);
@@ -1335,7 +1331,7 @@ orthopull_1 (corner_s * c, int fdir, int rdir, int any_sel)
       if (ln >= lm)
 	{
 	  lm = ln + 10;
-	  ls = (line_s **) realloc (ls, lm * sizeof (line_s));
+	  ls = (line_s **) realloc (ls, lm * sizeof (line_s *));
 	}
       ls[ln++] = l;
       c2 = other_corner (l, c2);
@@ -2483,7 +2479,7 @@ choose_example_line (corner_s * c1, corner_s * c2)
 		 c[ci]->lines[li]->line->Clearance,
 		 flags_to_string (c[ci]->lines[li]->line->Flags, LINE_TYPE));
 	/* Pads are disqualified, as we want to mimic a trace line. */
-	if (c[ci]->lines[li]->line == (LineTypePtr) c[ci]->pad)
+	if (c[ci]->lines[li]->line == (LineType *) c[ci]->pad)
 	  {
 	    dprintf ("  bad, pad\n");
 	    continue;
@@ -2844,7 +2840,7 @@ grok_layer_groups ()
 	}
       for (j = 0; j < l->Number[i]; j++)
 	{
-	  if (l->Entries[i][j] >= 0 && l->Entries[i][j] < max_copper_layer)
+	  if (l->Entries[i][j] < max_copper_layer)
 	    {
 	      layer_type[l->Entries[i][j]] |= f;
 	      layer_groupings[l->Entries[i][j]] = i;
@@ -2858,7 +2854,7 @@ grok_layer_groups ()
 }
 
 static const char djopt_syntax[] =
-  "djopt(debumpify|unjaggy|simple|vianudge|viatrim|orthopull)\n"
+  "djopt(debumpify|unjaggy|simple|vianudge|viatrim|orthopull|splitlines)\n"
   "djopt(auto) - all of the above\n"
   "djopt(miter)";
 
@@ -2922,11 +2918,6 @@ ActionDJopt (int argc, char **argv, Coord x, Coord y)
   int layn, saved = 0;
   corner_s *c;
 
-#ifdef ENDIF
-  SwitchDrawingWindow (PCB->Zoom, Output.drawing_area->window,
-		       Settings.ShowSolderSide, false);
-#endif
-
   hid_action("Busy");
 
   lines = 0;
@@ -2954,7 +2945,7 @@ ActionDJopt (int argc, char **argv, Coord x, Coord y)
     ls->e = find_corner (pad->Point2.X, pad->Point2.Y, layern);
     ls->e->pad = pad;
     ls->layer = layern;
-    ls->line = (LineTypePtr) pad;
+    ls->line = (LineType *) pad;
     add_line_to_corner (ls, ls->s);
     add_line_to_corner (ls, ls->e);
 
diff --git a/src/djopt.h b/src/djopt.h
index bc337af..15014c1 100644
--- a/src/djopt.h
+++ b/src/djopt.h
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
diff --git a/src/dolists.h b/src/dolists.h
index d16f055..3b7c663 100644
--- a/src/dolists.h
+++ b/src/dolists.h
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 #undef REGISTER_ACTIONS
 #undef REGISTER_ATTRIBUTES
 #undef REGISTER_FLAGS
diff --git a/src/draw.c b/src/draw.c
index deb9e65..a682f9d 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -35,6 +33,7 @@
 #endif
 
 #include "global.h"
+#include "hid_draw.h"
 
 /*#include "clip.h"*/
 #include "compat.h"
@@ -61,8 +60,6 @@
 #define MAXINT (((unsigned int)(~0))>>1)
 #endif
 
-RCSID ("$Id$");
-
 #define	SMALL_SMALL_TEXT_SIZE	0
 #define	SMALL_TEXT_SIZE			1
 #define	NORMAL_TEXT_SIZE		2
@@ -83,55 +80,29 @@ static bool doing_assy = false;
  */
 static void DrawEverything (const BoxType *);
 static void DrawPPV (int group, const BoxType *);
-static void DrawLayerGroup (int, const BoxType *);
 static void AddPart (void *);
-static void SetPVColor (PinTypePtr, int);
-static void DrawEMark (ElementTypePtr, Coord, Coord, bool);
-static void DrawMask (int side, const BoxType *);
-static void DrawPaste (int side, const BoxType *);
+static void DrawEMark (ElementType *, Coord, Coord, bool);
 static void DrawRats (const BoxType *);
-static void DrawSilk (int side, const BoxType *);
 
-/*--------------------------------------------------------------------------------------
- * setup color for pin or via
- */
 static void
-SetPVColor (PinTypePtr Pin, int Type)
+set_object_color (AnyObjectType *obj, char *warn_color, char *selected_color,
+                  char *connected_color, char *found_color, char *normal_color)
 {
   char *color;
 
-  if (Type == VIA_TYPE)
-    {
-      if (!doing_pinout
-	  && TEST_FLAG (WARNFLAG | SELECTEDFLAG | FOUNDFLAG, Pin))
-	{
-	  if (TEST_FLAG (WARNFLAG, Pin))
-	    color = PCB->WarnColor;
-	  else if (TEST_FLAG (SELECTEDFLAG, Pin))
-	    color = PCB->ViaSelectedColor;
-	  else
-	    color = PCB->ConnectedColor;
-	}
-      else
-	color = PCB->ViaColor;
-    }
-  else
-    {
-      if (!doing_pinout
-	  && TEST_FLAG (WARNFLAG | SELECTEDFLAG | FOUNDFLAG, Pin))
-	{
-	  if (TEST_FLAG (WARNFLAG, Pin))
-	    color = PCB->WarnColor;
-	  else if (TEST_FLAG (SELECTEDFLAG, Pin))
-	    color = PCB->PinSelectedColor;
-	  else
-	    color = PCB->ConnectedColor;
-	}
-      else
-	color = PCB->PinColor;
-    }
+  if      (warn_color      != NULL && TEST_FLAG (WARNFLAG,      obj)) color = warn_color;
+  else if (selected_color  != NULL && TEST_FLAG (SELECTEDFLAG,  obj)) color = selected_color;
+  else if (connected_color != NULL && TEST_FLAG (CONNECTEDFLAG, obj)) color = connected_color;
+  else if (found_color     != NULL && TEST_FLAG (FOUNDFLAG,     obj)) color = found_color;
+  else                                                                color = normal_color;
 
-  gui->set_color (Output.fgGC, color);
+  gui->graphics->set_color (Output.fgGC, color);
+}
+
+static void
+set_layer_object_color (LayerType *layer, AnyObjectType *obj)
+{
+  set_object_color (obj, NULL, layer->SelectedColor, PCB->ConnectedColor, PCB->FoundColor, layer->Color);
 }
 
 /*---------------------------------------------------------------------------
@@ -196,7 +167,7 @@ _draw_pv_name (PinType *pv)
       box.Y1 = pv->Y - pv->Thickness    / 2 + Settings.PinoutTextOffsetY;
     }
 
-  gui->set_color (Output.fgGC, PCB->PinNameColor);
+  gui->graphics->set_color (Output.fgGC, PCB->PinNameColor);
 
   text.Flags = NoFlags ();
   /* Set font height to approx 56% of pin thickness */
@@ -207,27 +178,33 @@ _draw_pv_name (PinType *pv)
 
   if (gui->gui)
     doing_pinout++;
-  DrawTextLowLevel (&text, 0);
+  gui->graphics->draw_pcb_text (Output.fgGC, &text, 0);
   if (gui->gui)
     doing_pinout--;
 }
 
 static void
-_draw_pv (PinTypePtr pv, bool draw_hole)
+_draw_pv (PinType *pv, bool draw_hole)
 {
   if (TEST_FLAG (THINDRAWFLAG, PCB))
-    gui->thindraw_pcb_pv (Output.fgGC, Output.fgGC, pv, draw_hole, false);
+    gui->graphics->thindraw_pcb_pv (Output.fgGC, Output.fgGC, pv, draw_hole, false);
   else
-    gui->fill_pcb_pv (Output.fgGC, Output.bgGC, pv, draw_hole, false);
+    gui->graphics->fill_pcb_pv (Output.fgGC, Output.bgGC, pv, draw_hole, false);
 
-  if (!TEST_FLAG (HOLEFLAG, pv) && TEST_FLAG (DISPLAYNAMEFLAG, pv))
+  if ((!TEST_FLAG (HOLEFLAG, pv) && TEST_FLAG (DISPLAYNAMEFLAG, pv)) || doing_pinout)
     _draw_pv_name (pv);
 }
 
 static void
-draw_pin (PinTypePtr pin, bool draw_hole)
+draw_pin (PinType *pin, bool draw_hole)
 {
-  SetPVColor (pin, PIN_TYPE);
+  if (doing_pinout)
+    gui->graphics->set_color (Output.fgGC, PCB->PinColor);
+  else
+    set_object_color ((AnyObjectType *)pin,
+                      PCB->WarnColor, PCB->PinSelectedColor,
+                      PCB->ConnectedColor, PCB->FoundColor, PCB->PinColor);
+
   _draw_pv (pin, draw_hole);
 }
 
@@ -239,9 +216,15 @@ pin_callback (const BoxType * b, void *cl)
 }
 
 static void
-draw_via (PinTypePtr via, bool draw_hole)
+draw_via (PinType *via, bool draw_hole)
 {
-  SetPVColor (via, VIA_TYPE);
+  if (doing_pinout)
+    gui->graphics->set_color (Output.fgGC, PCB->ViaColor);
+  else
+    set_object_color ((AnyObjectType *)via,
+                      PCB->WarnColor, PCB->ViaSelectedColor,
+                      PCB->ConnectedColor, PCB->FoundColor, PCB->ViaColor);
+
   _draw_pv (via, draw_hole);
 }
 
@@ -282,7 +265,7 @@ draw_pad_name (PadType *pad)
       box.Y1 += Settings.PinoutTextOffsetY;
     }
 
-  gui->set_color (Output.fgGC, PCB->PinNameColor);
+  gui->graphics->set_color (Output.fgGC, PCB->PinNameColor);
 
   text.Flags = NoFlags ();
   /* Set font height to approx 90% of pin thickness */
@@ -291,7 +274,7 @@ draw_pad_name (PadType *pad)
   text.Y = box.Y1;
   text.Direction = vert ? 1 : 0;
 
-  DrawTextLowLevel (&text, 0);
+  gui->graphics->draw_pcb_text (Output.fgGC, &text, 0);
 }
 
 static void
@@ -302,29 +285,20 @@ _draw_pad (hidGC gc, PadType *pad, bool clear, bool mask)
 
   if (TEST_FLAG (THINDRAWFLAG, PCB) ||
       (clear && TEST_FLAG (THINDRAWPOLYFLAG, PCB)))
-    gui->thindraw_pcb_pad (gc, pad, clear, mask);
+    gui->graphics->thindraw_pcb_pad (gc, pad, clear, mask);
   else
-    gui->fill_pcb_pad (gc, pad, clear, mask);
+    gui->graphics->fill_pcb_pad (gc, pad, clear, mask);
 }
 
 static void
 draw_pad (PadType *pad)
 {
   if (doing_pinout)
-   gui->set_color (Output.fgGC, PCB->PinColor);
-  else if (TEST_FLAG (WARNFLAG | SELECTEDFLAG | FOUNDFLAG, pad))
-   {
-     if (TEST_FLAG (WARNFLAG, pad))
-       gui->set_color (Output.fgGC, PCB->WarnColor);
-     else if (TEST_FLAG (SELECTEDFLAG, pad))
-       gui->set_color (Output.fgGC, PCB->PinSelectedColor);
-     else
-       gui->set_color (Output.fgGC, PCB->ConnectedColor);
-   }
-  else if (FRONT (pad))
-   gui->set_color (Output.fgGC, PCB->PinColor);
+    gui->graphics->set_color (Output.fgGC, PCB->PinColor);
   else
-   gui->set_color (Output.fgGC, PCB->InvisibleObjectsColor);
+    set_object_color ((AnyObjectType *)pad, PCB->WarnColor,
+                      PCB->PinSelectedColor, PCB->ConnectedColor, PCB->FoundColor,
+                      FRONT (pad) ? PCB->PinColor : PCB->InvisibleObjectsColor);
 
   _draw_pad (Output.fgGC, pad, false, false);
 
@@ -335,7 +309,7 @@ draw_pad (PadType *pad)
 static int
 pad_callback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   int *side = cl;
 
   if (ON_SIDE (pad, *side))
@@ -350,21 +324,21 @@ draw_element_name (ElementType *element)
       TEST_FLAG (HIDENAMEFLAG, element))
     return;
   if (doing_pinout || doing_assy)
-    gui->set_color (Output.fgGC, PCB->ElementColor);
+    gui->graphics->set_color (Output.fgGC, PCB->ElementColor);
   else if (TEST_FLAG (SELECTEDFLAG, &ELEMENT_TEXT (PCB, element)))
-    gui->set_color (Output.fgGC, PCB->ElementSelectedColor);
+    gui->graphics->set_color (Output.fgGC, PCB->ElementSelectedColor);
   else if (FRONT (element))
-    gui->set_color (Output.fgGC, PCB->ElementColor);
+    gui->graphics->set_color (Output.fgGC, PCB->ElementColor);
   else
-    gui->set_color (Output.fgGC, PCB->InvisibleObjectsColor);
-  DrawTextLowLevel (&ELEMENT_TEXT (PCB, element), PCB->minSlk);
+    gui->graphics->set_color (Output.fgGC, PCB->InvisibleObjectsColor);
+  gui->graphics->draw_pcb_text (Output.fgGC, &ELEMENT_TEXT (PCB, element), PCB->minSlk);
 }
 
 static int
 name_callback (const BoxType * b, void *cl)
 {
-  TextTypePtr text = (TextTypePtr) b;
-  ElementTypePtr element = (ElementTypePtr) text->Element;
+  TextType *text = (TextType *) b;
+  ElementType *element = (ElementType *) text->Element;
   int *side = cl;
 
   if (TEST_FLAG (HIDENAMEFLAG, element))
@@ -394,7 +368,7 @@ draw_element_pins_and_pads (ElementType *element)
 static int
 EMark_callback (const BoxType * b, void *cl)
 {
-  ElementTypePtr element = (ElementTypePtr) b;
+  ElementType *element = (ElementType *) b;
 
   DrawEMark (element, element->MarkX, element->MarkY, !FRONT (element));
   return 1;
@@ -403,7 +377,7 @@ EMark_callback (const BoxType * b, void *cl)
 static int
 hole_callback (const BoxType * b, void *cl)
 {
-  PinTypePtr pv = (PinTypePtr) b;
+  PinType *pv = (PinType *) b;
   int plated = cl ? *(int *) cl : -1;
 
   if ((plated == 0 && !TEST_FLAG (HOLEFLAG, pv)) ||
@@ -414,35 +388,32 @@ hole_callback (const BoxType * b, void *cl)
     {
       if (!TEST_FLAG (HOLEFLAG, pv))
         {
-          gui->set_line_cap (Output.fgGC, Round_Cap);
-          gui->set_line_width (Output.fgGC, 0);
-          gui->draw_arc (Output.fgGC,
-                         pv->X, pv->Y, pv->DrillingHole / 2,
-                         pv->DrillingHole / 2, 0, 360);
+          gui->graphics->set_line_cap (Output.fgGC, Round_Cap);
+          gui->graphics->set_line_width (Output.fgGC, 0);
+          gui->graphics->draw_arc (Output.fgGC,
+                                   pv->X, pv->Y, pv->DrillingHole / 2,
+                                   pv->DrillingHole / 2, 0, 360);
         }
     }
   else
-    gui->fill_circle (Output.bgGC, pv->X, pv->Y, pv->DrillingHole / 2);
+    gui->graphics->fill_circle (Output.bgGC, pv->X, pv->Y, pv->DrillingHole / 2);
 
   if (TEST_FLAG (HOLEFLAG, pv))
     {
-      if (TEST_FLAG (WARNFLAG, pv))
-        gui->set_color (Output.fgGC, PCB->WarnColor);
-      else if (TEST_FLAG (SELECTEDFLAG, pv))
-        gui->set_color (Output.fgGC, PCB->ViaSelectedColor);
-      else
-        gui->set_color (Output.fgGC, Settings.BlackColor);
-
-      gui->set_line_cap (Output.fgGC, Round_Cap);
-      gui->set_line_width (Output.fgGC, 0);
-      gui->draw_arc (Output.fgGC,
-                     pv->X, pv->Y, pv->DrillingHole / 2,
-                     pv->DrillingHole / 2, 0, 360);
+      set_object_color ((AnyObjectType *) pv,
+                        PCB->WarnColor, PCB->ViaSelectedColor,
+                        NULL, NULL, Settings.BlackColor);
+
+      gui->graphics->set_line_cap (Output.fgGC, Round_Cap);
+      gui->graphics->set_line_width (Output.fgGC, 0);
+      gui->graphics->draw_arc (Output.fgGC,
+                               pv->X, pv->Y, pv->DrillingHole / 2,
+                               pv->DrillingHole / 2, 0, 360);
     }
   return 1;
 }
 
-static void
+void
 DrawHoles (bool draw_plated, bool draw_unplated, const BoxType *drawn_area)
 {
   int plated = -1;
@@ -454,39 +425,15 @@ DrawHoles (bool draw_plated, bool draw_unplated, const BoxType *drawn_area)
   r_search (PCB->Data->via_tree, drawn_area, NULL, hole_callback, &plated);
 }
 
-static void
-_draw_line (LineType *line)
-{
-  gui->set_line_cap (Output.fgGC, Trace_Cap);
-  if (TEST_FLAG (THINDRAWFLAG, PCB))
-    gui->set_line_width (Output.fgGC, 0);
-  else
-    gui->set_line_width (Output.fgGC, line->Thickness);
-
-  gui->draw_line (Output.fgGC,
-		  line->Point1.X, line->Point1.Y,
-		  line->Point2.X, line->Point2.Y);
-}
-
-static void
-draw_line (LayerType *layer, LineType *line)
-{
-  if (TEST_FLAG (SELECTEDFLAG | FOUNDFLAG, line))
-    {
-      if (TEST_FLAG (SELECTEDFLAG, line))
-        gui->set_color (Output.fgGC, layer->SelectedColor);
-      else
-        gui->set_color (Output.fgGC, PCB->ConnectedColor);
-    }
-  else
-    gui->set_color (Output.fgGC, layer->Color);
-  _draw_line (line);
-}
-
 static int
 line_callback (const BoxType * b, void *cl)
 {
-  draw_line ((LayerType *) cl, (LineType *) b);
+  LayerType *layer = (LayerType *) cl;
+  LineType *line = (LineType *) b;
+
+  set_layer_object_color (layer, (AnyObjectType *) line);
+  gui->graphics->draw_pcb_line (Output.fgGC, line);
+
   return 1;
 }
 
@@ -495,17 +442,10 @@ rat_callback (const BoxType * b, void *cl)
 {
   RatType *rat = (RatType *)b;
 
-  if (TEST_FLAG (SELECTEDFLAG | FOUNDFLAG, rat))
-    {
-      if (TEST_FLAG (SELECTEDFLAG, rat))
-        gui->set_color (Output.fgGC, PCB->RatSelectedColor);
-      else
-        gui->set_color (Output.fgGC, PCB->ConnectedColor);
-    }
-  else
-    gui->set_color (Output.fgGC, PCB->RatColor);
+  set_object_color ((AnyObjectType *) rat, NULL, PCB->RatSelectedColor,
+                    PCB->ConnectedColor, PCB->FoundColor, PCB->RatColor);
 
-  if (Settings.RatThickness < 20)
+  if (Settings.RatThickness < 100)
     rat->Thickness = pixel_slop * Settings.RatThickness;
   /* rats.c set VIAFLAG if this rat goes to a containing poly: draw a donut */
   if (TEST_FLAG(VIAFLAG, rat))
@@ -513,53 +453,26 @@ rat_callback (const BoxType * b, void *cl)
       int w = rat->Thickness;
 
       if (TEST_FLAG (THINDRAWFLAG, PCB))
-        gui->set_line_width (Output.fgGC, 0);
+        gui->graphics->set_line_width (Output.fgGC, 0);
       else
-        gui->set_line_width (Output.fgGC, w);
-      gui->draw_arc (Output.fgGC, rat->Point1.X, rat->Point1.Y,
-                     w * 2, w * 2, 0, 360);
+        gui->graphics->set_line_width (Output.fgGC, w);
+      gui->graphics->draw_arc (Output.fgGC, rat->Point1.X, rat->Point1.Y,
+                               w * 2, w * 2, 0, 360);
     }
   else
-    _draw_line ((LineType *) rat);
+    gui->graphics->draw_pcb_line (Output.fgGC, (LineType *) rat);
   return 1;
 }
 
-static void
-_draw_arc (ArcType *arc)
-{
-  if (!arc->Thickness)
-    return;
-
-  if (TEST_FLAG (THINDRAWFLAG, PCB))
-    gui->set_line_width (Output.fgGC, 0);
-  else
-    gui->set_line_width (Output.fgGC, arc->Thickness);
-  gui->set_line_cap (Output.fgGC, Trace_Cap);
-
-  gui->draw_arc (Output.fgGC, arc->X, arc->Y, arc->Width,
-                 arc->Height, arc->StartAngle, arc->Delta);
-}
-
-static void
-draw_arc (LayerType *layer, ArcType *arc)
-{
-  if (TEST_FLAG (SELECTEDFLAG | FOUNDFLAG, arc))
-    {
-      if (TEST_FLAG (SELECTEDFLAG, arc))
-        gui->set_color (Output.fgGC, layer->SelectedColor);
-      else
-        gui->set_color (Output.fgGC, PCB->ConnectedColor);
-    }
-  else
-    gui->set_color (Output.fgGC, layer->Color);
-
-  _draw_arc (arc);
-}
-
 static int
 arc_callback (const BoxType * b, void *cl)
 {
-  draw_arc ((LayerTypePtr) cl, (ArcTypePtr) b);
+  LayerType *layer = (LayerType *) cl;
+  ArcType *arc =  (ArcType *) b;
+
+  set_layer_object_color (layer, (AnyObjectType *) arc);
+  gui->graphics->draw_pcb_arc (Output.fgGC, arc);
+
   return 1;
 }
 
@@ -568,23 +481,23 @@ draw_element_package (ElementType *element)
 {
   /* set color and draw lines, arcs, text and pins */
   if (doing_pinout || doing_assy)
-    gui->set_color (Output.fgGC, PCB->ElementColor);
+    gui->graphics->set_color (Output.fgGC, PCB->ElementColor);
   else if (TEST_FLAG (SELECTEDFLAG, element))
-    gui->set_color (Output.fgGC, PCB->ElementSelectedColor);
+    gui->graphics->set_color (Output.fgGC, PCB->ElementSelectedColor);
   else if (FRONT (element))
-    gui->set_color (Output.fgGC, PCB->ElementColor);
+    gui->graphics->set_color (Output.fgGC, PCB->ElementColor);
   else
-    gui->set_color (Output.fgGC, PCB->InvisibleObjectsColor);
+    gui->graphics->set_color (Output.fgGC, PCB->InvisibleObjectsColor);
 
   /* draw lines, arcs, text and pins */
   ELEMENTLINE_LOOP (element);
   {
-    _draw_line (line);
+    gui->graphics->draw_pcb_line (Output.fgGC, line);
   }
   END_LOOP;
   ARC_LOOP (element);
   {
-    _draw_arc (arc);
+    gui->graphics->draw_pcb_arc (Output.fgGC, arc);
   }
   END_LOOP;
 }
@@ -592,7 +505,7 @@ draw_element_package (ElementType *element)
 static int
 element_callback (const BoxType * b, void *cl)
 {
-  ElementTypePtr element = (ElementTypePtr) b;
+  ElementType *element = (ElementType *) b;
   int *side = cl;
 
   if (ON_SIDE (element, *side))
@@ -604,15 +517,15 @@ element_callback (const BoxType * b, void *cl)
  * prints assembly drawing.
  */
 
-static void
+void
 PrintAssembly (int side, const BoxType * drawn_area)
 {
   int side_group = GetLayerGroupNumberByNumber (max_copper_layer + side);
 
   doing_assy = true;
-  gui->set_draw_faded (Output.fgGC, 1);
+  gui->graphics->set_draw_faded (Output.fgGC, 1);
   DrawLayerGroup (side_group, drawn_area);
-  gui->set_draw_faded (Output.fgGC, 0);
+  gui->graphics->set_draw_faded (Output.fgGC, 0);
 
   /* draw package */
   DrawSilk (side, drawn_area);
@@ -777,7 +690,7 @@ DrawEverything (const BoxType *drawn_area)
 }
 
 static void
-DrawEMark (ElementTypePtr e, Coord X, Coord Y, bool invisible)
+DrawEMark (ElementType *e, Coord X, Coord Y, bool invisible)
 {
   Coord mark_size = EMARK_SIZE;
   if (!PCB->InvisibleObjectsOn && invisible)
@@ -798,14 +711,14 @@ DrawEMark (ElementTypePtr e, Coord X, Coord Y, bool invisible)
       mark_size = MIN (mark_size, pad0->Thickness / 2);
     }
 
-  gui->set_color (Output.fgGC,
+  gui->graphics->set_color (Output.fgGC,
 		  invisible ? PCB->InvisibleMarkColor : PCB->ElementColor);
-  gui->set_line_cap (Output.fgGC, Trace_Cap);
-  gui->set_line_width (Output.fgGC, 0);
-  gui->draw_line (Output.fgGC, X - mark_size, Y, X, Y - mark_size);
-  gui->draw_line (Output.fgGC, X + mark_size, Y, X, Y - mark_size);
-  gui->draw_line (Output.fgGC, X - mark_size, Y, X, Y + mark_size);
-  gui->draw_line (Output.fgGC, X + mark_size, Y, X, Y + mark_size);
+  gui->graphics->set_line_cap (Output.fgGC, Trace_Cap);
+  gui->graphics->set_line_width (Output.fgGC, 0);
+  gui->graphics->draw_line (Output.fgGC, X - mark_size, Y, X, Y - mark_size);
+  gui->graphics->draw_line (Output.fgGC, X + mark_size, Y, X, Y - mark_size);
+  gui->graphics->draw_line (Output.fgGC, X - mark_size, Y, X, Y + mark_size);
+  gui->graphics->draw_line (Output.fgGC, X + mark_size, Y, X, Y + mark_size);
 
   /*
    * If an element is locked, place a "L" on top of the "diamond".
@@ -814,8 +727,8 @@ DrawEMark (ElementTypePtr e, Coord X, Coord Y, bool invisible)
    */
   if (TEST_FLAG (LOCKFLAG, e) )
     {
-      gui->draw_line (Output.fgGC, X, Y, X + 2 * mark_size, Y);
-      gui->draw_line (Output.fgGC, X, Y, X, Y - 4* mark_size);
+      gui->graphics->draw_line (Output.fgGC, X, Y, X + 2 * mark_size, Y);
+      gui->graphics->draw_line (Output.fgGC, X, Y, X, Y - 4* mark_size);
     }
 }
 
@@ -862,11 +775,11 @@ DrawPPV (int group, const BoxType *drawn_area)
 static int
 clearPin_callback (const BoxType * b, void *cl)
 {
-  PinType *pin = (PinTypePtr) b;
+  PinType *pin = (PinType *) b;
   if (TEST_FLAG (THINDRAWFLAG, PCB) || TEST_FLAG (THINDRAWPOLYFLAG, PCB))
-    gui->thindraw_pcb_pv (Output.pmGC, Output.pmGC, pin, false, true);
+    gui->graphics->thindraw_pcb_pv (Output.pmGC, Output.pmGC, pin, false, true);
   else
-    gui->fill_pcb_pv (Output.pmGC, Output.pmGC, pin, false, true);
+    gui->graphics->fill_pcb_pv (Output.pmGC, Output.pmGC, pin, false, true);
   return 1;
 }
 
@@ -880,38 +793,10 @@ poly_callback (const BoxType * b, void *cl)
 {
   struct poly_info *i = cl;
   PolygonType *polygon = (PolygonType *)b;
-  static char *color;
-
-  if (!polygon->Clipped)
-    return 0;
-
-  if (TEST_FLAG (SELECTEDFLAG, polygon))
-    color = i->layer->SelectedColor;
-  else if (TEST_FLAG (FOUNDFLAG, polygon))
-    color = PCB->ConnectedColor;
-  else
-    color = i->layer->Color;
-  gui->set_color (Output.fgGC, color);
-
-  if (gui->thindraw_pcb_polygon != NULL &&
-      (TEST_FLAG (THINDRAWFLAG, PCB) ||
-       TEST_FLAG (THINDRAWPOLYFLAG, PCB)))
-    gui->thindraw_pcb_polygon (Output.fgGC, polygon, i->drawn_area);
-  else
-    gui->fill_pcb_polygon (Output.fgGC, polygon, i->drawn_area);
 
-  /* If checking planes, thin-draw any pieces which have been clipped away */
-  if (gui->thindraw_pcb_polygon != NULL &&
-      TEST_FLAG (CHECKPLANESFLAG, PCB) &&
-      !TEST_FLAG (FULLPOLYFLAG, polygon))
-    {
-      PolygonType poly = *polygon;
+  set_layer_object_color (i->layer, (AnyObjectType *) polygon);
 
-      for (poly.Clipped = polygon->Clipped->f;
-           poly.Clipped != polygon->Clipped;
-           poly.Clipped = poly.Clipped->f)
-        gui->thindraw_pcb_polygon (Output.fgGC, &poly, i->drawn_area);
-    }
+  gui->graphics->draw_pcb_polygon (Output.fgGC, polygon, i->drawn_area);
 
   return 1;
 }
@@ -919,7 +804,7 @@ poly_callback (const BoxType * b, void *cl)
 static int
 clearPad_callback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   int *side = cl;
   if (ON_SIDE (pad, *side) && pad->Mask)
     _draw_pad (Output.pmGC, pad, true, true);
@@ -930,7 +815,7 @@ clearPad_callback (const BoxType * b, void *cl)
  * Draws silk layer.
  */
 
-static void
+void
 DrawSilk (int side, const BoxType * drawn_area)
 {
 #if 0
@@ -942,7 +827,7 @@ DrawSilk (int side, const BoxType * drawn_area)
 #if 0
   if (gui->poly_before)
     {
-      gui->use_mask (HID_MASK_BEFORE);
+      gui->graphics->use_mask (HID_MASK_BEFORE);
 #endif
       DrawLayer (LAYER_PTR (max_copper_layer + side), drawn_area);
       /* draw package */
@@ -951,20 +836,20 @@ DrawSilk (int side, const BoxType * drawn_area)
 #if 0
     }
 
-  gui->use_mask (HID_MASK_CLEAR);
+  gui->graphics->use_mask (HID_MASK_CLEAR);
   r_search (PCB->Data->pin_tree, drawn_area, NULL, clearPin_callback, NULL);
   r_search (PCB->Data->via_tree, drawn_area, NULL, clearPin_callback, NULL);
   r_search (PCB->Data->pad_tree, drawn_area, NULL, clearPad_callback, &side);
 
   if (gui->poly_after)
     {
-      gui->use_mask (HID_MASK_AFTER);
+      gui->graphics->use_mask (HID_MASK_AFTER);
       DrawLayer (LAYER_PTR (max_copper_layer + layer), drawn_area);
       /* draw package */
       r_search (PCB->Data->element_tree, drawn_area, NULL, element_callback, &side);
       r_search (PCB->Data->name_tree[NAME_INDEX (PCB)], drawn_area, NULL, name_callback, &side);
     }
-  gui->use_mask (HID_MASK_OFF);
+  gui->graphics->use_mask (HID_MASK_OFF);
 #endif
 }
 
@@ -977,29 +862,29 @@ DrawMaskBoardArea (int mask_type, const BoxType *drawn_area)
       (mask_type == HID_MASK_AFTER  && !gui->poly_after))
     return;
 
-  gui->use_mask (mask_type);
-  gui->set_color (Output.fgGC, PCB->MaskColor);
+  gui->graphics->use_mask (mask_type);
+  gui->graphics->set_color (Output.fgGC, PCB->MaskColor);
   if (drawn_area == NULL)
-    gui->fill_rect (Output.fgGC, 0, 0, PCB->MaxWidth, PCB->MaxHeight);
+    gui->graphics->fill_rect (Output.fgGC, 0, 0, PCB->MaxWidth, PCB->MaxHeight);
   else
-    gui->fill_rect (Output.fgGC, drawn_area->X1, drawn_area->Y1,
-                                 drawn_area->X2, drawn_area->Y2);
+    gui->graphics->fill_rect (Output.fgGC, drawn_area->X1, drawn_area->Y1,
+                                           drawn_area->X2, drawn_area->Y2);
 }
 
 /* ---------------------------------------------------------------------------
  * draws solder mask layer - this will cover nearly everything
  */
-static void
+void
 DrawMask (int side, const BoxType *screen)
 {
   int thin = TEST_FLAG(THINDRAWFLAG, PCB) || TEST_FLAG(THINDRAWPOLYFLAG, PCB);
 
   if (thin)
-    gui->set_color (Output.pmGC, PCB->MaskColor);
+    gui->graphics->set_color (Output.pmGC, PCB->MaskColor);
   else
     {
       DrawMaskBoardArea (HID_MASK_BEFORE, screen);
-      gui->use_mask (HID_MASK_CLEAR);
+      gui->graphics->use_mask (HID_MASK_CLEAR);
     }
 
   r_search (PCB->Data->pin_tree, screen, NULL, clearPin_callback, NULL);
@@ -1007,21 +892,21 @@ DrawMask (int side, const BoxType *screen)
   r_search (PCB->Data->pad_tree, screen, NULL, clearPad_callback, &side);
 
   if (thin)
-    gui->set_color (Output.pmGC, "erase");
+    gui->graphics->set_color (Output.pmGC, "erase");
   else
     {
       DrawMaskBoardArea (HID_MASK_AFTER, screen);
-      gui->use_mask (HID_MASK_OFF);
+      gui->graphics->use_mask (HID_MASK_OFF);
     }
 }
 
 /* ---------------------------------------------------------------------------
  * draws solder paste layer for a given side of the board
  */
-static void
+void
 DrawPaste (int side, const BoxType *drawn_area)
 {
-  gui->set_color (Output.fgGC, PCB->ElementColor);
+  gui->graphics->set_color (Output.fgGC, PCB->ElementColor);
   ALLPAD_LOOP (PCB->Data);
   {
     if (ON_SIDE (pad, side) && !TEST_FLAG (NOPASTEFLAG, pad) && pad->Mask > 0)
@@ -1046,10 +931,10 @@ DrawRats (const BoxType *drawn_area)
   int can_mask = strcmp(gui->name, "lesstif") == 0;
 
   if (can_mask)
-    gui->use_mask (HID_MASK_CLEAR);
+    gui->graphics->use_mask (HID_MASK_CLEAR);
   r_search (PCB->Data->rat_tree, drawn_area, NULL, rat_callback, NULL);
   if (can_mask)
-    gui->use_mask (HID_MASK_OFF);
+    gui->graphics->use_mask (HID_MASK_OFF);
 }
 
 static int
@@ -1060,20 +945,20 @@ text_callback (const BoxType * b, void *cl)
   int min_silk_line;
 
   if (TEST_FLAG (SELECTEDFLAG, text))
-    gui->set_color (Output.fgGC, layer->SelectedColor);
+    gui->graphics->set_color (Output.fgGC, layer->SelectedColor);
   else
-    gui->set_color (Output.fgGC, layer->Color);
+    gui->graphics->set_color (Output.fgGC, layer->Color);
   if (layer == &PCB->Data->SILKLAYER ||
       layer == &PCB->Data->BACKSILKLAYER)
     min_silk_line = PCB->minSlk;
   else
     min_silk_line = PCB->minWid;
-  DrawTextLowLevel (text, min_silk_line);
+  gui->graphics->draw_pcb_text (Output.fgGC, text, min_silk_line);
   return 1;
 }
 
 void
-DrawLayer (LayerTypePtr Layer, const BoxType * screen)
+DrawLayer (LayerType *Layer, const BoxType *screen)
 {
   struct poly_info info = {screen, Layer};
 
@@ -1099,11 +984,11 @@ DrawLayer (LayerTypePtr Layer, const BoxType * screen)
       && (strcmp (Layer->Name, "outline") == 0
 	  || strcmp (Layer->Name, "route") == 0))
     {
-      gui->set_color (Output.fgGC, Layer->Color);
-      gui->set_line_width (Output.fgGC, PCB->minWid);
-      gui->draw_rect (Output.fgGC,
-		      0, 0,
-		      PCB->MaxWidth, PCB->MaxHeight);
+      gui->graphics->set_color (Output.fgGC, Layer->Color);
+      gui->graphics->set_line_width (Output.fgGC, PCB->minWid);
+      gui->graphics->draw_rect (Output.fgGC,
+                                0, 0,
+                                PCB->MaxWidth, PCB->MaxHeight);
     }
 }
 
@@ -1111,12 +996,12 @@ DrawLayer (LayerTypePtr Layer, const BoxType * screen)
  * draws one layer group.  If the exporter is not a GUI,
  * also draws the pins / pads / vias in this layer group.
  */
-static void
+void
 DrawLayerGroup (int group, const BoxType *drawn_area)
 {
   int i, rv = 1;
   int layernum;
-  LayerTypePtr Layer;
+  LayerType *Layer;
   int n_entries = PCB->LayerGroups.Number[group];
   Cardinal *layers = PCB->LayerGroups.Entries[group];
 
@@ -1138,7 +1023,7 @@ DrawLayerGroup (int group, const BoxType *drawn_area)
 }
 
 static void
-GatherPVName (PinTypePtr Ptr)
+GatherPVName (PinType *Ptr)
 {
   BoxType box;
   bool vert = TEST_FLAG (EDGE2FLAG, Ptr);
@@ -1168,7 +1053,7 @@ GatherPVName (PinTypePtr Ptr)
 }
 
 static void
-GatherPadName (PadTypePtr Pad)
+GatherPadName (PadType *Pad)
 {
   BoxType box;
   bool vert;
@@ -1200,93 +1085,10 @@ GatherPadName (PadTypePtr Pad)
 }
 
 /* ---------------------------------------------------------------------------
- * lowlevel drawing routine for text objects
- */
-void
-DrawTextLowLevel (TextTypePtr Text, Coord min_line_width)
-{
-  Coord x = 0;
-  unsigned char *string = (unsigned char *) Text->TextString;
-  Cardinal n;
-  FontTypePtr font = &PCB->Font;
-
-  while (string && *string)
-    {
-      /* draw lines if symbol is valid and data is present */
-      if (*string <= MAX_FONTPOSITION && font->Symbol[*string].Valid)
-	{
-	  LineTypePtr line = font->Symbol[*string].Line;
-	  LineType newline;
-
-	  for (n = font->Symbol[*string].LineN; n; n--, line++)
-	    {
-	      /* create one line, scale, move, rotate and swap it */
-	      newline = *line;
-	      newline.Point1.X = SCALE_TEXT (newline.Point1.X + x, Text->Scale);
-	      newline.Point1.Y = SCALE_TEXT (newline.Point1.Y, Text->Scale);
-	      newline.Point2.X = SCALE_TEXT (newline.Point2.X + x, Text->Scale);
-	      newline.Point2.Y = SCALE_TEXT (newline.Point2.Y, Text->Scale);
-	      newline.Thickness = SCALE_TEXT (newline.Thickness, Text->Scale / 2);
-	      if (newline.Thickness < min_line_width)
-		newline.Thickness = min_line_width;
-
-	      RotateLineLowLevel (&newline, 0, 0, Text->Direction);
-
-	      /* the labels of SMD objects on the bottom
-	       * side haven't been swapped yet, only their offset
-	       */
-	      if (TEST_FLAG (ONSOLDERFLAG, Text))
-		{
-		  newline.Point1.X = SWAP_SIGN_X (newline.Point1.X);
-		  newline.Point1.Y = SWAP_SIGN_Y (newline.Point1.Y);
-		  newline.Point2.X = SWAP_SIGN_X (newline.Point2.X);
-		  newline.Point2.Y = SWAP_SIGN_Y (newline.Point2.Y);
-		}
-	      /* add offset and draw line */
-	      newline.Point1.X += Text->X;
-	      newline.Point1.Y += Text->Y;
-	      newline.Point2.X += Text->X;
-	      newline.Point2.Y += Text->Y;
-	      _draw_line (&newline);
-	    }
-
-	  /* move on to next cursor position */
-	  x += (font->Symbol[*string].Width + font->Symbol[*string].Delta);
-	}
-      else
-	{
-	  /* the default symbol is a filled box */
-	  BoxType defaultsymbol = PCB->Font.DefaultSymbol;
-	  Coord size = (defaultsymbol.X2 - defaultsymbol.X1) * 6 / 5;
-
-	  defaultsymbol.X1 = SCALE_TEXT (defaultsymbol.X1 + x, Text->Scale);
-	  defaultsymbol.Y1 = SCALE_TEXT (defaultsymbol.Y1, Text->Scale);
-	  defaultsymbol.X2 = SCALE_TEXT (defaultsymbol.X2 + x, Text->Scale);
-	  defaultsymbol.Y2 = SCALE_TEXT (defaultsymbol.Y2, Text->Scale);
-
-	  RotateBoxLowLevel (&defaultsymbol, 0, 0, Text->Direction);
-
-	  /* add offset and draw box */
-	  defaultsymbol.X1 += Text->X;
-	  defaultsymbol.Y1 += Text->Y;
-	  defaultsymbol.X2 += Text->X;
-	  defaultsymbol.Y2 += Text->Y;
-	  gui->fill_rect (Output.fgGC,
-			  defaultsymbol.X1, defaultsymbol.Y1,
-			  defaultsymbol.X2, defaultsymbol.Y2);
-
-	  /* move on to next cursor position */
-	  x += size;
-	}
-      string++;
-    }
-}
-
-/* ---------------------------------------------------------------------------
  * draw a via object
  */
 void
-DrawVia (PinTypePtr Via)
+DrawVia (PinType *Via)
 {
   AddPart (Via);
   if (!TEST_FLAG (HOLEFLAG, Via) && TEST_FLAG (DISPLAYNAMEFLAG, Via))
@@ -1297,7 +1099,7 @@ DrawVia (PinTypePtr Via)
  * draws the name of a via
  */
 void
-DrawViaName (PinTypePtr Via)
+DrawViaName (PinType *Via)
 {
   GatherPVName (Via);
 }
@@ -1306,7 +1108,7 @@ DrawViaName (PinTypePtr Via)
  * draw a pin object
  */
 void
-DrawPin (PinTypePtr Pin)
+DrawPin (PinType *Pin)
 {
   AddPart (Pin);
   if ((!TEST_FLAG (HOLEFLAG, Pin) && TEST_FLAG (DISPLAYNAMEFLAG, Pin))
@@ -1318,7 +1120,7 @@ DrawPin (PinTypePtr Pin)
  * draws the name of a pin
  */
 void
-DrawPinName (PinTypePtr Pin)
+DrawPinName (PinType *Pin)
 {
   GatherPVName (Pin);
 }
@@ -1327,7 +1129,7 @@ DrawPinName (PinTypePtr Pin)
  * draw a pad object
  */
 void
-DrawPad (PadTypePtr Pad)
+DrawPad (PadType *Pad)
 {
   AddPart (Pad);
   if (doing_pinout || TEST_FLAG (DISPLAYNAMEFLAG, Pad))
@@ -1338,7 +1140,7 @@ DrawPad (PadTypePtr Pad)
  * draws the name of a pad
  */
 void
-DrawPadName (PadTypePtr Pad)
+DrawPadName (PadType *Pad)
 {
   GatherPadName (Pad);
 }
@@ -1347,7 +1149,7 @@ DrawPadName (PadTypePtr Pad)
  * draws a line on a layer
  */
 void
-DrawLine (LayerTypePtr Layer, LineTypePtr Line)
+DrawLine (LayerType *Layer, LineType *Line)
 {
   AddPart (Line);
 }
@@ -1356,9 +1158,9 @@ DrawLine (LayerTypePtr Layer, LineTypePtr Line)
  * draws a ratline
  */
 void
-DrawRat (RatTypePtr Rat)
+DrawRat (RatType *Rat)
 {
-  if (Settings.RatThickness < 20)
+  if (Settings.RatThickness < 100)
     Rat->Thickness = pixel_slop * Settings.RatThickness;
   /* rats.c set VIAFLAG if this rat goes to a containing poly: draw a donut */
   if (TEST_FLAG(VIAFLAG, Rat))
@@ -1381,7 +1183,7 @@ DrawRat (RatTypePtr Rat)
  * draws an arc on a layer
  */
 void
-DrawArc (LayerTypePtr Layer, ArcTypePtr Arc)
+DrawArc (LayerType *Layer, ArcType *Arc)
 {
   AddPart (Arc);
 }
@@ -1390,7 +1192,7 @@ DrawArc (LayerTypePtr Layer, ArcTypePtr Arc)
  * draws a text on a layer
  */
 void
-DrawText (LayerTypePtr Layer, TextTypePtr Text)
+DrawText (LayerType *Layer, TextType *Text)
 {
   AddPart (Text);
 }
@@ -1400,7 +1202,7 @@ DrawText (LayerTypePtr Layer, TextTypePtr Text)
  * draws a polygon on a layer
  */
 void
-DrawPolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
+DrawPolygon (LayerType *Layer, PolygonType *Polygon)
 {
   AddPart (Polygon);
 }
@@ -1409,7 +1211,7 @@ DrawPolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
  * draws an element
  */
 void
-DrawElement (ElementTypePtr Element)
+DrawElement (ElementType *Element)
 {
   DrawElementPackage (Element);
   DrawElementName (Element);
@@ -1420,7 +1222,7 @@ DrawElement (ElementTypePtr Element)
  * draws the name of an element
  */
 void
-DrawElementName (ElementTypePtr Element)
+DrawElementName (ElementType *Element)
 {
   if (TEST_FLAG (HIDENAMEFLAG, Element))
     return;
@@ -1431,7 +1233,7 @@ DrawElementName (ElementTypePtr Element)
  * draws the package of an element
  */
 void
-DrawElementPackage (ElementTypePtr Element)
+DrawElementPackage (ElementType *Element)
 {
   ELEMENTLINE_LOOP (Element);
   {
@@ -1449,7 +1251,7 @@ DrawElementPackage (ElementTypePtr Element)
  * draw pins of an element
  */
 void
-DrawElementPinsAndPads (ElementTypePtr Element)
+DrawElementPinsAndPads (ElementType *Element)
 {
   PAD_LOOP (Element);
   {
@@ -1468,7 +1270,7 @@ DrawElementPinsAndPads (ElementTypePtr Element)
  * erase a via
  */
 void
-EraseVia (PinTypePtr Via)
+EraseVia (PinType *Via)
 {
   AddPart (Via);
   if (TEST_FLAG (DISPLAYNAMEFLAG, Via))
@@ -1479,7 +1281,7 @@ EraseVia (PinTypePtr Via)
  * erase a ratline
  */
 void
-EraseRat (RatTypePtr Rat)
+EraseRat (RatType *Rat)
 {
   if (TEST_FLAG(VIAFLAG, Rat))
     {
@@ -1502,7 +1304,7 @@ EraseRat (RatTypePtr Rat)
  * erase a via name
  */
 void
-EraseViaName (PinTypePtr Via)
+EraseViaName (PinType *Via)
 {
   GatherPVName (Via);
 }
@@ -1511,7 +1313,7 @@ EraseViaName (PinTypePtr Via)
  * erase a pad object
  */
 void
-ErasePad (PadTypePtr Pad)
+ErasePad (PadType *Pad)
 {
   AddPart (Pad);
   if (TEST_FLAG (DISPLAYNAMEFLAG, Pad))
@@ -1522,7 +1324,7 @@ ErasePad (PadTypePtr Pad)
  * erase a pad name
  */
 void
-ErasePadName (PadTypePtr Pad)
+ErasePadName (PadType *Pad)
 {
   GatherPadName (Pad);
 }
@@ -1531,7 +1333,7 @@ ErasePadName (PadTypePtr Pad)
  * erase a pin object
  */
 void
-ErasePin (PinTypePtr Pin)
+ErasePin (PinType *Pin)
 {
   AddPart (Pin);
   if (TEST_FLAG (DISPLAYNAMEFLAG, Pin))
@@ -1542,7 +1344,7 @@ ErasePin (PinTypePtr Pin)
  * erase a pin name
  */
 void
-ErasePinName (PinTypePtr Pin)
+ErasePinName (PinType *Pin)
 {
   GatherPVName (Pin);
 }
@@ -1551,7 +1353,7 @@ ErasePinName (PinTypePtr Pin)
  * erases a line on a layer
  */
 void
-EraseLine (LineTypePtr Line)
+EraseLine (LineType *Line)
 {
   AddPart (Line);
 }
@@ -1560,7 +1362,7 @@ EraseLine (LineTypePtr Line)
  * erases an arc on a layer
  */
 void
-EraseArc (ArcTypePtr Arc)
+EraseArc (ArcType *Arc)
 {
   if (!Arc->Thickness)
     return;
@@ -1571,7 +1373,7 @@ EraseArc (ArcTypePtr Arc)
  * erases a text on a layer
  */
 void
-EraseText (LayerTypePtr Layer, TextTypePtr Text)
+EraseText (LayerType *Layer, TextType *Text)
 {
   AddPart (Text);
 }
@@ -1580,7 +1382,7 @@ EraseText (LayerTypePtr Layer, TextTypePtr Text)
  * erases a polygon on a layer
  */
 void
-ErasePolygon (PolygonTypePtr Polygon)
+ErasePolygon (PolygonType *Polygon)
 {
   AddPart (Polygon);
 }
@@ -1589,7 +1391,7 @@ ErasePolygon (PolygonTypePtr Polygon)
  * erases an element
  */
 void
-EraseElement (ElementTypePtr Element)
+EraseElement (ElementType *Element)
 {
   ELEMENTLINE_LOOP (Element);
   {
@@ -1609,7 +1411,7 @@ EraseElement (ElementTypePtr Element)
  * erases all pins and pads of an element
  */
 void
-EraseElementPinsAndPads (ElementTypePtr Element)
+EraseElementPinsAndPads (ElementType *Element)
 {
   PIN_LOOP (Element);
   {
@@ -1627,7 +1429,7 @@ EraseElementPinsAndPads (ElementTypePtr Element)
  * erases the name of an element
  */
 void
-EraseElementName (ElementTypePtr Element)
+EraseElementName (ElementType *Element)
 {
   if (TEST_FLAG (HIDENAMEFLAG, Element))
     return;
@@ -1642,29 +1444,29 @@ EraseObject (int type, void *lptr, void *ptr)
     {
     case VIA_TYPE:
     case PIN_TYPE:
-      ErasePin ((PinTypePtr) ptr);
+      ErasePin ((PinType *) ptr);
       break;
     case TEXT_TYPE:
     case ELEMENTNAME_TYPE:
-      EraseText ((LayerTypePtr)lptr, (TextTypePtr) ptr);
+      EraseText ((LayerType *)lptr, (TextType *) ptr);
       break;
     case POLYGON_TYPE:
-      ErasePolygon ((PolygonTypePtr) ptr);
+      ErasePolygon ((PolygonType *) ptr);
       break;
     case ELEMENT_TYPE:
-      EraseElement ((ElementTypePtr) ptr);
+      EraseElement ((ElementType *) ptr);
       break;
     case LINE_TYPE:
     case ELEMENTLINE_TYPE:
     case RATLINE_TYPE:
-      EraseLine ((LineTypePtr) ptr);
+      EraseLine ((LineType *) ptr);
       break;
     case PAD_TYPE:
-      ErasePad ((PadTypePtr) ptr);
+      ErasePad ((PadType *) ptr);
       break;
     case ARC_TYPE:
     case ELEMENTARC_TYPE:
-      EraseArc ((ArcTypePtr) ptr);
+      EraseArc ((ArcType *) ptr);
       break;
     default:
       Message ("hace: Internal ERROR, trying to erase an unknown type\n");
@@ -1680,51 +1482,51 @@ DrawObject (int type, void *ptr1, void *ptr2)
     {
     case VIA_TYPE:
       if (PCB->ViaOn)
-	DrawVia ((PinTypePtr) ptr2);
+	DrawVia ((PinType *) ptr2);
       break;
     case LINE_TYPE:
-      if (((LayerTypePtr) ptr1)->On)
-	DrawLine ((LayerTypePtr) ptr1, (LineTypePtr) ptr2);
+      if (((LayerType *) ptr1)->On)
+	DrawLine ((LayerType *) ptr1, (LineType *) ptr2);
       break;
     case ARC_TYPE:
-      if (((LayerTypePtr) ptr1)->On)
-	DrawArc ((LayerTypePtr) ptr1, (ArcTypePtr) ptr2);
+      if (((LayerType *) ptr1)->On)
+	DrawArc ((LayerType *) ptr1, (ArcType *) ptr2);
       break;
     case TEXT_TYPE:
-      if (((LayerTypePtr) ptr1)->On)
-	DrawText ((LayerTypePtr) ptr1, (TextTypePtr) ptr2);
+      if (((LayerType *) ptr1)->On)
+	DrawText ((LayerType *) ptr1, (TextType *) ptr2);
       break;
     case POLYGON_TYPE:
-      if (((LayerTypePtr) ptr1)->On)
-	DrawPolygon ((LayerTypePtr) ptr1, (PolygonTypePtr) ptr2);
+      if (((LayerType *) ptr1)->On)
+	DrawPolygon ((LayerType *) ptr1, (PolygonType *) ptr2);
       break;
     case ELEMENT_TYPE:
       if (PCB->ElementOn &&
-	  (FRONT ((ElementTypePtr) ptr2) || PCB->InvisibleObjectsOn))
-	DrawElement ((ElementTypePtr) ptr2);
+	  (FRONT ((ElementType *) ptr2) || PCB->InvisibleObjectsOn))
+	DrawElement ((ElementType *) ptr2);
       break;
     case RATLINE_TYPE:
       if (PCB->RatOn)
-	DrawRat ((RatTypePtr) ptr2);
+	DrawRat ((RatType *) ptr2);
       break;
     case PIN_TYPE:
       if (PCB->PinOn)
-	DrawPin ((PinTypePtr) ptr2);
+	DrawPin ((PinType *) ptr2);
       break;
     case PAD_TYPE:
       if (PCB->PinOn)
-	DrawPad ((PadTypePtr) ptr2);
+	DrawPad ((PadType *) ptr2);
       break;
     case ELEMENTNAME_TYPE:
       if (PCB->ElementOn &&
-	  (FRONT ((ElementTypePtr) ptr2) || PCB->InvisibleObjectsOn))
-	DrawElementName ((ElementTypePtr) ptr1);
+	  (FRONT ((ElementType *) ptr2) || PCB->InvisibleObjectsOn))
+	DrawElementName ((ElementType *) ptr1);
       break;
     }
 }
 
 static void
-draw_element (ElementTypePtr element)
+draw_element (ElementType *element)
 {
   draw_element_package (element);
   draw_element_name (element);
@@ -1741,12 +1543,12 @@ hid_expose_callback (HID * hid, BoxType * region, void *item)
   HID *old_gui = gui;
 
   gui = hid;
-  Output.fgGC = gui->make_gc ();
-  Output.bgGC = gui->make_gc ();
-  Output.pmGC = gui->make_gc ();
+  Output.fgGC = gui->graphics->make_gc ();
+  Output.bgGC = gui->graphics->make_gc ();
+  Output.pmGC = gui->graphics->make_gc ();
 
-  hid->set_color (Output.pmGC, "erase");
-  hid->set_color (Output.bgGC, "drill");
+  hid->graphics->set_color (Output.pmGC, "erase");
+  hid->graphics->set_color (Output.bgGC, "drill");
 
   if (item)
     {
@@ -1757,8 +1559,8 @@ hid_expose_callback (HID * hid, BoxType * region, void *item)
   else
     DrawEverything (region);
 
-  gui->destroy_gc (Output.fgGC);
-  gui->destroy_gc (Output.bgGC);
-  gui->destroy_gc (Output.pmGC);
+  gui->graphics->destroy_gc (Output.fgGC);
+  gui->graphics->destroy_gc (Output.bgGC);
+  gui->graphics->destroy_gc (Output.pmGC);
   gui = old_gui;
 }
diff --git a/src/draw.h b/src/draw.h
index ef32ebb..b58e5cb 100644
--- a/src/draw.h
+++ b/src/draw.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for drawing routines
@@ -33,42 +32,46 @@
 
 #include "global.h"
 
-/*bool	SwitchDrawingWindow(double, GdkDrawable *, gboolean, gboolean);*/
-
 void Draw (void);
 void Redraw (void);
-void DrawVia (PinTypePtr);
-void DrawRat (RatTypePtr);
-void DrawViaName (PinTypePtr);
-void DrawPin (PinTypePtr);
-void DrawPinName (PinTypePtr);
-void DrawPad (PadTypePtr);
-void DrawPadName (PadTypePtr);
-void DrawLine (LayerTypePtr, LineTypePtr);
-void DrawArc (LayerTypePtr, ArcTypePtr);
-void DrawText (LayerTypePtr, TextTypePtr);
-void DrawTextLowLevel (TextTypePtr, Coord);
-void DrawPolygon (LayerTypePtr, PolygonTypePtr);
-void DrawElement (ElementTypePtr);
-void DrawElementName (ElementTypePtr);
-void DrawElementPackage (ElementTypePtr);
-void DrawElementPinsAndPads (ElementTypePtr);
+void DrawVia (PinType *);
+void DrawRat (RatType *);
+void DrawViaName (PinType *);
+void DrawPin (PinType *);
+void DrawPinName (PinType *);
+void DrawPad (PadType *);
+void DrawPadName (PadType *);
+void DrawLine (LayerType *, LineType *);
+void DrawArc (LayerType *, ArcType *);
+void DrawText (LayerType *, TextType *);
+void DrawPolygon (LayerType *, PolygonType *);
+void DrawElement (ElementType *);
+void DrawElementName (ElementType *);
+void DrawElementPackage (ElementType *);
+void DrawElementPinsAndPads (ElementType *);
 void DrawObject (int, void *, void *);
-void DrawLayer (LayerTypePtr, const BoxType *);
-void EraseVia (PinTypePtr);
-void EraseRat (RatTypePtr);
-void EraseViaName (PinTypePtr);
-void ErasePad (PadTypePtr);
-void ErasePadName (PadTypePtr);
-void ErasePin (PinTypePtr);
-void ErasePinName (PinTypePtr);
-void EraseLine (LineTypePtr);
-void EraseArc (ArcTypePtr);
-void EraseText (LayerTypePtr, TextTypePtr);
-void ErasePolygon (PolygonTypePtr);
-void EraseElement (ElementTypePtr);
-void EraseElementPinsAndPads (ElementTypePtr);
-void EraseElementName (ElementTypePtr);
+void DrawLayer (LayerType *, const BoxType *);
+void EraseVia (PinType *);
+void EraseRat (RatType *);
+void EraseViaName (PinType *);
+void ErasePad (PadType *);
+void ErasePadName (PadType *);
+void ErasePin (PinType *);
+void ErasePinName (PinType *);
+void EraseLine (LineType *);
+void EraseArc (ArcType *);
+void EraseText (LayerType *, TextType *);
+void ErasePolygon (PolygonType *);
+void EraseElement (ElementType *);
+void EraseElementPinsAndPads (ElementType *);
+void EraseElementName (ElementType *);
 void EraseObject (int, void *, void *);
 
+void DrawLayerGroup (int side, const BoxType *drawn_area);
+void DrawPaste (int side, const BoxType *drawn_area);
+void DrawSilk (int side, const BoxType *drawn_area);
+void DrawMask (int side, const BoxType *drawn_area);
+void DrawHoles (bool draw_plated, bool draw_unplated, const BoxType *drawn_area);
+void PrintAssembly (int side, const BoxType *drawn_area);
+
 #endif
diff --git a/src/drill.c b/src/drill.c
index a7a908b..7830e49 100644
--- a/src/drill.c
+++ b/src/drill.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -41,24 +39,19 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
-
-
-
 /*
  * some local prototypes
  */
-static void FillDrill (DrillTypePtr, ElementTypePtr, PinTypePtr);
-static void InitializeDrill (DrillTypePtr, PinTypePtr, ElementTypePtr);
+static void FillDrill (DrillType *, ElementType *, PinType *);
+static void InitializeDrill (DrillType *, PinType *, ElementType *);
 
 
 static void
-FillDrill (DrillTypePtr Drill, ElementTypePtr Element, PinTypePtr Pin)
+FillDrill (DrillType *Drill, ElementType *Element, PinType *Pin)
 {
   Cardinal n;
-  ElementTypeHandle ptr;
-  PinTypeHandle pin;
+  ElementType **ptr;
+  PinType **pin;
 
   pin = GetDrillPinMemory (Drill);
   *pin = Pin;
@@ -81,7 +74,7 @@ FillDrill (DrillTypePtr Drill, ElementTypePtr Element, PinTypePtr Pin)
 }
 
 static void
-InitializeDrill (DrillTypePtr drill, PinTypePtr pin, ElementTypePtr element)
+InitializeDrill (DrillType *drill, PinType *pin, ElementType *element)
 {
   void *ptr;
 
@@ -96,11 +89,11 @@ InitializeDrill (DrillTypePtr drill, PinTypePtr pin, ElementTypePtr element)
   drill->Pin = NULL;
   drill->PinMax = 0;
   ptr = (void *) GetDrillPinMemory (drill);
-  *((PinTypeHandle) ptr) = pin;
+  *((PinType **) ptr) = pin;
   if (element)
     {
       ptr = (void *) GetDrillElementMemory (drill);
-      *((ElementTypeHandle) ptr) = element;
+      *((ElementType **) ptr) = element;
       drill->PinCount = 1;
     }
   else
@@ -117,16 +110,16 @@ DrillQSort (const void *va, const void *vb)
   return a->DrillSize - b->DrillSize;
 }
 
-DrillInfoTypePtr
-GetDrillInfo (DataTypePtr top)
+DrillInfoType *
+GetDrillInfo (DataType *top)
 {
-  DrillInfoTypePtr AllDrills;
-  DrillTypePtr Drill = NULL;
+  DrillInfoType *AllDrills;
+  DrillType *Drill = NULL;
   DrillType savedrill, swapdrill;
   bool DrillFound = false;
   bool NewDrill;
 
-  AllDrills = (DrillInfoTypePtr)calloc (1, sizeof (DrillInfoType));
+  AllDrills = (DrillInfoType *)calloc (1, sizeof (DrillInfoType));
   ALLPIN_LOOP (top);
   {
     if (!DrillFound)
@@ -218,7 +211,7 @@ GetDrillInfo (DataTypePtr top)
 #define ROUND(x,n) ((int)(((x)+(n)/2)/(n))*(n))
 
 void
-RoundDrillInfo (DrillInfoTypePtr d, int roundto)
+RoundDrillInfo (DrillInfoType *d, int roundto)
 {
   unsigned int i = 0;
 
@@ -235,9 +228,9 @@ RoundDrillInfo (DrillInfoTypePtr d, int roundto)
 	    = d->Drill[i].ElementN + d->Drill[i+1].ElementN;
 	  if (d->Drill[i].ElementMax)
 	    {
-	      d->Drill[i].Element = (ElementTypePtr *)realloc (d->Drill[i].Element,
+	      d->Drill[i].Element = (ElementType **)realloc (d->Drill[i].Element,
 					     d->Drill[i].ElementMax *
-					     sizeof (ElementTypePtr));
+					     sizeof (ElementType *));
 
 	      for (ei = 0; ei < d->Drill[i+1].ElementN; ei++)
 		{
@@ -253,11 +246,11 @@ RoundDrillInfo (DrillInfoTypePtr d, int roundto)
 	  d->Drill[i + 1].Element = NULL;
 
 	  d->Drill[i].PinMax = d->Drill[i].PinN + d->Drill[i + 1].PinN;
-	  d->Drill[i].Pin = (PinTypePtr *)realloc (d->Drill[i].Pin,
+	  d->Drill[i].Pin = (PinType **)realloc (d->Drill[i].Pin,
 				     d->Drill[i].PinMax *
-				     sizeof (PinTypePtr));
+				     sizeof (PinType *));
 	  memcpy (d->Drill[i].Pin + d->Drill[i].PinN, d->Drill[i + 1].Pin,
-		  d->Drill[i + 1].PinN * sizeof (PinTypePtr));
+		  d->Drill[i + 1].PinN * sizeof (PinType *));
 	  d->Drill[i].PinN += d->Drill[i + 1].PinN;
 	  free (d->Drill[i + 1].Pin);
 	  d->Drill[i + 1].Pin = NULL;
@@ -282,7 +275,7 @@ RoundDrillInfo (DrillInfoTypePtr d, int roundto)
 }
 
 void
-FreeDrillInfo (DrillInfoTypePtr Drills)
+FreeDrillInfo (DrillInfoType *Drills)
 {
   DRILL_LOOP (Drills);
   {
diff --git a/src/drill.h b/src/drill.h
index 862ff08..e9c4e92 100644
--- a/src/drill.h
+++ b/src/drill.h
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -28,6 +26,6 @@
  *
  */
 
-DrillInfoTypePtr GetDrillInfo (DataTypePtr);
-void FreeDrillInfo (DrillInfoTypePtr);
-void RoundDrillInfo (DrillInfoTypePtr, int);
+DrillInfoType * GetDrillInfo (DataType *);
+void FreeDrillInfo (DrillInfoType *);
+void RoundDrillInfo (DrillInfoType *, int);
diff --git a/src/edif.c b/src/edif.c
index 2f97934..ac5b4ad 100644
--- a/src/edif.c
+++ b/src/edif.c
@@ -1,9 +1,8 @@
-/* A Bison parser, made by GNU Bison 2.4.3.  */
+/* A Bison parser, made by GNU Bison 2.5.  */
 
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* Bison implementation for Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2009, 2010 Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -45,7 +44,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.4.3"
+#define YYBISON_VERSION "2.5"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -74,7 +73,7 @@
 
 /* Copy the first part of user declarations.  */
 
-/* Line 189 of yacc.c  */
+/* Line 268 of yacc.c  */
 #line 1 "edif.y"
 
 /* 
@@ -107,8 +106,8 @@
 #include "global.h"
 #include "data.h"
 /* from mymem.h, not include because of the malloc junk */
-LibraryMenuTypePtr GetLibraryMenuMemory (LibraryTypePtr);
-LibraryEntryTypePtr GetLibraryEntryMemory (LibraryMenuTypePtr);
+LibraryMenuType * GetLibraryMenuMemory (LibraryType *);
+LibraryEntryType * GetLibraryEntryMemory (LibraryMenuType *);
 
 /*
  *	Local definitions.
@@ -176,8 +175,8 @@ LibraryEntryTypePtr GetLibraryEntryMemory (LibraryMenuTypePtr);
      str_pair* node;
      char* buf;
      char* p;
-     LibraryEntryTypePtr entry;
-     LibraryMenuTypePtr menu = GetLibraryMenuMemory (&PCB->NetlistLib);
+     LibraryEntryType *entry;
+     LibraryMenuType *menu = GetLibraryMenuMemory (&PCB->NetlistLib);
 
      if ( !name->str1 )
      {
@@ -266,8 +265,8 @@ LibraryEntryTypePtr GetLibraryEntryMemory (LibraryMenuTypePtr);
  static void PopC(void);
 
 
-/* Line 189 of yacc.c  */
-#line 271 "edif.c"
+/* Line 268 of yacc.c  */
+#line 270 "edif.c"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
@@ -889,7 +888,7 @@ LibraryEntryTypePtr GetLibraryEntryMemory (LibraryMenuTypePtr);
 typedef union YYSTYPE
 {
 
-/* Line 214 of yacc.c  */
+/* Line 293 of yacc.c  */
 #line 193 "edif.y"
 
     char* s;
@@ -898,8 +897,8 @@ typedef union YYSTYPE
 
 
 
-/* Line 214 of yacc.c  */
-#line 903 "edif.c"
+/* Line 293 of yacc.c  */
+#line 902 "edif.c"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -910,8 +909,8 @@ typedef union YYSTYPE
 /* Copy the second part of user declarations.  */
 
 
-/* Line 264 of yacc.c  */
-#line 915 "edif.c"
+/* Line 343 of yacc.c  */
+#line 914 "edif.c"
 
 #ifdef short
 # undef short
@@ -1014,11 +1013,11 @@ YYID (yyi)
 #    define alloca _alloca
 #   else
 #    define YYSTACK_ALLOC alloca
-#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#     ifndef _STDLIB_H
-#      define _STDLIB_H 1
+#     ifndef EXIT_SUCCESS
+#      define EXIT_SUCCESS 0
 #     endif
 #    endif
 #   endif
@@ -1041,24 +1040,24 @@ YYID (yyi)
 #  ifndef YYSTACK_ALLOC_MAXIMUM
 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
 #  endif
-#  if (defined __cplusplus && ! defined _STDLIB_H \
+#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
        && ! ((defined YYMALLOC || defined malloc) \
 	     && (defined YYFREE || defined free)))
 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   ifndef _STDLIB_H
-#    define _STDLIB_H 1
+#   ifndef EXIT_SUCCESS
+#    define EXIT_SUCCESS 0
 #   endif
 #  endif
 #  ifndef YYMALLOC
 #   define YYMALLOC malloc
-#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+#   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
 #  ifndef YYFREE
 #   define YYFREE free
-#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+#   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 void free (void *); /* INFRINGES ON USER NAME SPACE */
 #   endif
@@ -1087,23 +1086,7 @@ union yyalloc
      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
       + YYSTACK_GAP_MAXIMUM)
 
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if defined __GNUC__ && 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count)		\
-      do					\
-	{					\
-	  YYSIZE_T yyi;				\
-	  for (yyi = 0; yyi < (Count); yyi++)	\
-	    (To)[yyi] = (From)[yyi];		\
-	}					\
-      while (YYID (0))
-#  endif
-# endif
+# define YYCOPY_NEEDED 1
 
 /* Relocate STACK from its old location to the new one.  The
    local variables YYSIZE and YYSTACKSIZE give the old and new number of
@@ -1123,6 +1106,26 @@ union yyalloc
 
 #endif
 
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)		\
+      do					\
+	{					\
+	  YYSIZE_T yyi;				\
+	  for (yyi = 0; yyi < (Count); yyi++)	\
+	    (To)[yyi] = (From)[yyi];		\
+	}					\
+      while (YYID (0))
+#  endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  11
 /* YYLAST -- Last index in YYTABLE.  */
@@ -2241,8 +2244,8 @@ static const yytype_uint8 yyr2[] =
        2,     2,     2,     2,     2,     2,     1,     1,     1,     1
 };
 
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
-   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
+/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
+   Performed when YYTABLE doesn't specify something else to do.  Zero
    means the default is an error.  */
 static const yytype_uint16 yydefact[] =
 {
@@ -2689,8 +2692,7 @@ static const yytype_int16 yypgoto[] =
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
    positive, shift that token.  If negative, reduce the rule which
-   number is the opposite.  If zero, do what YYDEFACT says.
-   If YYTABLE_NINF, syntax error.  */
+   number is the opposite.  If YYTABLE_NINF, syntax error.  */
 #define YYTABLE_NINF -1
 static const yytype_uint16 yytable[] =
 {
@@ -2958,6 +2960,12 @@ static const yytype_uint16 yytable[] =
        0,     0,     0,     0,     0,     0,     0,     0,    10,    10
 };
 
+#define yypact_value_is_default(yystate) \
+  ((yystate) == (-1333))
+
+#define yytable_value_is_error(yytable_value) \
+  YYID (0)
+
 static const yytype_int16 yycheck[] =
 {
       25,   518,   216,   773,   213,   215,   680,  1003,   673,   476,
@@ -3426,7 +3434,6 @@ do								\
     {								\
       yychar = (Token);						\
       yylval = (Value);						\
-      yytoken = YYTRANSLATE (yychar);				\
       YYPOPSTACK (1);						\
       goto yybackup;						\
     }								\
@@ -3468,19 +3475,10 @@ while (YYID (0))
 #endif
 
 
-/* YY_LOCATION_PRINT -- Print the location on the stream.
-   This macro was not mandated originally: define only if we know
-   we won't break user code: when these are the locations we know.  */
+/* This macro is provided for backward compatibility. */
 
 #ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
-#  define YY_LOCATION_PRINT(File, Loc)			\
-     fprintf (File, "%d.%d-%d.%d",			\
-	      (Loc).first_line, (Loc).first_column,	\
-	      (Loc).last_line,  (Loc).last_column)
-# else
-#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
 #endif
 
 
@@ -3672,7 +3670,6 @@ int yydebug;
 # define YYMAXDEPTH 10000
 #endif
 
-

 
 #if YYERROR_VERBOSE
 
@@ -3775,115 +3772,142 @@ yytnamerr (char *yyres, const char *yystr)
 }
 # endif
 
-/* Copy into YYRESULT an error message about the unexpected token
-   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
-   including the terminating null byte.  If YYRESULT is null, do not
-   copy anything; just return the number of bytes that would be
-   copied.  As a special case, return 0 if an ordinary "syntax error"
-   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
-   size calculation.  */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
-{
-  int yyn = yypact[yystate];
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+   about the unexpected token YYTOKEN for the state stack whose top is
+   YYSSP.
 
-  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
-    return 0;
-  else
+   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
+   not large enough to hold the message.  In that case, also set
+   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
+   required number of bytes is too large to store.  */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+                yytype_int16 *yyssp, int yytoken)
+{
+  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
+  YYSIZE_T yysize = yysize0;
+  YYSIZE_T yysize1;
+  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+  /* Internationalized format string. */
+  const char *yyformat = 0;
+  /* Arguments of yyformat. */
+  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+  /* Number of reported tokens (one for the "unexpected", one per
+     "expected"). */
+  int yycount = 0;
+
+  /* There are many possibilities here to consider:
+     - Assume YYFAIL is not used.  It's too flawed to consider.  See
+       <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
+       for details.  YYERROR is fine as it does not invoke this
+       function.
+     - If this state is a consistent state with a default action, then
+       the only way this function was invoked is if the default action
+       is an error action.  In that case, don't check for expected
+       tokens because there are none.
+     - The only way there can be no lookahead present (in yychar) is if
+       this state is a consistent state with a default action.  Thus,
+       detecting the absence of a lookahead is sufficient to determine
+       that there is no unexpected or expected token to report.  In that
+       case, just report a simple "syntax error".
+     - Don't assume there isn't a lookahead just because this state is a
+       consistent state with a default action.  There might have been a
+       previous inconsistent state, consistent state with a non-default
+       action, or user semantic action that manipulated yychar.
+     - Of course, the expected token list depends on states to have
+       correct lookahead information, and it depends on the parser not
+       to perform extra reductions after fetching a lookahead from the
+       scanner and before detecting a syntax error.  Thus, state merging
+       (from LALR or IELR) and default reductions corrupt the expected
+       token list.  However, the list is correct for canonical LR with
+       one exception: it will still contain any token that will not be
+       accepted due to an error action in a later state.
+  */
+  if (yytoken != YYEMPTY)
     {
-      int yytype = YYTRANSLATE (yychar);
-      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
-      YYSIZE_T yysize = yysize0;
-      YYSIZE_T yysize1;
-      int yysize_overflow = 0;
-      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
-      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
-      int yyx;
-
-# if 0
-      /* This is so xgettext sees the translatable formats that are
-	 constructed on the fly.  */
-      YY_("syntax error, unexpected %s");
-      YY_("syntax error, unexpected %s, expecting %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
-      char *yyfmt;
-      char const *yyf;
-      static char const yyunexpected[] = "syntax error, unexpected %s";
-      static char const yyexpecting[] = ", expecting %s";
-      static char const yyor[] = " or %s";
-      char yyformat[sizeof yyunexpected
-		    + sizeof yyexpecting - 1
-		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
-		       * (sizeof yyor - 1))];
-      char const *yyprefix = yyexpecting;
-
-      /* Start YYX at -YYN if negative to avoid negative indexes in
-	 YYCHECK.  */
-      int yyxbegin = yyn < 0 ? -yyn : 0;
-
-      /* Stay within bounds of both yycheck and yytname.  */
-      int yychecklim = YYLAST - yyn + 1;
-      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
-      int yycount = 1;
-
-      yyarg[0] = yytname[yytype];
-      yyfmt = yystpcpy (yyformat, yyunexpected);
-
-      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
-	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-	  {
-	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
-	      {
-		yycount = 1;
-		yysize = yysize0;
-		yyformat[sizeof yyunexpected - 1] = '\0';
-		break;
-	      }
-	    yyarg[yycount++] = yytname[yyx];
-	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
-	    yysize_overflow |= (yysize1 < yysize);
-	    yysize = yysize1;
-	    yyfmt = yystpcpy (yyfmt, yyprefix);
-	    yyprefix = yyor;
-	  }
+      int yyn = yypact[*yyssp];
+      yyarg[yycount++] = yytname[yytoken];
+      if (!yypact_value_is_default (yyn))
+        {
+          /* Start YYX at -YYN if negative to avoid negative indexes in
+             YYCHECK.  In other words, skip the first -YYN actions for
+             this state because they are default actions.  */
+          int yyxbegin = yyn < 0 ? -yyn : 0;
+          /* Stay within bounds of both yycheck and yytname.  */
+          int yychecklim = YYLAST - yyn + 1;
+          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+          int yyx;
+
+          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+                && !yytable_value_is_error (yytable[yyx + yyn]))
+              {
+                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+                  {
+                    yycount = 1;
+                    yysize = yysize0;
+                    break;
+                  }
+                yyarg[yycount++] = yytname[yyx];
+                yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+                if (! (yysize <= yysize1
+                       && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+                  return 2;
+                yysize = yysize1;
+              }
+        }
+    }
 
-      yyf = YY_(yyformat);
-      yysize1 = yysize + yystrlen (yyf);
-      yysize_overflow |= (yysize1 < yysize);
-      yysize = yysize1;
+  switch (yycount)
+    {
+# define YYCASE_(N, S)                      \
+      case N:                               \
+        yyformat = S;                       \
+      break
+      YYCASE_(0, YY_("syntax error"));
+      YYCASE_(1, YY_("syntax error, unexpected %s"));
+      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+    }
 
-      if (yysize_overflow)
-	return YYSIZE_MAXIMUM;
+  yysize1 = yysize + yystrlen (yyformat);
+  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+    return 2;
+  yysize = yysize1;
 
-      if (yyresult)
-	{
-	  /* Avoid sprintf, as that infringes on the user's name space.
-	     Don't have undefined behavior even if the translation
-	     produced a string with the wrong number of "%s"s.  */
-	  char *yyp = yyresult;
-	  int yyi = 0;
-	  while ((*yyp = *yyf) != '\0')
-	    {
-	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
-		{
-		  yyp += yytnamerr (yyp, yyarg[yyi++]);
-		  yyf += 2;
-		}
-	      else
-		{
-		  yyp++;
-		  yyf++;
-		}
-	    }
-	}
-      return yysize;
+  if (*yymsg_alloc < yysize)
+    {
+      *yymsg_alloc = 2 * yysize;
+      if (! (yysize <= *yymsg_alloc
+             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+      return 1;
     }
+
+  /* Avoid sprintf, as that infringes on the user's name space.
+     Don't have undefined behavior even if the translation
+     produced a string with the wrong number of "%s"s.  */
+  {
+    char *yyp = *yymsg;
+    int yyi = 0;
+    while ((*yyp = *yyformat) != '\0')
+      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+        {
+          yyp += yytnamerr (yyp, yyarg[yyi++]);
+          yyformat += 2;
+        }
+      else
+        {
+          yyp++;
+          yyformat++;
+        }
+  }
+  return 0;
 }
 #endif /* YYERROR_VERBOSE */
-

 
 /*-----------------------------------------------.
 | Release the memory associated to this symbol.  |
@@ -3916,6 +3940,7 @@ yydestruct (yymsg, yytype, yyvaluep)
     }
 }
 
+
 /* Prevent warnings from -Wmissing-prototypes.  */
 #ifdef YYPARSE_PARAM
 #if defined __STDC__ || defined __cplusplus
@@ -3942,10 +3967,9 @@ YYSTYPE yylval;
 int yynerrs;
 
 
-
-/*-------------------------.
-| yyparse or yypush_parse.  |
-`-------------------------*/
+/*----------.
+| yyparse.  |
+`----------*/
 
 #ifdef YYPARSE_PARAM
 #if (defined __STDC__ || defined __C99__FUNC__ \
@@ -3969,8 +3993,6 @@ yyparse ()
 #endif
 #endif
 {
-
-
     int yystate;
     /* Number of tokens to shift before error messages enabled.  */
     int yyerrstatus;
@@ -4125,7 +4147,7 @@ yybackup:
 
   /* First try to decide what to do without reference to lookahead token.  */
   yyn = yypact[yystate];
-  if (yyn == YYPACT_NINF)
+  if (yypact_value_is_default (yyn))
     goto yydefault;
 
   /* Not known => get a lookahead token if don't already have one.  */
@@ -4156,8 +4178,8 @@ yybackup:
   yyn = yytable[yyn];
   if (yyn <= 0)
     {
-      if (yyn == 0 || yyn == YYTABLE_NINF)
-	goto yyerrlab;
+      if (yytable_value_is_error (yyn))
+        goto yyerrlab;
       yyn = -yyn;
       goto yyreduce;
     }
@@ -4212,630 +4234,630 @@ yyreduce:
     {
         case 2:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 505 "edif.y"
     { PopC(); }
     break;
 
   case 11:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 520 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 12:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 523 "edif.y"
     { free((yyvsp[(2) - (3)].s)); }
     break;
 
   case 13:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 527 "edif.y"
     { free((yyvsp[(2) - (5)].s)); free((yyvsp[(3) - (5)].s)); free((yyvsp[(4) - (5)].s)); }
     break;
 
   case 25:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 551 "edif.y"
     { free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 34:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 568 "edif.y"
     { str_pair_free((yyvsp[(2) - (5)].ps)); free((yyvsp[(3) - (5)].s)); }
     break;
 
   case 36:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 572 "edif.y"
     { free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 47:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 597 "edif.y"
     { free((yyvsp[(2) - (3)].s)); }
     break;
 
   case 69:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 645 "edif.y"
     { free((yyvsp[(2) - (5)].s)); free((yyvsp[(3) - (5)].s)); }
     break;
 
   case 70:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 648 "edif.y"
     { free((yyvsp[(2) - (3)].s)); }
     break;
 
   case 80:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 666 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 84:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 676 "edif.y"
     { free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 91:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 691 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 102:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 714 "edif.y"
     { free((yyvsp[(2) - (2)].s)); }
     break;
 
   case 140:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 774 "edif.y"
     { free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 147:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 789 "edif.y"
     { free((yyvsp[(2) - (4)].s)); }
     break;
 
   case 150:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 796 "edif.y"
     { free((yyvsp[(2) - (4)].s)); }
     break;
 
   case 182:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 866 "edif.y"
     { free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 184:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 870 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 240:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 974 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 247:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 987 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 278:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1034 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 279:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1037 "edif.y"
     { free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 333:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1123 "edif.y"
     { free((yyvsp[(2) - (5)].s)); free((yyvsp[(3) - (5)].s)); }
     break;
 
   case 336:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1130 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 337:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1133 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 344:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1146 "edif.y"
     { free((yyvsp[(1) - (3)].s)); }
     break;
 
   case 346:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1150 "edif.y"
     { free((yyvsp[(2) - (2)].s)); }
     break;
 
   case 347:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1151 "edif.y"
     { free((yyvsp[(2) - (2)].s)); }
     break;
 
   case 348:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1152 "edif.y"
     { free((yyvsp[(2) - (2)].s)); }
     break;
 
   case 369:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1193 "edif.y"
     { (yyval.s)=(yyvsp[(2) - (4)].s); }
     break;
 
   case 371:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1197 "edif.y"
     { free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 374:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1204 "edif.y"
     { free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 381:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1215 "edif.y"
     { free((yyvsp[(2) - (2)].s)); }
     break;
 
   case 384:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1222 "edif.y"
     { free((yyvsp[(2) - (2)].s)); }
     break;
 
   case 388:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1228 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 390:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1232 "edif.y"
     { (yyval.s)=(yyvsp[(1) - (1)].s); }
     break;
 
   case 393:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1239 "edif.y"
     { free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 397:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1247 "edif.y"
     { free((yyvsp[(2) - (2)].s)); }
     break;
 
   case 408:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1262 "edif.y"
     { pair_list_free((yyvsp[(2) - (2)].pl)); }
     break;
 
   case 437:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1312 "edif.y"
     { (yyval.pl) = new_pair_list((yyvsp[(2) - (3)].ps)); }
     break;
 
   case 438:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1315 "edif.y"
     { (yyval.ps)=NULL; }
     break;
 
   case 439:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1316 "edif.y"
     { (yyvsp[(2) - (2)].ps)->next = (yyvsp[(1) - (2)].ps); (yyval.ps) = (yyvsp[(2) - (2)].ps); }
     break;
 
   case 455:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1342 "edif.y"
     { free((yyvsp[(2) - (3)].s)); }
     break;
 
   case 459:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1352 "edif.y"
     { free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 460:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1355 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 462:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1361 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 463:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1364 "edif.y"
     { free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 483:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1406 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 484:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1409 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 492:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1423 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 506:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1451 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 507:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1454 "edif.y"
     { free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 514:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1469 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 549:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1524 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 555:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1536 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 560:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1545 "edif.y"
     { free((yyvsp[(2) - (4)].s)); }
     break;
 
   case 561:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1548 "edif.y"
     { free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 562:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1549 "edif.y"
     { free((yyvsp[(2) - (2)].s)); }
     break;
 
   case 582:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1591 "edif.y"
     { str_pair_free((yyvsp[(2) - (2)].ps)); }
     break;
 
   case 585:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1594 "edif.y"
     { pair_list_free((yyvsp[(2) - (2)].pl)); }
     break;
 
   case 586:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1597 "edif.y"
     { (yyval.s)=(yyvsp[(2) - (3)].s); }
     break;
 
   case 587:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1600 "edif.y"
     { (yyval.s)=(yyvsp[(1) - (1)].s); }
     break;
 
   case 589:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1604 "edif.y"
     { (yyval.ps) = new_str_pair((yyvsp[(1) - (1)].s),NULL); }
     break;
 
   case 590:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1605 "edif.y"
     { (yyval.ps) = new_str_pair((yyvsp[(1) - (1)].s),NULL); }
     break;
 
   case 591:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1606 "edif.y"
     { (yyval.ps)=(yyvsp[(1) - (1)].ps); }
     break;
 
   case 592:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1609 "edif.y"
     { (yyval.s)=(yyvsp[(1) - (1)].s); }
     break;
 
   case 593:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1610 "edif.y"
     { (yyval.s)=(yyvsp[(1) - (1)].s); }
     break;
 
   case 594:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1613 "edif.y"
     { define_pcb_net((yyvsp[(2) - (4)].ps), (yyvsp[(3) - (4)].pl)); }
     break;
 
   case 595:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1616 "edif.y"
     { (yyval.pl)=(yyvsp[(1) - (1)].pl); }
     break;
 
   case 611:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1638 "edif.y"
     { str_pair_free((yyvsp[(2) - (4)].ps)); }
     break;
 
   case 632:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1675 "edif.y"
     { (yyval.ps)=(yyvsp[(1) - (1)].ps); }
     break;
 
   case 633:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1676 "edif.y"
     { (yyval.ps)=NULL; }
     break;
 
   case 634:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1680 "edif.y"
     { free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 639:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1689 "edif.y"
     { free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 644:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1700 "edif.y"
     { str_pair_free((yyvsp[(2) - (2)].ps)); }
     break;
 
   case 698:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1802 "edif.y"
     { free((yyvsp[(2) - (5)].s)); }
     break;
 
   case 701:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1809 "edif.y"
     { free((yyvsp[(2) - (3)].s)); }
     break;
 
   case 727:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1861 "edif.y"
     { free((yyvsp[(2) - (3)].s)); }
     break;
 
   case 730:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1868 "edif.y"
     { str_pair_free((yyvsp[(2) - (2)].ps)); }
     break;
 
   case 747:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1903 "edif.y"
     { free((yyvsp[(2) - (4)].s)); free((yyvsp[(3) - (4)].s)); }
     break;
 
   case 766:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1934 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 789:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1969 "edif.y"
     { str_pair_free((yyvsp[(2) - (2)].ps)); }
     break;
 
   case 791:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1975 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 803:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1991 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 818:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2010 "edif.y"
     { str_pair_free((yyvsp[(2) - (2)].ps)); }
     break;
 
   case 823:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2021 "edif.y"
     { str_pair_free((yyvsp[(2) - (2)].ps)); }
     break;
 
   case 827:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2027 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 829:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2031 "edif.y"
     { (yyval.s)=(yyvsp[(1) - (1)].s); }
     break;
 
   case 831:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2036 "edif.y"
     { 
     if ((yyvsp[(3) - (4)].ps))
@@ -4853,290 +4875,301 @@ yyreduce:
 
   case 832:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2050 "edif.y"
     { (yyval.ps)=NULL; }
     break;
 
   case 833:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2051 "edif.y"
     { (yyval.ps)=(yyvsp[(1) - (1)].ps); }
     break;
 
   case 834:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2052 "edif.y"
     { (yyval.ps) = new_str_pair((yyvsp[(1) - (1)].s),NULL); }
     break;
 
   case 835:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2053 "edif.y"
     { (yyval.ps)=NULL; }
     break;
 
   case 848:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2080 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 849:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2083 "edif.y"
     { free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 881:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2136 "edif.y"
     { (yyval.ps) = new_str_pair((yyvsp[(2) - (4)].s),(yyvsp[(3) - (4)].s)); }
     break;
 
   case 882:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2139 "edif.y"
     { (yyval.s)=(yyvsp[(1) - (1)].s); }
     break;
 
   case 883:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2140 "edif.y"
     { (yyval.s)=(yyvsp[(1) - (1)].s); }
     break;
 
   case 884:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2143 "edif.y"
     { (yyval.s)=(yyvsp[(1) - (1)].s); }
     break;
 
   case 885:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2144 "edif.y"
     { (yyval.s)=NULL; }
     break;
 
   case 889:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2154 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 891:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2160 "edif.y"
     { free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 892:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2161 "edif.y"
     { free((yyvsp[(2) - (4)].s)); free((yyvsp[(3) - (4)].s)); }
     break;
 
   case 893:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2164 "edif.y"
     { free((yyvsp[(2) - (4)].s)); free((yyvsp[(3) - (4)].s)); }
     break;
 
   case 894:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2167 "edif.y"
     { free((yyvsp[(2) - (4)].s)); free((yyvsp[(3) - (4)].s)); }
     break;
 
   case 896:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2173 "edif.y"
     { free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 898:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2175 "edif.y"
     { free((yyvsp[(2) - (2)].s)); }
     break;
 
   case 903:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2186 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 935:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2250 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 943:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2266 "edif.y"
     { free((yyvsp[(2) - (2)].s)); }
     break;
 
   case 946:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2271 "edif.y"
     { free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 973:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2316 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 987:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2338 "edif.y"
     { free((yyvsp[(2) - (3)].s)); }
     break;
 
   case 994:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2354 "edif.y"
     { free((yyvsp[(2) - (8)].s)); free((yyvsp[(3) - (8)].s)); free((yyvsp[(4) - (8)].s)); free((yyvsp[(5) - (8)].s)); free((yyvsp[(6) - (8)].s)); free((yyvsp[(7) - (8)].s)); }
     break;
 
   case 1054:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2461 "edif.y"
     { free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 1055:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2462 "edif.y"
     { free((yyvsp[(2) - (2)].s)); }
     break;
 
   case 1056:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2463 "edif.y"
     { free((yyvsp[(2) - (2)].s)); }
     break;
 
   case 1057:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2464 "edif.y"
     { free((yyvsp[(2) - (2)].s)); }
     break;
 
   case 1059:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2468 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 1061:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2472 "edif.y"
     { free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 1063:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2476 "edif.y"
     { free((yyvsp[(2) - (3)].s)); }
     break;
 
   case 1085:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2512 "edif.y"
     { str_pair_free((yyvsp[(1) - (1)].ps)); }
     break;
 
   case 1086:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2515 "edif.y"
     { free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 1107:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2556 "edif.y"
     { str_pair_free((yyvsp[(2) - (2)].ps)); }
     break;
 
   case 1109:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2558 "edif.y"
     { pair_list_free((yyvsp[(2) - (2)].pl)); }
     break;
 
   case 1126:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2585 "edif.y"
     { (yyval.s)=(yyvsp[(1) - (1)].s); }
     break;
 
   case 1127:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2588 "edif.y"
     { (yyval.s)=(yyvsp[(1) - (1)].s); }
     break;
 
   case 1128:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2591 "edif.y"
     { (yyval.s)=(yyvsp[(1) - (1)].s); }
     break;
 
   case 1129:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2594 "edif.y"
     { (yyval.s)=(yyvsp[(1) - (1)].s); }
     break;
 
 
 
-/* Line 1464 of yacc.c  */
-#line 5138 "edif.c"
+/* Line 1806 of yacc.c  */
+#line 5160 "edif.c"
       default: break;
     }
+  /* User semantic actions sometimes alter yychar, and that requires
+     that yytoken be updated with the new translation.  We take the
+     approach of translating immediately before every use of yytoken.
+     One alternative is translating here after every semantic action,
+     but that translation would be missed if the semantic action invokes
+     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
+     incorrect destructor might then be invoked immediately.  In the
+     case of YYERROR or YYBACKUP, subsequent parser actions might lead
+     to an incorrect destructor call or verbose syntax error message
+     before the lookahead is translated.  */
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
 
   YYPOPSTACK (yylen);
@@ -5164,6 +5197,10 @@ yyreduce:
 | yyerrlab -- here on detecting error |
 `------------------------------------*/
 yyerrlab:
+  /* Make sure we have latest lookahead translation.  See comments at
+     user semantic actions for why this is necessary.  */
+  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
   /* If not already recovering from an error, report this error.  */
   if (!yyerrstatus)
     {
@@ -5171,37 +5208,36 @@ yyerrlab:
 #if ! YYERROR_VERBOSE
       yyerror (YY_("syntax error"));
 #else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+                                        yyssp, yytoken)
       {
-	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
-	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
-	  {
-	    YYSIZE_T yyalloc = 2 * yysize;
-	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
-	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
-	    if (yymsg != yymsgbuf)
-	      YYSTACK_FREE (yymsg);
-	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
-	    if (yymsg)
-	      yymsg_alloc = yyalloc;
-	    else
-	      {
-		yymsg = yymsgbuf;
-		yymsg_alloc = sizeof yymsgbuf;
-	      }
-	  }
-
-	if (0 < yysize && yysize <= yymsg_alloc)
-	  {
-	    (void) yysyntax_error (yymsg, yystate, yychar);
-	    yyerror (yymsg);
-	  }
-	else
-	  {
-	    yyerror (YY_("syntax error"));
-	    if (yysize != 0)
-	      goto yyexhaustedlab;
-	  }
+        char const *yymsgp = YY_("syntax error");
+        int yysyntax_error_status;
+        yysyntax_error_status = YYSYNTAX_ERROR;
+        if (yysyntax_error_status == 0)
+          yymsgp = yymsg;
+        else if (yysyntax_error_status == 1)
+          {
+            if (yymsg != yymsgbuf)
+              YYSTACK_FREE (yymsg);
+            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+            if (!yymsg)
+              {
+                yymsg = yymsgbuf;
+                yymsg_alloc = sizeof yymsgbuf;
+                yysyntax_error_status = 2;
+              }
+            else
+              {
+                yysyntax_error_status = YYSYNTAX_ERROR;
+                yymsgp = yymsg;
+              }
+          }
+        yyerror (yymsgp);
+        if (yysyntax_error_status == 2)
+          goto yyexhaustedlab;
       }
+# undef YYSYNTAX_ERROR
 #endif
     }
 
@@ -5260,7 +5296,7 @@ yyerrlab1:
   for (;;)
     {
       yyn = yypact[yystate];
-      if (yyn != YYPACT_NINF)
+      if (!yypact_value_is_default (yyn))
 	{
 	  yyn += YYTERROR;
 	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
@@ -5319,8 +5355,13 @@ yyexhaustedlab:
 
 yyreturn:
   if (yychar != YYEMPTY)
-     yydestruct ("Cleanup: discarding lookahead",
-		 yytoken, &yylval);
+    {
+      /* Make sure we have latest lookahead translation.  See comments at
+         user semantic actions for why this is necessary.  */
+      yytoken = YYTRANSLATE (yychar);
+      yydestruct ("Cleanup: discarding lookahead",
+                  yytoken, &yylval);
+    }
   /* Do not reclaim the symbols of the rule which action triggered
      this YYABORT or YYACCEPT.  */
   YYPOPSTACK (yylen);
@@ -5345,7 +5386,7 @@ yyreturn:
 
 
 
-/* Line 1684 of yacc.c  */
+/* Line 2067 of yacc.c  */
 #line 2597 "edif.y"
 
 /*
diff --git a/src/edif.h b/src/edif.h
index 8dd60e6..47f58a5 100644
--- a/src/edif.h
+++ b/src/edif.h
@@ -1,9 +1,8 @@
-/* A Bison parser, made by GNU Bison 2.4.3.  */
+/* A Bison parser, made by GNU Bison 2.5.  */
 
-/* Skeleton interface for Bison's Yacc-like parsers in C
+/* Bison interface for Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2009, 2010 Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -633,7 +632,7 @@
 typedef union YYSTYPE
 {
 
-/* Line 1685 of yacc.c  */
+/* Line 2068 of yacc.c  */
 #line 193 "edif.y"
 
     char* s;
@@ -642,8 +641,8 @@ typedef union YYSTYPE
 
 
 
-/* Line 1685 of yacc.c  */
-#line 647 "edif.h"
+/* Line 2068 of yacc.c  */
+#line 646 "edif.h"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
diff --git a/src/edif.y b/src/edif.y
index cb31d9a..e5a606d 100644
--- a/src/edif.y
+++ b/src/edif.y
@@ -29,8 +29,8 @@
 #include "global.h"
 #include "data.h"
 /* from mymem.h, not include because of the malloc junk */
-LibraryMenuTypePtr GetLibraryMenuMemory (LibraryTypePtr);
-LibraryEntryTypePtr GetLibraryEntryMemory (LibraryMenuTypePtr);
+LibraryMenuType * GetLibraryMenuMemory (LibraryType *);
+LibraryEntryType * GetLibraryEntryMemory (LibraryMenuType *);
 
 /*
  *	Local definitions.
@@ -98,8 +98,8 @@ LibraryEntryTypePtr GetLibraryEntryMemory (LibraryMenuTypePtr);
      str_pair* node;
      char* buf;
      char* p;
-     LibraryEntryTypePtr entry;
-     LibraryMenuTypePtr menu = GetLibraryMenuMemory (&PCB->NetlistLib);
+     LibraryEntryType *entry;
+     LibraryMenuType *menu = GetLibraryMenuMemory (&PCB->NetlistLib);
 
      if ( !name->str1 )
      {
diff --git a/src/error.c b/src/error.c
index f01420e..4e802a4 100644
--- a/src/error.c
+++ b/src/error.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -61,9 +59,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
-
 #define utf8_dup_string(a,b) *(a) = strdup(b)
 
 /* ----------------------------------------------------------------------
diff --git a/src/error.h b/src/error.h
index 8409767..8cd99a2 100644
--- a/src/error.h
+++ b/src/error.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for error and debug functions
diff --git a/src/file.c b/src/file.c
index c22f5c5..01d3b39 100644
--- a/src/file.c
+++ b/src/file.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -100,8 +98,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 #if !defined(HAS_ATEXIT) && !defined(HAS_ON_EXIT)
 /* ---------------------------------------------------------------------------
  * some local identifiers for OS without an atexit() or on_exit()
@@ -117,10 +113,10 @@ static void PrintQuotedString (FILE *, char *);
 static void WritePCBInfoHeader (FILE *);
 static void WritePCBDataHeader (FILE *);
 static void WritePCBFontData (FILE *);
-static void WriteViaData (FILE *, DataTypePtr);
+static void WriteViaData (FILE *, DataType *);
 static void WritePCBRatData (FILE *);
-static void WriteElementData (FILE *, DataTypePtr);
-static void WriteLayerData (FILE *, Cardinal, LayerTypePtr);
+static void WriteElementData (FILE *, DataType *);
+static void WriteLayerData (FILE *, Cardinal, LayerType *);
 static int WritePCB (FILE *);
 static int WritePCBFile (char *);
 static int WritePipe (char *, bool);
@@ -160,7 +156,7 @@ static char *pcb_basename (char *p);
 /* Hole[] in Polygon.  */
 #define PCB_FILE_VERSION_HOLES 20100606
 /* First version ever saved.  */
-#define PCB_FILE_VERSION_BASELINE 20070407
+#define PCB_FILE_VERSION_BASELINE 20091103
 
 int
 PCBFileVersionNeeded (void)
@@ -232,7 +228,7 @@ netnode_sort (const void *va, const void *vb)
 }
 
 static void
-sort_library (LibraryTypePtr lib)
+sort_library (LibraryType *lib)
 {
   int i;
   qsort (lib->Menu, lib->MenuN, sizeof (lib->Menu[0]), netlist_sort);
@@ -390,10 +386,10 @@ set_some_route_style ()
 static int
 real_load_pcb (char *Filename, bool revert)
 {
-  const char *unit_suffix;
+  const char *unit_suffix, *grid_size;
   char *new_filename;
-  PCBTypePtr newPCB = CreateNewPCB (false);
-  PCBTypePtr oldPCB;
+  PCBType *newPCB = CreateNewPCB (false);
+  PCBType *oldPCB;
 #ifdef DEBUG
   double elapsed;
   clock_t start, end;
@@ -447,6 +443,12 @@ real_load_pcb (char *Filename, bool revert)
             Settings.grid_unit = new_unit;
         }
       AttributePut (PCB, "PCB::grid::unit", Settings.grid_unit->suffix);
+      /* Use attribute PCB::grid::size as size, if we can */
+      grid_size = AttributeGet (PCB, "PCB::grid::size");
+      if (grid_size)
+        {
+          PCB->Grid = GetValue (grid_size, NULL, NULL);
+        }
  
       sort_netlist ();
 
@@ -496,9 +498,9 @@ RevertPCB (void)
  * functions for loading elements-as-pcb
  */
 
-extern	PCBTypePtr		yyPCB;
-extern	DataTypePtr		yyData;
-extern	FontTypePtr		yyFont;
+extern	PCBType *		yyPCB;
+extern	DataType *		yyData;
+extern	FontType *		yyFont;
 
 void
 PreLoadElementPCB ()
@@ -516,8 +518,8 @@ PreLoadElementPCB ()
 void
 PostLoadElementPCB ()
 {
-  PCBTypePtr pcb_save = PCB;
-  ElementTypePtr e;
+  PCBType *pcb_save = PCB;
+  ElementType *e;
 
   if (!yyPCB)
     return;
@@ -550,7 +552,7 @@ PrintQuotedString (FILE * FP, char *S)
  * writes out an attribute list
  */
 static void
-WriteAttributeList (FILE * FP, AttributeListTypePtr list, char *prefix)
+WriteAttributeList (FILE * FP, AttributeListType *list, char *prefix)
 {
   int i;
 
@@ -601,9 +603,7 @@ WritePCBDataHeader (FILE * FP)
   fputs ("\nPCB[", FP);
   PrintQuotedString (FP, (char *)EMPTY (PCB->Name));
   pcb_fprintf (FP, " %mr %mr]\n\n", PCB->MaxWidth, PCB->MaxHeight);
-  pcb_fprintf (FP, "Grid[%.1mr %mr %mr %d]\n", PCB->Grid, PCB->GridOffsetX, PCB->GridOffsetY, Settings.DrawGrid);
-  pcb_fprintf (FP, "Cursor[%mr %mr %s]\n",
-               Crosshair.X, Crosshair.Y, c_dtostr (PCB->Zoom));
+  pcb_fprintf (FP, "Grid[%s %mr %mr %d]\n", c_dtostr (COORD_TO_MIL (PCB->Grid) * 100), PCB->GridOffsetX, PCB->GridOffsetY, Settings.DrawGrid);
   /* PolyArea should be output in square cmils, no suffix */
   fprintf (FP, "PolyArea[%s]\n", c_dtostr (COORD_TO_MIL (COORD_TO_MIL (PCB->IsleArea) * 100) * 100));
   pcb_fprintf (FP, "Thermal[%s]\n", c_dtostr (PCB->ThermScale));
@@ -630,8 +630,8 @@ static void
 WritePCBFontData (FILE * FP)
 {
   Cardinal i, j;
-  LineTypePtr line;
-  FontTypePtr font;
+  LineType *line;
+  FontType *font;
 
   for (font = &PCB->Font, i = 0; i <= MAX_FONTPOSITION; i++)
     {
@@ -656,7 +656,7 @@ WritePCBFontData (FILE * FP)
  * writes via data
  */
 static void
-WriteViaData (FILE * FP, DataTypePtr Data)
+WriteViaData (FILE * FP, DataType *Data)
 {
   GList *iter;
   /* write information about vias */
@@ -702,7 +702,7 @@ WritePCBNetlistData (FILE * FP)
 
       for (n = 0; n < PCB->NetlistLib.MenuN; n++)
 	{
-	  LibraryMenuTypePtr menu = &PCB->NetlistLib.Menu[n];
+	  LibraryMenuType *menu = &PCB->NetlistLib.Menu[n];
 	  fprintf (FP, "\tNet(");
 	  PrintQuotedString(FP, &menu->Name[2]);
 	  fprintf (FP, " ");
@@ -710,7 +710,7 @@ WritePCBNetlistData (FILE * FP)
 	  fprintf (FP, ")\n\t(\n");
 	  for (p = 0; p < menu->EntryN; p++)
 	    {
-	      LibraryEntryTypePtr entry = &menu->Entry[p];
+	      LibraryEntryType *entry = &menu->Entry[p];
 	      fprintf (FP, "\t\tConnect(");
 	      PrintQuotedString (FP, entry->ListEntry);
 	      fprintf (FP, ")\n");
@@ -725,7 +725,7 @@ WritePCBNetlistData (FILE * FP)
  * writes element data
  */
 static void
-WriteElementData (FILE * FP, DataTypePtr Data)
+WriteElementData (FILE * FP, DataType *Data)
 {
   GList *n, *p;
   for (n = Data->Element; n != NULL; n = g_list_next (n))
@@ -808,7 +808,7 @@ WriteElementData (FILE * FP, DataTypePtr Data)
  * writes layer data
  */
 static void
-WriteLayerData (FILE * FP, Cardinal Number, LayerTypePtr layer)
+WriteLayerData (FILE * FP, Cardinal Number, LayerType *layer)
 {
   GList *n;
   /* write information about non empty layers */
@@ -855,7 +855,7 @@ WriteLayerData (FILE * FP, Cardinal Number, LayerTypePtr layer)
 	  fprintf (FP, "\tPolygon(%s)\n\t(", F2S (polygon, POLYGON_TYPE));
 	  for (p = 0; p < polygon->PointN; p++)
 	    {
-	      PointTypePtr point = &polygon->Points[p];
+	      PointType *point = &polygon->Points[p];
 
 	      if (hole < polygon->HoleIndexN &&
 		  p == polygon->HoleIndex[hole])
@@ -1172,8 +1172,8 @@ LoadNewlibFootprintsFromDir(char *libpath, char *toppath)
   DIR *subdirobj;                 /* Interable object holding all subdir entries */
   struct dirent *subdirentry;     /* Individual subdir entry */
   struct stat buffer;             /* Buffer used in stat */
-  LibraryMenuTypePtr menu = NULL; /* Pointer to PCB's library menu structure */
-  LibraryEntryTypePtr entry;      /* Pointer to individual menu entry */
+  LibraryMenuType *menu = NULL; /* Pointer to PCB's library menu structure */
+  LibraryEntryType *entry;      /* Pointer to individual menu entry */
   size_t l;
   size_t len;
   int n_footprints = 0;           /* Running count of footprints found in this subdir */
@@ -1396,6 +1396,7 @@ ParseLibraryTree (void)
   printf("Leaving ParseLibraryTree, found %d footprints.\n", n_footprints);
 #endif
 
+  free (libpaths);
   return n_footprints;
 }
 
@@ -1410,8 +1411,8 @@ ReadLibraryContents (void)
   static char *command = NULL;
   char inputline[MAX_LIBRARY_LINE_LENGTH + 1];
   FILE *resultFP = NULL;
-  LibraryMenuTypePtr menu = NULL;
-  LibraryEntryTypePtr entry;
+  LibraryMenuType *menu = NULL;
+  LibraryEntryType *entry;
 
   /* If we don't have a command to execute to find the library contents,
    * skip this. This is used by default on Windows builds (set in main.c),
@@ -1525,14 +1526,15 @@ ReadNetlist (char *filename)
   char inputline[MAX_NETLIST_LINE_LENGTH + 1];
   char temp[MAX_NETLIST_LINE_LENGTH + 1];
   FILE *fp;
-  LibraryMenuTypePtr menu = NULL;
-  LibraryEntryTypePtr entry;
+  LibraryMenuType *menu = NULL;
+  LibraryEntryType *entry;
   int i, j, lines, kind;
   bool continued;
-  int used_popen = 0;
+  bool used_popen = false;
+  int retval = 0;
 
   if (!filename)
-    return (1);			/* nothing to do */
+    return 1;			/* nothing to do */
 
   Message (_("Importing PCB netlist %s\n"), filename);
 
@@ -1547,7 +1549,7 @@ ReadNetlist (char *filename)
     }
   else
     {
-      used_popen = 1;
+      used_popen = true;
       free (command);
       command = EvaluateFilename (Settings.RatCommand,
 				  Settings.RatPath, filename, NULL);
@@ -1556,7 +1558,7 @@ ReadNetlist (char *filename)
       if (*command == '\0' || (fp = popen (command, "r")) == NULL)
 	{
 	  PopenErrorMessage (command);
-	  return (1);
+	  return 1;
 	}
     }
   lines = 0;
@@ -1627,15 +1629,14 @@ ReadNetlist (char *filename)
   if (!lines)
     {
       Message (_("Empty netlist file!\n"));
-      pclose (fp);
-      return (1);
+      retval = 1;
     }
   if (used_popen)
     pclose (fp);
   else
     fclose (fp);
   sort_netlist ();
-  return (0);
+  return retval;
 }
 
 static int ReadEdifNetlist (char *filename);
diff --git a/src/find.c b/src/find.c
index 877deb4..99893da 100644
--- a/src/find.c
+++ b/src/find.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *
  *                            COPYRIGHT
@@ -67,26 +65,15 @@
 #include "config.h"
 #endif
 
-#include <stdlib.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#include <math.h>
 #include <setjmp.h>
 #include <assert.h>
 
-#ifdef HAVE_SYS_TIMES_H
-#include <sys/times.h>
-#endif
-
 #include "global.h"
 
-#include "crosshair.h"
 #include "data.h"
 #include "draw.h"
 #include "error.h"
 #include "find.h"
-#include "mymem.h"
 #include "misc.h"
 #include "rtree.h"
 #include "polygon.h"
@@ -102,21 +89,10 @@
 
 #undef DEBUG
 
-RCSID ("$Id$");
-
-
-
-
 /* ---------------------------------------------------------------------------
  * some local macros
  */
 
-#define EXPAND_BOUNDS(p) if (Bloat > 0) {\
-       (p)->BoundingBox.X1 -= Bloat; \
-       (p)->BoundingBox.X2 += Bloat; \
-       (p)->BoundingBox.Y1 -= Bloat; \
-       (p)->BoundingBox.Y2 += Bloat;}
-
 #define	SEPARATE(FP)							\
 	{											\
 		int	i;									\
@@ -126,23 +102,13 @@ RCSID ("$Id$");
 		fputc('\n', (FP));						\
 	}
 
-#define	PADLIST_ENTRY(L,I)	\
-	(((PadTypePtr *)PadList[(L)].Data)[(I)])
-
-#define	LINELIST_ENTRY(L,I)	\
-	(((LineTypePtr *)LineList[(L)].Data)[(I)])
-
-#define	ARCLIST_ENTRY(L,I)	\
-	(((ArcTypePtr *)ArcList[(L)].Data)[(I)])
-
-#define RATLIST_ENTRY(I)	\
-	(((RatTypePtr *)RatList.Data)[(I)])
-
-#define	POLYGONLIST_ENTRY(L,I)	\
-	(((PolygonTypePtr *)PolygonList[(L)].Data)[(I)])
-
-#define	PVLIST_ENTRY(I)	\
-	(((PinTypePtr *)PVList.Data)[(I)])
+#define LIST_ENTRY(list,I)      (((AnyObjectType **)list->Data)[(I)])
+#define PADLIST_ENTRY(L,I)      (((PadType **)PadList[(L)].Data)[(I)])
+#define LINELIST_ENTRY(L,I)     (((LineType **)LineList[(L)].Data)[(I)])
+#define ARCLIST_ENTRY(L,I)      (((ArcType **)ArcList[(L)].Data)[(I)])
+#define RATLIST_ENTRY(I)        (((RatType **)RatList.Data)[(I)])
+#define POLYGONLIST_ENTRY(L,I)  (((PolygonType **)PolygonList[(L)].Data)[(I)])
+#define PVLIST_ENTRY(I)         (((PinType **)PVList.Data)[(I)])
 
 #define IS_PV_ON_RAT(PV, Rat) \
 	(IsPointOnLineEnd((PV)->X,(PV)->Y, (Rat)))
@@ -285,189 +251,135 @@ typedef struct
   Cardinal Location,            /* currently used position */
     DrawLocation, Number,       /* number of objects in list */
     Size;
-}
-ListType, *ListTypePtr;
+} ListType;
 
 /* ---------------------------------------------------------------------------
  * some local identifiers
  */
 static Coord Bloat = 0;
-static int TheFlag = FOUNDFLAG;
-static int OldFlag = FOUNDFLAG;
 static void *thing_ptr1, *thing_ptr2, *thing_ptr3;
 static int thing_type;
 static bool User = false;    /* user action causing this */
 static bool drc = false;     /* whether to stop if finding something not found */
-static bool IsBad = false;
 static Cardinal drcerr_count;   /* count of drc errors */
-static Cardinal TotalP, TotalV, NumberOfPads[2];
+static Cardinal TotalP, TotalV;
 static ListType LineList[MAX_LAYER],    /* list of objects to */
   PolygonList[MAX_LAYER], ArcList[MAX_LAYER], PadList[2], RatList, PVList;
 
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static bool LookupLOConnectionsToPVList (bool);
-static bool LookupLOConnectionsToLOList (bool);
-static bool LookupPVConnectionsToLOList (bool);
-static bool LookupPVConnectionsToPVList (void);
-static bool LookupLOConnectionsToLine (LineTypePtr, Cardinal, bool);
-static bool LookupLOConnectionsToPad (PadTypePtr, Cardinal);
-static bool LookupLOConnectionsToPolygon (PolygonTypePtr, Cardinal);
-static bool LookupLOConnectionsToArc (ArcTypePtr, Cardinal);
-static bool LookupLOConnectionsToRatEnd (PointTypePtr, Cardinal);
-static bool IsRatPointOnLineEnd (PointTypePtr, LineTypePtr);
-static bool ArcArcIntersect (ArcTypePtr, ArcTypePtr);
+static bool LookupLOConnectionsToLine (LineType *, Cardinal, int, bool, bool);
+static bool LookupLOConnectionsToPad (PadType *, Cardinal, int, bool);
+static bool LookupLOConnectionsToPolygon (PolygonType *, Cardinal, int, bool);
+static bool LookupLOConnectionsToArc (ArcType *, Cardinal, int, bool);
+static bool LookupLOConnectionsToRatEnd (PointType *, Cardinal, int);
+static bool IsRatPointOnLineEnd (PointType *, LineType *);
+static bool ArcArcIntersect (ArcType *, ArcType *);
 static bool PrepareNextLoop (FILE *);
-static bool PrintElementConnections (ElementTypePtr, FILE *, bool);
-static bool ListsEmpty (bool);
-static bool DoIt (bool, bool);
-static void PrintElementNameList (ElementTypePtr, FILE *);
-static void PrintConnectionElementName (ElementTypePtr, FILE *);
-static void PrintConnectionListEntry (char *, ElementTypePtr,
-                                      bool, FILE *);
-static void PrintPadConnections (Cardinal, FILE *, bool);
-static void PrintPinConnections (FILE *, bool);
-static bool PrintAndSelectUnusedPinsAndPadsOfElement (ElementTypePtr,
-                                                         FILE *);
 static void DrawNewConnections (void);
 static void DumpList (void);
 static void LocateError (Coord *, Coord *);
 static void BuildObjectList (int *, long int **, int **);
-static void GotoError (void);
-static bool DRCFind (int, void *, void *, void *);
-static bool ListStart (int, void *, void *, void *);
-static bool LOTouchesLine (LineTypePtr Line, Cardinal LayerGroup);
-static bool PVTouchesLine (LineTypePtr line);
 static bool SetThing (int, void *, void *, void *);
+static bool IsArcInPolygon (ArcType *, PolygonType *);
+static bool IsLineInPolygon (LineType *, PolygonType *);
+static bool IsPadInPolygon (PadType *, PolygonType *);
+static bool IsPolygonInPolygon (PolygonType *, PolygonType *);
 
 /* ---------------------------------------------------------------------------
  * some of the 'pad' routines are the same as for lines because the 'pad'
  * struct starts with a line struct. See global.h for details
  */
 bool
-LinePadIntersect (LineTypePtr Line, PadTypePtr Pad)
+LinePadIntersect (LineType *Line, PadType *Pad)
 {
-  return LineLineIntersect ((Line), (LineTypePtr)Pad);
+  return LineLineIntersect ((Line), (LineType *)Pad);
 }
 
 bool
-ArcPadIntersect (ArcTypePtr Arc, PadTypePtr Pad)
+ArcPadIntersect (ArcType *Arc, PadType *Pad)
 {
-  return LineArcIntersect ((LineTypePtr) (Pad), (Arc));
+  return LineArcIntersect ((LineType *) (Pad), (Arc));
 }
 
 static bool
-ADD_PV_TO_LIST (PinTypePtr Pin)
+add_object_to_list (ListType *list, int type, void *ptr1, void *ptr2, void *ptr3, int flag)
 {
+  AnyObjectType *object = (AnyObjectType *)ptr2;
+
   if (User)
-    AddObjectToFlagUndoList (Pin->Element ? PIN_TYPE : VIA_TYPE,
-                             Pin->Element ? Pin->Element : Pin, Pin, Pin);
-  SET_FLAG (TheFlag, Pin);
-  PVLIST_ENTRY (PVList.Number) = Pin;
-  PVList.Number++;
+    AddObjectToFlagUndoList (type, ptr1, ptr2, ptr3);
+
+  SET_FLAG (flag, object);
+  LIST_ENTRY (list, list->Number) = object;
+  list->Number++;
+
 #ifdef DEBUG
-  if (PVList.Number > PVList.Size)
-    printf ("ADD_PV_TO_LIST overflow! num=%d size=%d\n", PVList.Number,
-            PVList.Size);
+  if (list.Number > list.Size)
+    printf ("add_object_to_list overflow! type=%i num=%d size=%d\n", type, list.Number, list.Size);
 #endif
-  if (drc && !TEST_FLAG (SELECTEDFLAG, Pin))
-    return (SetThing (PIN_TYPE, Pin->Element, Pin, Pin));
+
+  if (drc && !TEST_FLAG (SELECTEDFLAG, object))
+    return (SetThing (type, ptr1, ptr2, ptr3));
   return false;
 }
 
 static bool
-ADD_PAD_TO_LIST (Cardinal L, PadTypePtr Pad)
+ADD_PV_TO_LIST (PinType *Pin, int flag)
 {
-  if (User)
-    AddObjectToFlagUndoList (PAD_TYPE, Pad->Element, Pad, Pad);
-  SET_FLAG (TheFlag, Pad);
-  PADLIST_ENTRY ((L), PadList[(L)].Number) = Pad;
-  PadList[(L)].Number++;
-#ifdef DEBUG
-  if (PadList[(L)].Number > PadList[(L)].Size)
-    printf ("ADD_PAD_TO_LIST overflow! lay=%d, num=%d size=%d\n", L,
-            PadList[(L)].Number, PadList[(L)].Size);
-#endif
-  if (drc && !TEST_FLAG (SELECTEDFLAG, Pad))
-    return (SetThing (PAD_TYPE, Pad->Element, Pad, Pad));
-  return false;
+  return add_object_to_list (&PVList, Pin->Element ? PIN_TYPE : VIA_TYPE,
+                             Pin->Element ? Pin->Element : Pin, Pin, Pin, flag);
 }
 
 static bool
-ADD_LINE_TO_LIST (Cardinal L, LineTypePtr Ptr)
+ADD_PAD_TO_LIST (Cardinal L, PadType *Pad, int flag)
 {
-  if (User)
-    AddObjectToFlagUndoList (LINE_TYPE, LAYER_PTR (L), (Ptr), (Ptr));
-  SET_FLAG (TheFlag, (Ptr));
-  LINELIST_ENTRY ((L), LineList[(L)].Number) = (Ptr);
-  LineList[(L)].Number++;
-#ifdef DEBUG
-  if (LineList[(L)].Number > LineList[(L)].Size)
-    printf ("ADD_LINE_TO_LIST overflow! lay=%d, num=%d size=%d\n", L,
-            LineList[(L)].Number, LineList[(L)].Size);
-#endif
-  if (drc && !TEST_FLAG (SELECTEDFLAG, (Ptr)))
-    return (SetThing (LINE_TYPE, LAYER_PTR (L), (Ptr), (Ptr)));
-  return false;
+  return add_object_to_list (&PadList[L], PAD_TYPE, Pad->Element, Pad, Pad, flag);
 }
 
 static bool
-ADD_ARC_TO_LIST (Cardinal L, ArcTypePtr Ptr)
+ADD_LINE_TO_LIST (Cardinal L, LineType *Ptr, int flag)
 {
-  if (User)
-    AddObjectToFlagUndoList (ARC_TYPE, LAYER_PTR (L), (Ptr), (Ptr));
-  SET_FLAG (TheFlag, (Ptr));
-  ARCLIST_ENTRY ((L), ArcList[(L)].Number) = (Ptr);
-  ArcList[(L)].Number++;
-#ifdef DEBUG
-  if (ArcList[(L)].Number > ArcList[(L)].Size)
-    printf ("ADD_ARC_TO_LIST overflow! lay=%d, num=%d size=%d\n", L,
-            ArcList[(L)].Number, ArcList[(L)].Size);
-#endif
-  if (drc && !TEST_FLAG (SELECTEDFLAG, (Ptr)))
-    return (SetThing (ARC_TYPE, LAYER_PTR (L), (Ptr), (Ptr)));
-  return false;
+  return add_object_to_list (&LineList[L], LINE_TYPE, LAYER_PTR (L), Ptr, Ptr, flag);
 }
 
 static bool
-ADD_RAT_TO_LIST (RatTypePtr Ptr)
+ADD_ARC_TO_LIST (Cardinal L, ArcType *Ptr, int flag)
 {
-  if (User)
-    AddObjectToFlagUndoList (RATLINE_TYPE, (Ptr), (Ptr), (Ptr));
-  SET_FLAG (TheFlag, (Ptr));
-  RATLIST_ENTRY (RatList.Number) = (Ptr);
-  RatList.Number++;
-#ifdef DEBUG
-  if (RatList.Number > RatList.Size)
-    printf ("ADD_RAT_TO_LIST overflow! num=%d size=%d\n",
-            RatList.Number, RatList.Size);
-#endif
-  if (drc && !TEST_FLAG (SELECTEDFLAG, (Ptr)))
-    return (SetThing (RATLINE_TYPE, (Ptr), (Ptr), (Ptr)));
-  return false;
+  return add_object_to_list (&ArcList[L], ARC_TYPE, LAYER_PTR (L), Ptr, Ptr, flag);
 }
 
 static bool
-ADD_POLYGON_TO_LIST (Cardinal L, PolygonTypePtr Ptr)
+ADD_RAT_TO_LIST (RatType *Ptr, int flag)
 {
-  if (User)
-    AddObjectToFlagUndoList (POLYGON_TYPE, LAYER_PTR (L), (Ptr), (Ptr));
-  SET_FLAG (TheFlag, (Ptr));
-  POLYGONLIST_ENTRY ((L), PolygonList[(L)].Number) = (Ptr);
-  PolygonList[(L)].Number++;
-#ifdef DEBUG
-  if (PolygonList[(L)].Number > PolygonList[(L)].Size)
-    printf ("ADD_ARC_TO_LIST overflow! lay=%d, num=%d size=%d\n", L,
-            PolygonList[(L)].Number, PolygonList[(L)].Size);
-#endif
-  if (drc && !TEST_FLAG (SELECTEDFLAG, (Ptr)))
-    return (SetThing (POLYGON_TYPE, LAYER_PTR (L), (Ptr), (Ptr)));
-  return false;
+  return add_object_to_list (&RatList, RATLINE_TYPE, Ptr, Ptr, Ptr, flag);
+}
+
+static bool
+ADD_POLYGON_TO_LIST (Cardinal L, PolygonType *Ptr, int flag)
+{
+  return add_object_to_list (&PolygonList[L], POLYGON_TYPE, LAYER_PTR (L), Ptr, Ptr, flag);
+}
+
+static BoxType
+expand_bounds (BoxType *box_in)
+{
+  BoxType box_out = *box_in;
+
+  if (Bloat > 0)
+    {
+      box_out.X1 -= Bloat;
+      box_out.X2 += Bloat;
+      box_out.Y1 -= Bloat;
+      box_out.Y2 += Bloat;
+    }
+
+  return box_out;
 }
 
 bool
-PinLineIntersect (PinTypePtr PV, LineTypePtr Line)
+PinLineIntersect (PinType *PV, LineType *Line)
 {
   /* IsLineInRectangle already has Bloat factor */
   return TEST_FLAG (SQUAREFLAG,
@@ -482,7 +394,7 @@ PinLineIntersect (PinTypePtr PV, LineTypePtr Line)
                                                                          2.0 +
                                                                          Bloat,
                                                                          0.0),
-                                                                    (PadTypePtr)Line);
+                                                                    (PadType *)Line);
 }
 
 
@@ -493,16 +405,11 @@ SetThing (int type, void *ptr1, void *ptr2, void *ptr3)
   thing_ptr2 = ptr2;
   thing_ptr3 = ptr3;
   thing_type = type;
-  if (type == PIN_TYPE && ptr1 == NULL)
-    {
-      thing_ptr1 = ptr3;
-      thing_type = VIA_TYPE;
-    }
   return true;
 }
 
 bool
-BoxBoxIntersection (BoxTypePtr b1, BoxTypePtr b2)
+BoxBoxIntersection (BoxType *b1, BoxType *b2)
 {
   if (b2->X2 < b1->X1 || b2->X1 > b1->X2)
     return false;
@@ -512,13 +419,13 @@ BoxBoxIntersection (BoxTypePtr b1, BoxTypePtr b2)
 }
 
 static bool
-PadPadIntersect (PadTypePtr p1, PadTypePtr p2)
+PadPadIntersect (PadType *p1, PadType *p2)
 {
-  return LinePadIntersect ((LineTypePtr) p1, p2);
+  return LinePadIntersect ((LineType *) p1, p2);
 }
 
 static inline bool
-PV_TOUCH_PV (PinTypePtr PV1, PinTypePtr PV2)
+PV_TOUCH_PV (PinType *PV1, PinType *PV2)
 {
   double t1, t2;
   BoxType b1, b2;
@@ -546,7 +453,7 @@ PV_TOUCH_PV (PinTypePtr PV1, PinTypePtr PV2)
 /* ---------------------------------------------------------------------------
  * releases all allocated memory
  */
-void
+static void
 FreeLayoutLookupMemory (void)
 {
   Cardinal i;
@@ -566,7 +473,7 @@ FreeLayoutLookupMemory (void)
   RatList.Data = NULL;
 }
 
-void
+static void
 FreeComponentLookupMemory (void)
 {
   free (PadList[0].Data);
@@ -579,9 +486,10 @@ FreeComponentLookupMemory (void)
  * allocates memory for component related stacks ...
  * initializes index and sorts it by X1 and X2
  */
-void
+static void
 InitComponentLookup (void)
 {
+  Cardinal NumberOfPads[2];
   Cardinal i;
 
   /* initialize pad data; start by counting the total number
@@ -599,7 +507,7 @@ InitComponentLookup (void)
   for (i = 0; i < 2; i++)
     {
       /* allocate memory for working list */
-      PadList[i].Data = (void **)calloc (NumberOfPads[i], sizeof (PadTypePtr));
+      PadList[i].Data = (void **)calloc (NumberOfPads[i], sizeof (PadType *));
 
       /* clear some struct members */
       PadList[i].Location = 0;
@@ -613,7 +521,7 @@ InitComponentLookup (void)
  * allocates memory for component related stacks ...
  * initializes index and sorts it by X1 and X2
  */
-void
+static void
 InitLayoutLookup (void)
 {
   Cardinal i;
@@ -621,17 +529,17 @@ InitLayoutLookup (void)
   /* initialize line arc and polygon data */
   for (i = 0; i < max_copper_layer; i++)
     {
-      LayerTypePtr layer = LAYER_PTR (i);
+      LayerType *layer = LAYER_PTR (i);
 
       if (layer->LineN)
         {
           /* allocate memory for line pointer lists */
-          LineList[i].Data = (void **)calloc (layer->LineN, sizeof (LineTypePtr));
+          LineList[i].Data = (void **)calloc (layer->LineN, sizeof (LineType *));
           LineList[i].Size = layer->LineN;
         }
       if (layer->ArcN)
         {
-          ArcList[i].Data = (void **)calloc (layer->ArcN, sizeof (ArcTypePtr));
+          ArcList[i].Data = (void **)calloc (layer->ArcN, sizeof (ArcType *));
           ArcList[i].Size = layer->ArcN;
         }
 
@@ -639,7 +547,7 @@ InitLayoutLookup (void)
       /* allocate memory for polygon list */
       if (layer->PolygonN)
         {
-          PolygonList[i].Data = (void **)calloc (layer->PolygonN, sizeof (PolygonTypePtr));
+          PolygonList[i].Data = (void **)calloc (layer->PolygonN, sizeof (PolygonType *));
           PolygonList[i].Size = layer->PolygonN;
         }
 
@@ -664,13 +572,13 @@ InitLayoutLookup (void)
   else
     TotalV = 0;
   /* allocate memory for 'new PV to check' list and clear struct */
-  PVList.Data = (void **)calloc (TotalP + TotalV, sizeof (PinTypePtr));
+  PVList.Data = (void **)calloc (TotalP + TotalV, sizeof (PinType *));
   PVList.Size = TotalP + TotalV;
   PVList.Location = 0;
   PVList.DrawLocation = 0;
   PVList.Number = 0;
   /* Initialize ratline data */
-  RatList.Data = (void **)calloc (PCB->Data->RatN, sizeof (RatTypePtr));
+  RatList.Data = (void **)calloc (PCB->Data->RatN, sizeof (RatType *));
   RatList.Size = PCB->Data->RatN;
   RatList.Location = 0;
   RatList.DrawLocation = 0;
@@ -680,20 +588,21 @@ InitLayoutLookup (void)
 struct pv_info
 {
   Cardinal layer;
-  PinType pv;
+  PinType *pv;
+  int flag;
   jmp_buf env;
 };
 
 static int
 LOCtoPVline_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct pv_info *i = (struct pv_info *) cl;
 
-  if (!TEST_FLAG (TheFlag, line) && PinLineIntersect (&i->pv, line) &&
-      !TEST_FLAG (HOLEFLAG, &i->pv))
+  if (!TEST_FLAG (i->flag, line) && PinLineIntersect (i->pv, line) &&
+      !TEST_FLAG (HOLEFLAG, i->pv))
     {
-      if (ADD_LINE_TO_LIST (i->layer, line))
+      if (ADD_LINE_TO_LIST (i->layer, line, i->flag))
         longjmp (i->env, 1);
     }
   return 0;
@@ -702,13 +611,13 @@ LOCtoPVline_callback (const BoxType * b, void *cl)
 static int
 LOCtoPVarc_callback (const BoxType * b, void *cl)
 {
-  ArcTypePtr arc = (ArcTypePtr) b;
+  ArcType *arc = (ArcType *) b;
   struct pv_info *i = (struct pv_info *) cl;
 
-  if (!TEST_FLAG (TheFlag, arc) && IS_PV_ON_ARC (&i->pv, arc) &&
-      !TEST_FLAG (HOLEFLAG, &i->pv))
+  if (!TEST_FLAG (i->flag, arc) && IS_PV_ON_ARC (i->pv, arc) &&
+      !TEST_FLAG (HOLEFLAG, i->pv))
     {
-      if (ADD_ARC_TO_LIST (i->layer, arc))
+      if (ADD_ARC_TO_LIST (i->layer, arc, i->flag))
         longjmp (i->env, 1);
     }
   return 0;
@@ -717,13 +626,13 @@ LOCtoPVarc_callback (const BoxType * b, void *cl)
 static int
 LOCtoPVpad_callback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   struct pv_info *i = (struct pv_info *) cl;
 
-  if (!TEST_FLAG (TheFlag, pad) && IS_PV_ON_PAD (&i->pv, pad) &&
-      !TEST_FLAG (HOLEFLAG, &i->pv) &&
+  if (!TEST_FLAG (i->flag, pad) && IS_PV_ON_PAD (i->pv, pad) &&
+      !TEST_FLAG (HOLEFLAG, i->pv) &&
       ADD_PAD_TO_LIST (TEST_FLAG (ONSOLDERFLAG, pad) ? SOLDER_LAYER :
-                       COMPONENT_LAYER, pad))
+                       COMPONENT_LAYER, pad, i->flag))
     longjmp (i->env, 1);
   return 0;
 }
@@ -731,18 +640,18 @@ LOCtoPVpad_callback (const BoxType * b, void *cl)
 static int
 LOCtoPVrat_callback (const BoxType * b, void *cl)
 {
-  RatTypePtr rat = (RatTypePtr) b;
+  RatType *rat = (RatType *) b;
   struct pv_info *i = (struct pv_info *) cl;
 
-  if (!TEST_FLAG (TheFlag, rat) && IS_PV_ON_RAT (&i->pv, rat) &&
-      ADD_RAT_TO_LIST (rat))
+  if (!TEST_FLAG (i->flag, rat) && IS_PV_ON_RAT (i->pv, rat) &&
+      ADD_RAT_TO_LIST (rat, i->flag))
     longjmp (i->env, 1);
   return 0;
 }
 static int
 LOCtoPVpoly_callback (const BoxType * b, void *cl)
 {
-  PolygonTypePtr polygon = (PolygonTypePtr) b;
+  PolygonType *polygon = (PolygonType *) b;
   struct pv_info *i = (struct pv_info *) cl;
 
   /* if the pin doesn't have a therm and polygon is clearing
@@ -751,33 +660,33 @@ LOCtoPVpoly_callback (const BoxType * b, void *cl)
    * because it might not be inside the polygon, or it could
    * be on an edge such that it doesn't actually touch.
    */
-  if (!TEST_FLAG (TheFlag, polygon) && !TEST_FLAG (HOLEFLAG, &i->pv) &&
-                                       (TEST_THERM (i->layer, &i->pv) ||
+  if (!TEST_FLAG (i->flag, polygon) && !TEST_FLAG (HOLEFLAG, i->pv) &&
+                                       (TEST_THERM (i->layer, i->pv) ||
                                         !TEST_FLAG (CLEARPOLYFLAG,
                                                     polygon)
-                                        || !i->pv.Clearance))
+                                        || !i->pv->Clearance))
     {
-      double wide = MAX (0.5 * i->pv.Thickness + Bloat, 0);
-      if (TEST_FLAG (SQUAREFLAG, &i->pv))
+      double wide = MAX (0.5 * i->pv->Thickness + Bloat, 0);
+      if (TEST_FLAG (SQUAREFLAG, i->pv))
         {
-          Coord x1 = i->pv.X - (i->pv.Thickness + 1 + Bloat) / 2;
-          Coord x2 = i->pv.X + (i->pv.Thickness + 1 + Bloat) / 2;
-          Coord y1 = i->pv.Y - (i->pv.Thickness + 1 + Bloat) / 2;
-          Coord y2 = i->pv.Y + (i->pv.Thickness + 1 + Bloat) / 2;
+          Coord x1 = i->pv->X - (i->pv->Thickness + 1 + Bloat) / 2;
+          Coord x2 = i->pv->X + (i->pv->Thickness + 1 + Bloat) / 2;
+          Coord y1 = i->pv->Y - (i->pv->Thickness + 1 + Bloat) / 2;
+          Coord y2 = i->pv->Y + (i->pv->Thickness + 1 + Bloat) / 2;
           if (IsRectangleInPolygon (x1, y1, x2, y2, polygon)
-              && ADD_POLYGON_TO_LIST (i->layer, polygon))
+              && ADD_POLYGON_TO_LIST (i->layer, polygon, i->flag))
             longjmp (i->env, 1);
         }
-      else if (TEST_FLAG (OCTAGONFLAG, &i->pv))
+      else if (TEST_FLAG (OCTAGONFLAG, i->pv))
         {
-          POLYAREA *oct = OctagonPoly (i->pv.X, i->pv.Y, i->pv.Thickness / 2);
+          POLYAREA *oct = OctagonPoly (i->pv->X, i->pv->Y, i->pv->Thickness / 2);
           if (isects (oct, polygon, true)
-              && ADD_POLYGON_TO_LIST (i->layer, polygon))
+              && ADD_POLYGON_TO_LIST (i->layer, polygon, i->flag))
             longjmp (i->env, 1);
         }
-      else if (IsPointInPolygon (i->pv.X, i->pv.Y, wide,
+      else if (IsPointInPolygon (i->pv->X, i->pv->Y, wide,
                                  polygon)
-               && ADD_POLYGON_TO_LIST (i->layer, polygon))
+               && ADD_POLYGON_TO_LIST (i->layer, polygon, i->flag))
         longjmp (i->env, 1);
     }
   return 0;
@@ -788,46 +697,54 @@ LOCtoPVpoly_callback (const BoxType * b, void *cl)
  * the appropriate list and the 'used' flag is set
  */
 static bool
-LookupLOConnectionsToPVList (bool AndRats)
+LookupLOConnectionsToPVList (int flag, bool AndRats)
 {
-  Cardinal layer;
+  Cardinal layer_no;
   struct pv_info info;
 
+  info.flag = flag;
+
   /* loop over all PVs currently on list */
   while (PVList.Location < PVList.Number)
     {
+      BoxType search_box;
+
       /* get pointer to data */
-      info.pv = *(PVLIST_ENTRY (PVList.Location));
-      EXPAND_BOUNDS (&info.pv);
+      info.pv = PVLIST_ENTRY (PVList.Location);
+      search_box = expand_bounds (&info.pv->BoundingBox);
 
       /* check pads */
       if (setjmp (info.env) == 0)
-        r_search (PCB->Data->pad_tree, (BoxType *) & info.pv, NULL,
+        r_search (PCB->Data->pad_tree, &search_box, NULL,
                   LOCtoPVpad_callback, &info);
       else
         return true;
 
       /* now all lines, arcs and polygons of the several layers */
-      for (layer = 0; layer < max_copper_layer; layer++)
+      for (layer_no = 0; layer_no < max_copper_layer; layer_no++)
         {
-          if (LAYER_PTR (layer)->no_drc)
+          LayerType *layer = LAYER_PTR (layer_no);
+
+          if (layer->no_drc)
              continue;
-          info.layer = layer;
+
+          info.layer = layer_no;
+
           /* add touching lines */
           if (setjmp (info.env) == 0)
-            r_search (LAYER_PTR (layer)->line_tree, (BoxType *) & info.pv,
+            r_search (layer->line_tree, &search_box,
                       NULL, LOCtoPVline_callback, &info);
           else
             return true;
           /* add touching arcs */
           if (setjmp (info.env) == 0)
-            r_search (LAYER_PTR (layer)->arc_tree, (BoxType *) & info.pv,
+            r_search (layer->arc_tree, &search_box,
                       NULL, LOCtoPVarc_callback, &info);
           else
             return true;
           /* check all polygons */
           if (setjmp (info.env) == 0)
-            r_search (LAYER_PTR (layer)->polygon_tree, (BoxType *) & info.pv,
+            r_search (layer->polygon_tree, &search_box,
                       NULL, LOCtoPVpoly_callback, &info);
           else
             return true;
@@ -836,7 +753,7 @@ LookupLOConnectionsToPVList (bool AndRats)
       if (AndRats)
         {
           if (setjmp (info.env) == 0)
-            r_search (PCB->Data->rat_tree, (BoxType *) & info.pv, NULL,
+            r_search (PCB->Data->rat_tree, &search_box, NULL,
                       LOCtoPVrat_callback, &info);
           else
             return true;
@@ -850,7 +767,7 @@ LookupLOConnectionsToPVList (bool AndRats)
  * find all connections between LO at the current list position and new LOs
  */
 static bool
-LookupLOConnectionsToLOList (bool AndRats)
+LookupLOConnectionsToLOList (int flag, bool AndRats)
 {
   bool done;
   Cardinal i, group, layer, ratposition,
@@ -865,7 +782,7 @@ LookupLOConnectionsToLOList (bool AndRats)
     {
       lineposition[i] = LineList[i].Location;
       polyposition[i] = PolygonList[i].Location;
-      arcposition[i] = ArcList[i].Location;
+      arcposition[i]  = ArcList[i].Location;
     }
   for (i = 0; i < 2; i++)
     padposition[i] = PadList[i].Location;
@@ -885,11 +802,11 @@ LookupLOConnectionsToLOList (bool AndRats)
             {
               group = RATLIST_ENTRY (*position)->group1;
               if (LookupLOConnectionsToRatEnd
-                  (&(RATLIST_ENTRY (*position)->Point1), group))
+                  (&(RATLIST_ENTRY (*position)->Point1), group, flag))
                 return (true);
               group = RATLIST_ENTRY (*position)->group2;
               if (LookupLOConnectionsToRatEnd
-                  (&(RATLIST_ENTRY (*position)->Point2), group))
+                  (&(RATLIST_ENTRY (*position)->Point2), group, flag))
                 return (true);
             }
         }
@@ -911,21 +828,21 @@ LookupLOConnectionsToLOList (bool AndRats)
                   position = &lineposition[layer];
                   for (; *position < LineList[layer].Number; (*position)++)
                     if (LookupLOConnectionsToLine
-                        (LINELIST_ENTRY (layer, *position), group, true))
+                        (LINELIST_ENTRY (layer, *position), group, flag, true, AndRats))
                       return (true);
 
                   /* try all new arcs */
                   position = &arcposition[layer];
                   for (; *position < ArcList[layer].Number; (*position)++)
                     if (LookupLOConnectionsToArc
-                        (ARCLIST_ENTRY (layer, *position), group))
+                        (ARCLIST_ENTRY (layer, *position), group, flag, AndRats))
                       return (true);
 
                   /* try all new polygons */
                   position = &polyposition[layer];
                   for (; *position < PolygonList[layer].Number; (*position)++)
                     if (LookupLOConnectionsToPolygon
-                        (POLYGONLIST_ENTRY (layer, *position), group))
+                        (POLYGONLIST_ENTRY (layer, *position), group, flag, AndRats))
                       return (true);
                 }
               else
@@ -941,7 +858,7 @@ LookupLOConnectionsToLOList (bool AndRats)
                   position = &padposition[layer];
                   for (; *position < PadList[layer].Number; (*position)++)
                     if (LookupLOConnectionsToPad
-                        (PADLIST_ENTRY (layer, *position), group))
+                        (PADLIST_ENTRY (layer, *position), group, flag, AndRats))
                       return (true);
                 }
             }
@@ -951,18 +868,13 @@ LookupLOConnectionsToLOList (bool AndRats)
        * may have changed the prior lists
        */
       done = !AndRats || ratposition >= RatList.Number;
-      for (layer = 0; layer < max_copper_layer + 2; layer++)
-        {
-          if (layer < max_copper_layer)
-            done = done &&
-              lineposition[layer] >= LineList[layer].Number
-              && arcposition[layer] >= ArcList[layer].Number
-              && polyposition[layer] >= PolygonList[layer].Number;
-          else
-            done = done
-              && padposition[layer - max_copper_layer] >=
-              PadList[layer - max_copper_layer].Number;
-        }
+      done = done && padposition[0] >= PadList[0].Number &&
+                     padposition[1] >= PadList[1].Number;
+      for (layer = 0; layer < max_copper_layer; layer++)
+        done = done &&
+               lineposition[layer] >= LineList[layer].Number &&
+               arcposition[layer]  >= ArcList[layer].Number &&
+               polyposition[layer] >= PolygonList[layer].Number;
     }
   while (!done);
   return (false);
@@ -971,12 +883,12 @@ LookupLOConnectionsToLOList (bool AndRats)
 static int
 pv_pv_callback (const BoxType * b, void *cl)
 {
-  PinTypePtr pin = (PinTypePtr) b;
+  PinType *pin = (PinType *) b;
   struct pv_info *i = (struct pv_info *) cl;
 
-  if (!TEST_FLAG (TheFlag, pin) && PV_TOUCH_PV (&i->pv, pin))
+  if (!TEST_FLAG (i->flag, pin) && PV_TOUCH_PV (i->pv, pin))
     {
-      if (TEST_FLAG (HOLEFLAG, pin) || TEST_FLAG (HOLEFLAG, &i->pv))
+      if (TEST_FLAG (HOLEFLAG, pin) || TEST_FLAG (HOLEFLAG, i->pv))
         {
           SET_FLAG (WARNFLAG, pin);
           Settings.RatWarn = true;
@@ -985,7 +897,7 @@ pv_pv_callback (const BoxType * b, void *cl)
           else
             Message (_("WARNING: Hole too close to via.\n"));
         }
-      else if (ADD_PV_TO_LIST (pin))
+      else if (ADD_PV_TO_LIST (pin, i->flag))
         longjmp (i->env, 1);
     }
   return 0;
@@ -995,26 +907,30 @@ pv_pv_callback (const BoxType * b, void *cl)
  * searches for new PVs that are connected to PVs on the list
  */
 static bool
-LookupPVConnectionsToPVList (void)
+LookupPVConnectionsToPVList (int flag)
 {
   Cardinal save_place;
   struct pv_info info;
 
+  info.flag = flag;
 
   /* loop over all PVs on list */
   save_place = PVList.Location;
   while (PVList.Location < PVList.Number)
     {
+      BoxType search_box;
+
       /* get pointer to data */
-      info.pv = *(PVLIST_ENTRY (PVList.Location));
-      EXPAND_BOUNDS (&info.pv);
+      info.pv = PVLIST_ENTRY (PVList.Location);
+      search_box = expand_bounds ((BoxType *)info.pv);
+
       if (setjmp (info.env) == 0)
-        r_search (PCB->Data->via_tree, (BoxType *) & info.pv, NULL,
+        r_search (PCB->Data->via_tree, &search_box, NULL,
                   pv_pv_callback, &info);
       else
         return true;
       if (setjmp (info.env) == 0)
-        r_search (PCB->Data->pin_tree, (BoxType *) & info.pv, NULL,
+        r_search (PCB->Data->pin_tree, &search_box, NULL,
                   pv_pv_callback, &info);
       else
         return true;
@@ -1027,21 +943,22 @@ LookupPVConnectionsToPVList (void)
 struct lo_info
 {
   Cardinal layer;
-  LineType line;
-  PadType pad;
-  ArcType arc;
-  PolygonType polygon;
-  RatType rat;
+  LineType *line;
+  PadType *pad;
+  ArcType *arc;
+  PolygonType *polygon;
+  RatType *rat;
+  int flag;
   jmp_buf env;
 };
 
 static int
 pv_line_callback (const BoxType * b, void *cl)
 {
-  PinTypePtr pv = (PinTypePtr) b;
+  PinType *pv = (PinType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
-  if (!TEST_FLAG (TheFlag, pv) && PinLineIntersect (pv, &i->line))
+  if (!TEST_FLAG (i->flag, pv) && PinLineIntersect (pv, i->line))
     {
       if (TEST_FLAG (HOLEFLAG, pv))
         {
@@ -1049,7 +966,7 @@ pv_line_callback (const BoxType * b, void *cl)
           Settings.RatWarn = true;
           Message (_("WARNING: Hole too close to line.\n"));
         }
-      else if (ADD_PV_TO_LIST (pv))
+      else if (ADD_PV_TO_LIST (pv, i->flag))
         longjmp (i->env, 1);
     }
   return 0;
@@ -1058,10 +975,10 @@ pv_line_callback (const BoxType * b, void *cl)
 static int
 pv_pad_callback (const BoxType * b, void *cl)
 {
-  PinTypePtr pv = (PinTypePtr) b;
+  PinType *pv = (PinType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
-  if (!TEST_FLAG (TheFlag, pv) && IS_PV_ON_PAD (pv, &i->pad))
+  if (!TEST_FLAG (i->flag, pv) && IS_PV_ON_PAD (pv, i->pad))
     {
       if (TEST_FLAG (HOLEFLAG, pv))
         {
@@ -1069,7 +986,7 @@ pv_pad_callback (const BoxType * b, void *cl)
           Settings.RatWarn = true;
           Message (_("WARNING: Hole too close to pad.\n"));
         }
-      else if (ADD_PV_TO_LIST (pv))
+      else if (ADD_PV_TO_LIST (pv, i->flag))
         longjmp (i->env, 1);
     }
   return 0;
@@ -1078,10 +995,10 @@ pv_pad_callback (const BoxType * b, void *cl)
 static int
 pv_arc_callback (const BoxType * b, void *cl)
 {
-  PinTypePtr pv = (PinTypePtr) b;
+  PinType *pv = (PinType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
-  if (!TEST_FLAG (TheFlag, pv) && IS_PV_ON_ARC (pv, &i->arc))
+  if (!TEST_FLAG (i->flag, pv) && IS_PV_ON_ARC (pv, i->arc))
     {
       if (TEST_FLAG (HOLEFLAG, pv))
         {
@@ -1089,7 +1006,7 @@ pv_arc_callback (const BoxType * b, void *cl)
           Settings.RatWarn = true;
           Message (_("WARNING: Hole touches arc.\n"));
         }
-      else if (ADD_PV_TO_LIST (pv))
+      else if (ADD_PV_TO_LIST (pv, i->flag))
         longjmp (i->env, 1);
     }
   return 0;
@@ -1098,13 +1015,13 @@ pv_arc_callback (const BoxType * b, void *cl)
 static int
 pv_poly_callback (const BoxType * b, void *cl)
 {
-  PinTypePtr pv = (PinTypePtr) b;
+  PinType *pv = (PinType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   /* note that holes in polygons are ok, so they don't generate warnings. */
-  if (!TEST_FLAG (TheFlag, pv) && !TEST_FLAG (HOLEFLAG, pv) &&
+  if (!TEST_FLAG (i->flag, pv) && !TEST_FLAG (HOLEFLAG, pv) &&
                                   (TEST_THERM (i->layer, pv) ||
-                                   !TEST_FLAG (CLEARPOLYFLAG, &i->polygon) ||
+                                   !TEST_FLAG (CLEARPOLYFLAG, i->polygon) ||
                                    !pv->Clearance))
     {
       if (TEST_FLAG (SQUAREFLAG, pv))
@@ -1114,21 +1031,21 @@ pv_poly_callback (const BoxType * b, void *cl)
           x2 = pv->X + (PIN_SIZE (pv) + 1 + Bloat) / 2;
           y1 = pv->Y - (PIN_SIZE (pv) + 1 + Bloat) / 2;
           y2 = pv->Y + (PIN_SIZE (pv) + 1 + Bloat) / 2;
-          if (IsRectangleInPolygon (x1, y1, x2, y2, &i->polygon)
-              && ADD_PV_TO_LIST (pv))
+          if (IsRectangleInPolygon (x1, y1, x2, y2, i->polygon)
+              && ADD_PV_TO_LIST (pv, i->flag))
             longjmp (i->env, 1);
         }
       else if (TEST_FLAG (OCTAGONFLAG, pv))
         {
           POLYAREA *oct = OctagonPoly (pv->X, pv->Y, PIN_SIZE (pv) / 2);
-          if (isects (oct, &i->polygon, true) && ADD_PV_TO_LIST (pv))
+          if (isects (oct, i->polygon, true) && ADD_PV_TO_LIST (pv, i->flag))
             longjmp (i->env, 1);
         }
       else
         {
           if (IsPointInPolygon
-              (pv->X, pv->Y, PIN_SIZE (pv) * 0.5 + Bloat, &i->polygon)
-              && ADD_PV_TO_LIST (pv))
+              (pv->X, pv->Y, PIN_SIZE (pv) * 0.5 + Bloat, i->polygon)
+              && ADD_PV_TO_LIST (pv, i->flag))
             longjmp (i->env, 1);
         }
     }
@@ -1138,12 +1055,12 @@ pv_poly_callback (const BoxType * b, void *cl)
 static int
 pv_rat_callback (const BoxType * b, void *cl)
 {
-  PinTypePtr pv = (PinTypePtr) b;
+  PinType *pv = (PinType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   /* rats can't cause DRC so there is no early exit */
-  if (!TEST_FLAG (TheFlag, pv) && IS_PV_ON_RAT (pv, &i->rat))
-    ADD_PV_TO_LIST (pv);
+  if (!TEST_FLAG (i->flag, pv) && IS_PV_ON_RAT (pv, i->rat))
+    ADD_PV_TO_LIST (pv, i->flag);
   return 0;
 }
 
@@ -1152,110 +1069,125 @@ pv_rat_callback (const BoxType * b, void *cl)
  * This routine updates the position counter of the lists too.
  */
 static bool
-LookupPVConnectionsToLOList (bool AndRats)
+LookupPVConnectionsToLOList (int flag, bool AndRats)
 {
-  Cardinal layer;
+  Cardinal layer_no;
   struct lo_info info;
 
+  info.flag = flag;
+
   /* loop over all layers */
-  for (layer = 0; layer < max_copper_layer; layer++)
+  for (layer_no = 0; layer_no < max_copper_layer; layer_no++)
     {
-      if (LAYER_PTR (layer)->no_drc)
+      LayerType *layer = LAYER_PTR (layer_no);
+
+      if (layer->no_drc)
                        continue;
       /* do nothing if there are no PV's */
       if (TotalP + TotalV == 0)
         {
-          LineList[layer].Location = LineList[layer].Number;
-          ArcList[layer].Location = ArcList[layer].Number;
-          PolygonList[layer].Location = PolygonList[layer].Number;
+          LineList[layer_no].Location = LineList[layer_no].Number;
+          ArcList[layer_no].Location = ArcList[layer_no].Number;
+          PolygonList[layer_no].Location = PolygonList[layer_no].Number;
           continue;
         }
 
       /* check all lines */
-      while (LineList[layer].Location < LineList[layer].Number)
+      while (LineList[layer_no].Location < LineList[layer_no].Number)
         {
-          info.line = *(LINELIST_ENTRY (layer, LineList[layer].Location));
-          EXPAND_BOUNDS (&info.line);
+          BoxType search_box;
+
+          info.line = LINELIST_ENTRY (layer_no, LineList[layer_no].Location);
+          search_box = expand_bounds ((BoxType *)info.line);
+
           if (setjmp (info.env) == 0)
-            r_search (PCB->Data->via_tree, (BoxType *) & info.line, NULL,
+            r_search (PCB->Data->via_tree, &search_box, NULL,
                       pv_line_callback, &info);
           else
             return true;
           if (setjmp (info.env) == 0)
-            r_search (PCB->Data->pin_tree, (BoxType *) & info.line, NULL,
+            r_search (PCB->Data->pin_tree, &search_box, NULL,
                       pv_line_callback, &info);
           else
             return true;
-          LineList[layer].Location++;
+          LineList[layer_no].Location++;
         }
 
       /* check all arcs */
-      while (ArcList[layer].Location < ArcList[layer].Number)
+      while (ArcList[layer_no].Location < ArcList[layer_no].Number)
         {
-          info.arc = *(ARCLIST_ENTRY (layer, ArcList[layer].Location));
-          EXPAND_BOUNDS (&info.arc);
+          BoxType search_box;
+
+          info.arc = ARCLIST_ENTRY (layer_no, ArcList[layer_no].Location);
+          search_box = expand_bounds ((BoxType *)info.arc);
+
           if (setjmp (info.env) == 0)
-            r_search (PCB->Data->via_tree, (BoxType *) & info.arc, NULL,
+            r_search (PCB->Data->via_tree, &search_box, NULL,
                       pv_arc_callback, &info);
           else
             return true;
           if (setjmp (info.env) == 0)
-            r_search (PCB->Data->pin_tree, (BoxType *) & info.arc, NULL,
+            r_search (PCB->Data->pin_tree, &search_box, NULL,
                       pv_arc_callback, &info);
           else
             return true;
-          ArcList[layer].Location++;
+          ArcList[layer_no].Location++;
         }
 
       /* now all polygons */
-      info.layer = layer;
-      while (PolygonList[layer].Location < PolygonList[layer].Number)
+      info.layer = layer_no;
+      while (PolygonList[layer_no].Location < PolygonList[layer_no].Number)
         {
-          info.polygon =
-            *(POLYGONLIST_ENTRY (layer, PolygonList[layer].Location));
-          EXPAND_BOUNDS (&info.polygon);
+          BoxType search_box;
+
+          info.polygon = POLYGONLIST_ENTRY (layer_no, PolygonList[layer_no].Location);
+          search_box = expand_bounds ((BoxType *)info.polygon);
+
           if (setjmp (info.env) == 0)
-            r_search (PCB->Data->via_tree, (BoxType *) & info.polygon, NULL,
+            r_search (PCB->Data->via_tree, &search_box, NULL,
                       pv_poly_callback, &info);
           else
             return true;
           if (setjmp (info.env) == 0)
-            r_search (PCB->Data->pin_tree, (BoxType *) & info.polygon, NULL,
+            r_search (PCB->Data->pin_tree, &search_box, NULL,
                       pv_poly_callback, &info);
           else
             return true;
-          PolygonList[layer].Location++;
+          PolygonList[layer_no].Location++;
         }
     }
 
   /* loop over all pad-layers */
-  for (layer = 0; layer < 2; layer++)
+  for (layer_no = 0; layer_no < 2; layer_no++)
     {
       /* do nothing if there are no PV's */
       if (TotalP + TotalV == 0)
         {
-          PadList[layer].Location = PadList[layer].Number;
+          PadList[layer_no].Location = PadList[layer_no].Number;
           continue;
         }
 
       /* check all pads; for a detailed description see
        * the handling of lines in this subroutine
        */
-      while (PadList[layer].Location < PadList[layer].Number)
+      while (PadList[layer_no].Location < PadList[layer_no].Number)
         {
-          info.pad = *(PADLIST_ENTRY (layer, PadList[layer].Location));
-          EXPAND_BOUNDS (&info.pad);
+          BoxType search_box;
+
+          info.pad = PADLIST_ENTRY (layer_no, PadList[layer_no].Location);
+          search_box = expand_bounds ((BoxType *)info.pad);
+
           if (setjmp (info.env) == 0)
-            r_search (PCB->Data->via_tree, (BoxType *) & info.pad, NULL,
+            r_search (PCB->Data->via_tree, &search_box, NULL,
                       pv_pad_callback, &info);
           else
             return true;
           if (setjmp (info.env) == 0)
-            r_search (PCB->Data->pin_tree, (BoxType *) & info.pad, NULL,
+            r_search (PCB->Data->pin_tree, &search_box, NULL,
                       pv_pad_callback, &info);
           else
             return true;
-          PadList[layer].Location++;
+          PadList[layer_no].Location++;
         }
     }
 
@@ -1268,14 +1200,14 @@ LookupPVConnectionsToLOList (bool AndRats)
     {
       while (RatList.Location < RatList.Number)
         {
-          info.rat = *(RATLIST_ENTRY (RatList.Location));
-          r_search_pt (PCB->Data->via_tree, & info.rat.Point1, 1, NULL,
+          info.rat = RATLIST_ENTRY (RatList.Location);
+          r_search_pt (PCB->Data->via_tree, & info.rat->Point1, 1, NULL,
                     pv_rat_callback, &info);
-          r_search_pt (PCB->Data->via_tree, & info.rat.Point2, 1, NULL,
+          r_search_pt (PCB->Data->via_tree, & info.rat->Point2, 1, NULL,
                     pv_rat_callback, &info);
-          r_search_pt (PCB->Data->pin_tree, & info.rat.Point1, 1, NULL,
+          r_search_pt (PCB->Data->pin_tree, & info.rat->Point1, 1, NULL,
                     pv_rat_callback, &info);
-          r_search_pt (PCB->Data->pin_tree, & info.rat.Point2, 1, NULL,
+          r_search_pt (PCB->Data->pin_tree, & info.rat->Point2, 1, NULL,
                     pv_rat_callback, &info);
 
           RatList.Location++;
@@ -1284,38 +1216,6 @@ LookupPVConnectionsToLOList (bool AndRats)
   return (false);
 }
 
-int
-pv_touch_callback (const BoxType * b, void *cl)
-{
-  PinTypePtr pin = (PinTypePtr) b;
-  struct lo_info *i = (struct lo_info *) cl;
-
-  if (!TEST_FLAG (TheFlag, pin) && PinLineIntersect (pin, &i->line))
-    longjmp (i->env, 1);
-  return 0;
-}
-
-static bool
-PVTouchesLine (LineTypePtr line)
-{
-  struct lo_info info;
-
-  info.line = *line;
-  EXPAND_BOUNDS (&info.line);
-  if (setjmp (info.env) == 0)
-    r_search (PCB->Data->via_tree, (BoxType *) & info.line, NULL,
-              pv_touch_callback, &info);
-  else
-    return true;
-  if (setjmp (info.env) == 0)
-    r_search (PCB->Data->pin_tree, (BoxType *) & info.line, NULL,
-              pv_touch_callback, &info);
-  else
-    return true;
-
-  return (false);
-}
-
 /* reduce arc start angle and delta to 0..360 */
 static void
 normalize_angles (Angle *sa, Angle *d)
@@ -1331,7 +1231,7 @@ normalize_angles (Angle *sa, Angle *d)
 }
 
 static int
-radius_crosses_arc (double x, double y, ArcTypePtr arc)
+radius_crosses_arc (double x, double y, ArcType *arc)
 {
   double alpha = atan2 (y - arc->Y, -x + arc->X) * RAD_TO_DEG;
   Angle sa = arc->StartAngle, d = arc->Delta;
@@ -1345,7 +1245,7 @@ radius_crosses_arc (double x, double y, ArcTypePtr arc)
 }
 
 static void
-get_arc_ends (Coord *box, ArcTypePtr arc)
+get_arc_ends (Coord *box, ArcType *arc)
 {
   box[0] = arc->X - arc->Width  * cos (M180 * arc->StartAngle);
   box[1] = arc->Y + arc->Height * sin (M180 * arc->StartAngle);
@@ -1378,7 +1278,7 @@ get_arc_ends (Coord *box, ArcTypePtr arc)
  *
  */
 static bool
-ArcArcIntersect (ArcTypePtr Arc1, ArcTypePtr Arc2)
+ArcArcIntersect (ArcType *Arc1, ArcType *Arc2)
 {
   double x, y, dx, dy, r1, r2, a, d, l, t, t1, t2, dl;
   Coord pdx, pdy;
@@ -1497,7 +1397,7 @@ ArcArcIntersect (ArcTypePtr Arc1, ArcTypePtr Arc2)
  * Tests if point is same as line end point
  */
 static bool
-IsRatPointOnLineEnd (PointTypePtr Point, LineTypePtr Line)
+IsRatPointOnLineEnd (PointType *Point, LineType *Line)
 {
   if ((Point->X == Line->Point1.X
        && Point->Y == Line->Point1.Y)
@@ -1507,7 +1407,7 @@ IsRatPointOnLineEnd (PointTypePtr Point, LineTypePtr Line)
 }
 
 static void 
-form_slanted_rectangle (PointType p[4], LineTypePtr l)
+form_slanted_rectangle (PointType p[4], LineType *l)
 /* writes vertices of a squared line */
 {
    double dwx = 0, dwy = 0;
@@ -1584,7 +1484,7 @@ form_slanted_rectangle (PointType p[4], LineTypePtr l)
  *
  */
 bool
-LineLineIntersect (LineTypePtr Line1, LineTypePtr Line2)
+LineLineIntersect (LineType *Line1, LineType *Line2)
 {
   double s, r;
   double line1_dx, line1_dy, line2_dx, line2_dy,
@@ -1611,16 +1511,16 @@ LineLineIntersect (LineTypePtr Line1, LineTypePtr Line2)
    *  below does not cause a divide-by-zero. */
   if (IsPointInPad (Line2->Point1.X, Line2->Point1.Y,
                     MAX (Line2->Thickness / 2 + Bloat, 0),
-                    (PadTypePtr) Line1)
+                    (PadType *) Line1)
        || IsPointInPad (Line2->Point2.X, Line2->Point2.Y,
                         MAX (Line2->Thickness / 2 + Bloat, 0),
-                        (PadTypePtr) Line1)
+                        (PadType *) Line1)
        || IsPointInPad (Line1->Point1.X, Line1->Point1.Y,
                         MAX (Line1->Thickness / 2 + Bloat, 0),
-                        (PadTypePtr) Line2)
+                        (PadType *) Line2)
        || IsPointInPad (Line1->Point2.X, Line1->Point2.Y,
                         MAX (Line1->Thickness / 2 + Bloat, 0),
-                        (PadTypePtr) Line2))
+                        (PadType *) Line2))
     return true;
 
   /* setup some constants */
@@ -1693,10 +1593,10 @@ LineLineIntersect (LineTypePtr Line1, LineTypePtr Line2)
  * The end points are hell so they are checked individually
  */
 bool
-LineArcIntersect (LineTypePtr Line, ArcTypePtr Arc)
+LineArcIntersect (LineType *Line, ArcType *Arc)
 {
   double dx, dy, dx1, dy1, l, d, r, r2, Radius;
-  BoxTypePtr box;
+  BoxType *box;
 
   dx = Line->Point2.X - Line->Point1.X;
   dy = Line->Point2.Y - Line->Point1.Y;
@@ -1742,9 +1642,9 @@ LineArcIntersect (LineTypePtr Line, ArcTypePtr Arc)
     return (true);
   /* check arc end points */
   box = GetArcEnds (Arc);
-  if (IsPointInPad (box->X1, box->Y1, Arc->Thickness * 0.5 + Bloat, (PadTypePtr)Line))
+  if (IsPointInPad (box->X1, box->Y1, Arc->Thickness * 0.5 + Bloat, (PadType *)Line))
     return true;
-  if (IsPointInPad (box->X2, box->Y2, Arc->Thickness * 0.5 + Bloat, (PadTypePtr)Line))
+  if (IsPointInPad (box->X2, box->Y2, Arc->Thickness * 0.5 + Bloat, (PadType *)Line))
     return true;
   return false;
 }
@@ -1752,12 +1652,12 @@ LineArcIntersect (LineTypePtr Line, ArcTypePtr Arc)
 static int
 LOCtoArcLine_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
-  if (!TEST_FLAG (TheFlag, line) && LineArcIntersect (line, &i->arc))
+  if (!TEST_FLAG (i->flag, line) && LineArcIntersect (line, i->arc))
     {
-      if (ADD_LINE_TO_LIST (i->layer, line))
+      if (ADD_LINE_TO_LIST (i->layer, line, i->flag))
         longjmp (i->env, 1);
     }
   return 0;
@@ -1766,14 +1666,14 @@ LOCtoArcLine_callback (const BoxType * b, void *cl)
 static int
 LOCtoArcArc_callback (const BoxType * b, void *cl)
 {
-  ArcTypePtr arc = (ArcTypePtr) b;
+  ArcType *arc = (ArcType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!arc->Thickness)
     return 0;
-  if (!TEST_FLAG (TheFlag, arc) && ArcArcIntersect (&i->arc, arc))
+  if (!TEST_FLAG (i->flag, arc) && ArcArcIntersect (i->arc, arc))
     {
-      if (ADD_ARC_TO_LIST (i->layer, arc))
+      if (ADD_ARC_TO_LIST (i->layer, arc, i->flag))
         longjmp (i->env, 1);
     }
   return 0;
@@ -1782,12 +1682,12 @@ LOCtoArcArc_callback (const BoxType * b, void *cl)
 static int
 LOCtoArcPad_callback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
-  if (!TEST_FLAG (TheFlag, pad) && i->layer ==
+  if (!TEST_FLAG (i->flag, pad) && i->layer ==
       (TEST_FLAG (ONSOLDERFLAG, pad) ? SOLDER_LAYER : COMPONENT_LAYER)
-      && ArcPadIntersect (&i->arc, pad) && ADD_PAD_TO_LIST (i->layer, pad))
+      && ArcPadIntersect (i->arc, pad) && ADD_PAD_TO_LIST (i->layer, pad, i->flag))
     longjmp (i->env, 1);
   return 0;
 }
@@ -1800,53 +1700,57 @@ LOCtoArcPad_callback (const BoxType * b, void *cl)
  * Xij means Xj at arc i
  */
 static bool
-LookupLOConnectionsToArc (ArcTypePtr Arc, Cardinal LayerGroup)
+LookupLOConnectionsToArc (ArcType *Arc, Cardinal LayerGroup, int flag, bool AndRats)
 {
   Cardinal entry;
   struct lo_info info;
+  BoxType search_box;
+
+  info.flag = flag;
+  info.arc = Arc;
+  search_box = expand_bounds ((BoxType *)info.arc);
 
-  info.arc = *Arc;
-  EXPAND_BOUNDS (&info.arc);
   /* loop over all layers of the group */
   for (entry = 0; entry < PCB->LayerGroups.Number[LayerGroup]; entry++)
     {
-      Cardinal layer;
+      Cardinal layer_no;
+      LayerType *layer;
       GList *i;
 
-      layer = PCB->LayerGroups.Entries[LayerGroup][entry];
+      layer_no = PCB->LayerGroups.Entries[LayerGroup][entry];
+      layer = LAYER_PTR (layer_no);
 
       /* handle normal layers */
-      if (layer < max_copper_layer)
+      if (layer_no < max_copper_layer)
         {
-          info.layer = layer;
+          info.layer = layer_no;
           /* add arcs */
           if (setjmp (info.env) == 0)
-            r_search (LAYER_PTR (layer)->line_tree, &info.arc.BoundingBox,
+            r_search (layer->line_tree, &search_box,
                       NULL, LOCtoArcLine_callback, &info);
           else
             return true;
 
           if (setjmp (info.env) == 0)
-            r_search (LAYER_PTR (layer)->arc_tree, &info.arc.BoundingBox,
+            r_search (layer->arc_tree, &search_box,
                       NULL, LOCtoArcArc_callback, &info);
           else
             return true;
 
           /* now check all polygons */
-          for (i = PCB->Data->Layer[layer].Polygon;
-               i != NULL; i = g_list_next (i))
+          for (i = layer->Polygon; i != NULL; i = g_list_next (i))
             {
               PolygonType *polygon = i->data;
-              if (!TEST_FLAG (TheFlag, polygon) && IsArcInPolygon (Arc, polygon)
-                  && ADD_POLYGON_TO_LIST (layer, polygon))
+              if (!TEST_FLAG (flag, polygon) && IsArcInPolygon (Arc, polygon)
+                  && ADD_POLYGON_TO_LIST (layer_no, polygon, flag))
                 return true;
             }
         }
       else
         {
-          info.layer = layer - max_copper_layer;
+          info.layer = layer_no - max_copper_layer;
           if (setjmp (info.env) == 0)
-            r_search (PCB->Data->pad_tree, &info.arc.BoundingBox, NULL,
+            r_search (PCB->Data->pad_tree, &search_box, NULL,
                       LOCtoArcPad_callback, &info);
           else
             return true;
@@ -1858,12 +1762,12 @@ LookupLOConnectionsToArc (ArcTypePtr Arc, Cardinal LayerGroup)
 static int
 LOCtoLineLine_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
-  if (!TEST_FLAG (TheFlag, line) && LineLineIntersect (&i->line, line))
+  if (!TEST_FLAG (i->flag, line) && LineLineIntersect (i->line, line))
     {
-      if (ADD_LINE_TO_LIST (i->layer, line))
+      if (ADD_LINE_TO_LIST (i->layer, line, i->flag))
         longjmp (i->env, 1);
     }
   return 0;
@@ -1872,14 +1776,14 @@ LOCtoLineLine_callback (const BoxType * b, void *cl)
 static int
 LOCtoLineArc_callback (const BoxType * b, void *cl)
 {
-  ArcTypePtr arc = (ArcTypePtr) b;
+  ArcType *arc = (ArcType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!arc->Thickness)
     return 0;
-  if (!TEST_FLAG (TheFlag, arc) && LineArcIntersect (&i->line, arc))
+  if (!TEST_FLAG (i->flag, arc) && LineArcIntersect (i->line, arc))
     {
-      if (ADD_ARC_TO_LIST (i->layer, arc))
+      if (ADD_ARC_TO_LIST (i->layer, arc, i->flag))
         longjmp (i->env, 1);
     }
   return 0;
@@ -1888,21 +1792,21 @@ LOCtoLineArc_callback (const BoxType * b, void *cl)
 static int
 LOCtoLineRat_callback (const BoxType * b, void *cl)
 {
-  RatTypePtr rat = (RatTypePtr) b;
+  RatType *rat = (RatType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
-  if (!TEST_FLAG (TheFlag, rat))
+  if (!TEST_FLAG (i->flag, rat))
     {
       if ((rat->group1 == i->layer)
-          && IsRatPointOnLineEnd (&rat->Point1, &i->line))
+          && IsRatPointOnLineEnd (&rat->Point1, i->line))
         {
-          if (ADD_RAT_TO_LIST (rat))
+          if (ADD_RAT_TO_LIST (rat, i->flag))
             longjmp (i->env, 1);
         }
       else if ((rat->group2 == i->layer)
-               && IsRatPointOnLineEnd (&rat->Point2, &i->line))
+               && IsRatPointOnLineEnd (&rat->Point2, i->line))
         {
-          if (ADD_RAT_TO_LIST (rat))
+          if (ADD_RAT_TO_LIST (rat, i->flag))
             longjmp (i->env, 1);
         }
     }
@@ -1912,12 +1816,12 @@ LOCtoLineRat_callback (const BoxType * b, void *cl)
 static int
 LOCtoLinePad_callback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
-  if (!TEST_FLAG (TheFlag, pad) && i->layer ==
+  if (!TEST_FLAG (i->flag, pad) && i->layer ==
       (TEST_FLAG (ONSOLDERFLAG, pad) ? SOLDER_LAYER : COMPONENT_LAYER)
-      && LinePadIntersect (&i->line, pad) && ADD_PAD_TO_LIST (i->layer, pad))
+      && LinePadIntersect (i->line, pad) && ADD_PAD_TO_LIST (i->layer, pad, i->flag))
     longjmp (i->env, 1);
   return 0;
 }
@@ -1930,42 +1834,50 @@ LOCtoLinePad_callback (const BoxType * b, void *cl)
  * Xij means Xj at line i
  */
 static bool
-LookupLOConnectionsToLine (LineTypePtr Line, Cardinal LayerGroup,
-                           bool PolysTo)
+LookupLOConnectionsToLine (LineType *Line, Cardinal LayerGroup,
+                           int flag, bool PolysTo, bool AndRats)
 {
   Cardinal entry;
   struct lo_info info;
+  BoxType search_box;
 
-  info.line = *Line;
+  info.flag = flag;
   info.layer = LayerGroup;
-  EXPAND_BOUNDS (&info.line)
-  /* add the new rat lines */
-  if (setjmp (info.env) == 0)
-    r_search (PCB->Data->rat_tree, &info.line.BoundingBox, NULL,
-              LOCtoLineRat_callback, &info);
-  else
-    return true;
+  info.line = Line;
+  search_box = expand_bounds ((BoxType *)info.line);
+
+  if (AndRats)
+    {
+      /* add the new rat lines */
+      if (setjmp (info.env) == 0)
+        r_search (PCB->Data->rat_tree, &search_box, NULL,
+                  LOCtoLineRat_callback, &info);
+      else
+        return true;
+    }
 
   /* loop over all layers of the group */
   for (entry = 0; entry < PCB->LayerGroups.Number[LayerGroup]; entry++)
     {
-      Cardinal layer;
+      Cardinal layer_no;
+      LayerType *layer;
 
-      layer = PCB->LayerGroups.Entries[LayerGroup][entry];
+      layer_no = PCB->LayerGroups.Entries[LayerGroup][entry];
+      layer = LAYER_PTR (layer_no);
 
       /* handle normal layers */
-      if (layer < max_copper_layer)
+      if (layer_no < max_copper_layer)
         {
-          info.layer = layer;
+          info.layer = layer_no;
           /* add lines */
           if (setjmp (info.env) == 0)
-            r_search (LAYER_PTR (layer)->line_tree, (BoxType *) & info.line,
+            r_search (layer->line_tree, &search_box,
                       NULL, LOCtoLineLine_callback, &info);
           else
             return true;
           /* add arcs */
           if (setjmp (info.env) == 0)
-            r_search (LAYER_PTR (layer)->arc_tree, (BoxType *) & info.line,
+            r_search (layer->arc_tree, &search_box,
                       NULL, LOCtoLineArc_callback, &info);
           else
             return true;
@@ -1973,13 +1885,11 @@ LookupLOConnectionsToLine (LineTypePtr Line, Cardinal LayerGroup,
           if (PolysTo)
             {
               GList *i;
-              for (i = PCB->Data->Layer[layer].Polygon;
-                   i != NULL; i = g_list_next (i))
+              for (i = layer->Polygon; i != NULL; i = g_list_next (i))
                 {
                   PolygonType *polygon = i->data;
-                  if (!TEST_FLAG
-                      (TheFlag, polygon) && IsLineInPolygon (Line, polygon)
-                      && ADD_POLYGON_TO_LIST (layer, polygon))
+                  if (!TEST_FLAG (flag, polygon) && IsLineInPolygon (Line, polygon)
+                      && ADD_POLYGON_TO_LIST (layer_no, polygon, flag))
                     return true;
                 }
             }
@@ -1987,9 +1897,9 @@ LookupLOConnectionsToLine (LineTypePtr Line, Cardinal LayerGroup,
       else
         {
           /* handle special 'pad' layers */
-          info.layer = layer - max_copper_layer;
+          info.layer = layer_no - max_copper_layer;
           if (setjmp (info.env) == 0)
-            r_search (PCB->Data->pad_tree, &info.line.BoundingBox, NULL,
+            r_search (PCB->Data->pad_tree, &search_box, NULL,
                       LOCtoLinePad_callback, &info);
           else
             return true;
@@ -1998,121 +1908,26 @@ LookupLOConnectionsToLine (LineTypePtr Line, Cardinal LayerGroup,
   return (false);
 }
 
-static int
-LOT_Linecallback (const BoxType * b, void *cl)
-{
-  LineTypePtr line = (LineTypePtr) b;
-  struct lo_info *i = (struct lo_info *) cl;
-
-  if (!TEST_FLAG (TheFlag, line) && LineLineIntersect (&i->line, line))
-    longjmp (i->env, 1);
-  return 0;
-}
-
-static int
-LOT_Arccallback (const BoxType * b, void *cl)
-{
-  ArcTypePtr arc = (ArcTypePtr) b;
-  struct lo_info *i = (struct lo_info *) cl;
-
-  if (!arc->Thickness)
-    return 0;
-  if (!TEST_FLAG (TheFlag, arc) && LineArcIntersect (&i->line, arc))
-    longjmp (i->env, 1);
-  return 0;
-}
-
-static int
-LOT_Padcallback (const BoxType * b, void *cl)
-{
-  PadTypePtr pad = (PadTypePtr) b;
-  struct lo_info *i = (struct lo_info *) cl;
-
-  if (!TEST_FLAG (TheFlag, pad) && i->layer ==
-      (TEST_FLAG (ONSOLDERFLAG, pad) ? SOLDER_LAYER : COMPONENT_LAYER)
-      && LinePadIntersect (&i->line, pad))
-    longjmp (i->env, 1);
-  return 0;
-}
-
-static bool
-LOTouchesLine (LineTypePtr Line, Cardinal LayerGroup)
-{
-  Cardinal entry;
-  struct lo_info info;
-
-
-  /* the maximum possible distance */
-
-  info.line = *Line;
-  EXPAND_BOUNDS (&info.line);
-
-  /* loop over all layers of the group */
-  for (entry = 0; entry < PCB->LayerGroups.Number[LayerGroup]; entry++)
-    {
-      Cardinal layer = PCB->LayerGroups.Entries[LayerGroup][entry];
-
-      /* handle normal layers */
-      if (layer < max_copper_layer)
-        {
-          GList *i;
-
-          /* find the first line that touches coordinates */
-
-          if (setjmp (info.env) == 0)
-            r_search (LAYER_PTR (layer)->line_tree, (BoxType *) & info.line,
-                      NULL, LOT_Linecallback, &info);
-          else
-            return (true);
-          if (setjmp (info.env) == 0)
-            r_search (LAYER_PTR (layer)->arc_tree, (BoxType *) & info.line,
-                      NULL, LOT_Arccallback, &info);
-          else
-            return (true);
-
-          /* now check all polygons */
-          for (i = PCB->Data->Layer[layer].Polygon;
-               i != NULL; i = g_list_next (i))
-            {
-              PolygonType *polygon = i->data;
-              if (!TEST_FLAG (TheFlag, polygon)
-                  && IsLineInPolygon (Line, polygon))
-                return (true);
-            }
-        }
-      else
-        {
-          /* handle special 'pad' layers */
-          info.layer = layer - max_copper_layer;
-          if (setjmp (info.env) == 0)
-            r_search (PCB->Data->pad_tree, &info.line.BoundingBox, NULL,
-                      LOT_Padcallback, &info);
-          else
-            return true;
-        }
-    }
-  return (false);
-}
-
 struct rat_info
 {
   Cardinal layer;
-  PointTypePtr Point;
+  PointType *Point;
+  int flag;
   jmp_buf env;
 };
 
 static int
 LOCtoRat_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct rat_info *i = (struct rat_info *) cl;
 
-  if (!TEST_FLAG (TheFlag, line) &&
+  if (!TEST_FLAG (i->flag, line) &&
       ((line->Point1.X == i->Point->X &&
         line->Point1.Y == i->Point->Y) ||
        (line->Point2.X == i->Point->X && line->Point2.Y == i->Point->Y)))
     {
-      if (ADD_LINE_TO_LIST (i->layer, line))
+      if (ADD_LINE_TO_LIST (i->layer, line, i->flag))
         longjmp (i->env, 1);
     }
   return 0;
@@ -2120,14 +1935,14 @@ LOCtoRat_callback (const BoxType * b, void *cl)
 static int
 PolygonToRat_callback (const BoxType * b, void *cl)
 {
-  PolygonTypePtr polygon = (PolygonTypePtr) b;
+  PolygonType *polygon = (PolygonType *) b;
   struct rat_info *i = (struct rat_info *) cl;
 
-  if (!TEST_FLAG (TheFlag, polygon) && polygon->Clipped &&
+  if (!TEST_FLAG (i->flag, polygon) && polygon->Clipped &&
       (i->Point->X == polygon->Clipped->contours->head.point[0]) &&
       (i->Point->Y == polygon->Clipped->contours->head.point[1]))
     {
-      if (ADD_POLYGON_TO_LIST (i->layer, polygon))
+      if (ADD_POLYGON_TO_LIST (i->layer, polygon, i->flag))
         longjmp (i->env, 1);
     }
   return 0;
@@ -2136,16 +1951,16 @@ PolygonToRat_callback (const BoxType * b, void *cl)
 static int
 LOCtoPad_callback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   struct rat_info *i = (struct rat_info *) cl;
 
-  if (!TEST_FLAG (TheFlag, pad) && i->layer ==
+  if (!TEST_FLAG (i->flag, pad) && i->layer ==
 	(TEST_FLAG (ONSOLDERFLAG, pad) ? SOLDER_LAYER : COMPONENT_LAYER) &&
       ((pad->Point1.X == i->Point->X && pad->Point1.Y == i->Point->Y) ||
        (pad->Point2.X == i->Point->X && pad->Point2.Y == i->Point->Y) ||
        ((pad->Point1.X + pad->Point2.X) / 2 == i->Point->X &&
         (pad->Point1.Y + pad->Point2.Y) / 2 == i->Point->Y)) &&
-      ADD_PAD_TO_LIST (i->layer, pad))
+      ADD_PAD_TO_LIST (i->layer, pad, i->flag))
     longjmp (i->env, 1);
   return 0;
 }
@@ -2158,39 +1973,42 @@ LOCtoPad_callback (const BoxType * b, void *cl)
  * Xij means Xj at line i
  */
 static bool
-LookupLOConnectionsToRatEnd (PointTypePtr Point, Cardinal LayerGroup)
+LookupLOConnectionsToRatEnd (PointType *Point, Cardinal LayerGroup, int flag)
 {
   Cardinal entry;
   struct rat_info info;
 
+  info.flag = flag;
   info.Point = Point;
   /* loop over all layers of this group */
   for (entry = 0; entry < PCB->LayerGroups.Number[LayerGroup]; entry++)
     {
-      Cardinal layer;
+      Cardinal layer_no;
+      LayerType *layer;
 
-      layer = PCB->LayerGroups.Entries[LayerGroup][entry];
+      layer_no = PCB->LayerGroups.Entries[LayerGroup][entry];
+      layer = LAYER_PTR (layer_no);
       /* handle normal layers 
          rats don't ever touch
          arcs by definition
        */
 
-      if (layer < max_copper_layer)
+      if (layer_no < max_copper_layer)
         {
-          info.layer = layer;
+          info.layer = layer_no;
           if (setjmp (info.env) == 0)
-            r_search_pt (LAYER_PTR (layer)->line_tree, Point, 1, NULL,
+            r_search_pt (layer->line_tree, Point, 1, NULL,
                       LOCtoRat_callback, &info);
           else
             return true;
           if (setjmp (info.env) == 0)
-            r_search_pt (LAYER_PTR (layer)->polygon_tree, Point, 1,
+            r_search_pt (layer->polygon_tree, Point, 1,
                       NULL, PolygonToRat_callback, &info);
         }
       else
         {
           /* handle special 'pad' layers */
-          info.layer = layer - max_copper_layer;
+          info.layer = layer_no - max_copper_layer;
           if (setjmp (info.env) == 0)
             r_search_pt (PCB->Data->pad_tree, Point, 1, NULL,
                       LOCtoPad_callback, &info);
@@ -2204,12 +2022,12 @@ LookupLOConnectionsToRatEnd (PointTypePtr Point, Cardinal LayerGroup)
 static int
 LOCtoPadLine_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
-  if (!TEST_FLAG (TheFlag, line) && LinePadIntersect (line, &i->pad))
+  if (!TEST_FLAG (i->flag, line) && LinePadIntersect (line, i->pad))
     {
-      if (ADD_LINE_TO_LIST (i->layer, line))
+      if (ADD_LINE_TO_LIST (i->layer, line, i->flag))
         longjmp (i->env, 1);
     }
   return 0;
@@ -2218,14 +2036,14 @@ LOCtoPadLine_callback (const BoxType * b, void *cl)
 static int
 LOCtoPadArc_callback (const BoxType * b, void *cl)
 {
-  ArcTypePtr arc = (ArcTypePtr) b;
+  ArcType *arc = (ArcType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!arc->Thickness)
     return 0;
-  if (!TEST_FLAG (TheFlag, arc) && ArcPadIntersect (arc, &i->pad))
+  if (!TEST_FLAG (i->flag, arc) && ArcPadIntersect (arc, i->pad))
     {
-      if (ADD_ARC_TO_LIST (i->layer, arc))
+      if (ADD_ARC_TO_LIST (i->layer, arc, i->flag))
         longjmp (i->env, 1);
     }
   return 0;
@@ -2234,15 +2052,15 @@ LOCtoPadArc_callback (const BoxType * b, void *cl)
 static int
 LOCtoPadPoly_callback (const BoxType * b, void *cl)
 {
-  PolygonTypePtr polygon = (PolygonTypePtr) b;
+  PolygonType *polygon = (PolygonType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
 
-  if (!TEST_FLAG (TheFlag, polygon) &&
-      (!TEST_FLAG (CLEARPOLYFLAG, polygon) || !i->pad.Clearance))
+  if (!TEST_FLAG (i->flag, polygon) &&
+      (!TEST_FLAG (CLEARPOLYFLAG, polygon) || !i->pad->Clearance))
     {
-      if (IsPadInPolygon (&i->pad, polygon) &&
-          ADD_POLYGON_TO_LIST (i->layer, polygon))
+      if (IsPadInPolygon (i->pad, polygon) &&
+          ADD_POLYGON_TO_LIST (i->layer, polygon, i->flag))
         longjmp (i->env, 1);
     }
   return 0;
@@ -2251,27 +2069,27 @@ LOCtoPadPoly_callback (const BoxType * b, void *cl)
 static int
 LOCtoPadRat_callback (const BoxType * b, void *cl)
 {
-  RatTypePtr rat = (RatTypePtr) b;
+  RatType *rat = (RatType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
-  if (!TEST_FLAG (TheFlag, rat))
+  if (!TEST_FLAG (i->flag, rat))
     {
       if (rat->group1 == i->layer &&
-	  ((rat->Point1.X == i->pad.Point1.X && rat->Point1.Y == i->pad.Point1.Y) ||
-	   (rat->Point1.X == i->pad.Point2.X && rat->Point1.Y == i->pad.Point2.Y) ||
-	   (rat->Point1.X == (i->pad.Point1.X + i->pad.Point2.X) / 2 &&
-	    rat->Point1.Y == (i->pad.Point1.Y + i->pad.Point2.Y) / 2)))
+	  ((rat->Point1.X == i->pad->Point1.X && rat->Point1.Y == i->pad->Point1.Y) ||
+	   (rat->Point1.X == i->pad->Point2.X && rat->Point1.Y == i->pad->Point2.Y) ||
+	   (rat->Point1.X == (i->pad->Point1.X + i->pad->Point2.X) / 2 &&
+	    rat->Point1.Y == (i->pad->Point1.Y + i->pad->Point2.Y) / 2)))
         {
-          if (ADD_RAT_TO_LIST (rat))
+          if (ADD_RAT_TO_LIST (rat, i->flag))
             longjmp (i->env, 1);
         }
       else if (rat->group2 == i->layer &&
-	       ((rat->Point2.X == i->pad.Point1.X && rat->Point2.Y == i->pad.Point1.Y) ||
-		(rat->Point2.X == i->pad.Point2.X && rat->Point2.Y == i->pad.Point2.Y) ||
-		(rat->Point2.X == (i->pad.Point1.X + i->pad.Point2.X) / 2 &&
-		 rat->Point2.Y == (i->pad.Point1.Y + i->pad.Point2.Y) / 2)))
+	       ((rat->Point2.X == i->pad->Point1.X && rat->Point2.Y == i->pad->Point1.Y) ||
+		(rat->Point2.X == i->pad->Point2.X && rat->Point2.Y == i->pad->Point2.Y) ||
+		(rat->Point2.X == (i->pad->Point1.X + i->pad->Point2.X) / 2 &&
+		 rat->Point2.Y == (i->pad->Point1.Y + i->pad->Point2.Y) / 2)))
         {
-          if (ADD_RAT_TO_LIST (rat))
+          if (ADD_RAT_TO_LIST (rat, i->flag))
             longjmp (i->env, 1);
         }
     }
@@ -2281,12 +2099,12 @@ LOCtoPadRat_callback (const BoxType * b, void *cl)
 static int
 LOCtoPadPad_callback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
-  if (!TEST_FLAG (TheFlag, pad) && i->layer ==
+  if (!TEST_FLAG (i->flag, pad) && i->layer ==
       (TEST_FLAG (ONSOLDERFLAG, pad) ? SOLDER_LAYER : COMPONENT_LAYER)
-      && PadPadIntersect (pad, &i->pad) && ADD_PAD_TO_LIST (i->layer, pad))
+      && PadPadIntersect (pad, i->pad) && ADD_PAD_TO_LIST (i->layer, pad, i->flag))
     longjmp (i->env, 1);
   return 0;
 }
@@ -2296,49 +2114,58 @@ LOCtoPadPad_callback (const BoxType * b, void *cl)
  * layergroup. All found connections are added to the list
  */
 static bool
-LookupLOConnectionsToPad (PadTypePtr Pad, Cardinal LayerGroup)
+LookupLOConnectionsToPad (PadType *Pad, Cardinal LayerGroup, int flag, bool AndRats)
 {
   Cardinal entry;
   struct lo_info info;
+  BoxType search_box;
 
   if (!TEST_FLAG (SQUAREFLAG, Pad))
-    return (LookupLOConnectionsToLine ((LineTypePtr) Pad, LayerGroup, false));
+    return (LookupLOConnectionsToLine ((LineType *) Pad, LayerGroup, flag, false, AndRats));
+
+  info.flag = flag;
+  info.pad = Pad;
+  search_box = expand_bounds ((BoxType *)info.pad);
 
-  info.pad = *Pad;
-  EXPAND_BOUNDS (&info.pad);
   /* add the new rat lines */
   info.layer = LayerGroup;
-  if (setjmp (info.env) == 0)
-    r_search (PCB->Data->rat_tree, &info.pad.BoundingBox, NULL,
-              LOCtoPadRat_callback, &info);
-  else
-    return true;
+
+  if (AndRats)
+    {
+      if (setjmp (info.env) == 0)
+        r_search (PCB->Data->rat_tree, &search_box, NULL,
+                  LOCtoPadRat_callback, &info);
+      else
+        return true;
+    }
 
   /* loop over all layers of the group */
   for (entry = 0; entry < PCB->LayerGroups.Number[LayerGroup]; entry++)
     {
-      Cardinal layer;
+      Cardinal layer_no;
+      LayerType *layer;
 
-      layer = PCB->LayerGroups.Entries[LayerGroup][entry];
+      layer_no = PCB->LayerGroups.Entries[LayerGroup][entry];
+      layer = LAYER_PTR (layer_no);
       /* handle normal layers */
-      if (layer < max_copper_layer)
+      if (layer_no < max_copper_layer)
         {
-          info.layer = layer;
+          info.layer = layer_no;
           /* add lines */
           if (setjmp (info.env) == 0)
-            r_search (LAYER_PTR (layer)->line_tree, &info.pad.BoundingBox,
+            r_search (layer->line_tree, &search_box,
                       NULL, LOCtoPadLine_callback, &info);
           else
             return true;
           /* add arcs */
           if (setjmp (info.env) == 0)
-            r_search (LAYER_PTR (layer)->arc_tree, &info.pad.BoundingBox,
+            r_search (layer->arc_tree, &search_box,
                       NULL, LOCtoPadArc_callback, &info);
           else
             return true;
           /* add polygons */
           if (setjmp (info.env) == 0)
-            r_search (LAYER_PTR (layer)->polygon_tree, &info.pad.BoundingBox,
+            r_search (layer->polygon_tree, &search_box,
                       NULL, LOCtoPadPoly_callback, &info);
           else
             return true;
@@ -2346,9 +2173,9 @@ LookupLOConnectionsToPad (PadTypePtr Pad, Cardinal LayerGroup)
       else
         {
           /* handle special 'pad' layers */
-          info.layer = layer - max_copper_layer;
+          info.layer = layer_no - max_copper_layer;
           if (setjmp (info.env) == 0)
-            r_search (PCB->Data->pad_tree, (BoxType *) & info.pad, NULL,
+            r_search (PCB->Data->pad_tree, &search_box, NULL,
                       LOCtoPadPad_callback, &info);
           else
             return true;
@@ -2361,12 +2188,12 @@ LookupLOConnectionsToPad (PadTypePtr Pad, Cardinal LayerGroup)
 static int
 LOCtoPolyLine_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
-  if (!TEST_FLAG (TheFlag, line) && IsLineInPolygon (line, &i->polygon))
+  if (!TEST_FLAG (i->flag, line) && IsLineInPolygon (line, i->polygon))
     {
-      if (ADD_LINE_TO_LIST (i->layer, line))
+      if (ADD_LINE_TO_LIST (i->layer, line, i->flag))
         longjmp (i->env, 1);
     }
   return 0;
@@ -2375,14 +2202,14 @@ LOCtoPolyLine_callback (const BoxType * b, void *cl)
 static int
 LOCtoPolyArc_callback (const BoxType * b, void *cl)
 {
-  ArcTypePtr arc = (ArcTypePtr) b;
+  ArcType *arc = (ArcType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!arc->Thickness)
     return 0;
-  if (!TEST_FLAG (TheFlag, arc) && IsArcInPolygon (arc, &i->polygon))
+  if (!TEST_FLAG (i->flag, arc) && IsArcInPolygon (arc, i->polygon))
     {
-      if (ADD_ARC_TO_LIST (i->layer, arc))
+      if (ADD_ARC_TO_LIST (i->layer, arc, i->flag))
         longjmp (i->env, 1);
     }
   return 0;
@@ -2391,14 +2218,14 @@ LOCtoPolyArc_callback (const BoxType * b, void *cl)
 static int
 LOCtoPolyPad_callback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
-  if (!TEST_FLAG (TheFlag, pad) && i->layer ==
+  if (!TEST_FLAG (i->flag, pad) && i->layer ==
       (TEST_FLAG (ONSOLDERFLAG, pad) ? SOLDER_LAYER : COMPONENT_LAYER)
-      && IsPadInPolygon (pad, &i->polygon))
+      && IsPadInPolygon (pad, i->polygon))
     {
-      if (ADD_PAD_TO_LIST (i->layer, pad))
+      if (ADD_PAD_TO_LIST (i->layer, pad, i->flag))
         longjmp (i->env, 1);
     }
   return 0;
@@ -2407,18 +2234,18 @@ LOCtoPolyPad_callback (const BoxType * b, void *cl)
 static int
 LOCtoPolyRat_callback (const BoxType * b, void *cl)
 {
-  RatTypePtr rat = (RatTypePtr) b;
+  RatType *rat = (RatType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
-  if (!TEST_FLAG (TheFlag, rat))
+  if (!TEST_FLAG (i->flag, rat))
     {
-      if ((rat->Point1.X == (i->polygon.Clipped->contours->head.point[0]) &&
-           rat->Point1.Y == (i->polygon.Clipped->contours->head.point[1]) &&
+      if ((rat->Point1.X == (i->polygon->Clipped->contours->head.point[0]) &&
+           rat->Point1.Y == (i->polygon->Clipped->contours->head.point[1]) &&
            rat->group1 == i->layer) ||
-          (rat->Point2.X == (i->polygon.Clipped->contours->head.point[0]) &&
-           rat->Point2.Y == (i->polygon.Clipped->contours->head.point[1]) &&
+          (rat->Point2.X == (i->polygon->Clipped->contours->head.point[0]) &&
+           rat->Point2.Y == (i->polygon->Clipped->contours->head.point[1]) &&
            rat->group2 == i->layer))
-        if (ADD_RAT_TO_LIST (rat))
+        if (ADD_RAT_TO_LIST (rat, i->flag))
           longjmp (i->env, 1);
     }
   return 0;
@@ -2430,65 +2257,74 @@ LOCtoPolyRat_callback (const BoxType * b, void *cl)
  * on the given layergroup. All found connections are added to the list
  */
 static bool
-LookupLOConnectionsToPolygon (PolygonTypePtr Polygon, Cardinal LayerGroup)
+LookupLOConnectionsToPolygon (PolygonType *Polygon, Cardinal LayerGroup, int flag, bool AndRats)
 {
   Cardinal entry;
   struct lo_info info;
+  BoxType search_box;
 
   if (!Polygon->Clipped)
     return false;
-  info.polygon = *Polygon;
-  EXPAND_BOUNDS (&info.polygon);
+
+  info.flag = flag;
+  info.polygon = Polygon;
+  search_box = expand_bounds ((BoxType *)info.polygon);
+
   info.layer = LayerGroup;
+
   /* check rats */
-  if (setjmp (info.env) == 0)
-    r_search (PCB->Data->rat_tree, (BoxType *) & info.polygon, NULL,
-              LOCtoPolyRat_callback, &info);
-  else
-    return true;
+  if (AndRats)
+    {
+      if (setjmp (info.env) == 0)
+        r_search (PCB->Data->rat_tree, &search_box, NULL,
+                  LOCtoPolyRat_callback, &info);
+      else
+        return true;
+    }
+
 /* loop over all layers of the group */
   for (entry = 0; entry < PCB->LayerGroups.Number[LayerGroup]; entry++)
     {
-      Cardinal layer;
+      Cardinal layer_no;
+      LayerType *layer;
 
-      layer = PCB->LayerGroups.Entries[LayerGroup][entry];
+      layer_no = PCB->LayerGroups.Entries[LayerGroup][entry];
+      layer = LAYER_PTR (layer_no);
 
       /* handle normal layers */
-      if (layer < max_copper_layer)
+      if (layer_no < max_copper_layer)
         {
           GList *i;
 
           /* check all polygons */
-          for (i = PCB->Data->Layer[layer].Polygon;
-               i != NULL; i = g_list_next (i))
+          for (i = layer->Polygon; i != NULL; i = g_list_next (i))
             {
               PolygonType *polygon = i->data;
-              if (!TEST_FLAG (TheFlag, polygon)
+              if (!TEST_FLAG (flag, polygon)
                   && IsPolygonInPolygon (polygon, Polygon)
-                  && ADD_POLYGON_TO_LIST (layer, polygon))
+                  && ADD_POLYGON_TO_LIST (layer_no, polygon, flag))
                 return true;
             }
 
-          info.layer = layer;
+          info.layer = layer_no;
           /* check all lines */
           if (setjmp (info.env) == 0)
-            r_search (LAYER_PTR (layer)->line_tree,
-                      (BoxType *) & info.polygon, NULL,
-                      LOCtoPolyLine_callback, &info);
+            r_search (layer->line_tree, &search_box,
+                      NULL, LOCtoPolyLine_callback, &info);
           else
             return true;
           /* check all arcs */
           if (setjmp (info.env) == 0)
-            r_search (LAYER_PTR (layer)->arc_tree, (BoxType *) & info.polygon,
+            r_search (layer->arc_tree, &search_box,
                       NULL, LOCtoPolyArc_callback, &info);
           else
             return true;
         }
       else
         {
-          info.layer = layer - max_copper_layer;
+          info.layer = layer_no - max_copper_layer;
           if (setjmp (info.env) == 0)
-            r_search (PCB->Data->pad_tree, (BoxType *) & info.polygon,
+            r_search (PCB->Data->pad_tree, &search_box,
                       NULL, LOCtoPolyPad_callback, &info);
           else
             return true;
@@ -2505,10 +2341,10 @@ LookupLOConnectionsToPolygon (PolygonTypePtr Polygon, Cardinal LayerGroup)
  * - check the two end points of the arc. If none of them matches
  * - check all segments of the polygon against the arc.
  */
-bool
-IsArcInPolygon (ArcTypePtr Arc, PolygonTypePtr Polygon)
+static bool
+IsArcInPolygon (ArcType *Arc, PolygonType *Polygon)
 {
-  BoxTypePtr Box = (BoxType *) Arc;
+  BoxType *Box = (BoxType *) Arc;
 
   /* arcs with clearance never touch polys */
   if (TEST_FLAG (CLEARPOLYFLAG, Polygon) && TEST_FLAG (CLEARLINEFLAG, Arc))
@@ -2537,10 +2373,10 @@ IsArcInPolygon (ArcTypePtr Arc, PolygonTypePtr Polygon)
  * - check the two end points of the line. If none of them matches
  * - check all segments of the polygon against the line.
  */
-bool
-IsLineInPolygon (LineTypePtr Line, PolygonTypePtr Polygon)
+static bool
+IsLineInPolygon (LineType *Line, PolygonType *Polygon)
 {
-  BoxTypePtr Box = (BoxType *) Line;
+  BoxType *Box = (BoxType *) Line;
   POLYAREA *lp;
 
   /* lines with clearance never touch polygons */
@@ -2576,10 +2412,10 @@ IsLineInPolygon (LineTypePtr Line, PolygonTypePtr Polygon)
  *
  * The polygon is assumed to already have been proven non-clearing
  */
-bool
-IsPadInPolygon (PadTypePtr pad, PolygonTypePtr polygon)
+static bool
+IsPadInPolygon (PadType *pad, PolygonType *polygon)
 {
-    return IsLineInPolygon ((LineTypePtr) pad, polygon);
+    return IsLineInPolygon ((LineType *) pad, polygon);
 }
 
 /* ---------------------------------------------------------------------------
@@ -2588,8 +2424,8 @@ IsPadInPolygon (PadTypePtr pad, PolygonTypePtr polygon)
  * First check all points out of P1 against P2 and vice versa.
  * If both fail check all lines of P1 against the ones of P2
  */
-bool
-IsPolygonInPolygon (PolygonTypePtr P1, PolygonTypePtr P2)
+static bool
+IsPolygonInPolygon (PolygonType *P1, PolygonType *P2)
 {
   if (!P1->Clipped || !P2->Clipped)
     return false;
@@ -2647,7 +2483,7 @@ IsPolygonInPolygon (PolygonTypePtr P1, PolygonTypePtr P2)
  * writes the several names of an element to a file
  */
 static void
-PrintElementNameList (ElementTypePtr Element, FILE * FP)
+PrintElementNameList (ElementType *Element, FILE * FP)
 {
   static DynamicStringType cname, pname, vname;
 
@@ -2661,7 +2497,7 @@ PrintElementNameList (ElementTypePtr Element, FILE * FP)
  * writes the several names of an element to a file
  */
 static void
-PrintConnectionElementName (ElementTypePtr Element, FILE * FP)
+PrintConnectionElementName (ElementType *Element, FILE * FP)
 {
   fputs ("Element", FP);
   PrintElementNameList (Element, FP);
@@ -2672,7 +2508,7 @@ PrintConnectionElementName (ElementTypePtr Element, FILE * FP)
  * prints one {pin,pad,via}/element entry of connection lists
  */
 static void
-PrintConnectionListEntry (char *ObjName, ElementTypePtr Element,
+PrintConnectionListEntry (char *ObjName, ElementType *Element,
                           bool FirstOne, FILE * FP)
 {
   static DynamicStringType oname;
@@ -2698,7 +2534,7 @@ static void
 PrintPadConnections (Cardinal Layer, FILE * FP, bool IsFirst)
 {
   Cardinal i;
-  PadTypePtr ptr;
+  PadType *ptr;
 
   if (!PadList[Layer].Number)
     return;
@@ -2720,7 +2556,7 @@ PrintPadConnections (Cardinal Layer, FILE * FP, bool IsFirst)
     {
       ptr = PADLIST_ENTRY (Layer, i);
       if (ptr != NULL)
-        PrintConnectionListEntry ((char *)EMPTY (ptr->Name), (ElementTypePtr)ptr->Element, false, FP);
+        PrintConnectionListEntry ((char *)EMPTY (ptr->Name), (ElementType *)ptr->Element, false, FP);
       else
         printf ("Skipping NULL ptr in 2nd part of PrintPadConnections\n");
     }
@@ -2734,7 +2570,7 @@ static void
 PrintPinConnections (FILE * FP, bool IsFirst)
 {
   Cardinal i;
-  PinTypePtr pv;
+  PinType *pv;
 
   if (!PVList.Number)
     return;
@@ -2753,7 +2589,7 @@ PrintPinConnections (FILE * FP, bool IsFirst)
     {
       /* get the elements name or assume that its a via */
       pv = PVLIST_ENTRY (i);
-      PrintConnectionListEntry ((char *)EMPTY (pv->Name), (ElementTypePtr)pv->Element, false, FP);
+      PrintConnectionListEntry ((char *)EMPTY (pv->Name), (ElementType *)pv->Element, false, FP);
     }
 }
 
@@ -2770,9 +2606,10 @@ ListsEmpty (bool AndRats)
   if (AndRats)
     empty = empty && (RatList.Location >= RatList.Number);
   for (i = 0; i < max_copper_layer && empty; i++)
-    empty = empty && LineList[i].Location >= LineList[i].Number
-      && ArcList[i].Location >= ArcList[i].Number
-      && PolygonList[i].Location >= PolygonList[i].Number;
+    if (!LAYER_PTR (i)->no_drc)
+      empty = empty && LineList[i].Location >= LineList[i].Number
+        && ArcList[i].Location >= ArcList[i].Number
+        && PolygonList[i].Location >= PolygonList[i].Number;
   return (empty);
 }
 
@@ -2783,7 +2620,7 @@ reassign_no_drc_flags (void)
 
   for (layer = 0; layer < max_copper_layer; layer++)
     {
-      LayerTypePtr l = LAYER_PTR (layer);
+      LayerType *l = LAYER_PTR (layer);
       l->no_drc = AttributeGet (l, "PCB::skip-drc") != NULL;
     }
 }
@@ -2795,7 +2632,7 @@ reassign_no_drc_flags (void)
  * loops till no more connections are found 
  */
 static bool
-DoIt (bool AndRats, bool AndDraw)
+DoIt (int flag, bool AndRats, bool AndDraw)
 {
   bool newone = false;
   reassign_no_drc_flags ();
@@ -2804,10 +2641,10 @@ DoIt (bool AndRats, bool AndDraw)
       /* lookup connections; these are the steps (2) to (4)
        * from the description
        */
-      newone = LookupPVConnectionsToPVList () ||
-               LookupLOConnectionsToPVList (AndRats) ||
-               LookupLOConnectionsToLOList (AndRats) ||
-               LookupPVConnectionsToLOList (AndRats);
+      newone = LookupPVConnectionsToPVList (flag) ||
+               LookupLOConnectionsToPVList (flag, AndRats) ||
+               LookupLOConnectionsToLOList (flag, AndRats) ||
+               LookupPVConnectionsToLOList (flag, AndRats);
       if (AndDraw)
         DrawNewConnections ();
     }
@@ -2817,26 +2654,11 @@ DoIt (bool AndRats, bool AndDraw)
   return (newone);
 }
 
-/* returns true if nothing un-found touches the passed line
- * returns false if it would touch something not yet found
- * doesn't include rat-lines in the search
- */
-
-bool
-lineClear (LineTypePtr line, Cardinal group)
-{
-  if (LOTouchesLine (line, group))
-    return (false);
-  if (PVTouchesLine (line))
-    return (false);
-  return (true);
-}
-
 /* ---------------------------------------------------------------------------
  * prints all unused pins of an element to file FP
  */
 static bool
-PrintAndSelectUnusedPinsAndPadsOfElement (ElementTypePtr Element, FILE * FP)
+PrintAndSelectUnusedPinsAndPadsOfElement (ElementType *Element, FILE * FP, int flag)
 {
   bool first = true;
   Cardinal number;
@@ -2849,12 +2671,12 @@ PrintAndSelectUnusedPinsAndPadsOfElement (ElementTypePtr Element, FILE * FP)
     if (!TEST_FLAG (HOLEFLAG, pin))
       {
         /* pin might have bee checked before, add to list if not */
-        if (!TEST_FLAG (TheFlag, pin) && FP)
+        if (!TEST_FLAG (flag, pin) && FP)
           {
             int i;
-            if (ADD_PV_TO_LIST (pin))
+            if (ADD_PV_TO_LIST (pin, flag))
               return true;
-            DoIt (true, true);
+            DoIt (flag, true, true);
             number = PadList[COMPONENT_LAYER].Number
               + PadList[SOLDER_LAYER].Number + PVList.Number;
             /* the pin has no connection if it's the only
@@ -2892,13 +2714,13 @@ PrintAndSelectUnusedPinsAndPadsOfElement (ElementTypePtr Element, FILE * FP)
   {
     /* lookup pad in list */
     /* pad might has bee checked before, add to list if not */
-    if (!TEST_FLAG (TheFlag, pad) && FP)
+    if (!TEST_FLAG (flag, pad) && FP)
       {
         int i;
         if (ADD_PAD_TO_LIST (TEST_FLAG (ONSOLDERFLAG, pad)
-                             ? SOLDER_LAYER : COMPONENT_LAYER, pad))
+                             ? SOLDER_LAYER : COMPONENT_LAYER, pad, flag))
           return true;
-        DoIt (true, true);
+        DoIt (flag, true, true);
         number = PadList[COMPONENT_LAYER].Number
           + PadList[SOLDER_LAYER].Number + PVList.Number;
         /* the pin has no connection if it's the only
@@ -2972,7 +2794,7 @@ PrepareNextLoop (FILE * FP)
  * Returns true if operation was aborted
  */
 static bool
-PrintElementConnections (ElementTypePtr Element, FILE * FP, bool AndDraw)
+PrintElementConnections (ElementType *Element, FILE * FP, int flag, bool AndDraw)
 {
   PrintConnectionElementName (Element, FP);
 
@@ -2980,15 +2802,15 @@ PrintElementConnections (ElementTypePtr Element, FILE * FP, bool AndDraw)
   PIN_LOOP (Element);
   {
     /* pin might have been checked before, add to list if not */
-    if (TEST_FLAG (TheFlag, pin))
+    if (TEST_FLAG (flag, pin))
       {
         PrintConnectionListEntry ((char *)EMPTY (pin->Name), NULL, true, FP);
         fputs ("\t\t__CHECKED_BEFORE__\n\t}\n", FP);
         continue;
       }
-    if (ADD_PV_TO_LIST (pin))
+    if (ADD_PV_TO_LIST (pin, flag))
       return true;
-    DoIt (true, AndDraw);
+    DoIt (flag, true, AndDraw);
     /* printout all found connections */
     PrintPinConnections (FP, true);
     PrintPadConnections (COMPONENT_LAYER, FP, false);
@@ -3004,16 +2826,16 @@ PrintElementConnections (ElementTypePtr Element, FILE * FP, bool AndDraw)
   {
     Cardinal layer;
     /* pad might have been checked before, add to list if not */
-    if (TEST_FLAG (TheFlag, pad))
+    if (TEST_FLAG (flag, pad))
       {
         PrintConnectionListEntry ((char *)EMPTY (pad->Name), NULL, true, FP);
         fputs ("\t\t__CHECKED_BEFORE__\n\t}\n", FP);
         continue;
       }
     layer = TEST_FLAG (ONSOLDERFLAG, pad) ? SOLDER_LAYER : COMPONENT_LAYER;
-    if (ADD_PAD_TO_LIST (layer, pad))
+    if (ADD_PAD_TO_LIST (layer, pad, flag))
       return true;
-    DoIt (true, AndDraw);
+    DoIt (flag, true, AndDraw);
     /* print all found connections */
     PrintPadConnections (layer, FP, true);
     PrintPadConnections (layer ==
@@ -3082,7 +2904,7 @@ DrawNewConnections (void)
    */
   while (PVList.DrawLocation < PVList.Number)
     {
-      PinTypePtr pv = PVLIST_ENTRY (PVList.DrawLocation);
+      PinType *pv = PVLIST_ENTRY (PVList.DrawLocation);
 
       if (TEST_FLAG (PINFLAG, pv))
         {
@@ -3107,14 +2929,13 @@ DrawNewConnections (void)
  * find all connections to pins within one element
  */
 void
-LookupElementConnections (ElementTypePtr Element, FILE * FP)
+LookupElementConnections (ElementType *Element, FILE * FP)
 {
   /* reset all currently marked connections */
   User = true;
-  TheFlag = FOUNDFLAG;
-  ResetConnections (true);
+  ClearFlagOnAllObjects (true, FOUNDFLAG);
   InitConnectionLookup ();
-  PrintElementConnections (Element, FP, true);
+  PrintElementConnections (Element, FP, FOUNDFLAG, true);
   SetChangedFlag (true);
   if (Settings.RingBellWhenFinished)
     gui->beep ();
@@ -3132,23 +2953,22 @@ LookupConnectionsToAllElements (FILE * FP)
 {
   /* reset all currently marked connections */
   User = false;
-  TheFlag = FOUNDFLAG;
-  ResetConnections (false);
+  ClearFlagOnAllObjects (false, FOUNDFLAG);
   InitConnectionLookup ();
 
   ELEMENT_LOOP (PCB->Data);
   {
     /* break if abort dialog returned true */
-    if (PrintElementConnections (element, FP, false))
+    if (PrintElementConnections (element, FP, FOUNDFLAG, false))
       break;
     SEPARATE (FP);
     if (Settings.ResetAfterElement && n != 1)
-      ResetConnections (false);
+      ClearFlagOnAllObjects (false, FOUNDFLAG);
   }
   END_LOOP;
   if (Settings.RingBellWhenFinished)
     gui->beep ();
-  ResetConnections (false);
+  ClearFlagOnAllObjects (false, FOUNDFLAG);
   FreeConnectionLookupMemory ();
   Redraw ();
 }
@@ -3157,7 +2977,7 @@ LookupConnectionsToAllElements (FILE * FP)
  * add the starting object to the list of found objects
  */
 static bool
-ListStart (int type, void *ptr1, void *ptr2, void *ptr3)
+ListStart (int type, void *ptr1, void *ptr2, void *ptr3, int flag)
 {
   DumpList ();
   switch (type)
@@ -3165,14 +2985,14 @@ ListStart (int type, void *ptr1, void *ptr2, void *ptr3)
     case PIN_TYPE:
     case VIA_TYPE:
       {
-        if (ADD_PV_TO_LIST ((PinTypePtr) ptr2))
+        if (ADD_PV_TO_LIST ((PinType *) ptr2, flag))
           return true;
         break;
       }
 
     case RATLINE_TYPE:
       {
-        if (ADD_RAT_TO_LIST ((RatTypePtr) ptr1))
+        if (ADD_RAT_TO_LIST ((RatType *) ptr1, flag))
           return true;
         break;
       }
@@ -3180,9 +3000,9 @@ ListStart (int type, void *ptr1, void *ptr2, void *ptr3)
     case LINE_TYPE:
       {
         int layer = GetLayerNumber (PCB->Data,
-                                    (LayerTypePtr) ptr1);
+                                    (LayerType *) ptr1);
 
-        if (ADD_LINE_TO_LIST (layer, (LineTypePtr) ptr2))
+        if (ADD_LINE_TO_LIST (layer, (LineType *) ptr2, flag))
           return true;
         break;
       }
@@ -3190,9 +3010,9 @@ ListStart (int type, void *ptr1, void *ptr2, void *ptr3)
     case ARC_TYPE:
       {
         int layer = GetLayerNumber (PCB->Data,
-                                    (LayerTypePtr) ptr1);
+                                    (LayerType *) ptr1);
 
-        if (ADD_ARC_TO_LIST (layer, (ArcTypePtr) ptr2))
+        if (ADD_ARC_TO_LIST (layer, (ArcType *) ptr2, flag))
           return true;
         break;
       }
@@ -3200,19 +3020,19 @@ ListStart (int type, void *ptr1, void *ptr2, void *ptr3)
     case POLYGON_TYPE:
       {
         int layer = GetLayerNumber (PCB->Data,
-                                    (LayerTypePtr) ptr1);
+                                    (LayerType *) ptr1);
 
-        if (ADD_POLYGON_TO_LIST (layer, (PolygonTypePtr) ptr2))
+        if (ADD_POLYGON_TO_LIST (layer, (PolygonType *) ptr2, flag))
           return true;
         break;
       }
 
     case PAD_TYPE:
       {
-        PadTypePtr pad = (PadTypePtr) ptr2;
+        PadType *pad = (PadType *) ptr2;
         if (ADD_PAD_TO_LIST
             (TEST_FLAG
-             (ONSOLDERFLAG, pad) ? SOLDER_LAYER : COMPONENT_LAYER, pad))
+             (ONSOLDERFLAG, pad) ? SOLDER_LAYER : COMPONENT_LAYER, pad, flag))
           return true;
         break;
       }
@@ -3228,7 +3048,8 @@ ListStart (int type, void *ptr1, void *ptr2, void *ptr3)
  * also the action is marked as undoable if AndDraw is true
  */
 void
-LookupConnection (Coord X, Coord Y, bool AndDraw, Coord Range, int which_flag)
+LookupConnection (Coord X, Coord Y, bool AndDraw, Coord Range, int flag,
+                  bool AndRats)
 {
   void *ptr1, *ptr2, *ptr3;
   char *name;
@@ -3242,37 +3063,33 @@ LookupConnection (Coord X, Coord Y, bool AndDraw, Coord Range, int which_flag)
     = SearchObjectByLocation (LOOKUP_FIRST, &ptr1, &ptr2, &ptr3, X, Y, Range);
   if (type == NO_TYPE)
     {
-      type
-        =
-        SearchObjectByLocation
-        (LOOKUP_MORE, &ptr1, &ptr2, &ptr3, X, Y, Range);
+      type = SearchObjectByLocation (
+        LOOKUP_MORE & ~(AndRats ? 0 : RATLINE_TYPE),
+        &ptr1, &ptr2, &ptr3, X, Y, Range);
       if (type == NO_TYPE)
         return;
       if (type & SILK_TYPE)
         {
           int laynum = GetLayerNumber (PCB->Data,
-                                       (LayerTypePtr) ptr1);
+                                       (LayerType *) ptr1);
 
           /* don't mess with non-conducting objects! */
-          if (laynum >= max_copper_layer || ((LayerTypePtr)ptr1)->no_drc)
+          if (laynum >= max_copper_layer || ((LayerType *)ptr1)->no_drc)
             return;
         }
     }
-  else
-    {
-      name = ConnectionName (type, ptr1, ptr2);
-      hid_actionl ("NetlistShow", name, NULL);
-    }
 
-  TheFlag = which_flag;
+  name = ConnectionName (type, ptr1, ptr2);
+  hid_actionl ("NetlistShow", name, NULL);
+
   User = AndDraw;
   InitConnectionLookup ();
 
   /* now add the object to the appropriate list and start scanning
    * This is step (1) from the description
    */
-  ListStart (type, ptr1, ptr2, ptr3);
-  DoIt (true, AndDraw);
+  ListStart (type, ptr1, ptr2, ptr3, flag);
+  DoIt (flag, AndRats, AndDraw);
   if (User)
     IncrementUndoSerialNumber ();
   User = false;
@@ -3291,12 +3108,12 @@ LookupConnection (Coord X, Coord Y, bool AndDraw, Coord Range, int which_flag)
  */
 void
 RatFindHook (int type, void *ptr1, void *ptr2, void *ptr3,
-             bool undo, bool AndRats)
+             bool undo, int flag, bool AndRats)
 {
   User = undo;
   DumpList ();
-  ListStart (type, ptr1, ptr2, ptr3);
-  DoIt (AndRats, false);
+  ListStart (type, ptr1, ptr2, ptr3, flag);
+  DoIt (flag, AndRats, false);
   User = false;
 }
 
@@ -3308,7 +3125,7 @@ LookupUnusedPins (FILE * FP)
 {
   /* reset all currently marked connections */
   User = true;
-  ResetConnections (true);
+  ClearFlagOnAllObjects (true, FOUNDFLAG);
   InitConnectionLookup ();
 
   ELEMENT_LOOP (PCB->Data);
@@ -3316,7 +3133,7 @@ LookupUnusedPins (FILE * FP)
     /* break if abort dialog returned true;
      * passing NULL as filedescriptor discards the normal output
      */
-    if (PrintAndSelectUnusedPinsAndPadsOfElement (element, FP))
+    if (PrintAndSelectUnusedPinsAndPadsOfElement (element, FP, FOUNDFLAG))
       break;
   }
   END_LOOP;
@@ -3333,17 +3150,17 @@ LookupUnusedPins (FILE * FP)
  * resets all used flags of pins and vias
  */
 bool
-ResetFoundPinsViasAndPads (bool AndDraw)
+ClearFlagOnPinsViasAndPads (bool AndDraw, int flag)
 {
   bool change = false;
 
   VIA_LOOP (PCB->Data);
   {
-    if (TEST_FLAG (TheFlag, via))
+    if (TEST_FLAG (flag, via))
       {
         if (AndDraw)
           AddObjectToFlagUndoList (VIA_TYPE, via, via, via);
-        CLEAR_FLAG (TheFlag, via);
+        CLEAR_FLAG (flag, via);
         if (AndDraw)
           DrawVia (via);
         change = true;
@@ -3354,11 +3171,11 @@ ResetFoundPinsViasAndPads (bool AndDraw)
   {
     PIN_LOOP (element);
     {
-      if (TEST_FLAG (TheFlag, pin))
+      if (TEST_FLAG (flag, pin))
         {
           if (AndDraw)
             AddObjectToFlagUndoList (PIN_TYPE, element, pin, pin);
-          CLEAR_FLAG (TheFlag, pin);
+          CLEAR_FLAG (flag, pin);
           if (AndDraw)
             DrawPin (pin);
           change = true;
@@ -3367,11 +3184,11 @@ ResetFoundPinsViasAndPads (bool AndDraw)
     END_LOOP;
     PAD_LOOP (element);
     {
-      if (TEST_FLAG (TheFlag, pad))
+      if (TEST_FLAG (flag, pad))
         {
           if (AndDraw)
             AddObjectToFlagUndoList (PAD_TYPE, element, pad, pad);
-          CLEAR_FLAG (TheFlag, pad);
+          CLEAR_FLAG (flag, pad);
           if (AndDraw)
             DrawPad (pad);
           change = true;
@@ -3389,17 +3206,17 @@ ResetFoundPinsViasAndPads (bool AndDraw)
  * resets all used flags of LOs
  */
 bool
-ResetFoundLinesAndPolygons (bool AndDraw)
+ClearFlagOnLinesAndPolygons (bool AndDraw, int flag)
 {
   bool change = false;
 
   RAT_LOOP (PCB->Data);
   {
-    if (TEST_FLAG (TheFlag, line))
+    if (TEST_FLAG (flag, line))
       {
         if (AndDraw)
           AddObjectToFlagUndoList (RATLINE_TYPE, line, line, line);
-        CLEAR_FLAG (TheFlag, line);
+        CLEAR_FLAG (flag, line);
         if (AndDraw)
           DrawRat (line);
         change = true;
@@ -3408,11 +3225,11 @@ ResetFoundLinesAndPolygons (bool AndDraw)
   END_LOOP;
   COPPERLINE_LOOP (PCB->Data);
   {
-    if (TEST_FLAG (TheFlag, line))
+    if (TEST_FLAG (flag, line))
       {
         if (AndDraw)
           AddObjectToFlagUndoList (LINE_TYPE, layer, line, line);
-        CLEAR_FLAG (TheFlag, line);
+        CLEAR_FLAG (flag, line);
         if (AndDraw)
           DrawLine (layer, line);
         change = true;
@@ -3421,11 +3238,11 @@ ResetFoundLinesAndPolygons (bool AndDraw)
   ENDALL_LOOP;
   COPPERARC_LOOP (PCB->Data);
   {
-    if (TEST_FLAG (TheFlag, arc))
+    if (TEST_FLAG (flag, arc))
       {
         if (AndDraw)
           AddObjectToFlagUndoList (ARC_TYPE, layer, arc, arc);
-        CLEAR_FLAG (TheFlag, arc);
+        CLEAR_FLAG (flag, arc);
         if (AndDraw)
           DrawArc (layer, arc);
         change = true;
@@ -3434,11 +3251,11 @@ ResetFoundLinesAndPolygons (bool AndDraw)
   ENDALL_LOOP;
   COPPERPOLYGON_LOOP (PCB->Data);
   {
-    if (TEST_FLAG (TheFlag, polygon))
+    if (TEST_FLAG (flag, polygon))
       {
         if (AndDraw)
           AddObjectToFlagUndoList (POLYGON_TYPE, layer, polygon, polygon);
-        CLEAR_FLAG (TheFlag, polygon);
+        CLEAR_FLAG (flag, polygon);
         if (AndDraw)
           DrawPolygon (layer, polygon);
         change = true;
@@ -3454,12 +3271,12 @@ ResetFoundLinesAndPolygons (bool AndDraw)
  * resets all found connections
  */
 bool
-ResetConnections (bool AndDraw)
+ClearFlagOnAllObjects (bool AndDraw, int flag)
 {
   bool change = false;
 
-  change = ResetFoundPinsViasAndPads  (AndDraw) || change;
-  change = ResetFoundLinesAndPolygons (AndDraw) || change;
+  change = ClearFlagOnPinsViasAndPads  (AndDraw, flag) || change;
+  change = ClearFlagOnLinesAndPolygons (AndDraw, flag) || change;
 
   return change;
 }
@@ -3499,6 +3316,11 @@ DumpList (void)
   RatList.DrawLocation = 0;
 }
 
+struct drc_info
+{
+  int flag;
+};
+
 /*-----------------------------------------------------------------------------
  * Check for DRC violations on a single net starting from the pad or pin
  * sees if the connectivity changes when everything is bloated, or shrunk
@@ -3511,37 +3333,33 @@ DRCFind (int What, void *ptr1, void *ptr2, void *ptr3)
   long int *object_id_list;
   int *object_type_list;
   DrcViolationType *violation;
+  int flag;
 
   if (PCB->Shrink != 0)
     {
       Bloat = -PCB->Shrink;
-      TheFlag = DRCFLAG | SELECTEDFLAG;
-      ListStart (What, ptr1, ptr2, ptr3);
-      DoIt (true, false);
+      ListStart (What, ptr1, ptr2, ptr3, DRCFLAG | SELECTEDFLAG);
+      DoIt (DRCFLAG | SELECTEDFLAG, true, false);
       /* ok now the shrunk net has the SELECTEDFLAG set */
       DumpList ();
-      TheFlag = FOUNDFLAG;
-      ListStart (What, ptr1, ptr2, ptr3);
+      ListStart (What, ptr1, ptr2, ptr3, FOUNDFLAG);
       Bloat = 0;
       drc = true;               /* abort the search if we find anything not already found */
-      if (DoIt (true, false))
+      if (DoIt (FOUNDFLAG, true, false))
         {
           DumpList ();
           /* make the flag changes undoable */
-          TheFlag = FOUNDFLAG | SELECTEDFLAG;
-          ResetConnections (false);
+          ClearFlagOnAllObjects (false, FOUNDFLAG | SELECTEDFLAG);
           User = true;
           drc = false;
           Bloat = -PCB->Shrink;
-          TheFlag = SELECTEDFLAG;
-          ListStart (What, ptr1, ptr2, ptr3);
-          DoIt (true, true);
+          ListStart (What, ptr1, ptr2, ptr3, SELECTEDFLAG);
+          DoIt (SELECTEDFLAG, true, true);
           DumpList ();
-          ListStart (What, ptr1, ptr2, ptr3);
-          TheFlag = FOUNDFLAG;
+          ListStart (What, ptr1, ptr2, ptr3, FOUNDFLAG);
           Bloat = 0;
           drc = true;
-          DoIt (true, true);
+          DoIt (FOUNDFLAG, true, true);
           DumpList ();
           User = false;
           drc = false;
@@ -3573,29 +3391,30 @@ DRCFind (int What, void *ptr1, void *ptr2, void *ptr3)
     }
   /* now check the bloated condition */
   drc = false;
-  ResetConnections (false);
-  TheFlag = FOUNDFLAG;
-  ListStart (What, ptr1, ptr2, ptr3);
+  ClearFlagOnAllObjects (false, FOUNDFLAG | SELECTEDFLAG);
+  Bloat = 0;
+  ListStart (What, ptr1, ptr2, ptr3, SELECTEDFLAG);
+  DoIt (SELECTEDFLAG, true, false);
+  DumpList ();
+  flag = FOUNDFLAG;
+  ListStart (What, ptr1, ptr2, ptr3, flag);
   Bloat = PCB->Bloat;
   drc = true;
-  while (DoIt (true, false))
+  while (DoIt (flag, true, false))
     {
       DumpList ();
       /* make the flag changes undoable */
-      TheFlag = FOUNDFLAG | SELECTEDFLAG;
-      ResetConnections (false);
+      ClearFlagOnAllObjects (false, FOUNDFLAG | SELECTEDFLAG);
       User = true;
       drc = false;
       Bloat = 0;
-      TheFlag = SELECTEDFLAG;
-      ListStart (What, ptr1, ptr2, ptr3);
-      DoIt (true, true);
+      ListStart (What, ptr1, ptr2, ptr3, SELECTEDFLAG);
+      DoIt (SELECTEDFLAG, true, true);
       DumpList ();
-      TheFlag = FOUNDFLAG;
-      ListStart (What, ptr1, ptr2, ptr3);
+      ListStart (What, ptr1, ptr2, ptr3, FOUNDFLAG);
       Bloat = PCB->Bloat;
       drc = true;
-      DoIt (true, true);
+      DoIt (FOUNDFLAG, true, true);
       DumpList ();
       drcerr_count++;
       LocateError (&x, &y);
@@ -3622,47 +3441,28 @@ DRCFind (int What, void *ptr1, void *ptr2, void *ptr3)
       IncrementUndoSerialNumber ();
       Undo (true);
       /* highlight the rest of the encroaching net so it's not reported again */
-      TheFlag |= SELECTEDFLAG;
+      flag = FOUNDFLAG | SELECTEDFLAG;
       Bloat = 0;
-      ListStart (thing_type, thing_ptr1, thing_ptr2, thing_ptr3);
-      DoIt (true, true);
+      ListStart (thing_type, thing_ptr1, thing_ptr2, thing_ptr3, flag);
+      DoIt (flag, true, true);
       DumpList ();
       drc = true;
       Bloat = PCB->Bloat;
-      ListStart (What, ptr1, ptr2, ptr3);
+      ListStart (What, ptr1, ptr2, ptr3, flag);
     }
   drc = false;
   DumpList ();
-  TheFlag = FOUNDFLAG | SELECTEDFLAG;
-  ResetConnections (false);
+  ClearFlagOnAllObjects (false, FOUNDFLAG | SELECTEDFLAG);
   return (false);
 }
 
-/*----------------------------------------------------------------------------
- * set up a temporary flag to use
- */
-void
-SaveFindFlag (int NewFlag)
-{
-  OldFlag = TheFlag;
-  TheFlag = NewFlag;
-}
-
-/*----------------------------------------------------------------------------
- * restore flag
- */
-void
-RestoreFindFlag (void)
-{
-  TheFlag = OldFlag;
-}
-
 /* DRC clearance callback */
 
 static int
-drc_callback (DataTypePtr data, LayerTypePtr layer, PolygonTypePtr polygon,
-              int type, void *ptr1, void *ptr2)
+drc_callback (DataType *data, LayerType *layer, PolygonType *polygon,
+              int type, void *ptr1, void *ptr2, void *userdata)
 {
+  struct drc_info *i = (struct drc_info *) userdata;
   char *message;
   Coord x, y;
   int object_count;
@@ -3670,22 +3470,20 @@ drc_callback (DataTypePtr data, LayerTypePtr layer, PolygonTypePtr polygon,
   int *object_type_list;
   DrcViolationType *violation;
 
-  LineTypePtr line = (LineTypePtr) ptr2;
-  ArcTypePtr arc = (ArcTypePtr) ptr2;
-  PinTypePtr pin = (PinTypePtr) ptr2;
-  PadTypePtr pad = (PadTypePtr) ptr2;
+  LineType *line = (LineType *) ptr2;
+  ArcType *arc = (ArcType *) ptr2;
+  PinType *pin = (PinType *) ptr2;
+  PadType *pad = (PadType *) ptr2;
+
+  SetThing (type, ptr1, ptr2, ptr2);
 
-  thing_type = type;
-  thing_ptr1 = ptr1;
-  thing_ptr2 = ptr2;
-  thing_ptr3 = ptr2;
   switch (type)
     {
     case LINE_TYPE:
       if (line->Clearance < 2 * PCB->Bloat)
         {
           AddObjectToFlagUndoList (type, ptr1, ptr2, ptr2);
-          SET_FLAG (TheFlag, line);
+          SET_FLAG (i->flag, line);
           message = _("Line with insufficient clearance inside polygon\n");
           goto doIsBad;
         }
@@ -3694,7 +3492,7 @@ drc_callback (DataTypePtr data, LayerTypePtr layer, PolygonTypePtr polygon,
       if (arc->Clearance < 2 * PCB->Bloat)
         {
           AddObjectToFlagUndoList (type, ptr1, ptr2, ptr2);
-          SET_FLAG (TheFlag, arc);
+          SET_FLAG (i->flag, arc);
           message = _("Arc with insufficient clearance inside polygon\n");
           goto doIsBad;
         }
@@ -3704,7 +3502,7 @@ drc_callback (DataTypePtr data, LayerTypePtr layer, PolygonTypePtr polygon,
 	if (IsPadInPolygon(pad,polygon))
 	  {
 	    AddObjectToFlagUndoList (type, ptr1, ptr2, ptr2);
-	    SET_FLAG (TheFlag, pad);
+	    SET_FLAG (i->flag, pad);
 	    message = _("Pad with insufficient clearance inside polygon\n");
 	    goto doIsBad;
 	  }
@@ -3713,7 +3511,7 @@ drc_callback (DataTypePtr data, LayerTypePtr layer, PolygonTypePtr polygon,
       if (pin->Clearance && pin->Clearance < 2 * PCB->Bloat)
         {
           AddObjectToFlagUndoList (type, ptr1, ptr2, ptr2);
-          SET_FLAG (TheFlag, pin);
+          SET_FLAG (i->flag, pin);
           message = _("Pin with insufficient clearance inside polygon\n");
           goto doIsBad;
         }
@@ -3722,7 +3520,7 @@ drc_callback (DataTypePtr data, LayerTypePtr layer, PolygonTypePtr polygon,
       if (pin->Clearance && pin->Clearance < 2 * PCB->Bloat)
         {
           AddObjectToFlagUndoList (type, ptr1, ptr2, ptr2);
-          SET_FLAG (TheFlag, pin);
+          SET_FLAG (i->flag, pin);
           message = _("Via with insufficient clearance inside polygon\n");
           goto doIsBad;
         }
@@ -3755,11 +3553,10 @@ doIsBad:
   pcb_drc_violation_free (violation);
   free (object_id_list);
   free (object_type_list);
+
   if (!throw_drc_dialog())
-    {
-      IsBad = true;
-      return 1;
-    }
+    return 1;
+
   IncrementUndoSerialNumber ();
   Undo (true);
   return 0;
@@ -3779,6 +3576,8 @@ DRCAll (void)
   DrcViolationType *violation;
   int tmpcnt;
   int nopastecnt = 0;
+  bool IsBad;
+  struct drc_info info;
 
   reset_drc_dialog_message();
 
@@ -3789,9 +3588,7 @@ DRCAll (void)
   hid_action ("LayersChanged");
   InitConnectionLookup ();
 
-  TheFlag = FOUNDFLAG | DRCFLAG | SELECTEDFLAG;
-
-  if (ResetConnections (true))
+  if (ClearFlagOnAllObjects (true, FOUNDFLAG | DRCFLAG | SELECTEDFLAG))
     {
       IncrementUndoSerialNumber ();
       Draw ();
@@ -3844,22 +3641,23 @@ DRCAll (void)
   }
   END_LOOP;
 
-  TheFlag = (IsBad) ? DRCFLAG : (FOUNDFLAG | DRCFLAG | SELECTEDFLAG);
-  ResetConnections (false);
-  TheFlag = SELECTEDFLAG;
+  ClearFlagOnAllObjects (false, IsBad ? DRCFLAG : (FOUNDFLAG | DRCFLAG | SELECTEDFLAG));
+  info.flag = SELECTEDFLAG;
   /* check minimum widths and polygon clearances */
   if (!IsBad)
     {
       COPPERLINE_LOOP (PCB->Data);
       {
         /* check line clearances in polygons */
-        PlowsPolygon (PCB->Data, LINE_TYPE, layer, line, drc_callback);
-        if (IsBad)
-          break;
+        if (PlowsPolygon (PCB->Data, LINE_TYPE, layer, line, drc_callback, &info))
+          {
+            IsBad = true;
+            break;
+          }
         if (line->Thickness < PCB->minWid)
           {
             AddObjectToFlagUndoList (LINE_TYPE, layer, line, line);
-            SET_FLAG (TheFlag, line);
+            SET_FLAG (SELECTEDFLAG, line);
             DrawLine (layer, line);
             drcerr_count++;
             SetThing (LINE_TYPE, layer, line, line);
@@ -3895,13 +3693,15 @@ DRCAll (void)
     {
       COPPERARC_LOOP (PCB->Data);
       {
-        PlowsPolygon (PCB->Data, ARC_TYPE, layer, arc, drc_callback);
-        if (IsBad)
-          break;
+        if (PlowsPolygon (PCB->Data, ARC_TYPE, layer, arc, drc_callback, &info))
+          {
+            IsBad = true;
+            break;
+          }
         if (arc->Thickness < PCB->minWid)
           {
             AddObjectToFlagUndoList (ARC_TYPE, layer, arc, arc);
-            SET_FLAG (TheFlag, arc);
+            SET_FLAG (SELECTEDFLAG, arc);
             DrawArc (layer, arc);
             drcerr_count++;
             SetThing (ARC_TYPE, layer, arc, arc);
@@ -3937,14 +3737,16 @@ DRCAll (void)
     {
       ALLPIN_LOOP (PCB->Data);
       {
-        PlowsPolygon (PCB->Data, PIN_TYPE, element, pin, drc_callback);
-        if (IsBad)
-          break;
+        if (PlowsPolygon (PCB->Data, PIN_TYPE, element, pin, drc_callback, &info))
+          {
+            IsBad = true;
+            break;
+          }
         if (!TEST_FLAG (HOLEFLAG, pin) &&
             pin->Thickness - pin->DrillingHole < 2 * PCB->minRing)
           {
             AddObjectToFlagUndoList (PIN_TYPE, element, pin, pin);
-            SET_FLAG (TheFlag, pin);
+            SET_FLAG (SELECTEDFLAG, pin);
             DrawPin (pin);
             drcerr_count++;
             SetThing (PIN_TYPE, element, pin, pin);
@@ -3976,7 +3778,7 @@ DRCAll (void)
         if (pin->DrillingHole < PCB->minDrill)
           {
             AddObjectToFlagUndoList (PIN_TYPE, element, pin, pin);
-            SET_FLAG (TheFlag, pin);
+            SET_FLAG (SELECTEDFLAG, pin);
             DrawPin (pin);
             drcerr_count++;
             SetThing (PIN_TYPE, element, pin, pin);
@@ -4011,13 +3813,15 @@ DRCAll (void)
     {
       ALLPAD_LOOP (PCB->Data);
       {
-        PlowsPolygon (PCB->Data, PAD_TYPE, element, pad, drc_callback);
-        if (IsBad)
-          break;
+        if (PlowsPolygon (PCB->Data, PAD_TYPE, element, pad, drc_callback, &info))
+          {
+            IsBad = true;
+            break;
+          }
         if (pad->Thickness < PCB->minWid)
           {
             AddObjectToFlagUndoList (PAD_TYPE, element, pad, pad);
-            SET_FLAG (TheFlag, pad);
+            SET_FLAG (SELECTEDFLAG, pad);
             DrawPad (pad);
             drcerr_count++;
             SetThing (PAD_TYPE, element, pad, pad);
@@ -4053,14 +3857,16 @@ DRCAll (void)
     {
       VIA_LOOP (PCB->Data);
       {
-        PlowsPolygon (PCB->Data, VIA_TYPE, via, via, drc_callback);
-        if (IsBad)
-          break;
+        if (PlowsPolygon (PCB->Data, VIA_TYPE, via, via, drc_callback, &info))
+          {
+            IsBad = true;
+            break;
+          }
         if (!TEST_FLAG (HOLEFLAG, via) &&
             via->Thickness - via->DrillingHole < 2 * PCB->minRing)
           {
             AddObjectToFlagUndoList (VIA_TYPE, via, via, via);
-            SET_FLAG (TheFlag, via);
+            SET_FLAG (SELECTEDFLAG, via);
             DrawVia (via);
             drcerr_count++;
             SetThing (VIA_TYPE, via, via, via);
@@ -4092,7 +3898,7 @@ DRCAll (void)
         if (via->DrillingHole < PCB->minDrill)
           {
             AddObjectToFlagUndoList (VIA_TYPE, via, via, via);
-            SET_FLAG (TheFlag, via);
+            SET_FLAG (SELECTEDFLAG, via);
             DrawVia (via);
             drcerr_count++;
             SetThing (VIA_TYPE, via, via, via);
@@ -4125,19 +3931,17 @@ DRCAll (void)
     }
 
   FreeConnectionLookupMemory ();
-  TheFlag = FOUNDFLAG;
   Bloat = 0;
 
   /* check silkscreen minimum widths outside of elements */
   /* XXX - need to check text and polygons too! */
-  TheFlag = SELECTEDFLAG;
   if (!IsBad)
     {
       SILKLINE_LOOP (PCB->Data);
       {
         if (line->Thickness < PCB->minSlk)
           {
-            SET_FLAG (TheFlag, line);
+            SET_FLAG (SELECTEDFLAG, line);
             DrawLine (layer, line);
             drcerr_count++;
             SetThing (LINE_TYPE, layer, line, line);
@@ -4170,7 +3974,6 @@ DRCAll (void)
 
   /* check silkscreen minimum widths inside of elements */
   /* XXX - need to check text and polygons too! */
-  TheFlag = SELECTEDFLAG;
   if (!IsBad)
     {
       ELEMENT_LOOP (PCB->Data);
@@ -4189,7 +3992,7 @@ DRCAll (void)
             char *buffer;
             int buflen;
 
-            SET_FLAG (TheFlag, element);
+            SET_FLAG (SELECTEDFLAG, element);
             DrawElement (element);
             drcerr_count++;
             SetThing (ELEMENT_TYPE, element, element, element);
@@ -4245,9 +4048,9 @@ DRCAll (void)
 
   if (nopastecnt > 0) 
     {
-      Message (_("Warning:  %d pad%s the nopaste flag set.\n"),
-	       nopastecnt,
-	       nopastecnt > 1 ? "s have" : " has");
+      Message (ngettext ("Warning: %d pad has the nopaste flag set.\n",
+                         "Warning: %d pads have the nopaste flag set.\n",
+			 nopastecnt), nopastecnt);
     }
   return IsBad ? -drcerr_count : drcerr_count;
 }
@@ -4262,21 +4065,21 @@ LocateError (Coord *x, Coord *y)
     {
     case LINE_TYPE:
       {
-        LineTypePtr line = (LineTypePtr) thing_ptr3;
+        LineType *line = (LineType *) thing_ptr3;
         *x = (line->Point1.X + line->Point2.X) / 2;
         *y = (line->Point1.Y + line->Point2.Y) / 2;
         break;
       }
     case ARC_TYPE:
       {
-        ArcTypePtr arc = (ArcTypePtr) thing_ptr3;
+        ArcType *arc = (ArcType *) thing_ptr3;
         *x = arc->X;
         *y = arc->Y;
         break;
       }
     case POLYGON_TYPE:
       {
-        PolygonTypePtr polygon = (PolygonTypePtr) thing_ptr3;
+        PolygonType *polygon = (PolygonType *) thing_ptr3;
         *x =
           (polygon->Clipped->contours->xmin +
            polygon->Clipped->contours->xmax) / 2;
@@ -4288,21 +4091,21 @@ LocateError (Coord *x, Coord *y)
     case PIN_TYPE:
     case VIA_TYPE:
       {
-        PinTypePtr pin = (PinTypePtr) thing_ptr3;
+        PinType *pin = (PinType *) thing_ptr3;
         *x = pin->X;
         *y = pin->Y;
         break;
       }
     case PAD_TYPE:
       {
-        PadTypePtr pad = (PadTypePtr) thing_ptr3;
+        PadType *pad = (PadType *) thing_ptr3;
         *x = (pad->Point1.X + pad->Point2.X) / 2;
         *y = (pad->Point1.Y + pad->Point2.Y) / 2;
         break;
       }
     case ELEMENT_TYPE:
       {
-        ElementTypePtr element = (ElementTypePtr) thing_ptr3;
+        ElementType *element = (ElementType *) thing_ptr3;
         *x = element->MarkX;
         *y = element->MarkY;
         break;
@@ -4363,9 +4166,9 @@ GotoError (void)
     case LINE_TYPE:
     case ARC_TYPE:
     case POLYGON_TYPE:
-      ChangeGroupVisibility (GetLayerNumber
-                             (PCB->Data, (LayerTypePtr) thing_ptr1), true,
-                             true);
+      ChangeGroupVisibility (
+          GetLayerNumber (PCB->Data, (LayerType *) thing_ptr1),
+          true, true);
     }
   CenterDisplay (X, Y);
 }
diff --git a/src/find.h b/src/find.h
index d2be7ac..4cc68f8 100644
--- a/src/find.h
+++ b/src/find.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes connection search routines
@@ -44,32 +43,21 @@
 #define SILK_TYPE	\
 	(LINE_TYPE | ARC_TYPE | POLYGON_TYPE)
 
-bool LineLineIntersect (LineTypePtr, LineTypePtr);
-bool LineArcIntersect (LineTypePtr, ArcTypePtr);
-bool PinLineIntersect (PinTypePtr, LineTypePtr);
-bool LinePadIntersect (LineTypePtr, PadTypePtr);
-bool ArcPadIntersect (ArcTypePtr, PadTypePtr);
-bool IsPolygonInPolygon (PolygonTypePtr, PolygonTypePtr);
-void LookupElementConnections (ElementTypePtr, FILE *);
+bool LineLineIntersect (LineType *, LineType *);
+bool LineArcIntersect (LineType *, ArcType *);
+bool PinLineIntersect (PinType *, LineType *);
+bool LinePadIntersect (LineType *, PadType *);
+bool ArcPadIntersect (ArcType *, PadType *);
+void LookupElementConnections (ElementType *, FILE *);
 void LookupConnectionsToAllElements (FILE *);
-void LookupConnection (Coord, Coord, bool, Coord, int);
+void LookupConnection (Coord, Coord, bool, Coord, int, bool AndRats);
 void LookupUnusedPins (FILE *);
-bool ResetFoundLinesAndPolygons (bool);
-bool ResetFoundPinsViasAndPads (bool);
-bool ResetConnections (bool);
+bool ClearFlagOnLinesAndPolygons (bool, int flag);
+bool ClearFlagOnPinsViasAndPads (bool, int flag);
+bool ClearFlagOnAllObjects (bool, int flag);
 void InitConnectionLookup (void);
-void InitComponentLookup (void);
-void InitLayoutLookup (void);
 void FreeConnectionLookupMemory (void);
-void FreeComponentLookupMemory (void);
-void FreeLayoutLookupMemory (void);
-void RatFindHook (int, void *, void *, void *, bool, bool);
-void SaveFindFlag (int);
-void RestoreFindFlag (void);
+void RatFindHook (int, void *, void *, void *, bool, int flag, bool);
 int DRCAll (void);
-bool lineClear (LineTypePtr, Cardinal);
-bool IsLineInPolygon (LineTypePtr, PolygonTypePtr);
-bool IsArcInPolygon (ArcTypePtr, PolygonTypePtr);
-bool IsPadInPolygon (PadTypePtr, PolygonTypePtr);
 
 #endif
diff --git a/src/flags.c b/src/flags.c
index de77b68..1383e99 100644
--- a/src/flags.c
+++ b/src/flags.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -38,14 +36,14 @@
 #include "data.h"
 #include "pcb-printf.h"
 
+#include <glib.h>
+
 #ifdef HAVE_LIBDMALLOC
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 static int
-FlagCurrentStyle (int dummy)
+FlagCurrentStyle (void *data)
 {
   STYLE_LOOP (PCB);
   {
@@ -60,19 +58,19 @@ FlagCurrentStyle (int dummy)
 }
 
 static int
-FlagGrid (int dummy)
+FlagGrid (void *data)
 {
   return PCB->Grid > 1;
 }
 
 static int
-FlagGridSize (int dummy)
+FlagGridSize (void *data)
 {
   return PCB->Grid;
 }
 
 static int
-FlagUnitsMm (int dummy)
+FlagUnitsMm (void *data)
 {
   static const Unit *u = NULL;
   if (u == NULL)
@@ -81,7 +79,7 @@ FlagUnitsMm (int dummy)
 }
 
 static int
-FlagUnitsMil (int dummy)
+FlagUnitsMil (void *data)
 {
   static const Unit *u = NULL;
   if (u == NULL)
@@ -90,13 +88,13 @@ FlagUnitsMil (int dummy)
 }
 
 static int
-FlagBuffer (int dummy)
+FlagBuffer (void *data)
 {
   return (int) (Settings.BufferNumber + 1);
 }
 
 static int
-FlagElementName (int dummy)
+FlagElementName (void  *data)
 {
   if (TEST_FLAG (NAMEONPCBFLAG, PCB))
     return 2;
@@ -106,27 +104,30 @@ FlagElementName (int dummy)
 }
 
 static int
-FlagTESTFLAG (int bit)
+FlagTESTFLAG (void *data)
 {
+  int bit = GPOINTER_TO_INT (data);
   return TEST_FLAG (bit, PCB) ? 1 : 0;
 }
 
 static int
-FlagSETTINGS (int ofs)
+FlagSETTINGS (void *data)
 {
-  return *(bool *) ((char *) (&Settings) + ofs);
+  size_t ofs = (size_t)data;
+  return *(bool *) ((char *)(&Settings) + ofs);
 }
 
 static int
-FlagMode (int x)
+FlagMode (void *data)
 {
+  int x = GPOINTER_TO_INT (data);
   if (x == -1)
     return Settings.Mode;
   return Settings.Mode == x;
 }
 
 static int
-FlagHaveRegex (int x)
+FlagHaveRegex (void *data)
 {
 #if defined(HAVE_REGCOMP) || defined(HAVE_RE_COMP)
   return 1;
@@ -145,8 +146,9 @@ enum {
 };
 
 static int
-FlagLayerShown (int n)
+FlagLayerShown (void *data)
 {
+  int n = GPOINTER_TO_INT (data);
   switch (n)
     {
     case FL_SILK:
@@ -169,8 +171,9 @@ FlagLayerShown (int n)
 }
 
 static int
-FlagLayerActive (int n)
+FlagLayerActive (void *data)
 {
+  int test_layer = GPOINTER_TO_INT (data);
   int current_layer;
   if (PCB->RatDraw)
     current_layer = FL_RATS;
@@ -179,98 +182,91 @@ FlagLayerActive (int n)
   else
     return 0;
 
-  return current_layer == n;
+  return current_layer == test_layer;
 }
 
-/* The cast to (int) is ONLY valid because we know we are
- * taking offsets on structures where the offset will fit
- * in an integer variable. It silences compile warnings on
- * 64bit machines.
- */
-#define OffsetOf(a,b) (int)(size_t)(&(((a *)0)->b))
+#define OFFSET_POINTER(a, b) (&(((a *)0)->b))
 
 HID_Flag flags_flag_list[] = {
-  {"style", FlagCurrentStyle, 0},
-  {"grid", FlagGrid, 0},
-  {"gridsize", FlagGridSize, 0},
-  {"elementname", FlagElementName, 0},
-  {"have_regex", FlagHaveRegex, 0},
-
-  {"silk_shown", FlagLayerShown, FL_SILK},
-  {"pins_shown", FlagLayerShown, FL_PINS},
-  {"rats_shown", FlagLayerShown, FL_RATS},
-  {"vias_shown", FlagLayerShown, FL_VIAS},
-  {"back_shown", FlagLayerShown, FL_BACK},
-  {"mask_shown", FlagLayerShown, FL_MASK},
-  {"silk_active", FlagLayerActive, FL_SILK},
-  {"rats_active", FlagLayerActive, FL_RATS},
-
-  {"mode", FlagMode, -1},
-  {"nomode", FlagMode, NO_MODE},
-  {"arcmode", FlagMode, ARC_MODE},
-  {"arrowmode", FlagMode, ARROW_MODE},
-  {"copymode", FlagMode, COPY_MODE},
-  {"insertpointmode", FlagMode, INSERTPOINT_MODE},
-  {"linemode", FlagMode, LINE_MODE},
-  {"lockmode", FlagMode, LOCK_MODE},
-  {"movemode", FlagMode, MOVE_MODE},
-  {"pastebuffermode", FlagMode, PASTEBUFFER_MODE},
-  {"polygonmode", FlagMode, POLYGON_MODE},
-  {"polygonholemode", FlagMode, POLYGONHOLE_MODE},
-  {"rectanglemode", FlagMode, RECTANGLE_MODE},
-  {"removemode", FlagMode, REMOVE_MODE},
-  {"rotatemode", FlagMode, ROTATE_MODE},
-  {"rubberbandmovemode", FlagMode, RUBBERBANDMOVE_MODE},
-  {"textmode", FlagMode, TEXT_MODE},
-  {"thermalmode", FlagMode, THERMAL_MODE},
-  {"viamode", FlagMode, VIA_MODE},
-
-  {"shownumber", FlagTESTFLAG, SHOWNUMBERFLAG},
-  {"localref", FlagTESTFLAG, LOCALREFFLAG},
-  {"checkplanes", FlagTESTFLAG, CHECKPLANESFLAG},
-  {"showdrc", FlagTESTFLAG, SHOWDRCFLAG},
-  {"rubberband", FlagTESTFLAG, RUBBERBANDFLAG},
-  {"description", FlagTESTFLAG, DESCRIPTIONFLAG},
-  {"nameonpcb", FlagTESTFLAG, NAMEONPCBFLAG},
-  {"autodrc", FlagTESTFLAG, AUTODRCFLAG},
-  {"alldirection", FlagTESTFLAG, ALLDIRECTIONFLAG},
-  {"swapstartdir", FlagTESTFLAG, SWAPSTARTDIRFLAG},
-  {"uniquename", FlagTESTFLAG, UNIQUENAMEFLAG},
-  {"clearnew", FlagTESTFLAG, CLEARNEWFLAG},
-  {"snappin", FlagTESTFLAG, SNAPPINFLAG},
-  {"showmask", FlagTESTFLAG, SHOWMASKFLAG},
-  {"thindraw", FlagTESTFLAG, THINDRAWFLAG},
-  {"orthomove", FlagTESTFLAG, ORTHOMOVEFLAG},
-  {"liveroute", FlagTESTFLAG, LIVEROUTEFLAG},
-  {"thindrawpoly", FlagTESTFLAG, THINDRAWPOLYFLAG},
-  {"locknames", FlagTESTFLAG, LOCKNAMESFLAG},
-  {"onlynames", FlagTESTFLAG, ONLYNAMESFLAG},
-  {"newfullpoly", FlagTESTFLAG, NEWFULLPOLYFLAG},
-  {"hidenames", FlagTESTFLAG, HIDENAMESFLAG},
-
-  {"fullpoly", FlagSETTINGS, OffsetOf (SettingType, FullPoly)},
-  {"grid_units_mm", FlagUnitsMm, -1},
-  {"grid_units_mil", FlagUnitsMil, -1},
-  {"clearline", FlagSETTINGS, OffsetOf (SettingType, ClearLine)},
-  {"uniquenames", FlagSETTINGS, OffsetOf (SettingType, UniqueNames)},
-  {"showsolderside", FlagSETTINGS, OffsetOf (SettingType, ShowSolderSide)},
-  {"savelastcommand", FlagSETTINGS, OffsetOf (SettingType, SaveLastCommand)},
-  {"saveintmp", FlagSETTINGS, OffsetOf (SettingType, SaveInTMP)},
-  {"drawgrid", FlagSETTINGS, OffsetOf (SettingType, DrawGrid)},
-  {"ratwarn", FlagSETTINGS, OffsetOf (SettingType, RatWarn)},
-  {"stipplepolygons", FlagSETTINGS, OffsetOf (SettingType, StipplePolygons)},
-  {"alldirectionlines", FlagSETTINGS,
-	OffsetOf (SettingType, AllDirectionLines)},
-  {"rubberbandmode", FlagSETTINGS, OffsetOf (SettingType, RubberBandMode)},
-  {"swapstartdirection", FlagSETTINGS,
-	OffsetOf (SettingType, SwapStartDirection)},
-  {"showdrcmode", FlagSETTINGS, OffsetOf (SettingType, ShowDRC)},
-  {"resetafterelement", FlagSETTINGS,
-	OffsetOf (SettingType, ResetAfterElement)},
-  {"ringbellwhenfinished", FlagSETTINGS,
-	OffsetOf (SettingType, RingBellWhenFinished)},
-
-  {"buffer", FlagBuffer, 0},
+  {"style",                FlagCurrentStyle, NULL},
+  {"grid",                 FlagGrid,         NULL},
+  {"gridsize",             FlagGridSize,     NULL},
+  {"elementname",          FlagElementName,  NULL},
+  {"have_regex",           FlagHaveRegex,    NULL},
+
+  {"silk_shown",           FlagLayerShown,   GINT_TO_POINTER (FL_SILK)},
+  {"pins_shown",           FlagLayerShown,   GINT_TO_POINTER (FL_PINS)},
+  {"rats_shown",           FlagLayerShown,   GINT_TO_POINTER (FL_RATS)},
+  {"vias_shown",           FlagLayerShown,   GINT_TO_POINTER (FL_VIAS)},
+  {"back_shown",           FlagLayerShown,   GINT_TO_POINTER (FL_BACK)},
+  {"mask_shown",           FlagLayerShown,   GINT_TO_POINTER (FL_MASK)},
+
+  {"silk_active",          FlagLayerActive,  GINT_TO_POINTER (FL_SILK)},
+  {"rats_active",          FlagLayerActive,  GINT_TO_POINTER (FL_RATS)},
+
+  {"mode",                 FlagMode,         GINT_TO_POINTER (-1)},
+  {"nomode",               FlagMode,         GINT_TO_POINTER (NO_MODE)},
+  {"arcmode",              FlagMode,         GINT_TO_POINTER (ARC_MODE)},
+  {"arrowmode",            FlagMode,         GINT_TO_POINTER (ARROW_MODE)},
+  {"copymode",             FlagMode,         GINT_TO_POINTER (COPY_MODE)},
+  {"insertpointmode",      FlagMode,         GINT_TO_POINTER (INSERTPOINT_MODE)},
+  {"linemode",             FlagMode,         GINT_TO_POINTER (LINE_MODE)},
+  {"lockmode",             FlagMode,         GINT_TO_POINTER (LOCK_MODE)},
+  {"movemode",             FlagMode,         GINT_TO_POINTER (MOVE_MODE)},
+  {"pastebuffermode",      FlagMode,         GINT_TO_POINTER (PASTEBUFFER_MODE)},
+  {"polygonmode",          FlagMode,         GINT_TO_POINTER (POLYGON_MODE)},
+  {"polygonholemode",      FlagMode,         GINT_TO_POINTER (POLYGONHOLE_MODE)},
+  {"rectanglemode",        FlagMode,         GINT_TO_POINTER (RECTANGLE_MODE)},
+  {"removemode",           FlagMode,         GINT_TO_POINTER (REMOVE_MODE)},
+  {"rotatemode",           FlagMode,         GINT_TO_POINTER (ROTATE_MODE)},
+  {"rubberbandmovemode",   FlagMode,         GINT_TO_POINTER (RUBBERBANDMOVE_MODE)},
+  {"textmode",             FlagMode,         GINT_TO_POINTER (TEXT_MODE)},
+  {"thermalmode",          FlagMode,         GINT_TO_POINTER (THERMAL_MODE)},
+  {"viamode",              FlagMode,         GINT_TO_POINTER (VIA_MODE)},
+
+  {"shownumber",           FlagTESTFLAG,     GINT_TO_POINTER (SHOWNUMBERFLAG)},
+  {"localref",             FlagTESTFLAG,     GINT_TO_POINTER (LOCALREFFLAG)},
+  {"checkplanes",          FlagTESTFLAG,     GINT_TO_POINTER (CHECKPLANESFLAG)},
+  {"showdrc",              FlagTESTFLAG,     GINT_TO_POINTER (SHOWDRCFLAG)},
+  {"rubberband",           FlagTESTFLAG,     GINT_TO_POINTER (RUBBERBANDFLAG)},
+  {"description",          FlagTESTFLAG,     GINT_TO_POINTER (DESCRIPTIONFLAG)},
+  {"nameonpcb",            FlagTESTFLAG,     GINT_TO_POINTER (NAMEONPCBFLAG)},
+  {"autodrc",              FlagTESTFLAG,     GINT_TO_POINTER (AUTODRCFLAG)},
+  {"alldirection",         FlagTESTFLAG,     GINT_TO_POINTER (ALLDIRECTIONFLAG)},
+  {"swapstartdir",         FlagTESTFLAG,     GINT_TO_POINTER (SWAPSTARTDIRFLAG)},
+  {"uniquename",           FlagTESTFLAG,     GINT_TO_POINTER (UNIQUENAMEFLAG)},
+  {"clearnew",             FlagTESTFLAG,     GINT_TO_POINTER (CLEARNEWFLAG)},
+  {"snappin",              FlagTESTFLAG,     GINT_TO_POINTER (SNAPPINFLAG)},
+  {"showmask",             FlagTESTFLAG,     GINT_TO_POINTER (SHOWMASKFLAG)},
+  {"thindraw",             FlagTESTFLAG,     GINT_TO_POINTER (THINDRAWFLAG)},
+  {"orthomove",            FlagTESTFLAG,     GINT_TO_POINTER (ORTHOMOVEFLAG)},
+  {"liveroute",            FlagTESTFLAG,     GINT_TO_POINTER (LIVEROUTEFLAG)},
+  {"thindrawpoly",         FlagTESTFLAG,     GINT_TO_POINTER (THINDRAWPOLYFLAG)},
+  {"locknames",            FlagTESTFLAG,     GINT_TO_POINTER (LOCKNAMESFLAG)},
+  {"onlynames",            FlagTESTFLAG,     GINT_TO_POINTER (ONLYNAMESFLAG)},
+  {"newfullpoly",          FlagTESTFLAG,     GINT_TO_POINTER (NEWFULLPOLYFLAG)},
+  {"hidenames",            FlagTESTFLAG,     GINT_TO_POINTER (HIDENAMESFLAG)},
+
+  {"grid_units_mm",        FlagUnitsMm,      NULL},
+  {"grid_units_mil",       FlagUnitsMil,     NULL},
+
+  {"fullpoly",             FlagSETTINGS,     OFFSET_POINTER (SettingType, FullPoly)},
+  {"clearline",            FlagSETTINGS,     OFFSET_POINTER (SettingType, ClearLine)},
+  {"uniquenames",          FlagSETTINGS,     OFFSET_POINTER (SettingType, UniqueNames)},
+  {"showsolderside",       FlagSETTINGS,     OFFSET_POINTER (SettingType, ShowSolderSide)},
+  {"savelastcommand",      FlagSETTINGS,     OFFSET_POINTER (SettingType, SaveLastCommand)},
+  {"saveintmp",            FlagSETTINGS,     OFFSET_POINTER (SettingType, SaveInTMP)},
+  {"drawgrid",             FlagSETTINGS,     OFFSET_POINTER (SettingType, DrawGrid)},
+  {"ratwarn",              FlagSETTINGS,     OFFSET_POINTER (SettingType, RatWarn)},
+  {"stipplepolygons",      FlagSETTINGS,     OFFSET_POINTER (SettingType, StipplePolygons)},
+  {"alldirectionlines",    FlagSETTINGS,     OFFSET_POINTER (SettingType, AllDirectionLines)},
+  {"rubberbandmode",       FlagSETTINGS,     OFFSET_POINTER (SettingType, RubberBandMode)},
+  {"swapstartdirection",   FlagSETTINGS,     OFFSET_POINTER (SettingType, SwapStartDirection)},
+  {"showdrcmode",          FlagSETTINGS,     OFFSET_POINTER (SettingType, ShowDRC)},
+  {"resetafterelement",    FlagSETTINGS,     OFFSET_POINTER (SettingType, ResetAfterElement)},
+  {"ringbellwhenfinished", FlagSETTINGS,     OFFSET_POINTER (SettingType, RingBellWhenFinished)},
+
+  {"buffer",               FlagBuffer,       NULL},
 
 };
 
diff --git a/src/fontmode.c b/src/fontmode.c
index dd64f63..e09f825 100644
--- a/src/fontmode.c
+++ b/src/fontmode.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -52,8 +50,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 /* FIXME - we currently hardcode the grid and PCB size.  What we
    should do in the future is scan the font for its extents, and size
    the grid appropriately.  Also, when we convert back to a font, we
@@ -80,7 +76,7 @@ FontEdit (int argc, char **argv, Coord Ux, Coord Uy)
 {
   FontType *font;
   SymbolType *symbol;
-  LayerTypePtr lfont, lorig, lwidth, lgrid;
+  LayerType *lfont, *lorig, *lwidth, *lgrid;
   int s, l;
 
   if (hid_actionl ("New", "Font", 0))
@@ -180,11 +176,11 @@ static const char fontsave_help[] = "Convert the current PCB back to a font.";
 static int
 FontSave (int argc, char **argv, Coord Ux, Coord Uy)
 {
-  FontTypePtr font;
-  SymbolTypePtr symbol;
+  FontType *font;
+  SymbolType *symbol;
   int i;
   GList *ii;
-  LayerTypePtr lfont, lwidth;
+  LayerType *lfont, *lwidth;
 
   font = &PCB->Font;
   lfont = PCB->Data->Layer + 0;
diff --git a/src/gettext.h b/src/gettext.h
new file mode 100644
index 0000000..e76b592
--- /dev/null
+++ b/src/gettext.h
@@ -0,0 +1,280 @@
+/* Convenience header for conditional use of GNU <libintl.h>.
+   Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published
+   by the Free Software Foundation; either version 3, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+   USA.  */
+
+#ifndef _LIBGETTEXT_H
+#define _LIBGETTEXT_H 1
+
+/* NLS can be disabled through the configure --disable-nls option.  */
+#if ENABLE_NLS
+
+/* Get declarations of GNU message catalog functions.  */
+# include <libintl.h>
+
+/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by
+   the gettext() and ngettext() macros.  This is an alternative to calling
+   textdomain(), and is useful for libraries.  */
+# ifdef DEFAULT_TEXT_DOMAIN
+#  undef gettext
+#  define gettext(Msgid) \
+     dgettext (DEFAULT_TEXT_DOMAIN, Msgid)
+#  undef ngettext
+#  define ngettext(Msgid1, Msgid2, N) \
+     dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N)
+# endif
+
+#else
+
+/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
+   chokes if dcgettext is defined as a macro.  So include it now, to make
+   later inclusions of <locale.h> a NOP.  We don't include <libintl.h>
+   as well because people using "gettext.h" will not include <libintl.h>,
+   and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
+   is OK.  */
+#if defined(__sun)
+# include <locale.h>
+#endif
+
+/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
+   <libintl.h>, which chokes if dcgettext is defined as a macro.  So include
+   it now, to make later inclusions of <libintl.h> a NOP.  */
+#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
+# include <cstdlib>
+# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H
+#  include <libintl.h>
+# endif
+#endif
+
+/* Disabled NLS.
+   The casts to 'const char *' serve the purpose of producing warnings
+   for invalid uses of the value returned from these functions.
+   On pre-ANSI systems without 'const', the config.h file is supposed to
+   contain "#define const".  */
+# undef gettext
+# define gettext(Msgid) ((const char *) (Msgid))
+# undef dgettext
+# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid))
+# undef dcgettext
+# define dcgettext(Domainname, Msgid, Category) \
+    ((void) (Category), dgettext (Domainname, Msgid))
+# undef ngettext
+# define ngettext(Msgid1, Msgid2, N) \
+    ((N) == 1 \
+     ? ((void) (Msgid2), (const char *) (Msgid1)) \
+     : ((void) (Msgid1), (const char *) (Msgid2)))
+# undef dngettext
+# define dngettext(Domainname, Msgid1, Msgid2, N) \
+    ((void) (Domainname), ngettext (Msgid1, Msgid2, N))
+# undef dcngettext
+# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
+    ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N))
+# undef textdomain
+# define textdomain(Domainname) ((const char *) (Domainname))
+# undef bindtextdomain
+# define bindtextdomain(Domainname, Dirname) \
+    ((void) (Domainname), (const char *) (Dirname))
+# undef bind_textdomain_codeset
+# define bind_textdomain_codeset(Domainname, Codeset) \
+    ((void) (Domainname), (const char *) (Codeset))
+
+#endif
+
+/* A pseudo function call that serves as a marker for the automated
+   extraction of messages, but does not call gettext().  The run-time
+   translation is done at a different place in the code.
+   The argument, String, should be a literal string.  Concatenated strings
+   and other string expressions won't work.
+   The macro's expansion is not parenthesized, so that it is suitable as
+   initializer for static 'char[]' or 'const char[]' variables.  */
+#define gettext_noop(String) String
+
+/* The separator between msgctxt and msgid in a .mo file.  */
+#define GETTEXT_CONTEXT_GLUE "\004"
+
+/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a
+   MSGID.  MSGCTXT and MSGID must be string literals.  MSGCTXT should be
+   short and rarely need to change.
+   The letter 'p' stands for 'particular' or 'special'.  */
+#ifdef DEFAULT_TEXT_DOMAIN
+# define pgettext(Msgctxt, Msgid) \
+   pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#else
+# define pgettext(Msgctxt, Msgid) \
+   pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#endif
+#define dpgettext(Domainname, Msgctxt, Msgid) \
+  pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \
+  pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category)
+#ifdef DEFAULT_TEXT_DOMAIN
+# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
+   npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#else
+# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
+   npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#endif
+#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
+  npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \
+  npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+pgettext_aux (const char *domain,
+              const char *msg_ctxt_id, const char *msgid,
+              int category)
+{
+  const char *translation = dcgettext (domain, msg_ctxt_id, category);
+  if (translation == msg_ctxt_id)
+    return msgid;
+  else
+    return translation;
+}
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+npgettext_aux (const char *domain,
+               const char *msg_ctxt_id, const char *msgid,
+               const char *msgid_plural, unsigned long int n,
+               int category)
+{
+  const char *translation =
+    dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+  if (translation == msg_ctxt_id || translation == msgid_plural)
+    return (n == 1 ? msgid : msgid_plural);
+  else
+    return translation;
+}
+
+/* The same thing extended for non-constant arguments.  Here MSGCTXT and MSGID
+   can be arbitrary expressions.  But for string literals these macros are
+   less efficient than those above.  */
+
+#include <string.h>
+
+#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
+  (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \
+   /* || __STDC_VERSION__ >= 199901L */ )
+
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+#include <stdlib.h>
+#endif
+
+#define pgettext_expr(Msgctxt, Msgid) \
+  dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES)
+#define dpgettext_expr(Domainname, Msgctxt, Msgid) \
+  dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+dcpgettext_expr (const char *domain,
+                 const char *msgctxt, const char *msgid,
+                 int category)
+{
+  size_t msgctxt_len = strlen (msgctxt) + 1;
+  size_t msgid_len = strlen (msgid) + 1;
+  const char *translation;
+#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+  char msg_ctxt_id[msgctxt_len + msgid_len];
+#else
+  char buf[1024];
+  char *msg_ctxt_id =
+    (msgctxt_len + msgid_len <= sizeof (buf)
+     ? buf
+     : (char *) malloc (msgctxt_len + msgid_len));
+  if (msg_ctxt_id != NULL)
+#endif
+    {
+      memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
+      msg_ctxt_id[msgctxt_len - 1] = '\004';
+      memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
+      translation = dcgettext (domain, msg_ctxt_id, category);
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+      if (msg_ctxt_id != buf)
+        free (msg_ctxt_id);
+#endif
+      if (translation != msg_ctxt_id)
+        return translation;
+    }
+  return msgid;
+}
+
+#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \
+  dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
+#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
+  dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+dcnpgettext_expr (const char *domain,
+                  const char *msgctxt, const char *msgid,
+                  const char *msgid_plural, unsigned long int n,
+                  int category)
+{
+  size_t msgctxt_len = strlen (msgctxt) + 1;
+  size_t msgid_len = strlen (msgid) + 1;
+  const char *translation;
+#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+  char msg_ctxt_id[msgctxt_len + msgid_len];
+#else
+  char buf[1024];
+  char *msg_ctxt_id =
+    (msgctxt_len + msgid_len <= sizeof (buf)
+     ? buf
+     : (char *) malloc (msgctxt_len + msgid_len));
+  if (msg_ctxt_id != NULL)
+#endif
+    {
+      memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
+      msg_ctxt_id[msgctxt_len - 1] = '\004';
+      memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
+      translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+      if (msg_ctxt_id != buf)
+        free (msg_ctxt_id);
+#endif
+      if (!(translation == msg_ctxt_id || translation == msgid_plural))
+        return translation;
+    }
+  return (n == 1 ? msgid : msgid_plural);
+}
+
+#endif /* _LIBGETTEXT_H */
diff --git a/src/global.h b/src/global.h
index 96c9cc9..4e0d2cc 100644
--- a/src/global.h
+++ b/src/global.h
@@ -22,9 +22,7 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
-/* 15 Oct 2008 Ineiev: add different crosshair shapes */
 
 /* definition of types
  */
@@ -60,13 +58,13 @@
 #include <glib.h>
 
 /* Forward declarations for structures the HIDs need.  */
-typedef struct BoxType BoxType, *BoxTypePtr;
-typedef struct polygon_st PolygonType, *PolygonTypePtr;
-typedef struct pad_st PadType, *PadTypePtr;
-typedef struct pin_st PinType, *PinTypePtr, **PinTypeHandle;
-typedef struct drc_violation_st DrcViolationType, *DrcViolationTypePtr;
+typedef struct BoxType BoxType;
+typedef struct polygon_st PolygonType;
+typedef struct pad_st PadType;
+typedef struct pin_st PinType;
+typedef struct drc_violation_st DrcViolationType;
 typedef struct rtree rtree_t;
-typedef struct AttributeListType AttributeListType, *AttributeListTypePtr;
+typedef struct AttributeListType AttributeListType;
 
 typedef struct unit Unit;
 typedef struct increments Increments;
@@ -78,22 +76,18 @@ typedef double Angle;		/* degrees */
 #include "polyarea.h"
 
 /* Internationalization support. */
-#ifdef ENABLE_NLS
-# include <libintl.h>
-# define _(S) gettext(S)
-# if defined(gettext_noop)
-#  define N_(S) gettext_noop(S)
-# else
-#  define N_(S) (S)
-# endif
+#include "gettext.h"
+
+#if defined (ENABLE_NLS)
+/* When an empty string is used for msgid, the functions may return a nonempty
+   string. */
+# define _(S) (S[0] != '\0') ? gettext(S) : S
+# define N_(S) gettext_noop(S)
+# define C_(C, S) pgettext(C, S)
 #else
-# define _(S) (S)
-# define N_(S) (S)
-# define textdomain(S) (S)
-# define gettext(S) (S)
-# define dgettext(D, S) (S)
-# define dcgettext(D, S, T) (S)
-# define bindtextdomain(D, Dir) (D)
+# define _(S) S
+# define N_(S) S
+# define C_(C, S) S
 #endif /* ENABLE_NLS */
 
 /* This is used by the lexer/parser */
@@ -120,7 +114,7 @@ typedef struct
 {
   unsigned long f;		/* generic flags */
   unsigned char t[(MAX_LAYER + 1) / 2];	/* thermals */
-} FlagType, *FlagTypePtr;
+} FlagType;
 
 #ifndef __GNUC__
 #define __FUNCTION1(a,b) a ":" #b
@@ -192,7 +186,7 @@ typedef struct			/* holds information about output window */
     fgGC,			/* changed from some routines */
     pmGC;			/* depth 1 pixmap GC to store clip */
 }
-OutputType, *OutputTypePtr;
+OutputType;
 
 /* ----------------------------------------------------------------------
  * layer group. A layer group identifies layers which are always switched
@@ -202,7 +196,7 @@ typedef struct
 {
   Cardinal Number[MAX_LAYER],	/* number of entries per groups */
     Entries[MAX_LAYER][MAX_LAYER + 2];
-} LayerGroupType, *LayerGroupTypePtr;
+} LayerGroupType;
 
 struct BoxType		/* a bounding box */
 {
@@ -214,13 +208,13 @@ typedef struct
 {
   Coord x, y;
   Coord width, height;
-} RectangleType, *RectangleTypePtr;
+} RectangleType;
 
 typedef struct
 {
   char *name;
   char *value;
-} AttributeType, *AttributeTypePtr;
+} AttributeType;
 
 struct AttributeListType
 {
@@ -236,24 +230,24 @@ struct AttributeListType
    based on this. */
 typedef struct {
   ANYOBJECTFIELDS;
-} AnyObjectType, *AnyObjectTypePtr;
+} AnyObjectType;
 
 typedef struct			/* a line/polygon point */
 {
   Coord X, Y, X2, Y2;	/* so Point type can be cast as BoxType */
   long int ID;
-} PointType, *PointTypePtr;
+} PointType;
 
 /* Lines, rats, pads, etc.  */
 typedef struct {
   ANYLINEFIELDS;
-} AnyLineObjectType, *AnyLineObjectTypePtr;
+} AnyLineObjectType;
 
 typedef struct			/* holds information about one line */
 {
   ANYLINEFIELDS;
   char *Number;
-} LineType, *LineTypePtr;
+} LineType;
 
 typedef struct
 {
@@ -263,7 +257,7 @@ typedef struct
   BYTE Direction;
   char *TextString;		/* string */
   void *Element;
-} TextType, *TextTypePtr;
+} TextType;
 
 struct polygon_st			/* holds information about a polygon */
 {
@@ -273,7 +267,7 @@ struct polygon_st			/* holds information about a polygon */
   POLYAREA *Clipped;		/* the clipped region of this polygon */
   PLINE *NoHoles;		/* the polygon broken into hole-less regions */
   int NoHolesValid;		/* Is the NoHoles polygon up to date? */
-  PointTypePtr Points;		/* data */
+  PointType *Points;		/* data */
   Cardinal *HoleIndex;		/* Index of hole data within the Points array */
   Cardinal HoleIndexN;		/* number of holes in polygon */
   Cardinal HoleIndexMax;	/* max number from malloc() */
@@ -284,10 +278,12 @@ typedef struct			/* holds information about arcs */
 {
   ANYOBJECTFIELDS;
   Coord Thickness, Clearance;
+  PointType Point1;
+  PointType Point2;
   Coord Width, Height,		/* length of axis */
     X, Y;			/* center coordinates */
   Angle StartAngle, Delta;	/* the two limiting angles in degrees */
-} ArcType, *ArcTypePtr;
+} ArcType;
 
 struct rtree
 {
@@ -313,13 +309,13 @@ typedef struct			/* holds information about one layer */
   AttributeListType Attributes;
   int no_drc; /* whether to ignore the layer when checking the design rules */
 }
-LayerType, *LayerTypePtr;
+LayerType;
 
 typedef struct			/* a rat-line */
 {
   ANYLINEFIELDS;
   Cardinal group1, group2;	/* the layer group each point is on */
-} RatType, *RatTypePtr;
+} RatType;
 
 struct pad_st			/* a SMD pad */
 {
@@ -365,20 +361,20 @@ typedef struct
   GList *Arc;
   BoxType VBox;
   AttributeListType Attributes;
-} ElementType, *ElementTypePtr, **ElementTypeHandle;
+} ElementType;
 
 /* ---------------------------------------------------------------------------
  * symbol and font related stuff
  */
 typedef struct			/* a single symbol */
 {
-  LineTypePtr Line;
+  LineType *Line;
   bool Valid;
   Cardinal LineN,		/* number of lines */
     LineMax;
   Coord Width, Height,		/* size of cell */
     Delta;			/* distance to next symbol */
-} SymbolType, *SymbolTypePtr;
+} SymbolType;
 
 typedef struct			/* complete set of symbols */
 {
@@ -387,7 +383,7 @@ typedef struct			/* complete set of symbols */
   BoxType DefaultSymbol;	/* the default symbol is a filled box */
   SymbolType Symbol[MAX_FONTPOSITION + 1];
   bool Valid;
-} FontType, *FontTypePtr;
+} FontType;
 
 typedef struct			/* holds all objects */
 {
@@ -402,7 +398,8 @@ typedef struct			/* holds all objects */
    *rat_tree;
   struct PCBType *pcb;
   LayerType Layer[MAX_LAYER + 2];	/* add 2 silkscreen layers */
-} DataType, *DataTypePtr;
+  int polyClip;
+} DataType;
 
 typedef struct			/* holds drill information */
 {
@@ -414,16 +411,16 @@ typedef struct			/* holds drill information */
     UnplatedCount,		/* number of these holes that are unplated */
     PinN,			/* number of drill coordinates in the list */
     PinMax;			/* max number of coordinates from malloc() */
-  PinTypePtr *Pin;		/* coordinates to drill */
-  ElementTypePtr *Element;	/* a pointer to an array of element pointers */
-} DrillType, *DrillTypePtr;
+  PinType **Pin;		/* coordinates to drill */
+  ElementType **Element;	/* a pointer to an array of element pointers */
+} DrillType;
 
 typedef struct			/* holds a range of Drill Infos */
 {
   Cardinal DrillN,		/* number of drill sizes */
     DrillMax;			/* max number from malloc() */
-  DrillTypePtr Drill;		/* plated holes */
-} DrillInfoType, *DrillInfoTypePtr;
+  DrillType *Drill;		/* plated holes */
+} DrillInfoType;
 
 typedef struct
 {
@@ -433,7 +430,7 @@ typedef struct
     Keepaway;			/* min. separation from other nets */
   char *Name;
   int index;
-} RouteStyleType, *RouteStyleTypePtr;
+} RouteStyleType;
 
 /* ---------------------------------------------------------------------------
  * structure used by library routines
@@ -447,8 +444,7 @@ typedef struct
    *Package,			/* package */
    *Value,			/* the value field */
    *Description;		/* some descritional text */
-} LibraryEntryType, *LibraryEntryTypePtr;
-//typedef LibraryEntryType *LibraryEntryTypePtr;
+} LibraryEntryType;
 
 /* If the internal flag is set, the only field that is valid is Name,
    and the struct is allocated with malloc instead of
@@ -462,18 +458,18 @@ typedef struct
    *Style;			/* routing style */
   Cardinal EntryN,		/* number of objects */
     EntryMax;			/* number of reserved memory locations */
-  LibraryEntryTypePtr Entry;	/* the entries */
+  LibraryEntryType *Entry;	/* the entries */
   char flag;			/* used by the netlist window to enable/disable nets */
   char internal;		/* if set, this is an internal-only entry, not
 				   part of the global netlist. */
-} LibraryMenuType, *LibraryMenuTypePtr;
+} LibraryMenuType;
 
 typedef struct
 {
   Cardinal MenuN;               /* number of objects */
   Cardinal MenuMax;             /* number of reserved memory locations */
-  LibraryMenuTypePtr Menu;      /* the entries */
-} LibraryType, *LibraryTypePtr;
+  LibraryMenuType *Menu;      /* the entries */
+} LibraryType;
 
 
   /* The PCBType struct holds information about board layout most of which is
@@ -505,37 +501,41 @@ typedef struct PCBType
     *InvisibleObjectsColor,
     *InvisibleMarkColor,
     *ElementSelectedColor,
-    *RatSelectedColor, *ConnectedColor, *WarnColor, *MaskColor;
+    *RatSelectedColor, *ConnectedColor, *FoundColor, *WarnColor, *MaskColor;
   long CursorX,			/* cursor position as saved with layout */
     CursorY, Clipping;
   Coord Bloat,			/* drc sizes saved with layout */
     Shrink, minWid, minSlk, minDrill, minRing;
   Coord GridOffsetX,		/* as saved with layout */
-    GridOffsetY, MaxWidth,	/* allowed size */
-    MaxHeight;
+    GridOffsetY;
+  /* TODO: Set this always to MAX_COORD, no saving needed.
+           Kept for compatibility and until the GUI code can deal
+           with the dynamic extent. */
+  Coord MaxWidth, MaxHeight;	/* allowed size */
+  Coord ExtentMinX, ExtentMinY,	/* extent, defined by the outline layer */
+    ExtentMaxX, ExtentMaxY;
 
   Coord Grid;			/* used grid with offsets */
-  double Zoom,			/* zoom factor */
-    IsleArea,			/* minimum poly island to retain */
+  double IsleArea,		/* minimum poly island to retain */
     ThermScale;			/* scale factor used with thermals */
   FontType Font;
   LayerGroupType LayerGroups;
   RouteStyleType RouteStyle[NUM_STYLES];
   LibraryType NetlistLib;
   AttributeListType Attributes;
-  DataTypePtr Data;		/* entire database */
+  DataType *Data;		/* entire database */
 
   bool is_footprint;		/* If set, the user has loaded a footprint, not a pcb. */
 }
-PCBType, *PCBTypePtr;
+PCBType;
 
 typedef struct			/* information about the paste buffer */
 {
   Coord X, Y;			/* offset */
   BoxType BoundingBox;
-  DataTypePtr Data;		/* data; not all members of PCBType */
+  DataType *Data;		/* data; not all members of PCBType */
   /* are used */
-} BufferType, *BufferTypePtr;
+} BufferType;
 
 /* ---------------------------------------------------------------------------
  * some types for cursor drawing, setting of block and lines
@@ -543,10 +543,10 @@ typedef struct			/* information about the paste buffer */
  */
 typedef struct			/* rubberband lines for element moves */
 {
-  LayerTypePtr Layer;		/* layer that holds the line */
-  LineTypePtr Line;		/* the line itself */
-  PointTypePtr MovedPoint;	/* and finally the point */
-} RubberbandType, *RubberbandTypePtr;
+  LayerType *Layer;		/* layer that holds the line */
+  LineType *Line;		/* the line itself */
+  PointType *MovedPoint;	/* and finally the point */
+} RubberbandType;
 
 typedef struct			/* current marked line */
 {
@@ -554,7 +554,7 @@ typedef struct			/* current marked line */
     Point2;
   long int State;
   bool draw;
-} AttachedLineType, *AttachedLineTypePtr;
+} AttachedLineType;
 
 typedef struct			/* currently marked block */
 {
@@ -562,7 +562,7 @@ typedef struct			/* currently marked block */
     Point2;
   long int State;
   bool otherway;
-} AttachedBoxType, *AttachedBoxTypePtr;
+} AttachedBoxType;
 
 typedef struct			/* currently attached object */
 {
@@ -575,8 +575,8 @@ typedef struct			/* currently attached object */
    *Ptr3;
   Cardinal RubberbandN,		/* number of lines in array */
     RubberbandMax;
-  RubberbandTypePtr Rubberband;
-} AttachedObjectType, *AttachedObjectTypePtr;
+  RubberbandType *Rubberband;
+} AttachedObjectType;
 
 enum crosshair_shape
 {
@@ -598,13 +598,13 @@ typedef struct			/* holds cursor information */
   PolygonType AttachedPolygon;
   AttachedObjectType AttachedObject;	/* data of attached objects */
   enum crosshair_shape shape; 	/* shape of crosshair */
-} CrosshairType, *CrosshairTypePtr;
+} CrosshairType;
 
 typedef struct
 {
   bool status;
   Coord X, Y;
-} MarkType, *MarkTypePtr;
+} MarkType;
 
 /* ---------------------------------------------------------------------------
  * our resources
@@ -632,6 +632,7 @@ typedef struct			/* some resources... */
     *ElementSelectedColor,
     *RatSelectedColor,
     *ConnectedColor,
+    *FoundColor,
     *OffLimitColor,
     *GridColor,
     *LayerColor[MAX_LAYER],
@@ -643,9 +644,7 @@ typedef struct			/* some resources... */
     Shrink, minWid, minSlk, minDrill, minRing;
   int TextScale;		/* text scaling in % */
   Coord Grid;			/* grid in pcb-units */
-  double Zoom,
-    IsleArea,    		/* polygon min area */
-    PinoutZoom;			/* same for pinout windows */
+  double IsleArea;		/* polygon min area */
   int PinoutNameLength,		/* max displayed length of a pinname */
     Volume,			/* the speakers volume -100..100 */
     CharPerLine,		/* width of an output line in characters */
@@ -695,26 +694,26 @@ typedef struct			/* some resources... */
     AutoPlace;			/* flag which says we should force placement of the
 				   windows on startup */
 }
-SettingType, *SettingTypePtr;
+SettingType;
 
 /* ----------------------------------------------------------------------
  * pointer to low-level copy, move and rotate functions
  */
 typedef struct
 {
-  void *(*Line) (LayerTypePtr, LineTypePtr);
-  void *(*Text) (LayerTypePtr, TextTypePtr);
-  void *(*Polygon) (LayerTypePtr, PolygonTypePtr);
-  void *(*Via) (PinTypePtr);
-  void *(*Element) (ElementTypePtr);
-  void *(*ElementName) (ElementTypePtr);
-  void *(*Pin) (ElementTypePtr, PinTypePtr);
-  void *(*Pad) (ElementTypePtr, PadTypePtr);
-  void *(*LinePoint) (LayerTypePtr, LineTypePtr, PointTypePtr);
-  void *(*Point) (LayerTypePtr, PolygonTypePtr, PointTypePtr);
-  void *(*Arc) (LayerTypePtr, ArcTypePtr);
-  void *(*Rat) (RatTypePtr);
-} ObjectFunctionType, *ObjectFunctionTypePtr;
+  void *(*Line) (LayerType *, LineType *);
+  void *(*Text) (LayerType *, TextType *);
+  void *(*Polygon) (LayerType *, PolygonType *);
+  void *(*Via) (PinType *);
+  void *(*Element) (ElementType *);
+  void *(*ElementName) (ElementType *);
+  void *(*Pin) (ElementType *, PinType *);
+  void *(*Pad) (ElementType *, PadType *);
+  void *(*LinePoint) (LayerType *, LineType *, PointType *);
+  void *(*Point) (LayerType *, PolygonType *, PointType *);
+  void *(*Arc) (LayerType *, ArcType *);
+  void *(*Rat) (RatType *);
+} ObjectFunctionType;
 
 /* ---------------------------------------------------------------------------
  * structure used by device drivers
@@ -727,44 +726,44 @@ typedef struct			/* holds a connection */
   void *ptr1, *ptr2;		/* the object of the connection */
   Cardinal group;		/* the layer group of the connection */
   LibraryMenuType *menu;	/* the netmenu this *SHOULD* belong too */
-} ConnectionType, *ConnectionTypePtr;
+} ConnectionType;
 
 typedef struct			/* holds a net of connections */
 {
   Cardinal ConnectionN,		/* the number of connections contained */
     ConnectionMax;		/* max connections from malloc */
-  ConnectionTypePtr Connection;
-  RouteStyleTypePtr Style;
-} NetType, *NetTypePtr;
+  ConnectionType *Connection;
+  RouteStyleType *Style;
+} NetType;
 
 typedef struct			/* holds a list of nets */
 {
   Cardinal NetN,		/* the number of subnets contained */
     NetMax;			/* max subnets from malloc */
-  NetTypePtr Net;
-} NetListType, *NetListTypePtr;
+  NetType *Net;
+} NetListType;
 
 typedef struct			/* holds a list of net lists */
 {
   Cardinal NetListN,		/* the number of net lists contained */
     NetListMax;			/* max net lists from malloc */
-  NetListTypePtr NetList;
-} NetListListType, *NetListListTypePtr;
+  NetListType *NetList;
+} NetListListType;
 
 typedef struct			/* holds a generic list of pointers */
 {
   Cardinal PtrN,		/* the number of pointers contained */
     PtrMax;			/* max subnets from malloc */
   void **Ptr;
-} PointerListType, *PointerListTypePtr;
+} PointerListType;
 
 typedef struct
 {
   Cardinal BoxN,		/* the number of boxes contained */
     BoxMax;			/* max boxes from malloc */
-  BoxTypePtr Box;
+  BoxType *Box;
 
-} BoxListType, *BoxListTypePtr;
+} BoxListType;
 
 struct drc_violation_st
 {
@@ -821,8 +820,6 @@ struct drc_violation_st
 #define ATTRIBUTE_UNUSED
 #endif
 
-#define RCSID(x) static char *rcsid  ATTRIBUTE_UNUSED = x
-
 /* ---------------------------------------------------------------------------
  * Macros called by various action routines to show usage or to report
  * a syntax error and fail
diff --git a/src/gpcb-menu.res.h b/src/gpcb-menu.res.h
new file mode 100644
index 0000000..6528187
--- /dev/null
+++ b/src/gpcb-menu.res.h
@@ -0,0 +1,1028 @@
+# 56 "gpcb-menu.res"
+char *s = N_("File");
+# 57 "gpcb-menu.res"
+char *s = N_("New");
+# 57 "gpcb-menu.res"
+char *s = N_("Ctrl-N");
+# 57 "gpcb-menu.res"
+char *s = N_("Ctrl<Key>n");
+# 58 "gpcb-menu.res"
+char *s = N_("Open...");
+# 58 "gpcb-menu.res"
+char *s = N_("Load a layout from a file");
+# 60 "gpcb-menu.res"
+char *s = N_("Save");
+# 60 "gpcb-menu.res"
+char *s = N_("Saves current layout");
+# 60 "gpcb-menu.res"
+char *s = N_("Ctrl-S");
+# 60 "gpcb-menu.res"
+char *s = N_("Ctrl<Key>s");
+# 61 "gpcb-menu.res"
+char *s = N_("Save As...");
+# 61 "gpcb-menu.res"
+char *s = N_("Saves current layout into a new file");
+# 61 "gpcb-menu.res"
+char *s = N_("Shift Ctrl-S");
+# 61 "gpcb-menu.res"
+char *s = N_("Shift Ctrl<Key>s");
+# 62 "gpcb-menu.res"
+char *s = N_("Revert");
+# 62 "gpcb-menu.res"
+char *s = N_("Revert to the layout stored on disk");
+# 64 "gpcb-menu.res"
+char *s = N_("Import Schematics");
+# 65 "gpcb-menu.res"
+char *s = N_("Load element to buffer");
+# 66 "gpcb-menu.res"
+char *s = N_("Load layout to buffer");
+# 67 "gpcb-menu.res"
+char *s = N_("Load netlist");
+# 68 "gpcb-menu.res"
+char *s = N_("Load vendor resource file");
+# 70 "gpcb-menu.res"
+char *s = N_("Save connection data of");
+# 71 "gpcb-menu.res"
+char *s = N_(" a single element");
+# 72 "gpcb-menu.res"
+char *s = N_(" all elements");
+# 73 "gpcb-menu.res"
+char *s = N_(" unused pins");
+# 75 "gpcb-menu.res"
+char *s = N_("Export...");
+# 77 "gpcb-menu.res"
+char *s = N_("Calibrate Printer...");
+# 78 "gpcb-menu.res"
+char *s = N_("Print...");
+# 80 "gpcb-menu.res"
+char *s = N_("Preferences...");
+# 82 "gpcb-menu.res"
+char *s = N_("Quit");
+# 82 "gpcb-menu.res"
+char *s = N_("Ctrl-Q");
+# 82 "gpcb-menu.res"
+char *s = N_("Ctrl<Key>q");
+# 88 "gpcb-menu.res"
+char *s = N_("Edit");
+# 89 "gpcb-menu.res"
+char *s = N_("Undo");
+# 89 "gpcb-menu.res"
+char *s = N_("U");
+# 89 "gpcb-menu.res"
+char *s = N_("<Key>u");
+# 90 "gpcb-menu.res"
+char *s = N_("Redo");
+# 90 "gpcb-menu.res"
+char *s = N_("Shift-R");
+# 90 "gpcb-menu.res"
+char *s = N_("Shift<Key>r");
+# 91 "gpcb-menu.res"
+char *s = N_("Clear undo-buffer");
+# 91 "gpcb-menu.res"
+char *s = N_("Shift-Ctrl-U");
+# 91 "gpcb-menu.res"
+char *s = N_("Shift Ctrl<Key>u");
+# 296 "gpcb-menu.res"
+char *s = N_("Cut to buffer");
+# 95 "gpcb-menu.res"
+char *s = N_("Ctrl-X");
+# 95 "gpcb-menu.res"
+char *s = N_("Ctrl<Key>x");
+# 96 "gpcb-menu.res"
+char *s = N_("Copy to buffer");
+# 98 "gpcb-menu.res"
+char *s = N_("Ctrl-C");
+# 98 "gpcb-menu.res"
+char *s = N_("Ctrl<Key>c");
+# 298 "gpcb-menu.res"
+char *s = N_("Paste buffer");
+# 99 "gpcb-menu.res"
+char *s = N_("Ctrl-V");
+# 99 "gpcb-menu.res"
+char *s = N_("Ctrl<Key>v");
+# 240 "gpcb-menu.res"
+char *s = N_("Unselect all");
+# 101 "gpcb-menu.res"
+char *s = N_("Shift-Alt-A");
+# 101 "gpcb-menu.res"
+char *s = N_("Shift Alt<Key>a");
+# 236 "gpcb-menu.res"
+char *s = N_("Select all visible");
+# 102 "gpcb-menu.res"
+char *s = N_("Alt-A");
+# 102 "gpcb-menu.res"
+char *s = N_("Alt<Key>a");
+# 104 "gpcb-menu.res"
+char *s = N_("Edit name of");
+# 105 "gpcb-menu.res"
+char *s = N_("text on layout");
+# 105 "gpcb-menu.res"
+char *s = N_("N");
+# 105 "gpcb-menu.res"
+char *s = N_("<Key>n");
+# 106 "gpcb-menu.res"
+char *s = N_("layout");
+# 107 "gpcb-menu.res"
+char *s = N_("active layer");
+# 109 "gpcb-menu.res"
+char *s = N_("Edit attributes of");
+# 110 "gpcb-menu.res"
+char *s = N_("Layout");
+# 111 "gpcb-menu.res"
+char *s = N_("CurrentLayer");
+# 112 "gpcb-menu.res"
+char *s = N_("Element");
+# 115 "gpcb-menu.res"
+char *s = N_("Route Styles");
+# 117 "gpcb-menu.res"
+char *s = N_("Edit...");
+# 124 "gpcb-menu.res"
+char *s = N_("View");
+# 125 "gpcb-menu.res"
+char *s = N_("Enable visible grid");
+# 126 "gpcb-menu.res"
+char *s = N_("Grid units");
+# 127 "gpcb-menu.res"
+char *s = N_("mil");
+# 128 "gpcb-menu.res"
+char *s = N_("mm");
+# 130 "gpcb-menu.res"
+char *s = N_("Grid size");
+# 131 "gpcb-menu.res"
+char *s = N_("No Grid");
+# 133 "gpcb-menu.res"
+char *s = N_("0.1 mil");
+# 134 "gpcb-menu.res"
+char *s = N_("1 mil");
+# 135 "gpcb-menu.res"
+char *s = N_("5 mil");
+# 136 "gpcb-menu.res"
+char *s = N_("10 mil");
+# 137 "gpcb-menu.res"
+char *s = N_("25 mil");
+# 138 "gpcb-menu.res"
+char *s = N_("50 mil");
+# 139 "gpcb-menu.res"
+char *s = N_("100 mil");
+# 141 "gpcb-menu.res"
+char *s = N_("0.01 mm");
+# 142 "gpcb-menu.res"
+char *s = N_("0.05 mm");
+# 143 "gpcb-menu.res"
+char *s = N_("0.1 mm");
+# 144 "gpcb-menu.res"
+char *s = N_("0.25 mm");
+# 145 "gpcb-menu.res"
+char *s = N_("0.5 mm");
+# 146 "gpcb-menu.res"
+char *s = N_("1 mm");
+# 148 "gpcb-menu.res"
+char *s = N_("Grid -");
+# 148 "gpcb-menu.res"
+char *s = N_("Shift-G");
+# 148 "gpcb-menu.res"
+char *s = N_("Shift<Key>g");
+# 149 "gpcb-menu.res"
+char *s = N_("Grid +");
+# 149 "gpcb-menu.res"
+char *s = N_("G");
+# 149 "gpcb-menu.res"
+char *s = N_("<Key>g");
+# 151 "gpcb-menu.res"
+char *s = N_("Realign grid");
+# 153 "gpcb-menu.res"
+char *s = N_("Displayed element name");
+# 154 "gpcb-menu.res"
+char *s = N_("Description");
+# 155 "gpcb-menu.res"
+char *s = N_("Reference Designator");
+# 156 "gpcb-menu.res"
+char *s = N_("Value");
+# 158 "gpcb-menu.res"
+char *s = N_("Enable Pinout shows number");
+# 159 "gpcb-menu.res"
+char *s = N_("Pins/Via show Name/Number");
+# 159 "gpcb-menu.res"
+char *s = N_("D");
+# 159 "gpcb-menu.res"
+char *s = N_("<Key>d");
+# 160 "gpcb-menu.res"
+/* xgettext:no-c-format */
+char *s = N_("Zoom In 20%");
+# 161 "gpcb-menu.res"
+char *s = N_("Z");
+# 161 "gpcb-menu.res"
+char *s = N_("<Key>z");
+# 161 "gpcb-menu.res"
+/* xgettext:no-c-format */
+char *s = N_("Zoom Out 20%");
+# 162 "gpcb-menu.res"
+char *s = N_("Shift-Z");
+# 162 "gpcb-menu.res"
+char *s = N_("Shift<Key>z");
+# 163 "gpcb-menu.res"
+char *s = N_("More zooms and view changes");
+# 164 "gpcb-menu.res"
+char *s = N_("Zoom Max");
+# 164 "gpcb-menu.res"
+char *s = N_("V");
+# 164 "gpcb-menu.res"
+char *s = N_("<Key>v");
+# 165 "gpcb-menu.res"
+char *s = N_("Zoom In 2X");
+# 166 "gpcb-menu.res"
+char *s = N_("Zoom Out 2X");
+# 167 "gpcb-menu.res"
+char *s = N_("Zoom to 0.1mil/px");
+# 168 "gpcb-menu.res"
+char *s = N_("Zoom to 0.01mm/px");
+# 169 "gpcb-menu.res"
+char *s = N_("Zoom to 1mil/px");
+# 170 "gpcb-menu.res"
+char *s = N_("Zoom to 0.05mm/px");
+# 171 "gpcb-menu.res"
+char *s = N_("Zoom to 2.5mil/px");
+# 172 "gpcb-menu.res"
+char *s = N_("Zoom to 0.1mm/px");
+# 173 "gpcb-menu.res"
+char *s = N_("Zoom to 10mil/px");
+# 173 "gpcb-menu.res"
+/* xgettext:no-c-format */
+char *s = N_("Zoom In 20% and center");
+# 174 "gpcb-menu.res"
+/* xgettext:no-c-format */
+char *s = N_("Zoom Out 20% and center");
+# 176 "gpcb-menu.res"
+char *s = N_("Flip up/down");
+# 176 "gpcb-menu.res"
+char *s = N_("Tab");
+# 176 "gpcb-menu.res"
+char *s = N_("<Key>Tab");
+# 177 "gpcb-menu.res"
+char *s = N_("Flip left/right");
+# 177 "gpcb-menu.res"
+char *s = N_("Shift-Tab");
+# 177 "gpcb-menu.res"
+char *s = N_("Shift<Key>Tab");
+# 178 "gpcb-menu.res"
+char *s = N_("Spin 180 degrees");
+# 178 "gpcb-menu.res"
+char *s = N_("Ctrl-Tab");
+# 178 "gpcb-menu.res"
+char *s = N_("Ctrl<Key>Tab");
+# 179 "gpcb-menu.res"
+char *s = N_("Swap Sides");
+# 179 "gpcb-menu.res"
+char *s = N_("Ctrl-Shift-Tab");
+# 179 "gpcb-menu.res"
+char *s = N_("Ctrl Shift<Key>Tab");
+# 180 "gpcb-menu.res"
+char *s = N_("Center cursor");
+# 180 "gpcb-menu.res"
+char *s = N_("C");
+# 180 "gpcb-menu.res"
+char *s = N_("<Key>c");
+# 183 "gpcb-menu.res"
+char *s = N_("Shown Layers");
+# 186 "gpcb-menu.res"
+char *s = N_("Edit Layer Groups");
+# 188 "gpcb-menu.res"
+char *s = N_("Current Layer");
+# 191 "gpcb-menu.res"
+char *s = N_("Delete current layer");
+# 192 "gpcb-menu.res"
+char *s = N_("Add new layer");
+# 193 "gpcb-menu.res"
+char *s = N_("Move current layer up");
+# 194 "gpcb-menu.res"
+char *s = N_("Move current layer down");
+# 201 "gpcb-menu.res"
+char *s = N_("Settings");
+# 202 "gpcb-menu.res"
+char *s = N_("'All-direction' lines");
+# 202 "gpcb-menu.res"
+char *s = N_(".");
+# 202 "gpcb-menu.res"
+char *s = N_("<Key>.");
+# 203 "gpcb-menu.res"
+char *s = N_("Auto swap line start angle");
+# 204 "gpcb-menu.res"
+char *s = N_("Orthogonal moves");
+# 205 "gpcb-menu.res"
+char *s = N_("Crosshair snaps to pins and pads");
+# 206 "gpcb-menu.res"
+char *s = N_("Crosshair shows DRC clearance");
+# 207 "gpcb-menu.res"
+char *s = N_("Auto enforce DRC clearance");
+# 208 "gpcb-menu.res"
+char *s = N_("Lock Names");
+# 209 "gpcb-menu.res"
+char *s = N_("Only Names");
+# 210 "gpcb-menu.res"
+char *s = N_("Hide Names");
+# 212 "gpcb-menu.res"
+char *s = N_("Rubber band mode");
+# 213 "gpcb-menu.res"
+char *s = N_("Require unique element names");
+# 214 "gpcb-menu.res"
+char *s = N_("Auto-zero delta measurements");
+# 215 "gpcb-menu.res"
+char *s = N_("New lines, arcs clear polygons");
+# 216 "gpcb-menu.res"
+char *s = N_("New polygons are full ones");
+# 217 "gpcb-menu.res"
+char *s = N_("Show autorouter trials");
+# 218 "gpcb-menu.res"
+char *s = N_("Thin draw");
+# 218 "gpcb-menu.res"
+char *s = N_("|");
+# 218 "gpcb-menu.res"
+char *s = N_("<Key>|");
+# 219 "gpcb-menu.res"
+char *s = N_("Thin draw poly");
+# 219 "gpcb-menu.res"
+char *s = N_("Ctrl-Shift-P");
+# 219 "gpcb-menu.res"
+char *s = N_("Ctrl Shift<Key>p");
+# 220 "gpcb-menu.res"
+char *s = N_("Check polygons");
+# 222 "gpcb-menu.res"
+char *s = N_("Vendor drill mapping");
+# 223 "gpcb-menu.res"
+char *s = N_("Import New Elements at");
+# 224 "gpcb-menu.res"
+char *s = N_(" Center");
+# 225 "gpcb-menu.res"
+char *s = N_(" Mark");
+# 226 "gpcb-menu.res"
+char *s = N_(" Crosshair");
+# 228 "gpcb-menu.res"
+char *s = N_("Set Dispersion");
+# 235 "gpcb-menu.res"
+char *s = N_("Select");
+# 237 "gpcb-menu.res"
+char *s = N_("Select all found");
+# 238 "gpcb-menu.res"
+char *s = N_("Select all connected");
+# 241 "gpcb-menu.res"
+char *s = N_("Unselect all found");
+# 242 "gpcb-menu.res"
+char *s = N_("Unselect all connected");
+# 244 "gpcb-menu.res"
+char *s = N_("Select by name");
+# 245 "gpcb-menu.res"
+char *s = N_("All objects");
+# 287 "gpcb-menu.res"
+char *s = N_("Elements");
+# 247 "gpcb-menu.res"
+char *s = N_("Pads");
+# 288 "gpcb-menu.res"
+char *s = N_("Pins");
+# 505 "gpcb-menu.res"
+char *s = N_("Text");
+# 250 "gpcb-menu.res"
+char *s = N_("Vias");
+# 253 "gpcb-menu.res"
+char *s = N_("Auto-place selected elements");
+# 253 "gpcb-menu.res"
+char *s = N_("Ctrl-P");
+# 253 "gpcb-menu.res"
+char *s = N_("Ctrl<Key>p");
+# 254 "gpcb-menu.res"
+char *s = N_("Disperse all elements");
+# 255 "gpcb-menu.res"
+char *s = N_("Disperse selected elements");
+# 257 "gpcb-menu.res"
+char *s = N_("Move selected elements to other side");
+# 257 "gpcb-menu.res"
+char *s = N_("Shift-B");
+# 257 "gpcb-menu.res"
+char *s = N_("Shift<Key>b");
+# 258 "gpcb-menu.res"
+char *s = N_("Move selected to current layer");
+# 258 "gpcb-menu.res"
+char *s = N_("Shift-M");
+# 258 "gpcb-menu.res"
+char *s = N_("Shift<Key>m");
+# 474 "gpcb-menu.res"
+char *s = N_("Remove selected objects");
+# 259 "gpcb-menu.res"
+char *s = N_("Shift-Delete");
+# 259 "gpcb-menu.res"
+char *s = N_("Shift<Key>Delete");
+# 488 "gpcb-menu.res"
+char *s = N_("Convert selection to element");
+# 262 "gpcb-menu.res"
+char *s = N_("Optimize selected rats");
+# 334 "gpcb-menu.res"
+char *s = N_("Auto-route selected rats");
+# 263 "gpcb-menu.res"
+char *s = N_("Alt-R");
+# 263 "gpcb-menu.res"
+char *s = N_("Alt<Key>r");
+# 491 "gpcb-menu.res"
+char *s = N_("Rip up selected auto-routed tracks");
+# 266 "gpcb-menu.res"
+char *s = N_("Change size of selected objects");
+# 267 "gpcb-menu.res"
+char *s = N_("Lines -10 mil");
+# 268 "gpcb-menu.res"
+char *s = N_("Lines +10 mil");
+# 269 "gpcb-menu.res"
+char *s = N_("Pads -10 mil");
+# 270 "gpcb-menu.res"
+char *s = N_("Pads +10 mil");
+# 282 "gpcb-menu.res"
+char *s = N_("Pins -10 mil");
+# 283 "gpcb-menu.res"
+char *s = N_("Pins +10 mil");
+# 273 "gpcb-menu.res"
+char *s = N_("Texts -10 mil");
+# 274 "gpcb-menu.res"
+char *s = N_("Texts +10 mil");
+# 280 "gpcb-menu.res"
+char *s = N_("Vias -10 mil");
+# 281 "gpcb-menu.res"
+char *s = N_("Vias +10 mil");
+# 279 "gpcb-menu.res"
+char *s = N_("Change drilling hole of selected objects");
+# 286 "gpcb-menu.res"
+char *s = N_("Change square-flag of selected objects");
+# 509 "gpcb-menu.res"
+char *s = N_("Buffer");
+# 300 "gpcb-menu.res"
+char *s = N_("Rotate buffer 90 deg CCW");
+# 301 "gpcb-menu.res"
+char *s = N_("Shift-F7");
+# 301 "gpcb-menu.res"
+char *s = N_("Shift<Key>F7");
+# 302 "gpcb-menu.res"
+char *s = N_("Rotate buffer 90 deg CW");
+# 303 "gpcb-menu.res"
+char *s = N_("Arbitrarily Rotate Buffer");
+# 304 "gpcb-menu.res"
+char *s = N_("Mirror buffer (up/down)");
+# 305 "gpcb-menu.res"
+char *s = N_("Mirror buffer (left/right)");
+# 308 "gpcb-menu.res"
+char *s = N_("Clear buffer");
+# 309 "gpcb-menu.res"
+char *s = N_("Convert buffer to element");
+# 310 "gpcb-menu.res"
+char *s = N_("Break buffer elements to pieces");
+# 311 "gpcb-menu.res"
+char *s = N_("Save buffer elements to file");
+# 313 "gpcb-menu.res"
+char *s = N_("Select Buffer #1");
+# 313 "gpcb-menu.res"
+char *s = N_("Shift-1");
+# 313 "gpcb-menu.res"
+char *s = N_("Shift<Key>1");
+# 314 "gpcb-menu.res"
+char *s = N_("Select Buffer #2");
+# 314 "gpcb-menu.res"
+char *s = N_("Shift-2");
+# 314 "gpcb-menu.res"
+char *s = N_("Shift<Key>2");
+# 315 "gpcb-menu.res"
+char *s = N_("Select Buffer #3");
+# 315 "gpcb-menu.res"
+char *s = N_("Shift-3");
+# 315 "gpcb-menu.res"
+char *s = N_("Shift<Key>3");
+# 316 "gpcb-menu.res"
+char *s = N_("Select Buffer #4");
+# 316 "gpcb-menu.res"
+char *s = N_("Shift-4");
+# 316 "gpcb-menu.res"
+char *s = N_("Shift<Key>4");
+# 317 "gpcb-menu.res"
+char *s = N_("Select Buffer #5");
+# 317 "gpcb-menu.res"
+char *s = N_("Shift-5");
+# 317 "gpcb-menu.res"
+char *s = N_("Shift<Key>5");
+# 323 "gpcb-menu.res"
+char *s = N_("Connects");
+# 324 "gpcb-menu.res"
+char *s = N_("Lookup connection");
+# 324 "gpcb-menu.res"
+char *s = N_("Ctrl-F");
+# 324 "gpcb-menu.res"
+char *s = N_("Ctrl<Key>f");
+# 325 "gpcb-menu.res"
+char *s = N_("Reset scanned pads/pins/vias");
+# 326 "gpcb-menu.res"
+char *s = N_("Reset scanned lines/polygons");
+# 327 "gpcb-menu.res"
+char *s = N_("Reset all connections");
+# 327 "gpcb-menu.res"
+char *s = N_("Shift-F");
+# 327 "gpcb-menu.res"
+char *s = N_("Shift<Key>f");
+# 329 "gpcb-menu.res"
+char *s = N_("Optimize rats nest");
+# 330 "gpcb-menu.res"
+char *s = N_("O");
+# 330 "gpcb-menu.res"
+char *s = N_("<Key>o");
+# 331 "gpcb-menu.res"
+char *s = N_("Erase rats nest");
+# 331 "gpcb-menu.res"
+char *s = N_("E");
+# 331 "gpcb-menu.res"
+char *s = N_("<Key>e");
+# 332 "gpcb-menu.res"
+char *s = N_("Erase selected rats");
+# 332 "gpcb-menu.res"
+char *s = N_("Shift-E");
+# 332 "gpcb-menu.res"
+char *s = N_("Shift<Key>e");
+# 335 "gpcb-menu.res"
+char *s = N_("Auto-route all rats");
+# 336 "gpcb-menu.res"
+char *s = N_("Rip up all auto-routed tracks");
+# 338 "gpcb-menu.res"
+char *s = N_("Optimize routed tracks");
+# 339 "gpcb-menu.res"
+char *s = N_("Auto-Optimize");
+# 339 "gpcb-menu.res"
+char *s = N_("Shift-=");
+# 339 "gpcb-menu.res"
+char *s = N_("Shift<Key>=");
+# 340 "gpcb-menu.res"
+char *s = N_("Debumpify");
+# 341 "gpcb-menu.res"
+char *s = N_("Unjaggy");
+# 342 "gpcb-menu.res"
+char *s = N_("Vianudge");
+# 343 "gpcb-menu.res"
+char *s = N_("Viatrim");
+# 344 "gpcb-menu.res"
+char *s = N_("Ortho pull");
+# 345 "gpcb-menu.res"
+char *s = N_("Simple optimization");
+# 345 "gpcb-menu.res"
+char *s = N_("=");
+# 345 "gpcb-menu.res"
+char *s = N_("<Key>=");
+# 346 "gpcb-menu.res"
+char *s = N_("Miter");
+# 347 "gpcb-menu.res"
+char *s = N_("Puller");
+# 347 "gpcb-menu.res"
+char *s = N_("Y");
+# 347 "gpcb-menu.res"
+char *s = N_("<Key>y");
+# 348 "gpcb-menu.res"
+char *s = N_("Global Puller");
+# 349 "gpcb-menu.res"
+char *s = N_("Selected");
+# 350 "gpcb-menu.res"
+char *s = N_("Found");
+# 351 "gpcb-menu.res"
+char *s = N_("All");
+# 354 "gpcb-menu.res"
+char *s = N_("Only autorouted nets");
+# 357 "gpcb-menu.res"
+char *s = N_("Design Rule Checker");
+# 359 "gpcb-menu.res"
+char *s = N_("Apply vendor drill mapping");
+# 365 "gpcb-menu.res"
+char *s = N_("Info");
+# 494 "gpcb-menu.res"
+char *s = N_("Generate object report");
+# 366 "gpcb-menu.res"
+char *s = N_("Ctrl-R");
+# 366 "gpcb-menu.res"
+char *s = N_("Ctrl<Key>r");
+# 367 "gpcb-menu.res"
+char *s = N_("Generate drill summary");
+# 368 "gpcb-menu.res"
+char *s = N_("Report found pins/pads");
+# 369 "gpcb-menu.res"
+char *s = N_("Key Bindings");
+# 510 "gpcb-menu.res"
+char *s = N_("Remove");
+# 370 "gpcb-menu.res"
+char *s = N_("Delete");
+# 370 "gpcb-menu.res"
+char *s = N_("<Key>Delete");
+# 376 "gpcb-menu.res"
+char *s = N_("Remove Selected");
+# 376 "gpcb-menu.res"
+char *s = N_("Backspace");
+# 376 "gpcb-menu.res"
+char *s = N_("<Key>BackSpace");
+# 379 "gpcb-menu.res"
+char *s = N_("Remove Connected");
+# 379 "gpcb-menu.res"
+char *s = N_("Shift-Backspace");
+# 379 "gpcb-menu.res"
+char *s = N_("Shift<Key>BackSpace");
+# 396 "gpcb-menu.res"
+char *s = N_("Set Same");
+# 396 "gpcb-menu.res"
+char *s = N_("A");
+# 396 "gpcb-menu.res"
+char *s = N_("<Key>a");
+# 397 "gpcb-menu.res"
+char *s = N_("Flip Object");
+# 397 "gpcb-menu.res"
+char *s = N_("B");
+# 397 "gpcb-menu.res"
+char *s = N_("<Key>b");
+# 398 "gpcb-menu.res"
+char *s = N_("Find Connections");
+# 398 "gpcb-menu.res"
+char *s = N_("F");
+# 398 "gpcb-menu.res"
+char *s = N_("<Key>f");
+# 399 "gpcb-menu.res"
+char *s = N_("ToggleHideName Object");
+# 399 "gpcb-menu.res"
+char *s = N_("H");
+# 399 "gpcb-menu.res"
+char *s = N_("<Key>h");
+# 400 "gpcb-menu.res"
+char *s = N_("ToggleHideName SelectedElement");
+# 400 "gpcb-menu.res"
+char *s = N_("Shift-H");
+# 400 "gpcb-menu.res"
+char *s = N_("Shift<Key>h");
+# 401 "gpcb-menu.res"
+char *s = N_("ChangeHole Object");
+# 401 "gpcb-menu.res"
+char *s = N_("Ctrl-H");
+# 401 "gpcb-menu.res"
+char *s = N_("Ctrl<Key>h");
+# 402 "gpcb-menu.res"
+char *s = N_("ChangeJoin Object");
+# 402 "gpcb-menu.res"
+char *s = N_("J");
+# 402 "gpcb-menu.res"
+char *s = N_("<Key>j");
+# 403 "gpcb-menu.res"
+char *s = N_("ChangeJoin SelectedObject");
+# 403 "gpcb-menu.res"
+char *s = N_("Shift-J");
+# 403 "gpcb-menu.res"
+char *s = N_("Shift<Key>j");
+# 404 "gpcb-menu.res"
+char *s = N_("Clear Object +");
+# 404 "gpcb-menu.res"
+char *s = N_("K");
+# 404 "gpcb-menu.res"
+char *s = N_("<Key>k");
+# 405 "gpcb-menu.res"
+char *s = N_("Clear Object -");
+# 405 "gpcb-menu.res"
+char *s = N_("Shift-K");
+# 405 "gpcb-menu.res"
+char *s = N_("Shift<Key>k");
+# 406 "gpcb-menu.res"
+char *s = N_("Clear Selected +");
+# 406 "gpcb-menu.res"
+char *s = N_("Ctrl-K");
+# 406 "gpcb-menu.res"
+char *s = N_("Ctrl<Key>k");
+# 407 "gpcb-menu.res"
+char *s = N_("Clear Selected -");
+# 407 "gpcb-menu.res"
+char *s = N_("Shift-Ctrl-K");
+# 407 "gpcb-menu.res"
+char *s = N_("Shift Ctrl<Key>k");
+# 408 "gpcb-menu.res"
+char *s = N_("Line Tool size +");
+# 408 "gpcb-menu.res"
+char *s = N_("L");
+# 408 "gpcb-menu.res"
+char *s = N_("<Key>l");
+# 409 "gpcb-menu.res"
+char *s = N_("Line Tool size -");
+# 409 "gpcb-menu.res"
+char *s = N_("Shift-L");
+# 409 "gpcb-menu.res"
+char *s = N_("Shift<Key>l");
+# 410 "gpcb-menu.res"
+char *s = N_("Move Object to current layer");
+# 410 "gpcb-menu.res"
+char *s = N_("M");
+# 410 "gpcb-menu.res"
+char *s = N_("<Key>m");
+# 411 "gpcb-menu.res"
+char *s = N_("MarkCrosshair");
+# 411 "gpcb-menu.res"
+char *s = N_("Ctrl-M");
+# 411 "gpcb-menu.res"
+char *s = N_("Ctrl<Key>m");
+# 412 "gpcb-menu.res"
+char *s = N_("Select shortest rat");
+# 412 "gpcb-menu.res"
+char *s = N_("Shift-N");
+# 412 "gpcb-menu.res"
+char *s = N_("Shift<Key>n");
+# 413 "gpcb-menu.res"
+char *s = N_("AddRats to selected pins");
+# 413 "gpcb-menu.res"
+char *s = N_("Shift-O");
+# 413 "gpcb-menu.res"
+char *s = N_("Shift<Key>o");
+# 419 "gpcb-menu.res"
+char *s = N_("ChangeOctagon Object");
+# 419 "gpcb-menu.res"
+char *s = N_("Ctrl-O");
+# 419 "gpcb-menu.res"
+char *s = N_("Ctrl<Key>o");
+# 420 "gpcb-menu.res"
+char *s = N_("Polygon PreviousPoint");
+# 420 "gpcb-menu.res"
+char *s = N_("P");
+# 420 "gpcb-menu.res"
+char *s = N_("<Key>p");
+# 421 "gpcb-menu.res"
+char *s = N_("Polygon Close");
+# 421 "gpcb-menu.res"
+char *s = N_("Shift-P");
+# 421 "gpcb-menu.res"
+char *s = N_("Shift<Key>p");
+# 422 "gpcb-menu.res"
+char *s = N_("ChangeSquare Object");
+# 422 "gpcb-menu.res"
+char *s = N_("Q");
+# 422 "gpcb-menu.res"
+char *s = N_("<Key>q");
+# 423 "gpcb-menu.res"
+char *s = N_("ChangeSize +");
+# 423 "gpcb-menu.res"
+char *s = N_("S");
+# 423 "gpcb-menu.res"
+char *s = N_("<Key>s");
+# 424 "gpcb-menu.res"
+char *s = N_("ChangeSize -");
+# 424 "gpcb-menu.res"
+char *s = N_("Shift-S");
+# 424 "gpcb-menu.res"
+char *s = N_("Shift<Key>s");
+# 425 "gpcb-menu.res"
+char *s = N_("ChangeDrill +5 mil");
+# 425 "gpcb-menu.res"
+char *s = N_("Alt-S");
+# 425 "gpcb-menu.res"
+char *s = N_("Alt<Key>s");
+# 426 "gpcb-menu.res"
+char *s = N_("ChangeDrill -5 mil");
+# 426 "gpcb-menu.res"
+char *s = N_("Alt-Shift-S");
+# 426 "gpcb-menu.res"
+char *s = N_("Alt Shift<Key>s");
+# 427 "gpcb-menu.res"
+char *s = N_("Text Tool scale +10 mil");
+# 427 "gpcb-menu.res"
+char *s = N_("T");
+# 427 "gpcb-menu.res"
+char *s = N_("<Key>t");
+# 428 "gpcb-menu.res"
+char *s = N_("Text Tool scale -10 mil");
+# 428 "gpcb-menu.res"
+char *s = N_("Shift-T");
+# 428 "gpcb-menu.res"
+char *s = N_("Shift<Key>t");
+# 429 "gpcb-menu.res"
+char *s = N_("Via Tool size +5 mil");
+# 429 "gpcb-menu.res"
+char *s = N_("Shift-V");
+# 429 "gpcb-menu.res"
+char *s = N_("Shift<Key>v");
+# 430 "gpcb-menu.res"
+char *s = N_("Via Tool size -5 mil");
+# 430 "gpcb-menu.res"
+char *s = N_("Shift-Ctrl-V");
+# 430 "gpcb-menu.res"
+char *s = N_("Shift Ctrl<Key>v");
+# 431 "gpcb-menu.res"
+char *s = N_("Via Tool drill +5 mil");
+# 431 "gpcb-menu.res"
+char *s = N_("Alt-V");
+# 431 "gpcb-menu.res"
+char *s = N_("Alt<Key>v");
+# 432 "gpcb-menu.res"
+char *s = N_("Via Tool drill -5 mil");
+# 432 "gpcb-menu.res"
+char *s = N_("Alt-Shift-V");
+# 432 "gpcb-menu.res"
+char *s = N_("Alt Shift<Key>v");
+# 433 "gpcb-menu.res"
+char *s = N_("AddRats Selected");
+# 433 "gpcb-menu.res"
+char *s = N_("Shift-W");
+# 433 "gpcb-menu.res"
+char *s = N_("Shift<Key>w");
+# 434 "gpcb-menu.res"
+char *s = N_("Add All Rats");
+# 434 "gpcb-menu.res"
+char *s = N_("W");
+# 434 "gpcb-menu.res"
+char *s = N_("<Key>w");
+# 435 "gpcb-menu.res"
+char *s = N_("Cycle Clip");
+# 435 "gpcb-menu.res"
+char *s = N_("/");
+# 435 "gpcb-menu.res"
+char *s = N_("<Key>/");
+# 436 "gpcb-menu.res"
+char *s = N_("Arrow Mode");
+# 436 "gpcb-menu.res"
+char *s = N_("Space");
+# 436 "gpcb-menu.res"
+char *s = N_("<Key>space");
+# 437 "gpcb-menu.res"
+char *s = N_("Temp Arrow ON");
+# 437 "gpcb-menu.res"
+char *s = N_("[");
+# 437 "gpcb-menu.res"
+char *s = N_("<Key>[");
+# 438 "gpcb-menu.res"
+char *s = N_("Temp Arrow OFF");
+# 438 "gpcb-menu.res"
+char *s = N_("]");
+# 438 "gpcb-menu.res"
+char *s = N_("<Key>]");
+# 440 "gpcb-menu.res"
+char *s = N_("Step Up");
+# 444 "gpcb-menu.res"
+char *s = N_("Up");
+# 440 "gpcb-menu.res"
+char *s = N_("<Key>Up");
+# 441 "gpcb-menu.res"
+char *s = N_("Step Down");
+# 445 "gpcb-menu.res"
+char *s = N_("Down");
+# 441 "gpcb-menu.res"
+char *s = N_("<Key>Down");
+# 442 "gpcb-menu.res"
+char *s = N_("Step Left");
+# 446 "gpcb-menu.res"
+char *s = N_("Left");
+# 442 "gpcb-menu.res"
+char *s = N_("<Key>Left");
+# 443 "gpcb-menu.res"
+char *s = N_("Step Right");
+# 447 "gpcb-menu.res"
+char *s = N_("Right");
+# 443 "gpcb-menu.res"
+char *s = N_("<Key>Right");
+# 444 "gpcb-menu.res"
+char *s = N_("Step +Up");
+# 444 "gpcb-menu.res"
+char *s = N_("Shift<Key>Up");
+# 445 "gpcb-menu.res"
+char *s = N_("Step +Down");
+# 445 "gpcb-menu.res"
+char *s = N_("Shift<Key>Down");
+# 446 "gpcb-menu.res"
+char *s = N_("Step +Left");
+# 446 "gpcb-menu.res"
+char *s = N_("Shift<Key>Left");
+# 447 "gpcb-menu.res"
+char *s = N_("Step +Right");
+# 447 "gpcb-menu.res"
+char *s = N_("Shift<Key>Right");
+# 448 "gpcb-menu.res"
+char *s = N_("Click");
+# 448 "gpcb-menu.res"
+char *s = N_("Enter");
+# 448 "gpcb-menu.res"
+char *s = N_("<Key>Enter");
+# 456 "gpcb-menu.res"
+char *s = N_("Window");
+# 457 "gpcb-menu.res"
+char *s = N_("Library");
+# 457 "gpcb-menu.res"
+char *s = N_("i");
+# 457 "gpcb-menu.res"
+char *s = N_("<Key>i");
+# 458 "gpcb-menu.res"
+char *s = N_("Message Log");
+# 459 "gpcb-menu.res"
+char *s = N_("DRC Check");
+# 460 "gpcb-menu.res"
+char *s = N_("Netlist");
+# 461 "gpcb-menu.res"
+char *s = N_("Command Entry");
+# 461 "gpcb-menu.res"
+char *s = N_(":");
+# 461 "gpcb-menu.res"
+char *s = N_("<Key>:");
+# 462 "gpcb-menu.res"
+char *s = N_("Pinout");
+# 462 "gpcb-menu.res"
+char *s = N_("Shift-D");
+# 462 "gpcb-menu.res"
+char *s = N_("Shift<Key>d");
+# 464 "gpcb-menu.res"
+char *s = N_("About...");
+# 472 "gpcb-menu.res"
+char *s = N_("Operations on selections");
+# 473 "gpcb-menu.res"
+char *s = N_("Unselect all objects");
+# 475 "gpcb-menu.res"
+char *s = N_("Copy selection to buffer");
+# 481 "gpcb-menu.res"
+char *s = N_("Cut selection to buffer");
+# 489 "gpcb-menu.res"
+char *s = N_("Auto place selected elements");
+# 490 "gpcb-menu.res"
+char *s = N_("Autoroute selected elements");
+# 493 "gpcb-menu.res"
+char *s = N_("Operations on this location");
+# 497 "gpcb-menu.res"
+char *s = N_("Undo last operation");
+# 498 "gpcb-menu.res"
+char *s = N_("Redo last undone operation");
+# 501 "gpcb-menu.res"
+char *s = N_("None");
+# 502 "gpcb-menu.res"
+char *s = N_("Via");
+# 502 "gpcb-menu.res"
+char *s = N_("F1");
+# 502 "gpcb-menu.res"
+char *s = N_("<Key>F1");
+# 503 "gpcb-menu.res"
+char *s = N_("Line");
+# 503 "gpcb-menu.res"
+char *s = N_("F2");
+# 503 "gpcb-menu.res"
+char *s = N_("<Key>F2");
+# 504 "gpcb-menu.res"
+char *s = N_("Arc");
+# 504 "gpcb-menu.res"
+char *s = N_("F3");
+# 504 "gpcb-menu.res"
+char *s = N_("<Key>F3");
+# 505 "gpcb-menu.res"
+char *s = N_("F4");
+# 505 "gpcb-menu.res"
+char *s = N_("<Key>F4");
+# 506 "gpcb-menu.res"
+char *s = N_("Rectangle");
+# 506 "gpcb-menu.res"
+char *s = N_("F5");
+# 506 "gpcb-menu.res"
+char *s = N_("<Key>F5");
+# 507 "gpcb-menu.res"
+char *s = N_("Polygon");
+# 507 "gpcb-menu.res"
+char *s = N_("F6");
+# 507 "gpcb-menu.res"
+char *s = N_("<Key>F6");
+# 508 "gpcb-menu.res"
+char *s = N_("Polygon Hole");
+# 509 "gpcb-menu.res"
+char *s = N_("F7");
+# 509 "gpcb-menu.res"
+char *s = N_("<Key>F7");
+# 510 "gpcb-menu.res"
+char *s = N_("F8");
+# 510 "gpcb-menu.res"
+char *s = N_("<Key>F8");
+# 511 "gpcb-menu.res"
+char *s = N_("Rotate");
+# 511 "gpcb-menu.res"
+char *s = N_("F9");
+# 511 "gpcb-menu.res"
+char *s = N_("<Key>F9");
+# 512 "gpcb-menu.res"
+char *s = N_("Thermal");
+# 512 "gpcb-menu.res"
+char *s = N_("F10");
+# 512 "gpcb-menu.res"
+char *s = N_("<Key>F10");
+# 513 "gpcb-menu.res"
+char *s = N_("Arrow");
+# 513 "gpcb-menu.res"
+char *s = N_("F11");
+# 513 "gpcb-menu.res"
+char *s = N_("<Key>F11");
+# 514 "gpcb-menu.res"
+char *s = N_("Insert Point");
+# 514 "gpcb-menu.res"
+char *s = N_("Insert");
+# 514 "gpcb-menu.res"
+char *s = N_("<Key>Insert");
+# 515 "gpcb-menu.res"
+char *s = N_("Move");
+# 516 "gpcb-menu.res"
+char *s = N_("Copy");
+# 517 "gpcb-menu.res"
+char *s = N_("Lock");
+# 517 "gpcb-menu.res"
+char *s = N_("F12");
+# 517 "gpcb-menu.res"
+char *s = N_("<Key>F12");
+# 518 "gpcb-menu.res"
+char *s = N_("Cancel");
+# 518 "gpcb-menu.res"
+char *s = N_("Esc");
+# 518 "gpcb-menu.res"
+char *s = N_("<Key>Escape");
diff --git a/src/gpcb-menu.res.in b/src/gpcb-menu.res.in
index 7e63811..47bee40 100644
--- a/src/gpcb-menu.res.in
+++ b/src/gpcb-menu.res.in
@@ -37,6 +37,13 @@ Mouse =
 # If you want zoom to center, do this instead.
   #Up = { {Zoom(0.8) Center()} }
   #Down = { {Zoom(1.25) Center()} }
+
+  scroll-left = {
+    Scroll(left)
+  }
+  scroll-right = {
+    Scroll(right)
+  }
 }
 
 MainMenu =
@@ -46,16 +53,17 @@ MainMenu =
 # File Menu
 #
   {"File" m=F
-   {"Save Layout" Save(Layout) tip="Saves current layout" m=S a={"Ctrl-S" "Ctrl<Key>s"}}
-   {"Save Layout As..." Save(LayoutAs) tip="Saves current layout into a new file" m=A a={"Shift Ctrl-S" "Shift Ctrl<Key>s"}}
+   {"New" New() a={"Ctrl-N" "Ctrl<Key>n"}}
+   {"Open..." Load(Layout) tip="Load a layout from a file"}
    -
+   {"Save" Save(Layout) tip="Saves current layout" m=S a={"Ctrl-S" "Ctrl<Key>s"}}
+   {"Save As..." Save(LayoutAs) tip="Saves current layout into a new file" m=A a={"Shift Ctrl-S" "Shift Ctrl<Key>s"}}
    {"Revert" Load(Revert,none) tip="Revert to the layout stored on disk"}
    -
    {"Import Schematics" Import() }
-   {"Load layout" Load(Layout) tip="Load a layout from a file"}
-   {"Load element data to paste-buffer" PasteBuffer(Clear) Load(ElementTobuffer)}
-   {"Load layout data to paste-buffer" PasteBuffer(Clear) Load(LayoutTobuffer)}
-   {"Load netlist file" Load(Netlist)}
+   {"Load element to buffer" PasteBuffer(Clear) Load(ElementTobuffer)}
+   {"Load layout to buffer" PasteBuffer(Clear) Load(LayoutTobuffer)}
+   {"Load netlist" Load(Netlist)}
    {"Load vendor resource file" LoadVendorFrom()}
    -
    {"Save connection data of"
@@ -63,33 +71,31 @@ MainMenu =
      {" all elements" Save(AllConnections)}
      {" unused pins" Save(AllUnusedPins)}
    }
+   {"Export..." Export()}
    -
-   {"Print layout..." Print()}
-   {"Export layout..." Export()}
    {"Calibrate Printer..." PrintCalibrate()}
-   -
-   {"Start New Layout" New() a={"Ctrl-N" "Ctrl<Key>n"}}
+   {"Print..." Print()}
    -
    {"Preferences..." DoWindows(Preferences)}
    -
-   {"Quit Program" Quit()  a={"Ctrl-Q" "Ctrl<Key>q"}}
+   {"Quit" Quit()  a={"Ctrl-Q" "Ctrl<Key>q"}}
   }
 
 #
 # Edit Menu
 #
   {"Edit" m=E
-   {"Undo last operation" Undo() a={"U" "<Key>u"}}
-   {"Redo last undone operation" Redo() a={"Shift-R" "Shift<Key>r"}}
-   {"Clear undo-buffer" Undo(ClearList) a={"Shift-Ctrl-U" "Shift Ctrl<Key>u"}}
+   {"Undo" Undo() a={"U" "<Key>u"}}
+   {"Redo" Redo() a={"Shift-R" "Shift<Key>r"}}
+   #{"Clear undo-buffer" Undo(ClearList) a={"Shift-Ctrl-U" "Shift Ctrl<Key>u"}}
    -
-   {"Cut selection to buffer" GetXY(Click to set the snap point for this buffer)
+   {"Cut to buffer" GetXY(Click to set the snap point for this buffer)
     PasteBuffer(Clear) PasteBuffer(AddSelected) RemoveSelected() Mode(PasteBuffer)
     a={"Ctrl-X" "Ctrl<Key>x"}}
-   {"Copy selection to buffer" GetXY(Click to set the snap point for this buffer)
+   {"Copy to buffer" GetXY(Click to set the snap point for this buffer)
     PasteBuffer(Clear) PasteBuffer(AddSelected) Unselect(All) Mode(PasteBuffer)
     a={"Ctrl-C" "Ctrl<Key>c"}}
-   {"Paste buffer to layout" Mode(PasteBuffer) a={"Ctrl-V" "Ctrl<Key>v"}}
+   {"Paste buffer" Mode(PasteBuffer) a={"Ctrl-V" "Ctrl<Key>v"}}
    -
    {"Unselect all" Unselect(All) a={"Shift-Alt-A" "Shift Alt<Key>a"}}
    {"Select all visible" Select(All) a={"Alt-A" "Alt<Key>a"}}
@@ -138,10 +144,8 @@ MainMenu =
     {"0.5 mm"  checked=gridsize,0.50mm SetUnits(mm) SetValue(Grid,0.5mm)}
     {"1 mm"    checked=gridsize,1mm SetUnits(mm) SetValue(Grid,1mm)}
     -
-    {"Grid -5mil" SetValue(Grid,-5,mil) a={"Shift-G" "Shift<Key>g"}}
-    {"Grid +5mil" SetValue(Grid,+5,mil) a={"G" "<Key>g"}}
-    {"Grid -0.05mm" SetValue(Grid,-0.05,mm) a={"Shift-Ctrl-G" "Shift Ctrl<Key>g"}}
-    {"Grid +0.05mm" SetValue(Grid,+0.05,mm) a={"Ctrl-G" "Ctrl<Key>g"}}
+    {"Grid -" SetValue(Grid,-) a={"Shift-G" "Shift<Key>g"}}
+    {"Grid +" SetValue(Grid,+) a={"G" "<Key>g"}}
    }
    {"Realign grid" GetXY(Click to set the grid origin) Display(ToggleGrid)}
    -
@@ -228,11 +232,13 @@ MainMenu =
 # Select menu
 #
   {"Select" m=l
-   {"Select all visible objects" Select(All)}
-   {"Select all connected objects" Select(Connection)}
+   {"Select all visible" Select(All)}
+   {"Select all found" Select(Found)}
+   {"Select all connected" Select(Connection)}
    -
-   {"Unselect all objects" Unselect(All)}
-   {"unselect all connected objects" Unselect(Connection)}
+   {"Unselect all" Unselect(All)}
+   {"Unselect all found" Unselect(Found)}
+   {"Unselect all connected" Unselect(Connection)}
    -
    {"Select by name"
     {"All objects" Select(ObjectByName) active=have_regex}
@@ -286,9 +292,9 @@ MainMenu =
 # Buffer menu
 #
   {"Buffer" m=B
-   {"Cut selection to buffer" GetXY(Click to set the snap point for this buffer)
+   {"Cut to buffer" GetXY(Click to set the snap point for this buffer)
     PasteBuffer(Clear) PasteBuffer(AddSelected) RemoveSelected() Mode(PasteBuffer)}
-   {"Paste buffer to layout" Mode(PasteBuffer)}
+   {"Paste buffer" Mode(PasteBuffer)}
    -
    {"Rotate buffer 90 deg CCW" Mode(PasteBuffer) PasteBuffer(Rotate,1)
     a={"Shift-F7" "Shift<Key>F7"}}
@@ -314,7 +320,7 @@ MainMenu =
 # Connects menu
 #
   {"Connects" m=C
-   {"Lookup connection to object" GetXY(Click on the object) Connection(Find) a={"Ctrl-F" "Ctrl<Key>f"}}
+   {"Lookup connection" GetXY(Click on the object) Connection(Find) a={"Ctrl-F" "Ctrl<Key>f"}}
    {"Reset scanned pads/pins/vias" Connection(ResetPinsViasAndPads) Display(Redraw)}
    {"Reset scanned lines/polygons" Connection(ResetLinesAndPolygons) Display(Redraw)}
    {"Reset all connections" Connection(Reset) Display(Redraw) a={"Shift-F" "Shift<Key>f"}}
@@ -386,23 +392,6 @@ MainMenu =
      Unselect(All)
      Atomic(Block)
     }
-    {"Remove Connected"
-     Atomic(Save)
-     Connection(Reset)
-     Atomic(Restore)
-     Unselect(All)
-     Atomic(Restore)
-     Connection(Find)
-     Atomic(Restore)
-     Select(Connection)
-     Atomic(Restore)
-     RemoveSelected()
-     Atomic(Restore)
-     Connection(Reset)
-     Atomic(Restore)
-     Unselect(All)
-     Atomic(Block)
-    }
     {"Set Same" a={"A" "<Key>a"} SetSame()}
     {"Flip Object" a={"B" "<Key>b"} Flip(Object)}
     {"Find Connections" a={"F" "<Key>f"} Connection(Reset) Connection(Find)}
@@ -411,12 +400,12 @@ MainMenu =
     {"ChangeHole Object" a={"Ctrl-H" "Ctrl<Key>h"} ChangeHole(Object)}
     {"ChangeJoin Object" a={"J" "<Key>j"} ChangeJoin(Object)}
     {"ChangeJoin SelectedObject" a={"Shift-J" "Shift<Key>j"} ChangeJoin(SelectedObjects)}
-    {"Clear Object +2 mil" a={"K" "<Key>k"} ChangeClearSize(Object,+2,mil)}
-    {"Clear Object -2 mil" a={"Shift-K" "Shift<Key>k"} ChangeClearSize(Object,-2,mil)}
-    {"Clear Selected +2 mil" a={"Ctrl-K" "Ctrl<Key>k"} ChangeClearSize(SelectedObjects,+2,mil)}
-    {"Clear Selected -2 mil" a={"Shift-Ctrl-K" "Shift Ctrl<Key>k"} ChangeClearSize(SelectedObjects,-2,mil)}
-    {"Line Tool size +5 mil" a={"L" "<Key>l"} SetValue(LineSize,+5,mil)}
-    {"Line Tool size -5 mil" a={"Shift-L" "Shift<Key>l"} SetValue(LineSize,-5,mil)}
+    {"Clear Object +" a={"K" "<Key>k"} ChangeClearSize(Object,+)}
+    {"Clear Object -" a={"Shift-K" "Shift<Key>k"} ChangeClearSize(Object,-)}
+    {"Clear Selected +" a={"Ctrl-K" "Ctrl<Key>k"} ChangeClearSize(SelectedObjects,+)}
+    {"Clear Selected -" a={"Shift-Ctrl-K" "Shift Ctrl<Key>k"} ChangeClearSize(SelectedObjects,-)}
+    {"Line Tool size +" a={"L" "<Key>l"} SetValue(LineSize,+)}
+    {"Line Tool size -" a={"Shift-L" "Shift<Key>l"} SetValue(LineSize,-)}
     {"Move Object to current layer" a={"M" "<Key>m"} MoveToCurrentLayer(Object)}
     {"MarkCrosshair" a={"Ctrl-M" "Ctrl<Key>m"} MarkCrosshair()}
     {"Select shortest rat" a={"Shift-N" "Shift<Key>n"} AddRats(Close)}
@@ -430,8 +419,8 @@ MainMenu =
     {"Polygon PreviousPoint" a={"P" "<Key>p"} Polygon(PreviousPoint)}
     {"Polygon Close" a={"Shift-P" "Shift<Key>p"} Polygon(Close)}
     {"ChangeSquare Object" a={"Q" "<Key>q"} ChangeSquare(ToggleObject)}
-    {"ChangeSize +5 mil" a={"S" "<Key>s"} ChangeSize(Object,+5,mil)}
-    {"ChangeSize -5 mil" a={"Shift-S" "Shift<Key>s"} ChangeSize(Object,-5,mil)}
+    {"ChangeSize +" a={"S" "<Key>s"} ChangeSize(Object,+)}
+    {"ChangeSize -" a={"Shift-S" "Shift<Key>s"} ChangeSize(Object,-)}
     {"ChangeDrill +5 mil" a={"Alt-S" "Alt<Key>s"} ChangeDrillSize(Object,+5,mil)}
     {"ChangeDrill -5 mil" a={"Alt-Shift-S" "Alt Shift<Key>s"} ChangeDrillSize(Object,-5,mil)}
     {"Text Tool scale +10 mil" a={"T" "<Key>t"} SetValue(TextScale,+10,mil)}
diff --git a/src/heap.c b/src/heap.c
index 9e0f35e..50b11c0 100644
--- a/src/heap.c
+++ b/src/heap.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -48,9 +46,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
-
 /* define this for more thorough self-checking of data structures */
 #undef SLOW_ASSERTIONS
 
@@ -159,7 +154,6 @@ __upheap (heap_t * heap, int k)
   assert (heap && heap->size < heap->max);
   assert (k <= heap->size);
 
-  v = heap->element[k];
   heap->element[0].cost = MIN_COST;
   for (v = heap->element[k]; heap->element[k / 2].cost > v.cost; k = k / 2)
     heap->element[k] = heap->element[k / 2];
diff --git a/src/heap.h b/src/heap.h
index 381c7b2..85e6a53 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
diff --git a/src/hid.h b/src/hid.h
index 2266b6c..003b6a4 100644
--- a/src/hid.h
+++ b/src/hid.h
@@ -136,9 +136,9 @@ extern "C"
     /* Name of the flag */
     char *name;
     /* Function to call to get the value of the flag.  */
-    int (*function) (int);
+    int (*function) (void *);
     /* Additional parameter to pass to that function.  */
-    int parm;
+    void *parm;
   } HID_Flag;
 
   extern void hid_register_flags (HID_Flag *, int);
@@ -233,6 +233,7 @@ typedef enum
   } HID_DRC_GUI;
 
   typedef struct hid_st HID;
+  typedef struct hid_draw_st HID_DRAW;
 
 /* This is the main HID structure.  */
   struct hid_st
@@ -316,71 +317,8 @@ typedef enum
     /* Tell the GUI the layer last selected has been finished with */
     void (*end_layer) (void);
 
-    /* Drawing Functions.  Coordinates and distances are ALWAYS in PCB's
-       default coordinates (1/100 mil at the time this comment was
-       written).  Angles are always in degrees, with 0 being "right"
-       (positive X) and 90 being "up" (positive Y).  */
-
-    /* Make an empty graphics context.  */
-      hidGC (*make_gc) (void);
-    void (*destroy_gc) (hidGC gc_);
-
-    /* Special note about the "erase" color: To use this color, you must
-       use this function to tell the HID when you're using it.  At the
-       beginning of a layer redraw cycle (i.e. after set_layer), call
-       use_mask() to redirect output to a buffer.  Draw to the buffer
-       (using regular HID calls) using regular and "erase" colors.  Then
-       call use_mask(HID_MASK_OFF) to flush the buffer to the HID.  If
-       you use the "erase" color when use_mask is disabled, it simply
-       draws in the background color.  */
-    void (*use_mask) (int use_it_);
-    /* Flush the buffer and return to non-mask operation.  */
-#define HID_MASK_OFF 0
-    /* Polygons being drawn before clears.  */
-#define HID_MASK_BEFORE 1
-    /* Clearances being drawn.  */
-#define HID_MASK_CLEAR 2
-    /* Polygons being drawn after clears.  */
-#define HID_MASK_AFTER 3
-
-    /* Set a color.  Names can be like "red" or "#rrggbb" or special
-       names like "erase".  *Always* use the "erase" color for removing
-       ink (like polygon reliefs or thermals), as you cannot rely on
-       knowing the background color or special needs of the HID.  Always
-       use the "drill" color to draw holes.  You may assume this is
-       cheap enough to call inside the redraw callback, but not cheap
-       enough to call for each item drawn. */
-    void (*set_color) (hidGC gc_, const char *name_);
-
-    /* Set the line style.  While calling this is cheap, calling it with
-       different values each time may be expensive, so grouping items by
-       line style is helpful.  */
-    void (*set_line_cap) (hidGC gc_, EndCapStyle style_);
-    void (*set_line_width) (hidGC gc_, Coord width_);
-    void (*set_draw_xor) (hidGC gc_, int xor_);
-    /* Blends 20% or so color with 80% background.  Only used for
-       assembly drawings so far. */
-    void (*set_draw_faded) (hidGC gc_, int faded_);
-
-    /* The usual drawing functions.  "draw" means to use segments of the
-       given width, whereas "fill" means to fill to a zero-width
-       outline.  */
-    void (*draw_line) (hidGC gc_, Coord x1_, Coord y1_, Coord x2_, Coord y2_);
-    void (*draw_arc) (hidGC gc_, Coord cx_, Coord cy_, Coord xradius_, Coord yradius_,
-		      Angle start_angle_, Angle delta_angle_);
-    void (*draw_rect) (hidGC gc_, Coord x1_, Coord y1_, Coord x2_, Coord y2_);
-    void (*fill_circle) (hidGC gc_, Coord cx_, Coord cy_, Coord radius_);
-    void (*fill_polygon) (hidGC gc_, int n_coords_, Coord *x_, Coord *y_);
-    void (*fill_pcb_polygon) (hidGC gc_, PolygonType *poly,
-                              const BoxType *clip_box);
-    void (*thindraw_pcb_polygon) (hidGC gc_, PolygonType *poly,
-                                  const BoxType *clip_box);
-    void (*fill_pcb_pad) (hidGC gc_, PadType *pad, bool clip, bool mask);
-    void (*thindraw_pcb_pad) (hidGC gc_, PadType *pad, bool clip, bool mask);
-    void (*fill_pcb_pv) (hidGC fg_gc, hidGC bg_gc, PinType *pv, bool drawHole, bool mask);
-    void (*thindraw_pcb_pv) (hidGC fg_gc, hidGC bg_gc, PinType *pv, bool drawHole, bool mask);
-    void (*fill_rect) (hidGC gc_, Coord x1_, Coord y1_, Coord x2_, Coord y2_);
 
+    HID_DRAW *graphics;
 
     /* This is for the printer.  If you call this for the GUI, xval and
        yval are ignored, and a dialog pops up to lead you through the
diff --git a/src/hid/batch/batch.c b/src/hid/batch/batch.c
index ca8caf0..e62e313 100644
--- a/src/hid/batch/batch.c
+++ b/src/hid/batch/batch.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -15,6 +13,7 @@
 #include "data.h"
 #include "misc.h"
 #include "hid.h"
+#include "hid_draw.h"
 #include "../hidint.h"
 #include "pcb-printf.h"
 
@@ -27,8 +26,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 /* This is a text-line "batch" HID, which exists for scripting and
    non-GUI needs.  */
 
@@ -135,7 +132,7 @@ batch_do_export (HID_Attr_Val * options)
   if (interactive)
     {
       printf("Entering %s version %s batch mode.\n", PACKAGE, VERSION);
-      printf("See http://pcb.gpleda.org for project information\n");
+      printf("See http://pcb.geda-project.org for project information\n");
     }
   while (1)
     {
@@ -184,7 +181,7 @@ batch_destroy_gc (hidGC gc)
 }
 
 static void
-batch_use_mask (int use_it)
+batch_use_mask (enum mask_mode mode)
 {
 }
 
@@ -329,14 +326,16 @@ batch_show_item (void *item)
 #include "dolists.h"
 
 static HID batch_hid;
+static HID_DRAW batch_graphics;
 
 void
 hid_batch_init ()
 {
   memset (&batch_hid, 0, sizeof (HID));
+  memset (&batch_graphics, 0, sizeof (HID_DRAW));
 
   common_nogui_init (&batch_hid);
-  common_draw_helpers_init (&batch_hid);
+  common_draw_helpers_init (&batch_graphics);
 
   batch_hid.struct_size           = sizeof (HID);
   batch_hid.name                  = "batch";
@@ -349,19 +348,6 @@ hid_batch_init ()
   batch_hid.invalidate_lr         = batch_invalidate_lr;
   batch_hid.invalidate_all        = batch_invalidate_all;
   batch_hid.set_layer             = batch_set_layer;
-  batch_hid.make_gc               = batch_make_gc;
-  batch_hid.destroy_gc            = batch_destroy_gc;
-  batch_hid.use_mask              = batch_use_mask;
-  batch_hid.set_color             = batch_set_color;
-  batch_hid.set_line_cap          = batch_set_line_cap;
-  batch_hid.set_line_width        = batch_set_line_width;
-  batch_hid.set_draw_xor          = batch_set_draw_xor;
-  batch_hid.draw_line             = batch_draw_line;
-  batch_hid.draw_arc              = batch_draw_arc;
-  batch_hid.draw_rect             = batch_draw_rect;
-  batch_hid.fill_circle           = batch_fill_circle;
-  batch_hid.fill_polygon          = batch_fill_polygon;
-  batch_hid.fill_rect             = batch_fill_rect;
   batch_hid.calibrate             = batch_calibrate;
   batch_hid.shift_is_pressed      = batch_shift_is_pressed;
   batch_hid.control_is_pressed    = batch_control_is_pressed;
@@ -377,6 +363,22 @@ hid_batch_init ()
   batch_hid.attribute_dialog      = batch_attribute_dialog;
   batch_hid.show_item             = batch_show_item;
 
+  batch_hid.graphics              = &batch_graphics;
+
+  batch_graphics.make_gc          = batch_make_gc;
+  batch_graphics.destroy_gc       = batch_destroy_gc;
+  batch_graphics.use_mask         = batch_use_mask;
+  batch_graphics.set_color        = batch_set_color;
+  batch_graphics.set_line_cap     = batch_set_line_cap;
+  batch_graphics.set_line_width   = batch_set_line_width;
+  batch_graphics.set_draw_xor     = batch_set_draw_xor;
+  batch_graphics.draw_line        = batch_draw_line;
+  batch_graphics.draw_arc         = batch_draw_arc;
+  batch_graphics.draw_rect        = batch_draw_rect;
+  batch_graphics.fill_circle      = batch_fill_circle;
+  batch_graphics.fill_polygon     = batch_fill_polygon;
+  batch_graphics.fill_rect        = batch_fill_rect;
+
   hid_register_hid (&batch_hid);
 #include "batch_lists.h"
 }
diff --git a/src/hid/bom/bom.c b/src/hid/bom/bom.c
index b3529cd..9c81682 100644
--- a/src/hid/bom/bom.c
+++ b/src/hid/bom/bom.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -24,8 +22,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 static HID_Attribute bom_options[] = {
 /* %start-doc options "8 BOM Creation"
 @ftable @code
@@ -154,28 +150,47 @@ CleanBOMString (char *in)
 
 
 static double
-xyToAngle (double x, double y)
+xyToAngle (double x, double y, bool morethan2pins)
 {
-  double theta;
-
-  if ((x > 0.0) && (y >= 0.0))
-    theta = 180.0;
-  else if ((x <= 0.0) && (y > 0.0))
-    theta = 90.0;
-  else if ((x < 0.0) && (y <= 0.0))
-    theta = 0.0;
-  else if ((x >= 0.0) && (y < 0.0))
-    theta = 270.0;
+  double d = atan2 (-y, x) * 180.0 / M_PI;
+
+  /* IPC 7351 defines different rules for 2 pin elements */
+  if (morethan2pins)
+    {
+      /* Multi pin case:
+       * Output 0 degrees if pin1 in is top left or top, i.e. between angles of
+       * 80 to 170 degrees.
+       * Pin #1 can be at dead top (e.g. certain PLCCs) or anywhere in the top
+       * left.
+       */	    
+      if (d < -100)
+        return 90; /* -180 to -100 */
+      else if (d < -10)
+        return 180; /* -100 to -10 */
+      else if (d < 80)
+        return 270; /* -10 to 80 */
+      else if (d < 170)
+        return 0; /* 80 to 170 */
+      else
+        return 90; /* 170 to 180 */
+    }
   else
     {
-      theta = 0.0;
-      Message ("xyToAngle(): unable to figure out angle of element\n"
-	       "     because the pin is at the centroid of the part.\n"
-	       "     This is a BUG!!!\n"
-	       "     Setting to %g degrees\n", theta);
+      /* 2 pin element:
+       * Output 0 degrees if pin #1 is in top left or left, i.e. in sector
+       * between angles of 95 and 185 degrees.
+       */
+      if (d < -175)
+        return 0; /* -180 to -175 */
+      else if (d < -85)
+        return 90; /* -175 to -85 */
+      else if (d < 5)
+        return 180; /* -85 to 5 */
+      else if (d < 95)
+        return 270; /* 5 to 95 */
+      else
+        return 0; /* 95 to 180 */
     }
-
-  return (theta);
 }
 
 static StringList *
@@ -306,6 +321,14 @@ print_and_free (FILE *fp, BomList *bom)
     }
 }
 
+/*
+ * In order of preference.
+ * Includes numbered and BGA pins.
+ * Possibly BGA pins can be missing, so we add a few to try.
+ */
+#define MAXREFPINS 32 /* max length of following list */
+static char *reference_pin_names[] = {"1", "2", "A1", "A2", "B1", "B2", 0};
+
 static int
 PrintBOM (void)
 {
@@ -313,15 +336,21 @@ PrintBOM (void)
   Coord x, y;
   double theta = 0.0;
   double sumx, sumy;
-  double pin1x = 0.0, pin1y = 0.0, pin1angle = 0.0;
-  double pin2x = 0.0, pin2y = 0.0;
-  int found_pin1;
-  int found_pin2;
+  int pinfound[MAXREFPINS];
+  double pinx[MAXREFPINS];
+  double piny[MAXREFPINS];
+  double pinangle[MAXREFPINS];
+  double padcentrex, padcentrey;
+  double centroidx, centroidy;
+  double pin1x, pin1y;
   int pin_cnt;
+  int found_any_not_at_centroid;
+  int found_any;
   time_t currenttime;
   FILE *fp;
   BomList *bom = NULL;
-  char *name, *descr, *value;
+  char *name, *descr, *value,*fixed_rotation;
+  int rpindex;
 
   fp = fopen (xy_filename, "w");
   if (!fp)
@@ -337,45 +366,44 @@ PrintBOM (void)
     const char *fmt = "%c UTC";
     strftime (utcTime, sizeof (utcTime), fmt, gmtime (&currenttime));
   }
-  fprintf (fp, "# $Id");
-  fprintf (fp, "$\n");
   fprintf (fp, "# PcbXY Version 1.0\n");
   fprintf (fp, "# Date: %s\n", utcTime);
   fprintf (fp, "# Author: %s\n", pcb_author ());
   fprintf (fp, "# Title: %s - PCB X-Y\n", UNKNOWN (PCB->Name));
   fprintf (fp, "# RefDes, Description, Value, X, Y, rotation, top/bottom\n");
-  fprintf (fp, "# X,Y in %s.  rotation in degrees.\n", xy_unit->in_suffix);
+  /* don't use localized xy_unit->in_suffix here since */
+  /* the line itself is not localized and not for GUI  */
+  fprintf (fp, "# X,Y in %s.  rotation in degrees.\n", xy_unit->suffix);
   fprintf (fp, "# --------------------------------------------\n");
 
   /*
    * For each element we calculate the centroid of the footprint.
-   * In addition, we need to extract some notion of rotation.  
+   * In addition, we need to extract some notion of rotation.
    * While here generate the BOM list
    */
 
   ELEMENT_LOOP (PCB->Data);
   {
 
-    /* initialize our pin count and our totals for finding the
-       centriod */
+    /* Initialize our pin count and our totals for finding the centroid. */
     pin_cnt = 0;
     sumx = 0.0;
     sumy = 0.0;
-    found_pin1 = 0;
-    found_pin2 = 0;
+    for (rpindex = 0; rpindex < MAXREFPINS; rpindex++)
+      pinfound[rpindex] = 0;
 
-    /* insert this component into the bill of materials list */
+    /* Insert this component into the bill of materials list. */
     bom = bom_insert ((char *)UNKNOWN (NAMEONPCB_NAME (element)),
-		      (char *)UNKNOWN (DESCRIPTION_NAME (element)),
-		      (char *)UNKNOWN (VALUE_NAME (element)), bom);
+                      (char *)UNKNOWN (DESCRIPTION_NAME (element)),
+                      (char *)UNKNOWN (VALUE_NAME (element)), bom);
 
 
     /*
-     * iterate over the pins and pads keeping a running count of how
+     * Iterate over the pins and pads keeping a running count of how
      * many pins/pads total and the sum of x and y coordinates
-     * 
+     *
      * While we're at it, store the location of pin/pad #1 and #2 if
-     * we can find them
+     * we can find them.
      */
 
     PIN_LOOP (element);
@@ -384,19 +412,16 @@ PrintBOM (void)
       sumy += (double) pin->Y;
       pin_cnt++;
 
-      if (NSTRCMP (pin->Number, "1") == 0)
-	{
-	  pin1x = (double) pin->X;
-	  pin1y = (double) pin->Y;
-	  pin1angle = 0.0;	/* pins have no notion of angle */
-	  found_pin1 = 1;
-	}
-      else if (NSTRCMP (pin->Number, "2") == 0)
-	{
-	  pin2x = (double) pin->X;
-	  pin2y = (double) pin->Y;
-	  found_pin2 = 1;
-	}
+      for (rpindex = 0; reference_pin_names[rpindex]; rpindex++)
+        {
+          if (NSTRCMP (pin->Number, reference_pin_names[rpindex]) == 0)
+            {
+                pinx[rpindex] = (double) pin->X;
+                piny[rpindex] = (double) pin->Y;
+                pinangle[rpindex] = 0.0; /* pins have no notion of angle */
+                pinfound[rpindex] = 1;
+            }
+        }
     }
     END_LOOP;
 
@@ -406,83 +431,111 @@ PrintBOM (void)
       sumy += (pad->Point1.Y + pad->Point2.Y) / 2.0;
       pin_cnt++;
 
-      if (NSTRCMP (pad->Number, "1") == 0)
-	{
-	  pin1x = (double) (pad->Point1.X + pad->Point2.X) / 2.0;
-	  pin1y = (double) (pad->Point1.Y + pad->Point2.Y) / 2.0;
-	  /*
-	   * NOTE:  We swap the Y points because in PCB, the Y-axis
-	   * is inverted.  Increasing Y moves down.  We want to deal
-	   * in the usual increasing Y moves up coordinates though.
-	   */
-	  pin1angle = (180.0 / M_PI) * atan2 (pad->Point1.Y - pad->Point2.Y,
-					      pad->Point2.X - pad->Point1.X);
-	  found_pin1 = 1;
-	}
-      else if (NSTRCMP (pad->Number, "2") == 0)
-	{
-	  pin2x = (double) (pad->Point1.X + pad->Point2.X) / 2.0;
-	  pin2y = (double) (pad->Point1.Y + pad->Point2.Y) / 2.0;
-	  found_pin2 = 1;
-	}
-
+      for (rpindex = 0; reference_pin_names[rpindex]; rpindex++)
+        {
+          if (NSTRCMP (pad->Number, reference_pin_names[rpindex]) == 0)
+            {
+              padcentrex = (double) (pad->Point1.X + pad->Point2.X) / 2.0;
+              padcentrey = (double) (pad->Point1.Y + pad->Point2.Y) / 2.0;
+              pinx[rpindex] = padcentrex;
+              piny[rpindex] = padcentrey;
+              /*
+               * NOTE: We swap the Y points because in PCB, the Y-axis
+               * is inverted.  Increasing Y moves down.  We want to deal
+               * in the usual increasing Y moves up coordinates though.
+               */
+              pinangle[rpindex] = (180.0 / M_PI) * atan2 (pad->Point1.Y - pad->Point2.Y,
+                pad->Point2.X - pad->Point1.X);
+              pinfound[rpindex]=1;
+            }
+        }
     }
     END_LOOP;
 
     if (pin_cnt > 0)
       {
-	x = sumx / (double) pin_cnt;
-	y = sumy / (double) pin_cnt;
-
-	if (found_pin1)
+	centroidx = sumx / (double) pin_cnt;
+	centroidy = sumy / (double) pin_cnt;
+	      
+	if (NSTRCMP( AttributeGetFromList (&element->Attributes,"xy-centre"), "origin") == 0 )
 	  {
-	    /* recenter pin #1 onto the axis which cross at the part
-	       centroid */
-	    pin1x -= x;
-	    pin1y -= y;
-	    pin1y = -1.0 * pin1y;
-
-	    /* if only 1 pin, use pin 1's angle */
-	    if (pin_cnt == 1)
-	      theta = pin1angle;
-	    else
-	      {
-		/* if pin #1 is at (0,0) use pin #2 for rotation */
-		if ((pin1x == 0.0) && (pin1y == 0.0))
-		  {
-		    if (found_pin2)
-		      theta = xyToAngle (pin2x, pin2y);
-		    else
-		      {
-			Message
-			  ("PrintBOM(): unable to figure out angle of element\n"
-			   "     %s because pin #1 is at the centroid of the part.\n"
-			   "     and I could not find pin #2's location\n"
-			   "     Setting to %g degrees\n",
-			   UNKNOWN (NAMEONPCB_NAME (element)), theta);
-		      }
-		  }
-		else
-		  theta = xyToAngle (pin1x, pin1y);
-	      }
+            x = element->MarkX;
+            y = element->MarkY;
 	  }
-	/* we did not find pin #1 */
 	else
 	  {
-	    theta = 0.0;
-	    Message
-	      ("PrintBOM(): unable to figure out angle because I could\n"
-	       "     not find pin #1 of element %s\n"
-	       "     Setting to %g degrees\n",
-	       UNKNOWN (NAMEONPCB_NAME (element)), theta);
+            x = centroidx;
+            y = centroidy;
 	  }
-
+	
+	fixed_rotation = AttributeGetFromList (&element->Attributes, "xy-fixed-rotation");
+	if (fixed_rotation)
+	  {	
+            /* The user specified a fixed rotation */
+            theta = atof (fixed_rotation);
+            found_any_not_at_centroid = 1;
+            found_any = 1;
+	  } 
+	else
+	  {
+            /* Find first reference pin not at the  centroid  */
+            found_any_not_at_centroid = 0;
+            found_any = 0;
+            theta = 0.0;
+            for (rpindex = 0;
+                 reference_pin_names[rpindex] && !found_any_not_at_centroid;
+                 rpindex++)
+              {
+		if (pinfound[rpindex])
+		  {
+                    found_any = 1;
+
+                    /* Recenter pin "#1" onto the axis which cross at the part
+                       centroid */
+                    pin1x = pinx[rpindex] - x;
+                    pin1y = piny[rpindex] - y;
+
+                    /* flip x, to reverse rotation for elements on back */
+                    if (FRONT (element) != 1)
+                        pin1x = -pin1x;
+
+                    /* if only 1 pin, use pin 1's angle */
+                    if (pin_cnt == 1)
+                      {
+                        theta = pinangle[rpindex];
+                        found_any_not_at_centroid = 1;
+                      }
+                    else if ((pin1x != 0.0) || (pin1y != 0.0))
+                      {
+                        theta = xyToAngle (pin1x, pin1y, pin_cnt > 2);
+                        found_any_not_at_centroid = 1;
+                      }
+                  }
+              }
+
+            if (!found_any)
+              {
+                Message
+                  ("PrintBOM(): unable to figure out angle because I could\n"
+                   "     not find a suitable reference pin of element %s\n"
+                   "     Setting to %g degrees\n",
+                   UNKNOWN (NAMEONPCB_NAME (element)), theta);
+              }
+            else if (!found_any_not_at_centroid)
+              {
+                Message
+                      ("PrintBOM(): unable to figure out angle of element\n"
+                       "     %s because the reference pin(s) are at the centroid of the part.\n"
+                       "     Setting to %g degrees\n",
+                       UNKNOWN (NAMEONPCB_NAME (element)), theta);
+	      }
+          }
 	name = CleanBOMString ((char *)UNKNOWN (NAMEONPCB_NAME (element)));
 	descr = CleanBOMString ((char *)UNKNOWN (DESCRIPTION_NAME (element)));
 	value = CleanBOMString ((char *)UNKNOWN (VALUE_NAME (element)));
 
  	y = PCB->MaxHeight - y;
-	pcb_fprintf (fp, "%m+%s,\"%s\",\"%s\",%mS,%.2mS,%g,%s\n",
+	pcb_fprintf (fp, "%m+%s,\"%s\",\"%s\",%.2mS,%.2mS,%g,%s\n",
 		     xy_unit->allow, name, descr, value, x, y,
 		     theta, FRONT (element) == 1 ? "top" : "bottom");
 	free (name);
@@ -504,8 +557,6 @@ PrintBOM (void)
       return 1;
     }
 
-  fprintf (fp, "# $Id");
-  fprintf (fp, "$\n");
   fprintf (fp, "# PcbBOM Version 1.0\n");
   fprintf (fp, "# Date: %s\n", utcTime);
   fprintf (fp, "# Author: %s\n", pcb_author ());
@@ -541,9 +592,8 @@ bom_do_export (HID_Attr_Val * options)
   if (!xy_filename)
     xy_filename = "pcb-out.xy";
 
-  if (options[HA_unit].int_value == -1)
-    xy_unit = options[HA_xymm].int_value ? get_unit_struct ("mm")
-                                         : get_unit_struct ("mil");
+  if (options[HA_xymm].int_value)
+    xy_unit = get_unit_struct ("mm");
   else
     xy_unit = &get_unit_list ()[options[HA_unit].int_value];
   PrintBOM ();
diff --git a/src/hid/common/actions.c b/src/hid/common/actions.c
index 13bb129..78595d7 100644
--- a/src/hid/common/actions.c
+++ b/src/hid/common/actions.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -20,8 +18,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 static HID_Action **all_actions = 0;
 static int all_actions_sorted = 0;
 static int n_actions = 0;
@@ -224,7 +220,7 @@ hid_actionv (const char *name, int argc, char **argv)
   if (!a)
     {
       int i;
-      Message ("no action %s(", name);
+      Message (_("no action %s("), name);
       for (i = 0; i < argc; i++)
         Message ("%s%s", i ? ", " : "", argv[i]);
       Message (")\n");
diff --git a/src/hid/common/draw_helpers.c b/src/hid/common/draw_helpers.c
index 03e82d8..685b614 100644
--- a/src/hid/common/draw_helpers.c
+++ b/src/hid/common/draw_helpers.c
@@ -1,6 +1,123 @@
 #include "global.h"
 #include "hid.h"
+#include "hid_draw.h"
+#include "data.h" /* For global "PCB" variable */
+#include "rotate.h" /* For RotateLineLowLevel() */
 #include "polygon.h"
+#include "draw_helpers.h"
+
+
+static void
+common_draw_pcb_line (hidGC gc, LineType *line)
+{
+  gui->graphics->set_line_cap (gc, Trace_Cap);
+  if (TEST_FLAG (THINDRAWFLAG, PCB))
+    gui->graphics->set_line_width (gc, 0);
+  else
+    gui->graphics->set_line_width (gc, line->Thickness);
+
+  gui->graphics->draw_line (gc,
+                            line->Point1.X, line->Point1.Y,
+                            line->Point2.X, line->Point2.Y);
+}
+
+static void
+common_draw_pcb_arc (hidGC gc, ArcType *arc)
+{
+  if (!arc->Thickness)
+    return;
+
+  if (TEST_FLAG (THINDRAWFLAG, PCB))
+    gui->graphics->set_line_width (gc, 0);
+  else
+    gui->graphics->set_line_width (gc, arc->Thickness);
+  gui->graphics->set_line_cap (gc, Trace_Cap);
+
+  gui->graphics->draw_arc (gc, arc->X, arc->Y, arc->Width, arc->Height, arc->StartAngle, arc->Delta);
+}
+
+/* ---------------------------------------------------------------------------
+ * drawing routine for text objects
+ */
+static void
+common_draw_pcb_text (hidGC gc, TextType *Text, Coord min_line_width)
+{
+  Coord x = 0;
+  unsigned char *string = (unsigned char *) Text->TextString;
+  Cardinal n;
+  FontType *font = &PCB->Font;
+
+  while (string && *string)
+    {
+      /* draw lines if symbol is valid and data is present */
+      if (*string <= MAX_FONTPOSITION && font->Symbol[*string].Valid)
+        {
+          LineType *line = font->Symbol[*string].Line;
+          LineType newline;
+
+          for (n = font->Symbol[*string].LineN; n; n--, line++)
+            {
+              /* create one line, scale, move, rotate and swap it */
+              newline = *line;
+              newline.Point1.X = SCALE_TEXT (newline.Point1.X + x, Text->Scale);
+              newline.Point1.Y = SCALE_TEXT (newline.Point1.Y, Text->Scale);
+              newline.Point2.X = SCALE_TEXT (newline.Point2.X + x, Text->Scale);
+              newline.Point2.Y = SCALE_TEXT (newline.Point2.Y, Text->Scale);
+              newline.Thickness = SCALE_TEXT (newline.Thickness, Text->Scale / 2);
+              if (newline.Thickness < min_line_width)
+                newline.Thickness = min_line_width;
+
+              RotateLineLowLevel (&newline, 0, 0, Text->Direction);
+
+              /* the labels of SMD objects on the bottom
+               * side haven't been swapped yet, only their offset
+               */
+              if (TEST_FLAG (ONSOLDERFLAG, Text))
+                {
+                  newline.Point1.X = SWAP_SIGN_X (newline.Point1.X);
+                  newline.Point1.Y = SWAP_SIGN_Y (newline.Point1.Y);
+                  newline.Point2.X = SWAP_SIGN_X (newline.Point2.X);
+                  newline.Point2.Y = SWAP_SIGN_Y (newline.Point2.Y);
+                }
+              /* add offset and draw line */
+              newline.Point1.X += Text->X;
+              newline.Point1.Y += Text->Y;
+              newline.Point2.X += Text->X;
+              newline.Point2.Y += Text->Y;
+              gui->graphics->draw_pcb_line (gc, &newline);
+            }
+
+          /* move on to next cursor position */
+          x += (font->Symbol[*string].Width + font->Symbol[*string].Delta);
+        }
+      else
+        {
+          /* the default symbol is a filled box */
+          BoxType defaultsymbol = PCB->Font.DefaultSymbol;
+          Coord size = (defaultsymbol.X2 - defaultsymbol.X1) * 6 / 5;
+
+          defaultsymbol.X1 = SCALE_TEXT (defaultsymbol.X1 + x, Text->Scale);
+          defaultsymbol.Y1 = SCALE_TEXT (defaultsymbol.Y1, Text->Scale);
+          defaultsymbol.X2 = SCALE_TEXT (defaultsymbol.X2 + x, Text->Scale);
+          defaultsymbol.Y2 = SCALE_TEXT (defaultsymbol.Y2, Text->Scale);
+
+          RotateBoxLowLevel (&defaultsymbol, 0, 0, Text->Direction);
+
+          /* add offset and draw box */
+          defaultsymbol.X1 += Text->X;
+          defaultsymbol.Y1 += Text->Y;
+          defaultsymbol.X2 += Text->X;
+          defaultsymbol.Y2 += Text->Y;
+          gui->graphics->fill_rect (gc,
+                                    defaultsymbol.X1, defaultsymbol.Y1,
+                                    defaultsymbol.X2, defaultsymbol.Y2);
+
+          /* move on to next cursor position */
+          x += size;
+        }
+      string++;
+    }
+}
 
 static void
 fill_contour (hidGC gc, PLINE *pl)
@@ -18,7 +135,7 @@ fill_contour (hidGC gc, PLINE *pl)
       y[i++] = v->point[1];
     }
 
-  gui->fill_polygon (gc, n, x, y);
+  gui->graphics->fill_polygon (gc, n, x, y);
 
   free (x);
   free (y);
@@ -31,13 +148,13 @@ thindraw_contour (hidGC gc, PLINE *pl)
   Coord last_x, last_y;
   Coord this_x, this_y;
 
-  gui->set_line_width (gc, 0);
-  gui->set_line_cap (gc, Round_Cap);
+  gui->graphics->set_line_width (gc, 0);
+  gui->graphics->set_line_cap (gc, Round_Cap);
 
   /* If the contour is round, use an arc drawing routine. */
   if (pl->is_round)
     {
-      gui->draw_arc (gc, pl->cx, pl->cy, pl->radius, pl->radius, 0, 360);
+      gui->graphics->draw_arc (gc, pl->cx, pl->cy, pl->radius, pl->radius, 0, 360);
       return;
     }
 
@@ -54,8 +171,8 @@ thindraw_contour (hidGC gc, PLINE *pl)
       this_x = v->point[0];
       this_y = v->point[1];
 
-      gui->draw_line (gc, last_x, last_y, this_x, this_y);
-      // gui->fill_circle (gc, this_x, this_y, 30);
+      gui->graphics->draw_line (gc, last_x, last_y, this_x, this_y);
+      // gui->graphics->fill_circle (gc, this_x, this_y, 30);
 
       last_x = this_x;
       last_y = this_y;
@@ -140,8 +257,34 @@ should_compute_no_holes (PolygonType *poly, const BoxType *clip_box)
 #undef BOUNDS_INSIDE_CLIP_THRESHOLD
 
 void
+common_gui_draw_pcb_polygon (hidGC gc, PolygonType *polygon, const BoxType *clip_box)
+{
+  if (polygon->Clipped == NULL)
+    return;
+
+  if (TEST_FLAG (THINDRAWFLAG, PCB) || TEST_FLAG (THINDRAWPOLYFLAG, PCB))
+    gui->graphics->thindraw_pcb_polygon (gc, polygon, clip_box);
+  else
+    gui->graphics->fill_pcb_polygon (gc, polygon, clip_box);
+
+  /* If checking planes, thin-draw any pieces which have been clipped away */
+  if (TEST_FLAG (CHECKPLANESFLAG, PCB) && !TEST_FLAG (FULLPOLYFLAG, polygon))
+    {
+      PolygonType poly = *polygon;
+
+      for (poly.Clipped = polygon->Clipped->f;
+           poly.Clipped != polygon->Clipped;
+           poly.Clipped = poly.Clipped->f)
+        gui->graphics->thindraw_pcb_polygon (gc, &poly, clip_box);
+    }
+}
+
+void
 common_fill_pcb_polygon (hidGC gc, PolygonType *poly, const BoxType *clip_box)
 {
+  if (poly->Clipped == NULL)
+    return;
+
   if (!poly->NoHolesValid)
     {
       /* If enough of the polygon is on-screen, compute the entire
@@ -191,8 +334,25 @@ void
 common_thindraw_pcb_polygon (hidGC gc, PolygonType *poly,
                              const BoxType *clip_box)
 {
+  if (poly->Clipped == NULL)
+    return;
+
   thindraw_contour (gc, poly->Clipped->contours);
   PolygonHoles (poly, clip_box, thindraw_hole_cb, gc);
+
+  /* Draw other parts of the polygon if fullpoly flag is set */
+  if (TEST_FLAG (FULLPOLYFLAG, poly))
+    {
+      PolygonType p = *poly;
+
+      for (p.Clipped = poly->Clipped->f;
+           p.Clipped != poly->Clipped;
+           p.Clipped = p.Clipped->f)
+        {
+          thindraw_contour (gc, p.Clipped->contours);
+          PolygonHoles (&p, clip_box, thindraw_hole_cb, gc);
+        }
+    }
 }
 
 void
@@ -214,8 +374,8 @@ common_thindraw_pcb_pad (hidGC gc, PadType *pad, bool clear, bool mask)
       x1 = x2; x2 = temp_x;
       y1 = y2; y2 = temp_y;
     }
-  gui->set_line_cap (gc, Round_Cap);
-  gui->set_line_width (gc, 0);
+  gui->graphics->set_line_cap (gc, Round_Cap);
+  gui->graphics->set_line_width (gc, 0);
   if (TEST_FLAG (SQUAREFLAG, pad))
     {
       /* slanted square pad */
@@ -231,14 +391,14 @@ common_thindraw_pcb_pad (hidGC gc, PadType *pad, bool clear, bool mask)
       tx = t * cos (theta + M_PI / 4) * sqrt (2.0);
       ty = t * sin (theta + M_PI / 4) * sqrt (2.0);
 
-      gui->draw_line (gc, x1 - tx, y1 - ty, x2 + ty, y2 - tx);
-      gui->draw_line (gc, x2 + ty, y2 - tx, x2 + tx, y2 + ty);
-      gui->draw_line (gc, x2 + tx, y2 + ty, x1 - ty, y1 + tx);
-      gui->draw_line (gc, x1 - ty, y1 + tx, x1 - tx, y1 - ty);
+      gui->graphics->draw_line (gc, x1 - tx, y1 - ty, x2 + ty, y2 - tx);
+      gui->graphics->draw_line (gc, x2 + ty, y2 - tx, x2 + tx, y2 + ty);
+      gui->graphics->draw_line (gc, x2 + tx, y2 + ty, x1 - ty, y1 + tx);
+      gui->graphics->draw_line (gc, x1 - ty, y1 + tx, x1 - tx, y1 - ty);
     }
   else if (x1 == x2 && y1 == y2)
     {
-      gui->draw_arc (gc, x1, y1, t, t, 0, 360);
+      gui->graphics->draw_arc (gc, x1, y1, t, t, 0, 360);
     }
   else
     {
@@ -252,14 +412,14 @@ common_thindraw_pcb_pad (hidGC gc, PadType *pad, bool clear, bool mask)
       ox = dy * h + 0.5 * SGN (dy);
       oy = -(dx * h + 0.5 * SGN (dx));
 
-      gui->draw_line (gc, x1 + ox, y1 + oy, x2 + ox, y2 + oy);
+      gui->graphics->draw_line (gc, x1 + ox, y1 + oy, x2 + ox, y2 + oy);
 
       if (abs (ox) >= pixel_slop || abs (oy) >= pixel_slop)
         {
           Angle angle = atan2 (dx, dy) * 57.295779;
-          gui->draw_line (gc, x1 - ox, y1 - oy, x2 - ox, y2 - oy);
-          gui->draw_arc (gc, x1, y1, t, t, angle - 180, 180);
-          gui->draw_arc (gc, x2, y2, t, t, angle, 180);
+          gui->graphics->draw_line (gc, x1 - ox, y1 - oy, x2 - ox, y2 - oy);
+          gui->graphics->draw_arc (gc, x1, y1, t, t, angle - 180, 180);
+          gui->graphics->draw_arc (gc, x2, y2, t, t, angle, 180);
         }
     }
 }
@@ -281,20 +441,20 @@ common_fill_pcb_pad (hidGC gc, PadType *pad, bool clear, bool mask)
           b = pad->Point1.Y - w / 2;
           r = l + w;
           t = b + w;
-          gui->fill_rect (gc, l, b, r, t);
+          gui->graphics->fill_rect (gc, l, b, r, t);
         }
       else
         {
-          gui->fill_circle (gc, pad->Point1.X, pad->Point1.Y, w / 2);
+          gui->graphics->fill_circle (gc, pad->Point1.X, pad->Point1.Y, w / 2);
         }
     }
   else
     {
-      gui->set_line_cap (gc, TEST_FLAG (SQUAREFLAG, pad) ?
+      gui->graphics->set_line_cap (gc, TEST_FLAG (SQUAREFLAG, pad) ?
                                Square_Cap : Round_Cap);
-      gui->set_line_width (gc, w);
+      gui->graphics->set_line_width (gc, w);
 
-      gui->draw_line (gc, pad->Point1.X, pad->Point1.Y,
+      gui->graphics->draw_line (gc, pad->Point1.X, pad->Point1.Y,
                           pad->Point2.X, pad->Point2.Y);
     }
 }
@@ -321,7 +481,7 @@ FloatPolyType;
 
 static void
 draw_octagon_poly (hidGC gc, Coord X, Coord Y,
-                   Coord Thickness, Coord thin_draw)
+                   Coord Thickness, bool thin_draw)
 {
   static FloatPolyType p[8] = {
     { 0.5,               -TAN_22_5_DEGREE_2},
@@ -359,16 +519,16 @@ draw_octagon_poly (hidGC gc, Coord X, Coord Y,
   if (thin_draw)
     {
       int i;
-      gui->set_line_cap (gc, Round_Cap);
-      gui->set_line_width (gc, 0);
+      gui->graphics->set_line_cap (gc, Round_Cap);
+      gui->graphics->set_line_width (gc, 0);
       polygon_x[8] = X + scaled_x[0];
       polygon_y[8] = Y + scaled_y[0];
       for (i = 0; i < 8; i++)
-        gui->draw_line (gc, polygon_x[i    ], polygon_y[i    ],
+        gui->graphics->draw_line (gc, polygon_x[i    ], polygon_y[i    ],
                             polygon_x[i + 1], polygon_y[i + 1]);
     }
   else
-    gui->fill_polygon (gc, 8, polygon_x, polygon_y);
+    gui->graphics->fill_polygon (gc, 8, polygon_x, polygon_y);
 }
 
 void
@@ -380,13 +540,13 @@ common_fill_pcb_pv (hidGC fg_gc, hidGC bg_gc, PinType *pv, bool drawHole, bool m
   if (TEST_FLAG (HOLEFLAG, pv))
     {
       if (mask)
-	gui->fill_circle (bg_gc, pv->X, pv->Y, r);
+	gui->graphics->fill_circle (bg_gc, pv->X, pv->Y, r);
       if (drawHole)
         {
-          gui->fill_circle (bg_gc, pv->X, pv->Y, r);
-          gui->set_line_cap (fg_gc, Round_Cap);
-          gui->set_line_width (fg_gc, 0);
-          gui->draw_arc (fg_gc, pv->X, pv->Y, r, r, 0, 360);
+          gui->graphics->fill_circle (bg_gc, pv->X, pv->Y, r);
+          gui->graphics->set_line_cap (fg_gc, Round_Cap);
+          gui->graphics->set_line_width (fg_gc, 0);
+          gui->graphics->draw_arc (fg_gc, pv->X, pv->Y, r, r, 0, 360);
         }
       return;
     }
@@ -398,16 +558,16 @@ common_fill_pcb_pv (hidGC fg_gc, hidGC bg_gc, PinType *pv, bool drawHole, bool m
       Coord r = l + w;
       Coord t = b + w;
 
-      gui->fill_rect (fg_gc, l, b, r, t);
+      gui->graphics->fill_rect (fg_gc, l, b, r, t);
     }
   else if (TEST_FLAG (OCTAGONFLAG, pv))
     draw_octagon_poly (fg_gc, pv->X, pv->Y, w, false);
   else /* draw a round pin or via */
-    gui->fill_circle (fg_gc, pv->X, pv->Y, r);
+    gui->graphics->fill_circle (fg_gc, pv->X, pv->Y, r);
 
   /* and the drilling hole  (which is always round) */
   if (drawHole)
-    gui->fill_circle (bg_gc, pv->X, pv->Y, pv->DrillingHole / 2);
+    gui->graphics->fill_circle (bg_gc, pv->X, pv->Y, pv->DrillingHole / 2);
 }
 
 void
@@ -419,13 +579,13 @@ common_thindraw_pcb_pv (hidGC fg_gc, hidGC bg_gc, PinType *pv, bool drawHole, bo
   if (TEST_FLAG (HOLEFLAG, pv))
     {
       if (mask)
-	gui->draw_arc (fg_gc, pv->X, pv->Y, r, r, 0, 360);
+	gui->graphics->draw_arc (fg_gc, pv->X, pv->Y, r, r, 0, 360);
       if (drawHole)
         {
 	  r = pv->DrillingHole / 2;
-          gui->set_line_cap (bg_gc, Round_Cap);
-          gui->set_line_width (bg_gc, 0);
-          gui->draw_arc (bg_gc, pv->X, pv->Y, r, r, 0, 360);
+          gui->graphics->set_line_cap (bg_gc, Round_Cap);
+          gui->graphics->set_line_width (bg_gc, 0);
+          gui->graphics->draw_arc (bg_gc, pv->X, pv->Y, r, r, 0, 360);
         }
       return;
     }
@@ -437,12 +597,12 @@ common_thindraw_pcb_pv (hidGC fg_gc, hidGC bg_gc, PinType *pv, bool drawHole, bo
       Coord r = l + w;
       Coord t = b + w;
 
-      gui->set_line_cap (fg_gc, Round_Cap);
-      gui->set_line_width (fg_gc, 0);
-      gui->draw_line (fg_gc, r, t, r, b);
-      gui->draw_line (fg_gc, l, t, l, b);
-      gui->draw_line (fg_gc, r, t, l, t);
-      gui->draw_line (fg_gc, r, b, l, b);
+      gui->graphics->set_line_cap (fg_gc, Round_Cap);
+      gui->graphics->set_line_width (fg_gc, 0);
+      gui->graphics->draw_line (fg_gc, r, t, r, b);
+      gui->graphics->draw_line (fg_gc, l, t, l, b);
+      gui->graphics->draw_line (fg_gc, r, t, l, t);
+      gui->graphics->draw_line (fg_gc, r, b, l, b);
 
     }
   else if (TEST_FLAG (OCTAGONFLAG, pv))
@@ -451,28 +611,33 @@ common_thindraw_pcb_pv (hidGC fg_gc, hidGC bg_gc, PinType *pv, bool drawHole, bo
     }
   else /* draw a round pin or via */
     {
-      gui->set_line_cap (fg_gc, Round_Cap);
-      gui->set_line_width (fg_gc, 0);
-      gui->draw_arc (fg_gc, pv->X, pv->Y, r, r, 0, 360);
+      gui->graphics->set_line_cap (fg_gc, Round_Cap);
+      gui->graphics->set_line_width (fg_gc, 0);
+      gui->graphics->draw_arc (fg_gc, pv->X, pv->Y, r, r, 0, 360);
     }
 
   /* and the drilling hole  (which is always round */
   if (drawHole)
     {
-      gui->set_line_cap (bg_gc, Round_Cap);
-      gui->set_line_width (bg_gc, 0);
-      gui->draw_arc (bg_gc, pv->X, pv->Y, pv->DrillingHole / 2,
+      gui->graphics->set_line_cap (bg_gc, Round_Cap);
+      gui->graphics->set_line_width (bg_gc, 0);
+      gui->graphics->draw_arc (bg_gc, pv->X, pv->Y, pv->DrillingHole / 2,
                      pv->DrillingHole / 2, 0, 360);
     }
 }
 
 void
-common_draw_helpers_init (HID *hid)
+common_draw_helpers_init (HID_DRAW *graphics)
 {
-  hid->fill_pcb_polygon     = common_fill_pcb_polygon;
-  hid->thindraw_pcb_polygon = common_thindraw_pcb_polygon;
-  hid->fill_pcb_pad         = common_fill_pcb_pad;
-  hid->thindraw_pcb_pad     = common_thindraw_pcb_pad;
-  hid->fill_pcb_pv          = common_fill_pcb_pv;
-  hid->thindraw_pcb_pv      = common_thindraw_pcb_pv;
+  graphics->draw_pcb_line        = common_draw_pcb_line;
+  graphics->draw_pcb_arc         = common_draw_pcb_arc;
+  graphics->draw_pcb_text        = common_draw_pcb_text;
+  graphics->draw_pcb_polygon     = common_fill_pcb_polygon; /* Default is the non-GUI case */
+
+  graphics->fill_pcb_polygon     = common_fill_pcb_polygon;
+  graphics->thindraw_pcb_polygon = common_thindraw_pcb_polygon;
+  graphics->fill_pcb_pad         = common_fill_pcb_pad;
+  graphics->thindraw_pcb_pad     = common_thindraw_pcb_pad;
+  graphics->fill_pcb_pv          = common_fill_pcb_pv;
+  graphics->thindraw_pcb_pv      = common_thindraw_pcb_pv;
 }
diff --git a/src/hid/common/draw_helpers.h b/src/hid/common/draw_helpers.h
index 8243fe4..fb5730c 100644
--- a/src/hid/common/draw_helpers.h
+++ b/src/hid/common/draw_helpers.h
@@ -1,9 +1,8 @@
-void common_fill_pcb_polygon (hidGC gc, PolygonType *poly,
-                              const BoxType *clip_box);
-void common_thindraw_pcb_polygon (hidGC gc, PolygonType *poly,
-                                  const BoxType *clip_box);
+void common_gui_draw_pcb_polygon (hidGC gc, PolygonType *poly, const BoxType *clip_box);
+void common_fill_pcb_polygon (hidGC gc, PolygonType *poly, const BoxType *clip_box);
+void common_thindraw_pcb_polygon (hidGC gc, PolygonType *poly, const BoxType *clip_box);
 void common_fill_pcb_pad (hidGC gc, PadType *pad, bool clear, bool mask);
 void common_thindraw_pcb_pad (hidGC gc, PadType *pad, bool clear, bool mask);
-void common_fill_pcb_pv (hidGC gc, PinType *pv, bool drawHole, bool mask);
+void common_fill_pcb_pv (hidGC fg_gc, hidGC bg_gc, PinType *pv, bool drawHole, bool mask);
 void common_thindraw_pcb_pv (hidGC fg_gc, hidGC bg_gc, PinType *pv, bool drawHole, bool mask);
-void common_draw_helpers_init (HID *hid);
+void common_draw_helpers_init (HID_DRAW *graphics);
diff --git a/src/hid/common/extents.c b/src/hid/common/extents.c
index 6cdc135..432e374 100644
--- a/src/hid/common/extents.c
+++ b/src/hid/common/extents.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -13,6 +11,7 @@
 #include "data.h"
 
 #include "hid.h"
+#include "hid_draw.h"
 #include "../hidint.h"
 #include "hid/common/draw_helpers.h"
 
@@ -20,12 +19,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
-#ifndef MAXINT
-#define MAXINT (((unsigned int)(~0))>>1)
-#endif
-
 static BoxType box;
 
 typedef struct hid_gc_struct
@@ -75,7 +68,7 @@ extents_destroy_gc (hidGC gc)
 }
 
 static void
-extents_use_mask (int use_it)
+extents_use_mask (enum mask_mode mode)
 {
 }
 
@@ -160,6 +153,7 @@ extents_fill_rect (hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2)
 }
 
 static HID extents_hid;
+static HID_DRAW extents_graphics;
 
 void
 hid_extents_init (void)
@@ -170,8 +164,9 @@ hid_extents_init (void)
     return;
 
   memset (&extents_hid, 0, sizeof (HID));
+  memset (&extents_graphics, 0, sizeof (HID_DRAW));
 
-  common_draw_helpers_init (&extents_hid);
+  common_draw_helpers_init (&extents_graphics);
 
   extents_hid.struct_size         = sizeof (HID);
   extents_hid.name                = "extents-extents";
@@ -179,23 +174,27 @@ hid_extents_init (void)
   extents_hid.poly_before         = 1;
 
   extents_hid.set_layer           = extents_set_layer;
-  extents_hid.make_gc             = extents_make_gc;
-  extents_hid.destroy_gc          = extents_destroy_gc;
-  extents_hid.use_mask            = extents_use_mask;
-  extents_hid.set_color           = extents_set_color;
-  extents_hid.set_line_cap        = extents_set_line_cap;
-  extents_hid.set_line_width      = extents_set_line_width;
-  extents_hid.set_draw_xor        = extents_set_draw_xor;
-  extents_hid.draw_line           = extents_draw_line;
-  extents_hid.draw_arc            = extents_draw_arc;
-  extents_hid.draw_rect           = extents_draw_rect;
-  extents_hid.fill_circle         = extents_fill_circle;
-  extents_hid.fill_polygon        = extents_fill_polygon;
-  extents_hid.fill_rect           = extents_fill_rect;
+
+  extents_hid.graphics            = &extents_graphics;
+
+  extents_graphics.make_gc        = extents_make_gc;
+  extents_graphics.destroy_gc     = extents_destroy_gc;
+  extents_graphics.use_mask       = extents_use_mask;
+  extents_graphics.set_color      = extents_set_color;
+  extents_graphics.set_line_cap   = extents_set_line_cap;
+  extents_graphics.set_line_width = extents_set_line_width;
+  extents_graphics.set_draw_xor   = extents_set_draw_xor;
+  extents_graphics.draw_line      = extents_draw_line;
+  extents_graphics.draw_arc       = extents_draw_arc;
+  extents_graphics.draw_rect      = extents_draw_rect;
+  extents_graphics.fill_circle    = extents_fill_circle;
+  extents_graphics.fill_polygon   = extents_fill_polygon;
+  extents_graphics.fill_rect      = extents_fill_rect;
 
   initialised = true;
 }
 
+
 BoxType *
 hid_get_extents (void *item)
 {
@@ -204,15 +203,15 @@ hid_get_extents (void *item)
   /* As this isn't a real "HID", we need to ensure we are initialised. */
   hid_extents_init ();
 
-  box.X1 = MAXINT;
-  box.Y1 = MAXINT;
-  box.X2 = -MAXINT;
-  box.Y2 = -MAXINT;
+  box.X1 = COORD_MAX;
+  box.Y1 = COORD_MAX;
+  box.X2 = -COORD_MAX - 1;
+  box.Y2 = -COORD_MAX - 1;
 
-  region.X1 = -MAXINT;
-  region.Y1 = -MAXINT;
-  region.X2 = MAXINT;
-  region.Y2 = MAXINT;
+  region.X1 = -COORD_MAX - 1;
+  region.Y1 = -COORD_MAX - 1;
+  region.X2 = COORD_MAX;
+  region.Y2 = COORD_MAX;
   hid_expose_callback (&extents_hid, &region, item);
 
   return &box;
diff --git a/src/hid/common/flags.c b/src/hid/common/flags.c
index 92032f9..9c87a54 100644
--- a/src/hid/common/flags.c
+++ b/src/hid/common/flags.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -19,8 +17,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 typedef struct HID_FlagNode
 {
   struct HID_FlagNode *next;
diff --git a/src/hid/common/hid_resource.c b/src/hid/common/hid_resource.c
index 842a058..a98dc46 100644
--- a/src/hid/common/hid_resource.c
+++ b/src/hid/common/hid_resource.c
@@ -71,6 +71,10 @@ button_name_to_num (const char *name)
     return 4;
   else if (strcasecmp (name, "down") == 0)
     return 5;
+  else if (strcasecmp (name, "scroll-left") == 0)
+    return 6;
+  else if (strcasecmp (name, "scroll-right") == 0)
+    return 7;
   else
     return atoi (name);
 }
diff --git a/src/hid/common/hidgl.c b/src/hid/common/hidgl.c
index 21edb5d..ac68ce0 100644
--- a/src/hid/common/hidgl.c
+++ b/src/hid/common/hidgl.c
@@ -70,7 +70,7 @@
 triangle_buffer buffer;
 float global_depth = 0;
 
-void
+static void
 hidgl_init_triangle_array (triangle_buffer *buffer)
 {
   buffer->triangle_count = 0;
@@ -215,7 +215,7 @@ void
 hidgl_draw_line (int cap, Coord width, Coord x1, Coord y1, Coord x2, Coord y2, double scale)
 {
   double angle;
-  float deltax, deltay, length;
+  double deltax, deltay, length;
   float wdx, wdy;
   int circular_caps = 0;
   int hairline = 0;
@@ -233,7 +233,6 @@ hidgl_draw_line (int cap, Coord width, Coord x1, Coord y1, Coord x2, Coord y2, d
 
   if (length == 0) {
     /* Assume the orientation of the line is horizontal */
-    angle = 0;
     wdx = -width / 2.;
     wdy = 0;
     length = 1.;
@@ -242,16 +241,10 @@ hidgl_draw_line (int cap, Coord width, Coord x1, Coord y1, Coord x2, Coord y2, d
   } else {
     wdy = deltax * width / 2. / length;
     wdx = -deltay * width / 2. / length;
-
-    if (deltay == 0.)
-      angle = (deltax < 0) ? 270. : 90.;
-    else
-      angle = 180. / M_PI * atanl (deltax / deltay);
-
-    if (deltay < 0)
-      angle += 180.;
   }
 
+  angle = -180. / M_PI * atan2 (deltay, deltax);
+
   switch (cap) {
     case Trace_Cap:
     case Round_Cap:
@@ -278,8 +271,8 @@ hidgl_draw_line (int cap, Coord width, Coord x1, Coord y1, Coord x2, Coord y2, d
   /* Don't bother capping hairlines */
   if (circular_caps && !hairline)
     {
-      draw_cap (width, x1, y1, angle, scale);
-      draw_cap (width, x2, y2, angle + 180., scale);
+      draw_cap (width, x1, y1, angle + 90., scale);
+      draw_cap (width, x2, y2, angle - 90., scale);
     }
 }
 
@@ -416,21 +409,17 @@ static GLenum tessVertexType;
 static int stashed_vertices;
 static int triangle_comp_idx;
 
+#ifndef CALLBACK
+#define CALLBACK
+#endif
 
-static void
+static void CALLBACK
 myError (GLenum errno)
 {
   printf ("gluTess error: %s\n", gluErrorString (errno));
 }
 
-static void
-myFreeCombined ()
-{
-  while (combined_num_to_free)
-    free (combined_to_free [-- combined_num_to_free]);
-}
-
-static void
+static void CALLBACK
 myCombine ( GLdouble coords[3], void *vertex_data[4], GLfloat weight[4], void **dataOut )
 {
 #define MAX_COMBINED_VERTICES 2500
@@ -461,7 +450,7 @@ myCombine ( GLdouble coords[3], void *vertex_data[4], GLfloat weight[4], void **
   *dataOut = new_vertex;
 }
 
-static void
+static void CALLBACK
 myBegin (GLenum type)
 {
   tessVertexType = type;
@@ -471,7 +460,7 @@ myBegin (GLenum type)
 
 static double global_scale;
 
-static void
+static void CALLBACK
 myVertex (GLdouble *vertex_data)
 {
   static GLfloat triangle_vertices [2 * 3];
@@ -521,7 +510,14 @@ myVertex (GLdouble *vertex_data)
         }
     }
   else
-    printf ("Vertex recieved with unknown type\n");
+    printf ("Vertex received with unknown type\n");
+}
+
+static void
+myFreeCombined ()
+{
+  while (combined_num_to_free)
+    free (combined_to_free [-- combined_num_to_free]);
 }
 
 void
@@ -617,9 +613,8 @@ static GLint stencil_bits;
 static int dirty_bits = 0;
 static int assigned_bits = 0;
 
-/* FIXME: JUST DRAWS THE FIRST PIECE.. TODO: SUPPORT FOR FULLPOLY POLYGONS */
-void
-hidgl_fill_pcb_polygon (PolygonType *poly, const BoxType *clip_box, double scale)
+static void
+fill_polyarea (POLYAREA *pa, const BoxType *clip_box, double scale)
 {
   int vertex_count = 0;
   PLINE *contour;
@@ -629,12 +624,6 @@ hidgl_fill_pcb_polygon (PolygonType *poly, const BoxType *clip_box, double scale
   info.scale = scale;
   global_scale = scale;
 
-  if (poly->Clipped == NULL)
-    {
-      fprintf (stderr, "hidgl_fill_pcb_polygon: poly->Clipped == NULL\n");
-      return;
-    }
-
   stencil_bit = hidgl_assign_clear_stencil_bit ();
   if (!stencil_bit)
     {
@@ -647,8 +636,7 @@ hidgl_fill_pcb_polygon (PolygonType *poly, const BoxType *clip_box, double scale
 
   /* Walk the polygon structure, counting vertices */
   /* This gives an upper bound on the amount of storage required */
-  for (contour = poly->Clipped->contours;
-       contour != NULL; contour = contour->next)
+  for (contour = pa->contours; contour != NULL; contour = contour->next)
     vertex_count = MAX (vertex_count, contour->Count);
 
   info.vertices = malloc (sizeof(GLdouble) * vertex_count * 3);
@@ -670,7 +658,7 @@ hidgl_fill_pcb_polygon (PolygonType *poly, const BoxType *clip_box, double scale
 
   /* Drawing operations now set our reference bit in the stencil buffer */
 
-  r_search (poly->Clipped->contour_tree, clip_box, NULL, do_hole, &info);
+  r_search (pa->contour_tree, clip_box, NULL, do_hole, &info);
   hidgl_flush_triangles (&buffer);
 
   glPopAttrib ();                               /* Restore the colour and stencil buffer write-mask etc.. */
@@ -686,7 +674,8 @@ hidgl_fill_pcb_polygon (PolygonType *poly, const BoxType *clip_box, double scale
   /* Drawing operations as masked to areas where the stencil buffer is '0' */
 
   /* Draw the polygon outer */
-  tesselate_contour (info.tobj, poly->Clipped->contours, info.vertices, scale);
+  tesselate_contour (info.tobj, pa->contours, info.vertices, scale);
+
   hidgl_flush_triangles (&buffer);
 
   /* Unassign our stencil buffer bit */
@@ -700,6 +689,23 @@ hidgl_fill_pcb_polygon (PolygonType *poly, const BoxType *clip_box, double scale
 }
 
 void
+hidgl_fill_pcb_polygon (PolygonType *poly, const BoxType *clip_box, double scale)
+{
+  if (poly->Clipped == NULL)
+    return;
+
+  fill_polyarea (poly->Clipped, clip_box, scale);
+
+  if (TEST_FLAG (FULLPOLYFLAG, poly))
+    {
+      POLYAREA *pa;
+
+      for (pa = poly->Clipped->f; pa != poly->Clipped; pa = pa->f)
+        fill_polyarea (pa, clip_box, scale);
+    }
+}
+
+void
 hidgl_fill_rect (Coord x1, Coord y1, Coord x2, Coord y2)
 {
   hidgl_ensure_triangle_space (&buffer, 2);
@@ -726,6 +732,18 @@ hidgl_init (void)
     }
 }
 
+void
+hidgl_start_render (void)
+{
+  hidgl_init ();
+  hidgl_init_triangle_array (&buffer);
+}
+
+void
+hidgl_finish_render (void)
+{
+}
+
 int
 hidgl_stencil_bits (void)
 {
diff --git a/src/hid/common/hidgl.h b/src/hid/common/hidgl.h
index 858270a..8d2c78c 100644
--- a/src/hid/common/hidgl.h
+++ b/src/hid/common/hidgl.h
@@ -33,7 +33,6 @@ typedef struct {
 extern triangle_buffer buffer;
 extern float global_depth;
 
-void hidgl_init_triangle_array (triangle_buffer *buffer);
 void hidgl_flush_triangles (triangle_buffer *buffer);
 void hidgl_ensure_triangle_space (triangle_buffer *buffer, int count);
 
@@ -77,6 +76,8 @@ void hidgl_fill_pcb_polygon (PolygonType *poly, const BoxType *clip_box, double
 void hidgl_fill_rect (Coord x1, Coord y1, Coord x2, Coord y2);
 
 void hidgl_init (void);
+void hidgl_start_render (void);
+void hidgl_finish_render (void);
 int hidgl_stencil_bits (void);
 int hidgl_assign_clear_stencil_bit (void);
 void hidgl_return_stencil_bit (int bit);
diff --git a/src/hid/common/hidinit.c b/src/hid/common/hidinit.c
index 0bdd395..9f05800 100644
--- a/src/hid/common/hidinit.c
+++ b/src/hid/common/hidinit.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -38,8 +36,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 #define HID_DEF(x) extern void hid_ ## x ## _init(void);
 #include "hid/common/hidlist.h"
 #undef HID_DEF
@@ -117,6 +113,7 @@ hid_load_dir (char *dirname)
       free (path);
     }
   free (dirname);
+  closedir (dir);
 }
 
 void
diff --git a/src/hid/common/hidnogui.c b/src/hid/common/hidnogui.c
index 9d88086..e9662d1 100644
--- a/src/hid/common/hidnogui.c
+++ b/src/hid/common/hidnogui.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -11,13 +9,12 @@
 
 #include "global.h"
 #include "hid.h"
+#include "hid_draw.h"
 
 #ifdef HAVE_LIBDMALLOC
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 /* This is the "gui" that is installed at startup, and is used when
    there is no other real GUI to use.  For the most part, it just
    stops the application from (1) crashing randomly, and (2) doing
@@ -85,7 +82,7 @@ nogui_destroy_gc (hidGC gc)
 }
 
 static void
-nogui_use_mask (int use_it)
+nogui_use_mask (enum mask_mode mode)
 {
   CRASH;
 }
@@ -151,7 +148,7 @@ nogui_fill_polygon (hidGC gc, int n_coords, Coord *x, Coord *y)
 }
 
 static void
-nogui_fill_pcb_polygon (hidGC gc, PolygonType *poly, const BoxType *clip_box)
+nogui_draw_pcb_polygon (hidGC gc, PolygonType *poly, const BoxType *clip_box)
 {
   CRASH;
 }
@@ -381,7 +378,7 @@ nogui_prompt_for (const char *msg, const char *default_string)
   if (answer == NULL)
     return strdup ((default_string != NULL) ? default_string : "");
   else
-    return strdup (answer);
+    return answer;
 }
 
 /* FIXME - this could use some enhancement to actually use the other
@@ -402,7 +399,7 @@ nogui_fileselect (const char *title, const char *descr,
   if (answer == NULL)
     return (default_file != NULL) ? strdup (default_file) : NULL;
   else
-    return strdup (answer);
+    return answer;
 }
 
 static int
@@ -458,25 +455,6 @@ common_nogui_init (HID *hid)
   hid->invalidate_all =       nogui_invalidate_all;
   hid->set_layer =            nogui_set_layer;
   hid->end_layer =            nogui_end_layer;
-  hid->make_gc =              nogui_make_gc;
-  hid->destroy_gc =           nogui_destroy_gc;
-  hid->use_mask =             nogui_use_mask;
-  hid->set_color =            nogui_set_color;
-  hid->set_line_cap =         nogui_set_line_cap;
-  hid->set_line_width =       nogui_set_line_width;
-  hid->set_draw_xor =         nogui_set_draw_xor;
-  hid->set_draw_faded =       nogui_set_draw_faded;
-  hid->draw_line =            nogui_draw_line;
-  hid->draw_arc =             nogui_draw_arc;
-  hid->draw_rect =            nogui_draw_rect;
-  hid->fill_circle =          nogui_fill_circle;
-  hid->fill_polygon =         nogui_fill_polygon;
-  hid->fill_pcb_polygon =     nogui_fill_pcb_polygon;
-  hid->fill_pcb_pad =         nogui_fill_pcb_pad;
-  hid->thindraw_pcb_pad =     nogui_thindraw_pcb_pad;
-  hid->fill_pcb_pv =          nogui_fill_pcb_pv;
-  hid->thindraw_pcb_pv =      nogui_thindraw_pcb_pv;
-  hid->fill_rect =            nogui_fill_rect;
   hid->calibrate =            nogui_calibrate;
   hid->shift_is_pressed =     nogui_shift_is_pressed;
   hid->control_is_pressed =   nogui_control_is_pressed;
@@ -505,19 +483,48 @@ common_nogui_init (HID *hid)
   hid->finish_debug_draw =    nogui_finish_debug_draw;
 }
 
+void
+common_nogui_graphics_init (HID_DRAW *graphics)
+{
+  graphics->make_gc =         nogui_make_gc;
+  graphics->destroy_gc =      nogui_destroy_gc;
+  graphics->use_mask =        nogui_use_mask;
+  graphics->set_color =       nogui_set_color;
+  graphics->set_line_cap =    nogui_set_line_cap;
+  graphics->set_line_width =  nogui_set_line_width;
+  graphics->set_draw_xor =    nogui_set_draw_xor;
+  graphics->set_draw_faded =  nogui_set_draw_faded;
+  graphics->draw_line =       nogui_draw_line;
+  graphics->draw_arc =        nogui_draw_arc;
+  graphics->draw_rect =       nogui_draw_rect;
+  graphics->fill_circle =     nogui_fill_circle;
+  graphics->fill_polygon =    nogui_fill_polygon;
+  graphics->fill_rect =       nogui_fill_rect;
+
+  graphics->draw_pcb_polygon = nogui_draw_pcb_polygon;
+  graphics->fill_pcb_pad =     nogui_fill_pcb_pad;
+  graphics->thindraw_pcb_pad = nogui_thindraw_pcb_pad;
+  graphics->fill_pcb_pv =      nogui_fill_pcb_pv;
+  graphics->thindraw_pcb_pv =  nogui_thindraw_pcb_pv;
+}
+
 static HID nogui_hid;
+static HID_DRAW nogui_graphics;
 
 HID *
 hid_nogui_get_hid (void)
 {
   memset (&nogui_hid, 0, sizeof (HID));
+  memset (&nogui_graphics, 0, sizeof (HID_DRAW));
 
   nogui_hid.struct_size = sizeof (HID);
   nogui_hid.name        = "nogui";
   nogui_hid.description = "Default GUI when no other GUI is present.  "
                           "Does nothing.";
+  nogui_hid.graphics    = &nogui_graphics;
 
   common_nogui_init (&nogui_hid);
+  common_nogui_graphics_init (&nogui_graphics);
 
   return &nogui_hid;
 }
diff --git a/src/hid/common/trackball.c b/src/hid/common/trackball.c
new file mode 100644
index 0000000..c4b8501
--- /dev/null
+++ b/src/hid/common/trackball.c
@@ -0,0 +1,324 @@
+/*
+ * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
+ * ALL RIGHTS RESERVED
+ * Permission to use, copy, modify, and distribute this software for
+ * any purpose and without fee is hereby granted, provided that the above
+ * copyright notice appear in all copies and that both the copyright notice
+ * and this permission notice appear in supporting documentation, and that
+ * the name of Silicon Graphics, Inc. not be used in advertising
+ * or publicity pertaining to distribution of the software without specific,
+ * written prior permission.
+ *
+ * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
+ * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
+ * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
+ * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
+ * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
+ * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
+ * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
+ * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
+ * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN PAD_CONNECTION WITH THE
+ * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * US Government Users Restricted Rights
+ * Use, duplication, or disclosure by the Government is subject to
+ * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
+ * (c)(1)(ii) of the Rights in Technical Data and Computer Software
+ * clause at DFARS 252.227-7013 and/or in similar or successor
+ * clauses in the FAR or the DOD or NASA FAR Supplement.
+ * Unpublished-- rights reserved under the copyright laws of the
+ * United States.  Contractor/manufacturer is Silicon Graphics,
+ * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
+ *
+ * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
+ */
+/*
+ * Trackball code:
+ *
+ * Implementation of a virtual trackball.
+ * Implemented by Gavin Bell, lots of ideas from Thant Tessman and
+ *   the August '88 issue of Siggraph's "Computer Graphics," pp. 121-129.
+ *
+ * Vector manip code:
+ *
+ * Original code from:
+ * David M. Ciemiewicz, Mark Grossman, Henry Moreton, and Paul Haeberli
+ *
+ * Much mucking with by:
+ * Gavin Bell
+ */
+#include <math.h>
+#include "trackball.h"
+
+/*
+ * This size should really be based on the distance from the center of
+ * rotation to the point on the object underneath the mouse.  That
+ * point would then track the mouse as closely as possible.  This is a
+ * simple example, though, so that is left as an Exercise for the
+ * Programmer.
+ */
+#define TRACKBALLSIZE  (0.8f)
+
+/*
+ * Local function prototypes (not defined in trackball.h)
+ */
+static float tb_project_to_sphere(float, float, float);
+static void normalize_quat(float [4]);
+
+void
+vzero(float *v)
+{
+    v[0] = 0.0;
+    v[1] = 0.0;
+    v[2] = 0.0;
+}
+
+void
+vset(float *v, float x, float y, float z)
+{
+    v[0] = x;
+    v[1] = y;
+    v[2] = z;
+}
+
+void
+vsub(const float *src1, const float *src2, float *dst)
+{
+    dst[0] = src1[0] - src2[0];
+    dst[1] = src1[1] - src2[1];
+    dst[2] = src1[2] - src2[2];
+}
+
+void
+vcopy(const float *v1, float *v2)
+{
+    register int i;
+    for (i = 0 ; i < 3 ; i++)
+        v2[i] = v1[i];
+}
+
+void
+vcross(const float *v1, const float *v2, float *cross)
+{
+    float temp[3];
+
+    temp[0] = (v1[1] * v2[2]) - (v1[2] * v2[1]);
+    temp[1] = (v1[2] * v2[0]) - (v1[0] * v2[2]);
+    temp[2] = (v1[0] * v2[1]) - (v1[1] * v2[0]);
+    vcopy(temp, cross);
+}
+
+float
+vlength(const float *v)
+{
+    return (float) sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
+}
+
+void
+vscale(float *v, float div)
+{
+    v[0] *= div;
+    v[1] *= div;
+    v[2] *= div;
+}
+
+void
+vnormal(float *v)
+{
+    vscale(v, 1.0f/vlength(v));
+}
+
+float
+vdot(const float *v1, const float *v2)
+{
+    return v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2];
+}
+
+void
+vadd(const float *src1, const float *src2, float *dst)
+{
+    dst[0] = src1[0] + src2[0];
+    dst[1] = src1[1] + src2[1];
+    dst[2] = src1[2] + src2[2];
+}
+
+/*
+ * Ok, simulate a track-ball.  Project the points onto the virtual
+ * trackball, then figure out the axis of rotation, which is the cross
+ * product of P1 P2 and O P1 (O is the center of the ball, 0,0,0)
+ * Note:  This is a deformed trackball-- is a trackball in the center,
+ * but is deformed into a hyperbolic sheet of rotation away from the
+ * center.  This particular function was chosen after trying out
+ * several variations.
+ *
+ * It is assumed that the arguments to this routine are in the range
+ * (-1.0 ... 1.0)
+ */
+void
+trackball(float q[4], float p1x, float p1y, float p2x, float p2y)
+{
+    float a[3]; /* Axis of rotation */
+    float phi;  /* how much to rotate about axis */
+    float p1[3], p2[3], d[3];
+    float t;
+
+    if (p1x == p2x && p1y == p2y) {
+        /* Zero rotation */
+        vzero(q);
+        q[3] = 1.0;
+        return;
+    }
+
+    /*
+     * First, figure out z-coordinates for projection of P1 and P2 to
+     * deformed sphere
+     */
+    vset(p1, p1x, p1y, tb_project_to_sphere(TRACKBALLSIZE, p1x, p1y));
+    vset(p2, p2x, p2y, tb_project_to_sphere(TRACKBALLSIZE, p2x, p2y));
+
+    /*
+     *  Now, we want the cross product of P1 and P2
+     */
+    vcross(p2,p1,a);
+
+    /*
+     *  Figure out how much to rotate around that axis.
+     */
+    vsub(p1, p2, d);
+    t = vlength(d) / (2.0f*TRACKBALLSIZE);
+
+    /*
+     * Avoid problems with out-of-control values...
+     */
+    if (t > 1.0) t = 1.0;
+    if (t < -1.0) t = -1.0;
+    phi = 2.0f * (float) asin(t);
+
+    axis_to_quat(a,phi,q);
+}
+
+/*
+ *  Given an axis and angle, compute quaternion.
+ */
+void
+axis_to_quat(float a[3], float phi, float q[4])
+{
+    vnormal(a);
+    vcopy(a, q);
+    vscale(q, (float) sin(phi/2.0));
+    q[3] = (float) cos(phi/2.0);
+}
+
+/*
+ * Project an x,y pair onto a sphere of radius r OR a hyperbolic sheet
+ * if we are away from the center of the sphere.
+ */
+static float
+tb_project_to_sphere(float r, float x, float y)
+{
+    float d, t, z;
+
+    d = (float) sqrt(x*x + y*y);
+    if (d < r * 0.70710678118654752440) {    /* Inside sphere */
+        z = (float) sqrt(r*r - d*d);
+    } else {           /* On hyperbola */
+        t = r / 1.41421356237309504880f;
+        z = t*t / d;
+    }
+    return z;
+}
+
+/*
+ * Given two rotations, e1 and e2, expressed as quaternion rotations,
+ * figure out the equivalent single rotation and stuff it into dest.
+ *
+ * This routine also normalizes the result every RENORMCOUNT times it is
+ * called, to keep error from creeping in.
+ *
+ * NOTE: This routine is written so that q1 or q2 may be the same
+ * as dest (or each other).
+ */
+
+#define RENORMCOUNT 97
+
+void
+add_quats(float q1[4], float q2[4], float dest[4])
+{
+    static int count=0;
+    float t1[4], t2[4], t3[4];
+    float tf[4];
+
+    vcopy(q1,t1);
+    vscale(t1,q2[3]);
+
+    vcopy(q2,t2);
+    vscale(t2,q1[3]);
+
+    vcross(q2,q1,t3);
+    vadd(t1,t2,tf);
+    vadd(t3,tf,tf);
+    tf[3] = q1[3] * q2[3] - vdot(q1,q2);
+
+    dest[0] = tf[0];
+    dest[1] = tf[1];
+    dest[2] = tf[2];
+    dest[3] = tf[3];
+
+    if (++count > RENORMCOUNT) {
+        count = 0;
+        normalize_quat(dest);
+    }
+}
+
+/*
+ * Quaternions always obey:  a^2 + b^2 + c^2 + d^2 = 1.0
+ * If they don't add up to 1.0, dividing by their magnitued will
+ * renormalize them.
+ *
+ * Note: See the following for more information on quaternions:
+ *
+ * - Shoemake, K., Animating rotation with quaternion curves, Computer
+ *   Graphics 19, No 3 (Proc. SIGGRAPH'85), 245-254, 1985.
+ * - Pletinckx, D., Quaternion calculus as a basic tool in computer
+ *   graphics, The Visual Computer 5, 2-13, 1989.
+ */
+static void
+normalize_quat(float q[4])
+{
+    int i;
+    float mag;
+
+    mag = (q[0]*q[0] + q[1]*q[1] + q[2]*q[2] + q[3]*q[3]);
+    for (i = 0; i < 4; i++) q[i] /= mag;
+}
+
+/*
+ * Build a rotation matrix, given a quaternion rotation.
+ *
+ */
+void
+build_rotmatrix(float m[4][4], float q[4])
+{
+    m[0][0] = 1.0f - 2.0f * (q[1] * q[1] + q[2] * q[2]);
+    m[0][1] = 2.0f * (q[0] * q[1] - q[2] * q[3]);
+    m[0][2] = 2.0f * (q[2] * q[0] + q[1] * q[3]);
+    m[0][3] = 0.0f;
+
+    m[1][0] = 2.0f * (q[0] * q[1] + q[2] * q[3]);
+    m[1][1]= 1.0f - 2.0f * (q[2] * q[2] + q[0] * q[0]);
+    m[1][2] = 2.0f * (q[1] * q[2] - q[0] * q[3]);
+    m[1][3] = 0.0f;
+
+    m[2][0] = 2.0f * (q[2] * q[0] - q[1] * q[3]);
+    m[2][1] = 2.0f * (q[1] * q[2] + q[0] * q[3]);
+    m[2][2] = 1.0f - 2.0f * (q[1] * q[1] + q[0] * q[0]);
+    m[2][3] = 0.0f;
+
+    m[3][0] = 0.0f;
+    m[3][1] = 0.0f;
+    m[3][2] = 0.0f;
+    m[3][3] = 1.0f;
+}
+
diff --git a/src/hid/common/trackball.h b/src/hid/common/trackball.h
new file mode 100644
index 0000000..ed0c267
--- /dev/null
+++ b/src/hid/common/trackball.h
@@ -0,0 +1,78 @@
+/*
+ * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
+ * ALL RIGHTS RESERVED
+ * Permission to use, copy, modify, and distribute this software for
+ * any purpose and without fee is hereby granted, provided that the above
+ * copyright notice appear in all copies and that both the copyright notice
+ * and this permission notice appear in supporting documentation, and that
+ * the name of Silicon Graphics, Inc. not be used in advertising
+ * or publicity pertaining to distribution of the software without specific,
+ * written prior permission.
+ *
+ * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
+ * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
+ * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
+ * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
+ * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
+ * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
+ * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
+ * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
+ * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN PAD_CONNECTION WITH THE
+ * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * US Government Users Restricted Rights
+ * Use, duplication, or disclosure by the Government is subject to
+ * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
+ * (c)(1)(ii) of the Rights in Technical Data and Computer Software
+ * clause at DFARS 252.227-7013 and/or in similar or successor
+ * clauses in the FAR or the DOD or NASA FAR Supplement.
+ * Unpublished-- rights reserved under the copyright laws of the
+ * United States.  Contractor/manufacturer is Silicon Graphics,
+ * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
+ *
+ * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
+ */
+/*
+ * trackball.h
+ * A virtual trackball implementation
+ * Written by Gavin Bell for Silicon Graphics, November 1988.
+ */
+
+/*
+ * Pass the x and y coordinates of the last and current positions of
+ * the mouse, scaled so they are from (-1.0 ... 1.0).
+ *
+ * The resulting rotation is returned as a quaternion rotation in the
+ * first paramater.
+ */
+void
+trackball(float q[4], float p1x, float p1y, float p2x, float p2y);
+
+/*
+ * Given two quaternions, add them together to get a third quaternion.
+ * Adding quaternions to get a compound rotation is analagous to adding
+ * translations to get a compound translation.  When incrementally
+ * adding rotations, the first argument here should be the new
+ * rotation, the second and third the total rotation (which will be
+ * over-written with the resulting new total rotation).
+ */
+void
+add_quats(float *q1, float *q2, float *dest);
+
+/*
+ * A useful function, builds a rotation matrix in Matrix based on
+ * given quaternion.
+ */
+void
+build_rotmatrix(float m[4][4], float q[4]);
+
+/*
+ * This function computes a quaternion based on an axis (defined by
+ * the given vector) and an angle about which to rotate.  The angle is
+ * expressed in radians.  The result is put into the third argument.
+ */
+void
+axis_to_quat(float a[3], float phi, float q[4]);
+
diff --git a/src/hid/gcode/curve.c b/src/hid/gcode/curve.c
index abf85d7..24b927c 100644
--- a/src/hid/gcode/curve.c
+++ b/src/hid/gcode/curve.c
@@ -2,7 +2,7 @@
    This file is part of Potrace. It is free software and it is covered
    by the GNU General Public License. See the file COPYING for details. */
 
-/* $Id: curve.c 147 2007-04-09 00:44:09Z selinger $ */
+/* curve.c 147 2007-04-09 00:44:09Z selinger */
 /* private part of the path and curve data structures */
 
 #include <stdio.h>
diff --git a/src/hid/gcode/decompose.c b/src/hid/gcode/decompose.c
index 0b42882..eeac028 100644
--- a/src/hid/gcode/decompose.c
+++ b/src/hid/gcode/decompose.c
@@ -2,7 +2,7 @@
    This file is part of Potrace. It is free software and it is covered
    by the GNU General Public License. See the file COPYING for details. */
 
-/* $Id: decompose.c 146 2007-04-09 00:43:46Z selinger $ */
+/* decompose.c 146 2007-04-09 00:43:46Z selinger */
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/src/hid/gcode/decompose.h b/src/hid/gcode/decompose.h
index 333003e..9c11429 100644
--- a/src/hid/gcode/decompose.h
+++ b/src/hid/gcode/decompose.h
@@ -2,7 +2,7 @@
    This file is part of Potrace. It is free software and it is covered
    by the GNU General Public License. See the file COPYING for details. */
 
-/* $Id: decompose.h 147 2007-04-09 00:44:09Z selinger $ */
+/* decompose.h 147 2007-04-09 00:44:09Z selinger */
 
 #ifndef DECOMPOSE_H
 #define DECOMPOSE_H
diff --git a/src/hid/gcode/gcode.c b/src/hid/gcode/gcode.c
index 44a71fe..208d02d 100644
--- a/src/hid/gcode/gcode.c
+++ b/src/hid/gcode/gcode.c
@@ -4,8 +4,9 @@
  *  PCB, interactive printed circuit board design
  *
  *  GCODE export HID
- *  Copyright (C) 2010 Alberto Maccioni
- *  this code is based on the NELMA export HID, the PNG export HID,
+ *  Copyright (c) 2010 Alberto Maccioni
+ *  Copyright (c) 2012 Markus Hitter (mah at jump-ing.de)
+ *  This code is based on the NELMA export HID, the PNG export HID,
  *  and potrace, a tracing program by Peter Selinger
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -25,11 +26,11 @@
  */
 
 /*
- * This HID exports a PCB layout into: 
+ * This HID exports a PCB layout into:
  * one layer mask file (PNG format) per copper layer,
- * one G-CODE CNC drill file.
+ * one G-CODE CNC drill file per drill size
  * one G-CODE CNC file per copper layer.
- * The latter is used by a CNC milling machine to mill the pcb.  
+ * The latter is used by a CNC milling machine to mill the pcb.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -44,18 +45,23 @@
 
 #include <time.h>
 
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
+
 #include "global.h"
 #include "error.h" /* Message() */
 #include "data.h"
+#include "change.h" /* UpdateExtents() */
 #include "misc.h"
 #include "rats.h"
 
 #include "hid.h"
+#include "hid_draw.h"
 #include "../hidint.h"
 #include <gd.h>
 #include "hid/common/hidnogui.h"
 #include "hid/common/draw_helpers.h"
-#include "gcode.h"
 #include "bitmap.h"
 #include "curve.h"
 #include "potracelib.h"
@@ -70,6 +76,10 @@
 #endif
 
 #define CRASH fprintf(stderr, "HID error: pcb called unimplemented GCODE function %s.\n", __FUNCTION__); abort()
+
+static HID gcode_hid;
+static HID_DRAW gcode_graphics;
+
 struct color_struct
 {
   /* the descriptor used by the gd library */
@@ -86,7 +96,6 @@ struct hid_gc_struct
   int width;
   unsigned char r, g, b;
   int erase;
-  int faded;
   struct color_struct *color;
   gdImagePtr brush;
 };
@@ -94,11 +103,10 @@ struct hid_gc_struct
 static struct color_struct *black = NULL, *white = NULL;
 static int linewidth = -1;
 static gdImagePtr lastbrush = (gdImagePtr)((void *) -1);
-static int lastcolor = -1;
 
 /* gd image and file for PNG export */
 static gdImagePtr gcode_im = NULL;
-static FILE *gcode_f = NULL, *gcode_f2 = NULL;
+static FILE *gcode_f = NULL;
 
 static int is_mask;
 static int is_drill;
@@ -113,65 +121,132 @@ static int gcode_export_group[MAX_LAYER];
 /* Group that is currently exported. */
 static int gcode_cur_group;
 
-/* Filename prefix that will be used when saving files. */
+/* Filename prefix and suffix that will be used when saving files. */
 static const char *gcode_basename = NULL;
 
 /* Horizontal DPI (grid points per inch) */
 static int gcode_dpi = -1;
 
-static double gcode_cutdepth = 0;	/* milling depth (inch) */
-static double gcode_drilldepth = 0;	/* drilling depth (inch) */
-static double gcode_safeZ = 100;	/* safe Z (inch) */
-static double gcode_toolradius = 0;	/* tool radius(inch) */
+static double gcode_cutdepth = 0;       /* milling depth (inch) */
+static double gcode_isoplunge = 0;      /* isolation milling plunge feedrate */
+static double gcode_isofeedrate = 0;    /* isolation milling feedrate */
+static char gcode_predrill;
+static double gcode_drilldepth = 0;     /* drilling depth (mm or in) */
+static double gcode_drillfeedrate = 0;  /* drilling feedrate */
+static double gcode_safeZ = 100;        /* safe Z (mm or in) */
+static int gcode_toolradius = 0;        /* iso-mill tool radius (1/100 mil) */
+static char gcode_drillmill = 0;        /* wether to drill with the mill tool */
+static double gcode_milldepth = 0;      /* outline milling depth (mm or in) */
+static double gcode_milltoolradius = 0; /* outline-mill tool radius (mm or in)*/
+static double gcode_millplunge = 0;     /* outline-milling plunge feedrate */
+static double gcode_millfeedrate = 0;   /* outline-milling feedrate */
+static char gcode_advanced = 0;
 static int save_drill = 0;
-static int n_drill = 0;
-static int nmax_drill = 0;
-struct drill_struct
+
+/* structure to represent a single hole */
+struct drill_hole
 {
   double x;
   double y;
 };
 
-static struct drill_struct *drill = 0;
+/* structure to represent all holes of a given size */
+struct single_size_drills
+{
+  double diameter_inches;
 
-static const char *units[] = {
-  "mm",
-  "mil",
-  "um",
-  "inch",
-  NULL
+  int n_holes;
+  int n_holes_allocated;
+  struct drill_hole* holes;
 };
 
+/* at the start we have no drills at all */
+static struct single_size_drills* drills             = NULL;
+static int                        n_drills           = 0;
+static int                        n_drills_allocated = 0;
+
 HID_Attribute gcode_attribute_list[] = {
   /* other HIDs expect this to be first.  */
-  {"basename", "File name prefix",
+  {"basename", "File name prefix and suffix,\n"
+               "layer names will be inserted before the suffix.",
    HID_String, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_basename 0
 
-  {"dpi", "Resolution of intermediate image (pixels/inch)",
-   HID_Integer, 0, 2000, {600, 0, 0}, 0, 0},
-#define HA_dpi 1
+  {"measurement-unit", "Measurement unit used in the G-code output.",
+   HID_Unit, 0, 0, {3, 0, 0}, NULL, 0},
+#define HA_unit 1
 
-  {"mill-depth", "Milling depth",
-   HID_Real, -1000, 1000, {0, 0, -0.05}, 0, 0},
-#define HA_cutdepth 2
+  {"dpi", "Accuracy of the mill path generation in pixels/inch.",
+   HID_Integer, 0, 2000, {600, 0, 0}, 0, 0},
+#define HA_dpi 2
 
-  {"safe-Z", "Safe Z for traverse move",
+  {"safe-Z", "Safe Z for traverse movements of all operations.",
    HID_Real, -1000, 10000, {0, 0, 2}, 0, 0},
 #define HA_safeZ 3
 
-  {"tool-radius", "Milling tool radius compensation",
-   HID_Real, 0, 10000, {0, 0, 0.1}, 0, 0},
-#define HA_toolradius 4
+  {"iso-mill-depth", "Isolation milling depth.",
+   HID_Real, -1000, 1000, {0, 0, -0.05}, 0, 0},
+#define HA_cutdepth 4
 
-  {"drill-depth", "Drilling depth",
-   HID_Real, -10000, 10000, {0, 0, -2}, 0, 0},
-#define HA_drilldepth 5
+  {"iso-tool-diameter", "Isolation milling tool diameter.",
+   HID_Real, 0, 10000, {0, 0, 0.2}, 0, 0},
+#define HA_tooldiameter 5
+
+  {"iso-tool-plunge", "Isolation milling feedrate when plunging into\n"
+                      "the material.",
+   HID_Real, 0.1, 10000, {0, 0, 25.}, 0, 0},
+#define HA_isoplunge 6
 
-  {"measurement-unit", "Measurement unit",
-   HID_Unit, 0, 0, {-1, 0, 0}, units, 0},
-#define HA_unit 6
+  {"iso-tool-feedrate", "Isolation milling feedrate.",
+   HID_Real, 0.1, 10000, {0, 0, 50.}, 0, 0},
+#define HA_isofeedrate 7
 
+  {"predrill", "Wether to pre-drill all drill spots with the isolation milling\n"
+               "tool. Drill depth is iso-mill-depth here. This feature eases\n"
+               "and enhances accuracy of manual drilling.",
+   HID_Boolean, 0, 0, {1, 0, 0}, 0, 0},
+#define HA_predrill 8
+
+  {"drill-depth", "Drilling depth.",
+   HID_Real, -10000, 10000, {0, 0, -2}, 0, 0},
+#define HA_drilldepth 9
+
+  {"drill-feedrate", "Drilling feedrate.",
+   HID_Real, 0.1, 10000, {0, 0, 50.}, 0, 0},
+#define HA_drillfeedrate 10
+
+  {"drill-mill", "Wether to produce drill holes equal or bigger than the\n"
+                 "milling tool diameter with the milling tool.\n"
+                 "With the milling tool bigger holes can be accurately sized\n"
+                 "without changing the tool",
+   HID_Boolean, 0, 0, {1, 0, 0}, 0, 0},
+#define HA_drillmill 11
+
+  {"outline-mill-depth", "Milling depth when milling the outline.\n"
+                         "Currently, only the rectangular extents of the\n"
+                         "board are milled, no polygonal outlines or holes.",
+   HID_Real, -10000, 10000, {0, 0, -1}, 0, 0},
+#define HA_milldepth 12
+
+  {"outline-tool-diameter", "Diameter of the tool used for outline milling.",
+   HID_Real, 0, 10000, {0, 0, 1}, 0, 0},
+#define HA_milltooldiameter 13
+
+  {"outline-mill-plunge", "Outline milling feedrate when plunging into\n"
+                          "the material",
+   HID_Real, 0.1, 10000, {0, 0, 25.}, 0, 0},
+#define HA_millplunge 14
+
+  {"outline-mill-feedrate", "Outline milling feedrate",
+   HID_Real, 0.1, 10000, {0, 0, 50.}, 0, 0},
+#define HA_millfeedrate 15
+
+  {"advanced-gcode", "Wether to produce G-code for advanced interpreters,\n"
+                     "like using variables or drill cycles. Not all\n"
+                     "machine controllers understand this, but it allows\n"
+                     "better hand-editing of the resulting files.",
+   HID_Boolean, 0, 0, {-1, 0, 0}, 0, 0},
+#define HA_advanced 16
 };
 
 #define NUM_OPTIONS (sizeof(gcode_attribute_list)/sizeof(gcode_attribute_list[0]))
@@ -187,43 +262,72 @@ static int pcb_to_gcode (int pcb)
   return round(COORD_TO_INCH(pcb) * gcode_dpi);
 }
 
-static char *
-gcode_get_png_name (const char *basename, const char *suffix)
+/* Fits the given layer name into basename, just before the suffix */
+static void
+gcode_get_filename (char *filename, const char *layername)
 {
-  return g_strdup_printf ("%s.%s.png", basename, suffix);
+  char *pt;
+  char suffix[MAXPATHLEN];
+
+  suffix[0] = '\0';
+  pt = strrchr (gcode_basename, '.');
+  if (pt && pt > strrchr (gcode_basename, '/'))
+    strcpy (suffix, pt);
+  else
+    pt = NULL;
+
+  strcpy (filename, gcode_basename);
+  if (pt)
+    *(filename + (pt - gcode_basename)) = '\0';
+  strcat (filename, "-");
+  strcat (filename, layername);
+  strcat (filename, suffix);
+
+  // result is in char *filename
 }
 
-/* Sorts drills in order of distance from the origin */
-struct drill_struct *
-sort_drill (struct drill_struct *drill, int n_drill)
+/* Sorts drills to produce a short tool path. I start with the hole nearest
+ * (0,0) and for each subsequent one, find the hole nearest to the previous.
+ * This isn't guaranteed to find the shortest path, but should be good enough.
+ * Note that this is O(N^2). We can't use the O(N logN) sort, since our
+ * shortest-distance origin changes with every point */
+static void
+sort_drill (struct drill_hole *drill, int n_drill)
 {
-  int i, j, imin;
-  double dmin, d;
-  struct drill_struct p = { 0, 0 };
-  struct drill_struct *temp = (struct drill_struct *)malloc (n_drill * sizeof (struct drill_struct));
-  for (j = 0; j < n_drill; j++)
+  /* I start out by looking for points closest to (0,0) */
+  struct drill_hole nearest_target = { 0, 0 };
+
+  /* I sort my list by finding the correct point to fill each slot. I don't need
+     to look at the last one, since it'll be in the right place automatically */
+  for (int j = 0; j < n_drill-1; j++)
     {
-      dmin = 1e20;
-      imin = 0;
-      for (i = 0; i < n_drill - j; i++)
-	{
-	  d =
-	    (drill[i].x - p.x) * (drill[i].x - p.x) + (drill[i].y -
-						       p.y) * (drill[i].y -
-							       p.y);
-	  if (d < dmin)
-	    {
-	      imin = i;
-	      dmin = d;
-	    }
-	}
-      /* printf("j=%d imin=%d dmin=%f p=(%f,%f)\n",j,imin,dmin,p.x,p.y); */
-      temp[j] = drill[imin];
-      drill[imin] = drill[n_drill - j - 1];
-      p = temp[j];
+      double dmin = 1e20;
+      int    imin = 0;
+      /* look through remaining elements to find the next drill point. This is
+         the one nearest to nearest_target */
+      for (int i = j; i < n_drill; i++)
+        {
+          double d =
+            (drill[i].x - nearest_target.x) * (drill[i].x - nearest_target.x) +
+            (drill[i].y - nearest_target.y) * (drill[i].y - nearest_target.y);
+          if (d < dmin)
+            {
+              imin = i;
+              dmin = d;
+            }
+        }
+      /* printf("j=%d imin=%d dmin=%f nearest_target=(%f,%f)\n",j,imin,dmin,
+                nearest_target.x,nearest_target.y); */
+      if (j != imin)
+        {
+          struct drill_hole tmp;
+          tmp         = drill[j];
+          drill[j]    = drill[imin];
+          drill[imin] = tmp;
+        }
+
+      nearest_target = drill[j];
     }
-  free (drill);
-  return temp;
 }
 
 /* *** Main export callback ************************************************ */
@@ -232,8 +336,8 @@ static void
 gcode_parse_arguments (int *argc, char ***argv)
 {
   hid_register_attributes (gcode_attribute_list,
-			   sizeof (gcode_attribute_list) /
-			   sizeof (gcode_attribute_list[0]));
+                           sizeof (gcode_attribute_list) /
+                           sizeof (gcode_attribute_list[0]));
   hid_parse_command_line (argc, argv);
 }
 
@@ -255,8 +359,8 @@ gcode_get_export_options (int *n)
   if (PCB)
     {
       derive_default_filename (PCB->Filename,
-			       &gcode_attribute_list[HA_basename],
-			       ".gcode", &last_made_filename);
+                               &gcode_attribute_list[HA_basename],
+                               ".gcode", &last_made_filename);
     }
   if (n)
     {
@@ -266,7 +370,7 @@ gcode_get_export_options (int *n)
 }
 
 /* Populates gcode_export_group array */
-void
+static void
 gcode_choose_groups ()
 {
   int n, m;
@@ -280,23 +384,23 @@ gcode_choose_groups ()
       layer = &PCB->Data->Layer[n];
 
       if (layer->LineN || layer->TextN || layer->ArcN || layer->PolygonN)
-	{
-	  /* layer isn't empty */
-
-	  /*
-	   * is this check necessary? It seems that special
-	   * layers have negative indexes?
-	   */
-
-	  if (SL_TYPE (n) == 0)
-	    {
-	      /* layer is a copper layer */
-	      m = GetLayerGroupNumberByNumber (n);
-
-	      /* the export layer */
-	      gcode_export_group[m] = 1;
-	    }
-	}
+        {
+          /* layer isn't empty */
+
+          /*
+           * is this check necessary? It seems that special
+           * layers have negative indexes?
+           */
+
+          if (SL_TYPE (n) == 0)
+            {
+              /* layer is a copper layer */
+              m = GetLayerGroupNumberByNumber (n);
+
+              /* the export layer */
+              gcode_export_group[m] = 1;
+            }
+        }
     }
 }
 
@@ -318,99 +422,130 @@ gcode_alloc_colors ()
 }
 
 static void
-gcode_start_png (const char *basename, const char *suffix)
+gcode_start_png ()
 {
-  int h, w;
-  char *buf;
-
-  buf = gcode_get_png_name (basename, suffix);
-
-  h = pcb_to_gcode (PCB->MaxHeight);
-  w = pcb_to_gcode (PCB->MaxWidth);
-
-  /* Nelma only works with true color images */
-  gcode_im = gdImageCreate (w, h);
-  gcode_f = fopen (buf, "wb");
-
+  gcode_im = gdImageCreate (pcb_to_gcode (PCB->ExtentMaxX - PCB->ExtentMinX),
+                            pcb_to_gcode (PCB->ExtentMaxY - PCB->ExtentMinY));
   gcode_alloc_colors ();
-
-  free (buf);
 }
 
 static void
-gcode_finish_png ()
+gcode_finish_png (const char *layername)
 {
 #ifdef HAVE_GDIMAGEPNG
-  gdImagePng (gcode_im, gcode_f);
+  char *pngname, *filename;
+  FILE *file = NULL;
+
+  pngname = (char *)malloc (MAXPATHLEN);
+  gcode_get_filename (pngname, layername);
+  filename = g_strdup_printf ("%s.png", pngname);
+  free(pngname);
+
+  file = fopen (filename, "wb");
+  g_free (filename);
+
+  gdImagePng (gcode_im, file);
+  fclose (file);
 #else
   Message ("GCODE: PNG not supported by gd. Can't write layer mask.\n");
 #endif
   gdImageDestroy (gcode_im);
-  fclose (gcode_f);
 
   free (white);
   free (black);
-
   gcode_im = NULL;
-  gcode_f = NULL;
 }
 
-void
+static void
 gcode_start_png_export ()
 {
   BoxType region;
 
-  region.X1 = 0;
-  region.Y1 = 0;
-  region.X2 = PCB->MaxWidth;
-  region.Y2 = PCB->MaxHeight;
+  region.X1 = PCB->ExtentMinX;
+  region.Y1 = PCB->ExtentMinY;
+  region.X2 = PCB->ExtentMaxX;
+  region.Y2 = PCB->ExtentMaxY;
 
   linewidth = -1;
   lastbrush = (gdImagePtr)((void *) -1);
-  lastcolor = -1;
 
   hid_expose_callback (&gcode_hid, &region, 0);
 }
 
+static FILE *
+gcode_start_gcode (const char *layername, bool metric)
+{
+  FILE *file = NULL;
+  char buffer[MAXPATHLEN];
+  time_t t;
+
+  gcode_get_filename (buffer, layername);
+  file = fopen (buffer, "wb");
+  if ( ! file)
+    {
+      perror (buffer);
+      return NULL;
+    }
+  fprintf (file, "(Created by G-code exporter)\n");
+  t = time (NULL);
+  snprintf (buffer, sizeof(buffer), "%s", ctime (&t));
+  buffer[strlen (buffer) - 1] = '\0'; // drop the newline
+  fprintf (file, "(%s)\n", buffer);
+  fprintf (file, "(Units: %s)\n", metric ? "mm" : "inch");
+  if (metric)
+    pcb_fprintf (file, "(Board size: %.2mm x %.2mm mm)\n",
+                 PCB->ExtentMaxX - PCB->ExtentMinX,
+                 PCB->ExtentMaxY - PCB->ExtentMinY);
+  else
+    pcb_fprintf (file, "(Board size: %.2mi x %.2mi inches)\n",
+                 PCB->ExtentMaxX - PCB->ExtentMinX,
+                 PCB->ExtentMaxY - PCB->ExtentMinY);
+
+  return file;
+}
+
 static void
 gcode_do_export (HID_Attr_Val * options)
 {
   int save_ons[MAX_LAYER + 2];
   int i, idx;
-  time_t t;
   const Unit *unit;
   double scale = 0, d = 0;
   int r, c, v, p, metric;
-  char *filename;
   path_t *plist = NULL;
   potrace_bitmap_t *bm = NULL;
   potrace_param_t param_default = {
-    2,				/* turnsize */
-    POTRACE_TURNPOLICY_MINORITY,	/* turnpolicy */
-    1.0,			/* alphamax */
-    1,				/* opticurve */
-    0.2,			/* opttolerance */
+    2,                           /* turnsize */
+    POTRACE_TURNPOLICY_MINORITY, /* turnpolicy */
+    1.0,                         /* alphamax */
+    1,                           /* opticurve */
+    0.2,                         /* opttolerance */
     {
-     NULL,			/* callback function */
-     NULL,			/* callback data */
-     0.0, 1.0,			/* progress range  */
-     0.0,			/* granularity  */
+     NULL,                       /* callback function */
+     NULL,                       /* callback data */
+     0.0, 1.0,                   /* progress range  */
+     0.0,                        /* granularity  */
      },
   };
+  char variable_safeZ[20], variable_cutdepth[20];
+  char variable_isoplunge[20], variable_isofeedrate[20];
+  char variable_drilldepth[20], variable_milldepth[20];
+  char variable_millplunge[20], variable_millfeedrate[20];
+  char *old_locale = setlocale (LC_NUMERIC, NULL);
 
   if (!options)
     {
       gcode_get_export_options (0);
       for (i = 0; i < NUM_OPTIONS; i++)
-	{
-	  gcode_values[i] = gcode_attribute_list[i].default_val;
-	}
+        {
+          gcode_values[i] = gcode_attribute_list[i].default_val;
+        }
       options = gcode_values;
     }
   gcode_basename = options[HA_basename].str_value;
   if (!gcode_basename)
     {
-      gcode_basename = "pcb-out";
+      gcode_basename = "pcb-out.gcode";
     }
   gcode_dpi = options[HA_dpi].int_value;
   if (gcode_dpi < 0)
@@ -424,180 +559,580 @@ gcode_do_export (HID_Attr_Val * options)
                  : 1.0 / coord_to_unit (unit, INCH_TO_COORD (1.0));
 
   gcode_cutdepth = options[HA_cutdepth].real_value * scale;
+  gcode_isoplunge = options[HA_isoplunge].real_value * scale;
+  gcode_isofeedrate = options[HA_isofeedrate].real_value * scale;
+  gcode_predrill = options[HA_predrill].int_value;
   gcode_drilldepth = options[HA_drilldepth].real_value * scale;
+  gcode_drillfeedrate = options[HA_drillfeedrate].real_value * scale;
   gcode_safeZ = options[HA_safeZ].real_value * scale;
   gcode_toolradius = metric
-                   ? MM_TO_COORD(options[HA_toolradius].real_value * scale)
-                   : INCH_TO_COORD(options[HA_toolradius].real_value * scale);
+                   ? MM_TO_COORD(options[HA_tooldiameter].real_value / 2 * scale)
+                   : INCH_TO_COORD(options[HA_tooldiameter].real_value / 2 * scale);
+  gcode_drillmill = options[HA_drillmill].int_value;
+  gcode_milldepth = options[HA_milldepth].real_value * scale;
+  gcode_milltoolradius = options[HA_milltooldiameter].real_value / 2 * scale;
+  gcode_millplunge = options[HA_millplunge].real_value * scale;
+  gcode_millfeedrate = options[HA_millfeedrate].real_value * scale;
+  gcode_advanced = options[HA_advanced].int_value;
   gcode_choose_groups ();
+  setlocale (LC_NUMERIC, "C");   /* use . as separator */
+  if (gcode_advanced)
+    {
+      /* give each variable distinct names, even if they don't appear
+         together in a file. This allows to join output files */
+      strcpy (variable_safeZ, "#100");
+      strcpy (variable_cutdepth, "#101");
+      strcpy (variable_isoplunge, "#102");
+      strcpy (variable_isofeedrate, "#103");
+      strcpy (variable_drilldepth, "#104");
+      strcpy (variable_milldepth, "#105");
+      strcpy (variable_millplunge, "#106");
+      strcpy (variable_millfeedrate, "#107");
+    }
+  else
+    {
+      snprintf (variable_safeZ, 20, "%f", gcode_safeZ);
+      snprintf (variable_cutdepth, 20, "%f", gcode_cutdepth);
+      snprintf (variable_isoplunge, 20, "%f", gcode_isoplunge);
+      snprintf (variable_isofeedrate, 20, "%f", gcode_isofeedrate);
+      snprintf (variable_drilldepth, 20, "%f", gcode_drilldepth);
+      snprintf (variable_milldepth, 20, "%f", gcode_milldepth);
+      snprintf (variable_millplunge, 20, "%f", gcode_millplunge);
+      snprintf (variable_millfeedrate, 20, "%f", gcode_millfeedrate);
+    }
+  UpdateExtents();
 
   for (i = 0; i < MAX_LAYER; i++)
     {
       if (gcode_export_group[i])
-	{
-
-	  gcode_cur_group = i;
-
-	  /* magic */
-	  idx = (i >= 0 && i < max_group) ?
-	    PCB->LayerGroups.Entries[i][0] : i;
-	  printf ("idx=%d %s\n", idx, layer_type_to_file_name (idx, FNS_fixed));
-	  is_solder =
-	    (GetLayerGroupNumberByNumber (idx) ==
-	     GetLayerGroupNumberByNumber (solder_silk_layer)) ? 1 : 0;
-	  save_drill = is_solder;	/* save drills for one layer only */
-	  gcode_start_png (gcode_basename, layer_type_to_file_name (idx, FNS_fixed));
-	  hid_save_and_show_layer_ons (save_ons);
-	  gcode_start_png_export ();
-	  hid_restore_layer_ons (save_ons);
+        {
+          gcode_cur_group = i;
+
+          /* magic */
+          idx = (i >= 0 && i < max_group) ?
+            PCB->LayerGroups.Entries[i][0] : i;
+          is_solder =
+            (GetLayerGroupNumberByNumber (idx) ==
+             GetLayerGroupNumberByNumber (solder_silk_layer)) ? 1 : 0;
+          save_drill = is_solder; /* save drills for one layer only */
+          gcode_start_png ();
+          hid_save_and_show_layer_ons (save_ons);
+          gcode_start_png_export ();
+          hid_restore_layer_ons (save_ons);
 
 /* ***************** gcode conversion *************************** */
-/* potrace uses a different kind of bitmap; for simplicity gcode_im is copied to this format */
-	  bm = bm_new (gdImageSX (gcode_im), gdImageSY (gcode_im));
-	  filename = (char *)malloc (MAXPATHLEN);
-	  plist = NULL;
-	  if (is_solder)
-	    {			/* only for back layer */
-	      gdImagePtr temp_im =
-		gdImageCreate (gdImageSX (gcode_im), gdImageSY (gcode_im));
-	      gdImageCopy (temp_im, gcode_im, 0, 0, 0, 0,
-			   gdImageSX (gcode_im), gdImageSY (gcode_im));
-	      for (r = 0; r < gdImageSX (gcode_im); r++)
-		{
-		  for (c = 0; c < gdImageSY (gcode_im); c++)
-		    {
-		      gdImageSetPixel (gcode_im, r, c,
-				       gdImageGetPixel (temp_im,
-							gdImageSX (gcode_im) -
-							1 - r, c));
-		    }
-		}
-	      gdImageDestroy (temp_im);
-	    }
-	  sprintf (filename, "%s.%s.cnc", gcode_basename,
-		   layer_type_to_file_name (idx, FNS_fixed));
-	  for (r = 0; r < gdImageSX (gcode_im); r++)
-	    {
-	      for (c = 0; c < gdImageSY (gcode_im); c++)
-		{
-		  v =
-		    gdImageGetPixel (gcode_im, r,
-				     gdImageSY (gcode_im) - 1 - c);
-		  p = (gcode_im->red[v] || gcode_im->green[v]
-		       || gcode_im->blue[v]) ? 0 : 0xFFFFFF;
-		  BM_PUT (bm, r, c, p);
-		}
-	    }
-	  gcode_f2 = fopen (filename, "wb");
-	  if (!gcode_f2)
-	    {
-	      perror (filename);
-	      return;
-	    }
-	  fprintf (gcode_f2, "(Created by G-code exporter)\n");
-	  t = time (NULL);
-	  sprintf (filename, "%s", ctime (&t));
-	  filename[strlen (filename) - 1] = 0;
-	  fprintf (gcode_f2, "( %s )\n", filename);
-	  fprintf (gcode_f2, "(%d dpi)\n", gcode_dpi);
-	  fprintf (gcode_f2, "(Unit: %s)\n", metric ? "mm" : "inch");
-	  if (metric)
-	    pcb_fprintf (gcode_f2, "(Board size: %.2mmx%.2mm mm)", PCB->MaxWidth, PCB->MaxHeight);
-	  else
-	    pcb_fprintf (gcode_f2, "(Board size: %.2mix%.2mi inches)", PCB->MaxWidth, PCB->MaxHeight);
-	  fprintf (gcode_f2, "#100=%f  (safe Z)\n", gcode_safeZ);
-	  fprintf (gcode_f2, "#101=%f  (cutting depth)\n", gcode_cutdepth);
-	  fprintf (gcode_f2, "(---------------------------------)\n");
-	  fprintf (gcode_f2, "G17 G%d G90 G64 P0.003 M3 S3000 M7 F%d\n",
-		   metric ? 21 : 20, metric ? 25 : 1);
-	  fprintf (gcode_f2, "G0 Z#100\n");
-	  /* extract contour points from image */
-	  r = bm_to_pathlist (bm, &plist, &param_default);
-	  if (r)
-	    {
-	      fprintf (stderr, "ERROR: pathlist function failed\n");
-	      return;
-	    }
-	  /* generate best polygon and write vertices in g-code format */
-	  d =
-	    process_path (plist, &param_default, bm, gcode_f2,
-			  metric ? 25.4 / gcode_dpi : 1.0 / gcode_dpi);
-	  if (d < 0)
-	    {
-	      fprintf (stderr, "ERROR: path process function failed\n");
-	      return;
-	    }
-	  if (metric)
-	    fprintf (gcode_f2, "(end, total distance %.2fmm = %.2fin)\n", d,
-		     d * 1 / 25.4);
-	  else
-	    fprintf (gcode_f2, "(end, total distance %.2fmm = %.2fin)\n",
-		     25.4 * d, d);
-	  fprintf (gcode_f2, "M5 M9 M2\n");
-	  pathlist_free (plist);
-	  bm_free (bm);
-	  fclose (gcode_f2);
-	  if (save_drill)
-	    {
-	      d = 0;
-	      drill = sort_drill (drill, n_drill);
-	      sprintf (filename, "%s.drill.cnc", gcode_basename);
-	      gcode_f2 = fopen (filename, "wb");
-	      if (!gcode_f2)
-		{
-		  perror (filename);
-		  return;
-		}
-	      fprintf (gcode_f2, "(Created by G-code exporter)\n");
-	      fprintf (gcode_f2, "(drill file: %d drills)\n", n_drill);
-	      sprintf (filename, "%s", ctime (&t));
-	      filename[strlen (filename) - 1] = 0;
-	      fprintf (gcode_f2, "( %s )\n", filename);
-	      fprintf (gcode_f2, "(Unit: %s)\n", metric ? "mm" : "inch");
-	      if (metric)
-	        pcb_fprintf (gcode_f2, "(Board size: %.2mmx%.2mm mm)", PCB->MaxWidth, PCB->MaxHeight);
-	      else
-	        pcb_fprintf (gcode_f2, "(Board size: %.2mix%.2mi inches)", PCB->MaxWidth, PCB->MaxHeight);
-	      fprintf (gcode_f2, "#100=%f  (safe Z)\n", gcode_safeZ);
-	      fprintf (gcode_f2, "#101=%f  (drill depth)\n",
-		       gcode_drilldepth);
-	      fprintf (gcode_f2, "(---------------------------------)\n");
-	      fprintf (gcode_f2, "G17 G%d G90 G64 P0.003 M3 S3000 M7 F%d\n",
-		       metric ? 21 : 20, metric ? 25 : 1);
-/*                              fprintf(gcode_f2,"G0 Z#100\n"); */
-	      for (r = 0; r < n_drill; r++)
-		{
-/*                                      if(metric) fprintf(gcode_f2,"G0 X%f Y%f\n",drill[r].x*25.4,drill[r].y*25.4); */
-/*                                      else fprintf(gcode_f2,"G0 X%f Y%f\n",drill[r].x,drill[r].y); */
-		  if (metric)
-		    fprintf (gcode_f2, "G81 X%f Y%f Z#101 R#100\n",
-			     drill[r].x * 25.4, drill[r].y * 25.4);
-		  else
-		    fprintf (gcode_f2, "G81 X%f Y%f Z#101 R#100\n",
-			     drill[r].x, drill[r].y);
-/*                                      fprintf(gcode_f2,"G1 Z#101\n"); */
-/*                                      fprintf(gcode_f2,"G0 Z#100\n"); */
-		  if (r > 0)
-		    d +=
-		      sqrt ((drill[r].x - drill[r - 1].x) * (drill[r].x -
-							     drill[r - 1].x) +
-			    (drill[r].y - drill[r - 1].y) * (drill[r].y -
-							     drill[r - 1].y));
-		}
-	      fprintf (gcode_f2, "M5 M9 M2\n");
-	      fprintf (gcode_f2, "(end, total distance %.2fmm = %.2fin)\n",
-		       25.4 * d, d);
-	      fclose (gcode_f2);
-	      free (drill);
-	      drill = NULL;
-	      n_drill = nmax_drill = 0;
-	    }
-	  free (filename);
-
-/* ******************* end gcode conversion **************************** */
-	  gcode_finish_png ();
-	}
+/* potrace uses a different kind of bitmap; for simplicity gcode_im is
+   copied to this format and flipped as needed along the way */
+          bm = bm_new (gdImageSX (gcode_im), gdImageSY (gcode_im));
+          for (r = 0; r < gdImageSX (gcode_im); r++)
+            {
+              for (c = 0; c < gdImageSY (gcode_im); c++)
+                {
+                  if (is_solder)
+                    v =  /* flip vertically and horizontally */
+                      gdImageGetPixel (gcode_im, gdImageSX (gcode_im) - 1 - r,
+                                       gdImageSY (gcode_im) - 1 - c);
+                  else
+                    v =  /* flip only vertically */
+                      gdImageGetPixel (gcode_im, r,
+                                       gdImageSY (gcode_im) - 1 - c);
+                  p = (gcode_im->red[v] || gcode_im->green[v]
+                       || gcode_im->blue[v]) ? 0 : 0xFFFFFF;
+                  BM_PUT (bm, r, c, p);
+                }
+            }
+          if (is_solder)
+            { /* flip back layer, used only for PNG output */
+              gdImagePtr temp_im =
+                gdImageCreate (gdImageSX (gcode_im), gdImageSY (gcode_im));
+              gdImageColorAllocate (temp_im, white->r, white->g, white->b);
+              gdImageColorAllocate (temp_im, black->r, black->g, black->b);
+              gdImageCopy (temp_im, gcode_im, 0, 0, 0, 0,
+                           gdImageSX (gcode_im), gdImageSY (gcode_im));
+              for (r = 0; r < gdImageSX (gcode_im); r++)
+                {
+                  for (c = 0; c < gdImageSY (gcode_im); c++)
+                    {
+                      gdImageSetPixel (gcode_im, r, c,
+                                       gdImageGetPixel (temp_im,
+                                                        gdImageSX (gcode_im) -
+                                                        1 - r, c));
+                    }
+                }
+              gdImageDestroy (temp_im);
+            }
+          gcode_finish_png (layer_type_to_file_name (idx, FNS_fixed));
+          plist = NULL;
+          gcode_f = gcode_start_gcode (layer_type_to_file_name (idx, FNS_fixed),
+                                       metric);
+          if (!gcode_f)
+            {
+              bm_free (bm);
+              goto error;
+            }
+          fprintf (gcode_f, "(Accuracy %d dpi)\n", gcode_dpi);
+          fprintf (gcode_f, "(Tool diameter: %f %s)\n",
+                   options[HA_tooldiameter].real_value * scale,
+                   metric ? "mm" : "inch");
+          if (gcode_advanced)
+            {
+              fprintf (gcode_f, "%s=%f  (safe Z)\n",
+                       variable_safeZ, gcode_safeZ);
+              fprintf (gcode_f, "%s=%f  (cutting depth)\n",
+                       variable_cutdepth, gcode_cutdepth);
+              fprintf (gcode_f, "%s=%f  (plunge feedrate)\n",
+                       variable_isoplunge, gcode_isoplunge);
+              fprintf (gcode_f, "%s=%f  (feedrate)\n",
+                       variable_isofeedrate, gcode_isofeedrate);
+            }
+          if (gcode_predrill && save_drill)
+            fprintf (gcode_f, "(with predrilling)\n");
+          else
+            fprintf (gcode_f, "(no predrilling)\n");
+          fprintf (gcode_f, "(---------------------------------)\n");
+          if (gcode_advanced)
+              fprintf (gcode_f, "G17 G%d G90 G64 P0.003 M3 S3000 M7\n",
+                       metric ? 21 : 20);
+          else
+              fprintf (gcode_f, "G17\nG%d\nG90\nG64 P0.003\nM3 S3000\nM7\n",
+                       metric ? 21 : 20);
+          fprintf (gcode_f, "G0 Z%s\n", variable_safeZ);
+          /* extract contour points from image */
+          r = bm_to_pathlist (bm, &plist, &param_default);
+          if (r)
+            {
+              fprintf (stderr, "ERROR: pathlist function failed\n");
+              goto error;
+            }
+          /* generate best polygon and write vertices in g-code format */
+          d = process_path (plist, &param_default, bm, gcode_f,
+                            metric ? 25.4 / gcode_dpi : 1.0 / gcode_dpi,
+                            variable_cutdepth, variable_safeZ,
+                            variable_isoplunge, variable_isofeedrate);
+          if (d < 0)
+            {
+              fprintf (stderr, "ERROR: path process function failed\n");
+              goto error;
+            }
+          if (gcode_predrill && save_drill)
+            {
+              int n_all_drills = 0;
+              struct drill_hole* all_drills = NULL;
+              /* count all drills to be predrilled */
+              for (int i_drill_sets = 0; i_drill_sets < n_drills; i_drill_sets++)
+                {
+                  struct single_size_drills* drill_set = &drills[i_drill_sets];
+
+                  /* don't predrill drillmill holes */
+                  if (gcode_drillmill) {
+                    double radius = metric ?
+                                    drill_set->diameter_inches * 25.4 / 2:
+                                    drill_set->diameter_inches / 2;
+
+                    if (gcode_milltoolradius < radius)
+                      continue;
+                  }
+
+                  n_all_drills += drill_set->n_holes;
+                }
+              /* for sorting regardless of size, copy all drills to be
+                 predrilled into one new structure */
+              all_drills = (struct drill_hole *)
+                           malloc (n_all_drills * sizeof (struct drill_hole));
+              for (int i_drill_sets = 0; i_drill_sets < n_drills; i_drill_sets++)
+                {
+                  struct single_size_drills* drill_set = &drills[i_drill_sets];
+
+                  /* don't predrill drillmill holes */
+                  if (gcode_drillmill) {
+                    double radius = metric ?
+                                    drill_set->diameter_inches * 25.4 / 2:
+                                    drill_set->diameter_inches / 2;
+
+                    if (gcode_milltoolradius < radius)
+                      continue;
+                  }
+
+                  memcpy(&all_drills[r], drill_set->holes,
+                         drill_set->n_holes * sizeof(struct drill_hole));
+                }
+              sort_drill(all_drills, n_all_drills);
+              /* write that (almost the same code as writing the drill file) */
+              fprintf (gcode_f, "(predrilling)\n");
+              fprintf (gcode_f, "F%s\n", variable_isoplunge);
+
+              for (r = 0; r < n_all_drills; r++)
+                {
+                  double drillX, drillY;
+
+                  if (metric)
+                    {
+                      drillX = all_drills[r].x * 25.4;
+                      drillY = all_drills[r].y * 25.4;
+                    }
+                  else
+                    {
+                      drillX = all_drills[r].x;
+                      drillY = all_drills[r].y;
+                    }
+                  if (gcode_advanced)
+                    fprintf (gcode_f, "G81 X%f Y%f Z%s R%s\n", drillX, drillY,
+                             variable_cutdepth, variable_safeZ);
+                  else
+                    {
+                      fprintf (gcode_f, "G0 X%f Y%f\n", drillX, drillY);
+                      fprintf (gcode_f, "G1 Z%s\n", variable_cutdepth);
+                      fprintf (gcode_f, "G0 Z%s\n", variable_safeZ);
+                    }
+                }
+              fprintf (gcode_f, "(%d predrills)\n", n_all_drills);
+              free(all_drills);
+            }
+          if (metric)
+            fprintf (gcode_f, "(milling distance %.2fmm = %.2fin)\n", d,
+                     d * 1 / 25.4);
+          else
+            fprintf (gcode_f, "(milling distance %.2fmm = %.2fin)\n",
+                     25.4 * d, d);
+          if (gcode_advanced)
+            fprintf (gcode_f, "M5 M9 M2\n");
+          else
+            fprintf (gcode_f, "M5\nM9\nM2\n");
+          pathlist_free (plist);
+          bm_free (bm);
+          fclose (gcode_f);
+          gcode_f = NULL;
+          if (save_drill)
+            {
+              for (int i_drill_file=0; i_drill_file < n_drills; i_drill_file++)
+                {
+                  struct single_size_drills* drill = &drills[i_drill_file];
+
+                  /* don't drill drillmill holes */
+                  if (gcode_drillmill) {
+                    double radius = metric ?
+                                    drill->diameter_inches * 25.4 / 2:
+                                    drill->diameter_inches / 2;
+
+                    if (gcode_milltoolradius < radius)
+                      continue;
+                  }
+
+                  d = 0;
+                  sort_drill (drill->holes, drill->n_holes);
+
+                  {
+                    // get the filename with the drill size encoded in it
+                    char layername[32];
+                    snprintf(layername, sizeof(layername),
+                             "%.4f.drill",
+                             metric ?
+                             drill->diameter_inches * 25.4 :
+                             drill->diameter_inches);
+                    gcode_f = gcode_start_gcode(layername, metric);
+                  }
+                  if (!gcode_f)
+                    goto error;
+                  fprintf (gcode_f, "(Drill file: %d drills)\n", drill->n_holes);
+                  if (metric)
+                    fprintf (gcode_f, "(Drill diameter: %f mm)\n",
+                             drill->diameter_inches * 25.4);
+                  else
+                    fprintf (gcode_f, "(Drill diameter: %f inch)\n",
+                             drill->diameter_inches);
+                  if (gcode_advanced)
+                    {
+                      fprintf (gcode_f, "%s=%f  (safe Z)\n",
+                               variable_safeZ, gcode_safeZ);
+                      fprintf (gcode_f, "%s=%f  (drill depth)\n",
+                               variable_drilldepth, gcode_drilldepth);
+                      fprintf (gcode_f, "(---------------------------------)\n");
+                      fprintf (gcode_f, "G17 G%d G90 G64 P0.003 M3 S3000 M7 F%f\n",
+                               metric ? 21 : 20, gcode_drillfeedrate);
+                    }
+                  else
+                    {
+                      fprintf (gcode_f, "(---------------------------------)\n");
+                      fprintf (gcode_f, "G17\nG%d\nG90\nG64 P0.003\nM3 S3000\nM7\nF%f\n",
+                               metric ? 21 : 20, gcode_drillfeedrate);
+                    }
+                  fprintf (gcode_f, "G0 Z%s\n", variable_safeZ);
+                  for (r = 0; r < drill->n_holes; r++)
+                    {
+                      double drillX, drillY;
+
+                      if (metric)
+                        {
+                          drillX = drill->holes[r].x * 25.4;
+                          drillY = drill->holes[r].y * 25.4;
+                        }
+                      else
+                        {
+                          drillX = drill->holes[r].x;
+                          drillY = drill->holes[r].y;
+                        }
+                      if (gcode_advanced)
+                        fprintf (gcode_f, "G81 X%f Y%f Z%s R%s\n", drillX, drillY,
+                                 variable_drilldepth, variable_safeZ);
+                      else
+                        {
+                          fprintf (gcode_f, "G0 X%f Y%f\n", drillX, drillY);
+                          fprintf (gcode_f, "G1 Z%s\n", variable_drilldepth);
+                          fprintf (gcode_f, "G0 Z%s\n", variable_safeZ);
+                        }
+                      if (r > 0)
+                        d += Distance(drill->holes[r - 1].x, drill->holes[r - 1].y,
+                                      drill->holes[r    ].x, drill->holes[r    ].y);
+                    }
+                  if (gcode_advanced)
+                    fprintf (gcode_f, "M5 M9 M2\n");
+                  else
+                    fprintf (gcode_f, "M5\nM9\nM2\n");
+                  fprintf (gcode_f, "(end, total distance %.2fmm = %.2fin)\n",
+                           25.4 * d, d);
+                  fclose (gcode_f);
+                }
+
+/* ******************* handle drill-milling **************************** */
+              if (save_drill && gcode_drillmill)
+                {
+                  int n_drillmill_drills = 0;
+                  struct drill_hole* drillmill_drills = NULL;
+                  double* drillmill_radiuss = NULL;
+                  double mill_radius, inaccuracy;
+
+                  /* count drillmill drills */
+                  for (int i_drill_sets = 0; i_drill_sets < n_drills; i_drill_sets++)
+                    {
+                      struct single_size_drills* drill_set = &drills[i_drill_sets];
+                      double radius = metric ?
+                                      drill_set->diameter_inches * 25.4 / 2:
+                                      drill_set->diameter_inches / 2;
+
+                      if (gcode_milltoolradius <= radius)
+                        n_drillmill_drills += drill_set->n_holes;
+                    }
+                  if (n_drillmill_drills > 0) {
+                    /* for sorting regardless of size, copy all available drills
+                       into one new structure */
+                    drillmill_drills = (struct drill_hole *)
+                        malloc (n_drillmill_drills * sizeof (struct drill_hole));
+                    drillmill_radiuss = (double *)
+                        malloc (n_drillmill_drills * sizeof (double));
+                    r = 0;
+                    for (int i_drill_sets = 0; i_drill_sets < n_drills; i_drill_sets++)
+                      {
+                        struct single_size_drills* drill_set = &drills[i_drill_sets];
+                        double radius = metric ?
+                                        drill_set->diameter_inches * 25.4 / 2:
+                                        drill_set->diameter_inches / 2;
+
+                        if (gcode_milltoolradius <= radius)
+                          {
+                            memcpy(&drillmill_drills[r], drill_set->holes,
+                                   drill_set->n_holes * sizeof(struct drill_hole));
+                            for (int r2 = r; r2 < r + drill_set->n_holes; r2++)
+                              drillmill_radiuss[r2] = radius;
+                            r += drill_set->n_holes;
+                          }
+                      }
+                    sort_drill(drillmill_drills, n_drillmill_drills);
+
+                    gcode_f = gcode_start_gcode("drillmill", metric);
+                    if (!gcode_f)
+                      goto error;
+                    fprintf (gcode_f, "(Drillmill file)\n");
+                    fprintf (gcode_f, "(Tool diameter: %f %s)\n",
+                             gcode_milltoolradius * 2, metric ? "mm" : "inch");
+                    if (gcode_advanced)
+                      {
+                        fprintf (gcode_f, "%s=%f  (safe Z)\n",
+                                 variable_safeZ, gcode_safeZ);
+                        fprintf (gcode_f, "%s=%f  (mill depth)\n",
+                                 variable_milldepth, gcode_milldepth);
+                        fprintf (gcode_f, "%s=%f  (mill plunge feedrate)\n",
+                                 variable_millplunge, gcode_millplunge);
+                        fprintf (gcode_f, "%s=%f  (mill feedrate)\n",
+                                 variable_millfeedrate, gcode_millfeedrate);
+                        fprintf (gcode_f, "(---------------------------------)\n");
+                        fprintf (gcode_f, "G17 G%d G90 G64 P0.003 M3 S3000 M7\n",
+                                 metric ? 21 : 20);
+                      }
+                    else
+                      {
+                        fprintf (gcode_f, "(---------------------------------)\n");
+                        fprintf (gcode_f, "G17\nG%d\nG90\nG64 P0.003\nM3 S3000\nM7\n",
+                                 metric ? 21 : 20);
+                      }
+                    for (r = 0; r < n_drillmill_drills; r++)
+                      {
+                        double drillX, drillY;
+
+                        if (metric)
+                          {
+                            drillX = drillmill_drills[r].x * 25.4;
+                            drillY = drillmill_drills[r].y * 25.4;
+                          }
+                        else
+                          {
+                            drillX = drillmill_drills[r].x;
+                            drillY = drillmill_drills[r].y;
+                          }
+                        fprintf (gcode_f, "G0 X%f Y%f\n", drillX, drillY);
+                        fprintf (gcode_f, "G1 Z%s F%s\n",
+                                 variable_milldepth, variable_millplunge);
+
+                        mill_radius = drillmill_radiuss[r] - gcode_milltoolradius;
+                        inaccuracy = (metric ? 25.4 : 1.) / gcode_dpi;
+                        if (mill_radius > inaccuracy)
+                          {
+                            int n_sides;
+
+                            /* calculate how many polygon sides we need to stay
+                               within our accuracy while avoiding a G02/G03 */
+                            n_sides = M_PI / acos (mill_radius /
+                                                    (mill_radius + inaccuracy));
+                            if (n_sides < 4)
+                              n_sides = 4;
+                            fprintf (gcode_f, "F%s\n", variable_millfeedrate);
+                            for (i = 0; i <= n_sides; i++)
+                              {
+                                double angle = M_PI * 2 * i / n_sides;
+                                fprintf (gcode_f, "G1 X%f Y%f\n",
+                                         drillX + mill_radius * cos (angle),
+                                         drillY + mill_radius * sin (angle));
+                              }
+                            fprintf (gcode_f, "G0 X%f Y%f\n", drillX, drillY);
+                          }
+                        fprintf (gcode_f, "G0 Z%s\n", variable_safeZ);
+                      }
+                    if (gcode_advanced)
+                      fprintf (gcode_f, "M5 M9 M2\n");
+                    else
+                      fprintf (gcode_f, "M5\nM9\nM2\n");
+                    fclose (gcode_f);
+
+                    free(drillmill_radiuss);
+                    free(drillmill_drills);
+                  }
+                }
+/* ******************* end of per-layer writing ************************ */
+
+              for (int i_drill_file=0; i_drill_file < n_drills; i_drill_file++)
+                free(drills[i_drill_file].holes);
+              free (drills);
+              drills = NULL;
+              n_drills = n_drills_allocated = 0;
+            }
+        }
     }
+    /*
+     * General milling. Put this aside from the above code, as paths
+     * are generated without taking line or curve thickness into account.
+     * Accordingly, we need an entirely different approach.
+     */
+    /*
+     * Currently this is a rarther simple implementation, which mills
+     * the retangular extents of the board and nothing else. This should
+     * be sufficient for many use cases.
+     *
+     * A better implementation would have to group the lines and polygons
+     * on the outline layer by outer polygon and inner holes, then offset
+     * all of them to the right side and mill that.
+     */
+    /* a better implementation might look like this:
+    LAYER_LOOP (PCB->Data, MAX_LAYER);
+      {
+        if (strcmp (layer->Name, "outline") == 0)
+          {
+            LINE_LOOP (layer);
+              {
+                ... calculate the offset for all lines and polygons of this layer,
+                mirror it if is_solder, then mill it ...
+              }
+            END_LOOP;
+          }
+      }
+    END_LOOP;
+
+    for now: */
+    { /* unconditional */
+      double lowerX = 0., lowerY = 0., upperX = 0., upperY = 0.;
+      double mill_distance = 0.;
+
+      gcode_f = gcode_start_gcode("outline", metric);
+      if (!gcode_f)
+        goto error;
+      fprintf (gcode_f, "(Outline mill file)\n");
+      fprintf (gcode_f, "(Tool diameter: %f %s)\n",
+               gcode_milltoolradius * 2, metric ? "mm" : "inch");
+      if (gcode_advanced)
+        {
+          fprintf (gcode_f, "%s=%f  (safe Z)\n", variable_safeZ, gcode_safeZ);
+          fprintf (gcode_f, "%s=%f  (mill depth)\n",
+                   variable_milldepth, gcode_milldepth);
+          fprintf (gcode_f, "%s=%f  (mill plunge feedrate)\n",
+                   variable_millplunge, gcode_millplunge);
+          fprintf (gcode_f, "%s=%f  (mill feedrate)\n",
+                   variable_millfeedrate, gcode_millfeedrate);
+          fprintf (gcode_f, "(---------------------------------)\n");
+          fprintf (gcode_f, "G17 G%d G90 G64 P0.003 M3 S3000 M7\n",
+                   metric ? 21 : 20);
+        }
+      else
+        {
+          fprintf (gcode_f, "(---------------------------------)\n");
+          fprintf (gcode_f, "G17\nG%d\nG90\nG64 P0.003\nM3 S3000\nM7\n",
+                   metric ? 21 : 20);
+        }
+      if (metric)
+        {
+          upperX = COORD_TO_MM(PCB->ExtentMaxX - PCB->ExtentMinX);
+          upperY = COORD_TO_MM(PCB->ExtentMaxY - PCB->ExtentMinY);
+        }
+      else
+        {
+          upperX = COORD_TO_INCH(PCB->ExtentMaxX - PCB->ExtentMinX);
+          upperY = COORD_TO_INCH(PCB->ExtentMaxY - PCB->ExtentMinY);
+        }
+      lowerX -= gcode_milltoolradius;
+      lowerY -= gcode_milltoolradius;
+      upperX += gcode_milltoolradius;
+      upperY += gcode_milltoolradius;
+
+      fprintf (gcode_f, "G0 Z%s\n", variable_safeZ);
+      /* mill the two edges adjectant to 0,0 first to disconnect the
+         workpiece from the raw material last */
+      fprintf (gcode_f, "G0 X%f Y%f\n", upperX, lowerY);
+      fprintf (gcode_f, "G1 Z%s F%s\n",
+               variable_milldepth, variable_millplunge);
+      fprintf (gcode_f, "G1 X%f Y%f F%s\n",
+               lowerX, lowerY, variable_millfeedrate);
+      fprintf (gcode_f, "G1 X%f Y%f\n", lowerX, upperY);
+      fprintf (gcode_f, "G1 X%f Y%f\n", upperX, upperY);
+      fprintf (gcode_f, "G1 X%f Y%f\n", upperX, lowerY);
+      fprintf (gcode_f, "G0 Z%s\n", variable_safeZ);
+
+      if (gcode_advanced)
+        fprintf (gcode_f, "M5 M9 M2\n");
+      else
+        fprintf (gcode_f, "M5\nM9\nM2\n");
+      mill_distance = abs(gcode_safeZ - gcode_milldepth);
+      if (metric)
+        mill_distance /= 25.4;
+      fprintf (gcode_f, "(end, total distance G0 %.2f mm = %.2f in)\n",
+               mill_distance * 25.4, mill_distance);
+      mill_distance = (upperX - lowerX + upperY - lowerY) * 2;
+      mill_distance += abs(gcode_safeZ - gcode_milldepth);
+      if (metric)
+        mill_distance /= 25.4;
+      fprintf (gcode_f, "(     total distance G1 %.2f mm = %.2f in)\n",
+               mill_distance * 25.4, mill_distance);
+      fclose (gcode_f);
+    }
+
+error:
+  setlocale (LC_NUMERIC, old_locale);   /* restore locale */
 }
 
 /* *** PNG export (slightly modified code from PNG export HID) ************* */
@@ -659,7 +1194,7 @@ gcode_destroy_gc (hidGC gc)
 }
 
 static void
-gcode_use_mask (int use_it)
+gcode_use_mask (enum mask_mode mode)
 {
   /* does nothing */
 }
@@ -714,7 +1249,6 @@ gcode_set_draw_xor (hidGC gc, int xor_)
 static void
 gcode_set_draw_faded (hidGC gc, int faded)
 {
-  gc->faded = faded;
 }
 
 static void
@@ -736,7 +1270,7 @@ use_gc (hidGC gc)
          else
        */
       gdImageSetThickness (gcode_im,
-			   pcb_to_gcode (gc->width + 2 * gcode_toolradius));
+                           pcb_to_gcode (gc->width + 2 * gcode_toolradius));
       linewidth = gc->width;
       need_brush = 1;
     }
@@ -749,90 +1283,59 @@ use_gc (hidGC gc)
       int r;
 
       switch (gc->cap)
-	{
-	case Round_Cap:
-	case Trace_Cap:
-	  type = 'C';
-	  r = pcb_to_gcode (gc->width / 2 + gcode_toolradius);
-	  break;
-	default:
-	case Square_Cap:
-	  r = pcb_to_gcode (gc->width + gcode_toolradius * 2);
-	  type = 'S';
-	  break;
-	}
+        {
+        case Round_Cap:
+        case Trace_Cap:
+          type = 'C';
+          r = pcb_to_gcode (gc->width / 2 + gcode_toolradius);
+          break;
+        default:
+        case Square_Cap:
+          r = pcb_to_gcode (gc->width + gcode_toolradius * 2);
+          type = 'S';
+          break;
+        }
       sprintf (name, "#%.2x%.2x%.2x_%c_%d", gc->color->r, gc->color->g,
-	       gc->color->b, type, r);
+               gc->color->b, type, r);
 
       if (hid_cache_color (0, name, &bval, &bcache))
-	{
-	  gc->brush = (gdImagePtr)bval.ptr;
-	}
+        {
+          gc->brush = (gdImagePtr)bval.ptr;
+        }
       else
-	{
-	  int bg, fg;
-	  if (type == 'C')
-	    gc->brush = gdImageCreate (2 * r + 1, 2 * r + 1);
-	  else
-	    gc->brush = gdImageCreate (r + 1, r + 1);
-	  bg = gdImageColorAllocate (gc->brush, 255, 255, 255);
-	  fg =
-	    gdImageColorAllocate (gc->brush, gc->color->r, gc->color->g,
-				  gc->color->b);
-	  gdImageColorTransparent (gc->brush, bg);
-
-	  /*
-	   * if we shrunk to a radius/box width of zero, then just use
-	   * a single pixel to draw with.
-	   */
-	  if (r == 0)
-	    gdImageFilledRectangle (gc->brush, 0, 0, 0, 0, fg);
-	  else
-	    {
-	      if (type == 'C')
-		gdImageFilledEllipse (gc->brush, r, r, 2 * r, 2 * r, fg);
-	      else
-		gdImageFilledRectangle (gc->brush, 0, 0, r, r, fg);
-	    }
-	  bval.ptr = gc->brush;
-	  hid_cache_color (1, name, &bval, &bcache);
-	}
+        {
+          int bg, fg;
+          if (type == 'C')
+            gc->brush = gdImageCreate (2 * r + 1, 2 * r + 1);
+          else
+            gc->brush = gdImageCreate (r + 1, r + 1);
+          bg = gdImageColorAllocate (gc->brush, 255, 255, 255);
+          fg =
+            gdImageColorAllocate (gc->brush, gc->color->r, gc->color->g,
+                                  gc->color->b);
+          gdImageColorTransparent (gc->brush, bg);
+
+          /*
+           * if we shrunk to a radius/box width of zero, then just use
+           * a single pixel to draw with.
+           */
+          if (r == 0)
+            gdImageFilledRectangle (gc->brush, 0, 0, 0, 0, fg);
+          else
+            {
+              if (type == 'C')
+                gdImageFilledEllipse (gc->brush, r, r, 2 * r, 2 * r, fg);
+              else
+                gdImageFilledRectangle (gc->brush, 0, 0, r, r, fg);
+            }
+          bval.ptr = gc->brush;
+          hid_cache_color (1, name, &bval, &bcache);
+        }
 
       gdImageSetBrush (gcode_im, gc->brush);
       lastbrush = gc->brush;
 
     }
-#define CBLEND(gc) (((gc->r)<<24)|((gc->g)<<16)|((gc->b)<<8)|(gc->faded))
-  if (lastcolor != CBLEND (gc))
-    {
-      if (is_drill || is_mask)
-	{
-#ifdef FIXME
-	  fprintf (f, "%d gray\n", gc->erase ? 0 : 1);
-#endif
-	  lastcolor = 0;
-	}
-      else
-	{
-	  double r, g, b;
-	  r = gc->r;
-	  g = gc->g;
-	  b = gc->b;
-	  if (gc->faded)
-	    {
-	      r = 0.8 * 255 + 0.2 * r;
-	      g = 0.8 * 255 + 0.2 * g;
-	      b = 0.8 * 255 + 0.2 * b;
-	    }
-#ifdef FIXME
-	  if (gc->r == gc->g && gc->g == gc->b)
-	    fprintf (f, "%g gray\n", r / 255.0);
-	  else
-	    fprintf (f, "%g %g %g rgb\n", r / 255.0, g / 255.0, b / 255.0);
-#endif
-	  lastcolor = CBLEND (gc);
-	}
-    }
 }
 
 static void
@@ -840,10 +1343,11 @@ gcode_draw_rect (hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2)
 {
   use_gc (gc);
   gdImageRectangle (gcode_im,
-		    pcb_to_gcode (x1 - gcode_toolradius),
-		    pcb_to_gcode (y1 - gcode_toolradius),
-		    pcb_to_gcode (x2 + gcode_toolradius),
-		    pcb_to_gcode (y2 + gcode_toolradius), gc->color->c);
+                    pcb_to_gcode (x1 - PCB->ExtentMinX - gcode_toolradius),
+                    pcb_to_gcode (y1 - PCB->ExtentMinY - gcode_toolradius),
+                    pcb_to_gcode (x2 - PCB->ExtentMinX + gcode_toolradius),
+                    pcb_to_gcode (y2 - PCB->ExtentMinY + gcode_toolradius),
+                    gc->color->c);
 /*      printf("Rect %d %d %d %d\n",x1,y1,x2,y2); */
 }
 
@@ -854,10 +1358,11 @@ gcode_fill_rect (hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2)
   gdImageSetThickness (gcode_im, 0);
   linewidth = 0;
   gdImageFilledRectangle (gcode_im,
-			  pcb_to_gcode (x1 - gcode_toolradius),
-			  pcb_to_gcode (y1 - gcode_toolradius),
-			  pcb_to_gcode (x2 + gcode_toolradius),
-			  pcb_to_gcode (y2 + gcode_toolradius), gc->color->c);
+                      pcb_to_gcode (x1 - PCB->ExtentMinX - gcode_toolradius),
+                      pcb_to_gcode (y1 - PCB->ExtentMinY - gcode_toolradius),
+                      pcb_to_gcode (x2 - PCB->ExtentMinX + gcode_toolradius),
+                      pcb_to_gcode (y2 - PCB->ExtentMinY + gcode_toolradius),
+                      gc->color->c);
 /*      printf("FillRect %d %d %d %d\n",x1,y1,x2,y2); */
 }
 
@@ -867,20 +1372,25 @@ gcode_draw_line (hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2)
   if (x1 == x2 && y1 == y2)
     {
       Coord w = gc->width / 2;
-      gcode_fill_rect (gc, x1 - w, y1 - w, x1 + w, y1 + w);
+      gcode_fill_rect (gc,
+                       x1 - PCB->ExtentMinX - w, y1 - PCB->ExtentMinX - w,
+                       x1 - PCB->ExtentMinX + w, y1 - PCB->ExtentMinY + w);
       return;
     }
   use_gc (gc);
 
   gdImageSetThickness (gcode_im, 0);
   linewidth = 0;
-  gdImageLine (gcode_im, pcb_to_gcode (x1), pcb_to_gcode (y1),
-	       pcb_to_gcode (x2), pcb_to_gcode (y2), gdBrushed);
+  gdImageLine (gcode_im,
+               pcb_to_gcode (x1 - PCB->ExtentMinX),
+               pcb_to_gcode (y1 - PCB->ExtentMinY),
+               pcb_to_gcode (x2 - PCB->ExtentMinX),
+               pcb_to_gcode (y2 - PCB->ExtentMinY), gdBrushed);
 }
 
 static void
 gcode_draw_arc (hidGC gc, Coord cx, Coord cy, Coord width, Coord height,
-		Angle start_angle, Angle delta_angle)
+                Angle start_angle, Angle delta_angle)
 {
   Angle sa, ea;
 
@@ -910,18 +1420,97 @@ gcode_draw_arc (hidGC gc, Coord cx, Coord cy, Coord width, Coord height,
 
 #if 0
   printf ("draw_arc %d,%d %dx%d %d..%d %d..%d\n",
-	  cx, cy, width, height, start_angle, delta_angle, sa, ea);
+          cx, cy, width, height, start_angle, delta_angle, sa, ea);
   printf ("gdImageArc (%p, %d, %d, %d, %d, %d, %d, %d)\n",
-	  im, SCALE_X (cx), SCALE_Y (cy),
-	  SCALE (width), SCALE (height), sa, ea, gc->color->c);
+          im, SCALE_X (cx), SCALE_Y (cy),
+          SCALE (width), SCALE (height), sa, ea, gc->color->c);
 #endif
   use_gc (gc);
   gdImageSetThickness (gcode_im, 0);
   linewidth = 0;
-  gdImageArc (gcode_im, pcb_to_gcode (cx), pcb_to_gcode (cy),
-	      pcb_to_gcode (2 * width + gcode_toolradius * 2),
-	      pcb_to_gcode (2 * height + gcode_toolradius * 2), sa, ea,
-	      gdBrushed);
+  gdImageArc (gcode_im,
+              pcb_to_gcode (cx - PCB->ExtentMinX),
+              pcb_to_gcode (cy - PCB->ExtentMinY),
+              pcb_to_gcode (2 * width + gcode_toolradius * 2),
+              pcb_to_gcode (2 * height + gcode_toolradius * 2), sa, ea,
+              gdBrushed);
+}
+
+/* given a hole size, return the structure that currently holds the data for
+   that hole size. If there isn't one, make it */
+static int _drill_size_comparator(const void* _size0, const void* _size1)
+{
+  double size0 = ((const struct single_size_drills*)_size0)->diameter_inches;
+  double size1 = ((const struct single_size_drills*)_size1)->diameter_inches;
+  if (size0 == size1)
+    return 0;
+
+  if (size0 < size1)
+    return -1;
+
+  return 1;
+}
+static struct single_size_drills*
+get_drill(double diameter_inches)
+{
+  /* see if we already have this size. If so, return that structure */
+  struct single_size_drills* drill =
+    bsearch (&diameter_inches,
+             drills, n_drills, sizeof (drills[0]),
+             _drill_size_comparator);
+  if (drill != NULL)
+    return drill;
+
+  /* haven't seen this hole size before, so make a new structure for it */
+  if (n_drills == n_drills_allocated)
+    {
+      n_drills_allocated += 100;
+      drills =
+        (struct single_size_drills *) realloc (drills,
+                                               n_drills_allocated *
+                                               sizeof (struct single_size_drills));
+    }
+
+  /* I now add the structure to the list, making sure to keep the list
+   * sorted. Ideally the bsearch() call above would have given me the location
+   * to insert this element while keeping things sorted, but it doesn't. For
+   * simplicity I manually lsearch() to find this location myself */
+  {
+    int i = 0;
+    for (; i<n_drills; i++)
+      if (drills[i].diameter_inches >= diameter_inches)
+        break;
+
+    if (n_drills != i)
+      memmove (&drills[i+1], &drills[i],
+               (n_drills-i) * sizeof (struct single_size_drills));
+
+    drills[i].diameter_inches   = diameter_inches;
+    drills[i].n_holes           = 0;
+    drills[i].n_holes_allocated = 0;
+    drills[i].holes             = NULL;
+    n_drills++;
+
+    return &drills[i];
+  }
+}
+
+static void
+add_hole (struct single_size_drills* drill,
+          double cx_inches, double cy_inches)
+{
+  if (drill->n_holes == drill->n_holes_allocated)
+    {
+      drill->n_holes_allocated += 100;
+      drill->holes =
+        (struct drill_hole *) realloc (drill->holes,
+                                       drill->n_holes_allocated *
+                                       sizeof (struct drill_hole));
+    }
+
+  drill->holes[ drill->n_holes ].x = cx_inches;
+  drill->holes[ drill->n_holes ].y = cy_inches;
+  drill->n_holes++;
 }
 
 static void
@@ -931,25 +1520,22 @@ gcode_fill_circle (hidGC gc, Coord cx, Coord cy, Coord radius)
 
   gdImageSetThickness (gcode_im, 0);
   linewidth = 0;
-  gdImageFilledEllipse (gcode_im, pcb_to_gcode (cx), pcb_to_gcode (cy),
-			pcb_to_gcode (2 * radius + gcode_toolradius * 2),
-			pcb_to_gcode (2 * radius + gcode_toolradius * 2),
-			gc->color->c);
+  gdImageFilledEllipse (gcode_im,
+                        pcb_to_gcode (cx - PCB->ExtentMinX),
+                        pcb_to_gcode (cy - PCB->ExtentMinY),
+                        pcb_to_gcode (2 * radius + gcode_toolradius * 2),
+                        pcb_to_gcode (2 * radius + gcode_toolradius * 2),
+                        gc->color->c);
   if (save_drill && is_drill)
     {
-      if (n_drill == nmax_drill)
-	{
-	  drill =
-	    (struct drill_struct *) realloc (drill,
-					     (nmax_drill +
-					      100) *
-					     sizeof (struct drill_struct));
-	  nmax_drill += 100;
-	}
-      drill[n_drill].x = COORD_TO_INCH(PCB->MaxWidth - cx);	/* convert to inch, flip: will drill from bottom side */
-      drill[n_drill].y = COORD_TO_INCH(PCB->MaxHeight - cy);	/* PCB reverses y axis */
-      n_drill++;
-/*              printf("Circle %d %d\n",cx,cy); */
+      double diameter_inches = COORD_TO_INCH(radius*2);
+
+      struct single_size_drills* drill = get_drill (diameter_inches);
+      add_hole (drill,
+                /* convert to inch, flip: will drill from bottom side */
+                COORD_TO_INCH(PCB->ExtentMaxX  - cx),  
+                /* PCB reverses y axis */
+                COORD_TO_INCH(PCB->ExtentMaxY - cy)); 
     }
 }
 
@@ -968,8 +1554,8 @@ gcode_fill_polygon (hidGC gc, int n_coords, Coord *x, Coord *y)
   use_gc (gc);
   for (i = 0; i < n_coords; i++)
     {
-      points[i].x = pcb_to_gcode (x[i]);
-      points[i].y = pcb_to_gcode (y[i]);
+      points[i].x = pcb_to_gcode (x[i] - PCB->ExtentMinX);
+      points[i].y = pcb_to_gcode (y[i] - PCB->ExtentMinY);
     }
   gdImageSetThickness (gcode_im, 0);
   linewidth = 0;
@@ -993,15 +1579,14 @@ gcode_set_crosshair (int x, int y, int a)
 
 #include "dolists.h"
 
-HID gcode_hid;
-
 void
 hid_gcode_init ()
 {
   memset (&gcode_hid, 0, sizeof (HID));
+  memset (&gcode_graphics, 0, sizeof (HID_DRAW));
 
   common_nogui_init (&gcode_hid);
-  common_draw_helpers_init (&gcode_hid);
+  common_draw_helpers_init (&gcode_graphics);
 
   gcode_hid.struct_size         = sizeof (HID);
   gcode_hid.name                = "gcode";
@@ -1013,23 +1598,26 @@ hid_gcode_init ()
   gcode_hid.do_export           = gcode_do_export;
   gcode_hid.parse_arguments     = gcode_parse_arguments;
   gcode_hid.set_layer           = gcode_set_layer;
-  gcode_hid.make_gc             = gcode_make_gc;
-  gcode_hid.destroy_gc          = gcode_destroy_gc;
-  gcode_hid.use_mask            = gcode_use_mask;
-  gcode_hid.set_color           = gcode_set_color;
-  gcode_hid.set_line_cap        = gcode_set_line_cap;
-  gcode_hid.set_line_width      = gcode_set_line_width;
-  gcode_hid.set_draw_xor        = gcode_set_draw_xor;
-  gcode_hid.set_draw_faded      = gcode_set_draw_faded;
-  gcode_hid.draw_line           = gcode_draw_line;
-  gcode_hid.draw_arc            = gcode_draw_arc;
-  gcode_hid.draw_rect           = gcode_draw_rect;
-  gcode_hid.fill_circle         = gcode_fill_circle;
-  gcode_hid.fill_polygon        = gcode_fill_polygon;
-  gcode_hid.fill_rect           = gcode_fill_rect;
   gcode_hid.calibrate           = gcode_calibrate;
   gcode_hid.set_crosshair       = gcode_set_crosshair;
 
+  gcode_hid.graphics            = &gcode_graphics;
+
+  gcode_graphics.make_gc        = gcode_make_gc;
+  gcode_graphics.destroy_gc     = gcode_destroy_gc;
+  gcode_graphics.use_mask       = gcode_use_mask;
+  gcode_graphics.set_color      = gcode_set_color;
+  gcode_graphics.set_line_cap   = gcode_set_line_cap;
+  gcode_graphics.set_line_width = gcode_set_line_width;
+  gcode_graphics.set_draw_xor   = gcode_set_draw_xor;
+  gcode_graphics.set_draw_faded = gcode_set_draw_faded;
+  gcode_graphics.draw_line      = gcode_draw_line;
+  gcode_graphics.draw_arc       = gcode_draw_arc;
+  gcode_graphics.draw_rect      = gcode_draw_rect;
+  gcode_graphics.fill_circle    = gcode_fill_circle;
+  gcode_graphics.fill_polygon   = gcode_fill_polygon;
+  gcode_graphics.fill_rect      = gcode_fill_rect;
+
   hid_register_hid (&gcode_hid);
 
 #include "gcode_lists.h"
diff --git a/src/hid/gcode/gcode.h b/src/hid/gcode/gcode.h
deleted file mode 100644
index ae9d7a0..0000000
--- a/src/hid/gcode/gcode.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $Id: nelma.h,v 1.2 2007/04/20 11:31:15 danmc Exp $ */
-
-extern HID gcode_hid;
diff --git a/src/hid/gcode/lists.h b/src/hid/gcode/lists.h
index 3513184..60d42e6 100644
--- a/src/hid/gcode/lists.h
+++ b/src/hid/gcode/lists.h
@@ -2,7 +2,7 @@
    This file is part of Potrace. It is free software and it is covered
    by the GNU General Public License. See the file COPYING for details. */
 
-/* $Id: lists.h 147 2007-04-09 00:44:09Z selinger $ */
+/* lists.h 147 2007-04-09 00:44:09Z selinger */
 
 #ifndef PCB_HID_GCODE_LISTS_H
 #define PCB_HID_GCODE_LISTS_H
diff --git a/src/hid/gcode/trace.c b/src/hid/gcode/trace.c
index 7fb9012..f920096 100644
--- a/src/hid/gcode/trace.c
+++ b/src/hid/gcode/trace.c
@@ -4,7 +4,7 @@
    This file is part of Potrace. It is free software and it is covered
    by the GNU General Public License. See the file COPYING for details. */
 
-/* $Id: trace.c 147 2007-04-09 00:44:09Z selinger $ */
+/* trace.c 147 2007-04-09 00:44:09Z selinger */
 /* transform jaggy paths into smooth curves */
 
 #include <stdio.h>
@@ -1401,7 +1401,9 @@ malloc_error:
 
 /* ---------------------------------------------------------------------- */
 double
-plotpolygon (privpath_t * pp, FILE * f, double scale)
+plotpolygon (privpath_t * pp, FILE * f, double scale,
+             const char *var_cutdepth, const char *var_safeZ,
+             const char *var_plunge, const char *var_feedrate)
 {
   int i;
   int m = pp->m;
@@ -1418,7 +1420,8 @@ plotpolygon (privpath_t * pp, FILE * f, double scale)
 
   fprintf (f, "G0 X%f Y%f    (start point)\n", pt[po[0]].x * scale,
 	   pt[po[0]].y * scale);
-  fprintf (f, "G1 Z#101\n");
+  fprintf (f, "G1 Z%s F%s\n", var_cutdepth, var_plunge);
+  fprintf (f, "F%s\n", var_feedrate);
   for (i = 1; i < m; i++)
     {
       fprintf (f, "G1 X%f Y%f\n", pt[po[i]].x * scale, pt[po[i]].y * scale);
@@ -1432,7 +1435,7 @@ plotpolygon (privpath_t * pp, FILE * f, double scale)
 	      scale);
     }
   fprintf (f, "G1 X%f Y%f\n", pt[po[0]].x * scale, pt[po[0]].y * scale);
-  fprintf (f, "G0 Z#100\n");
+  fprintf (f, "G0 Z%s\n", var_safeZ);
   dm +=
     sqrt ((pt[po[m - 1]].x - pt[po[0]].x) * scale * (pt[po[m - 1]].x -
 						     pt[po[0]].x) * scale +
@@ -1447,7 +1450,9 @@ plotpolygon (privpath_t * pp, FILE * f, double scale)
 /* return distance on success, -1 on error with errno set. */
 double
 process_path (path_t * plist, const potrace_param_t * param,
-	      const potrace_bitmap_t * bm, FILE * f, double scale)
+	      const potrace_bitmap_t * bm, FILE * f, double scale,
+	      const char *var_cutdepth, const char *var_safeZ,
+	      const char *var_plunge, const char *var_feedrate)
 {
   path_t *p;
   double dm = 0;
@@ -1460,7 +1465,8 @@ process_path (path_t * plist, const potrace_param_t * param,
     TRY (bestpolygon (p->priv));
     TRY (adjust_vertices (p->priv));
     fprintf (f, "(polygon %d)\n", ++n);
-    dm += plotpolygon (p->priv, f, scale);
+    dm += plotpolygon (p->priv, f, scale, var_cutdepth, var_safeZ, var_plunge,
+                       var_feedrate);
 /*  No need to extract curves
 	TRY(smooth(&p->priv->curve, p->sign, param->alphamax));
     if (param->opticurve) {
diff --git a/src/hid/gcode/trace.h b/src/hid/gcode/trace.h
index 2a07e61..9fc2afb 100644
--- a/src/hid/gcode/trace.h
+++ b/src/hid/gcode/trace.h
@@ -2,7 +2,7 @@
    This file is part of Potrace. It is free software and it is covered
    by the GNU General Public License. See the file COPYING for details. */
 
-/* $Id: trace.h 147 2007-04-09 00:44:09Z selinger $ */
+/* trace.h 147 2007-04-09 00:44:09Z selinger */
 
 #ifndef TRACE_H
 #define TRACE_H
@@ -10,6 +10,8 @@
 #include "potracelib.h"
 
 double process_path (path_t * plist, const potrace_param_t * param,
-		     const potrace_bitmap_t * bm, FILE * f, double scale);
+		     const potrace_bitmap_t * bm, FILE * f, double scale,
+		     const char *var_cutdepth, const char *var_safeZ,
+		     const char *var_plunge, const char *var_feedrate);
 
 #endif /* TRACE_H */
diff --git a/src/hid/gerber/gerber.c b/src/hid/gerber/gerber.c
index 1539f88..657f9f1 100644
--- a/src/hid/gerber/gerber.c
+++ b/src/hid/gerber/gerber.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -29,6 +27,7 @@
 #include "pcb-printf.h"
 
 #include "hid.h"
+#include "hid_draw.h"
 #include "../hidint.h"
 #include "hid/common/hidnogui.h"
 #include "hid/common/draw_helpers.h"
@@ -38,8 +37,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 #define CRASH fprintf(stderr, "HID error: pcb called unimplemented Gerber function %s.\n", __FUNCTION__); abort()
 
 /*----------------------------------------------------------------------------*/
@@ -52,7 +49,7 @@ static void gerber_parse_arguments (int *argc, char ***argv);
 static int gerber_set_layer (const char *name, int group, int empty);
 static hidGC gerber_make_gc (void);
 static void gerber_destroy_gc (hidGC gc);
-static void gerber_use_mask (int use_it);
+static void gerber_use_mask (enum mask_mode mode);
 static void gerber_set_color (hidGC gc, const char *name);
 static void gerber_set_line_cap (hidGC gc, EndCapStyle style);
 static void gerber_set_line_width (hidGC gc, Coord width);
@@ -76,9 +73,9 @@ static void gerber_fill_polygon (hidGC gc, int n_coords, Coord *x, Coord *y);
 #define gerberXOffset(pcb, x) ((Coord) (x))
 #define gerberYOffset(pcb, y) ((Coord) (-(y)))
 
-/* These are for drills (printed as mils but are really 1/10th mil) */
-#define gerberDrX(pcb, x) ((Coord) (x) * 10)
-#define gerberDrY(pcb, y) ((Coord) ((pcb)->MaxHeight - (y)) * 10)
+/* These are for drills */
+#define gerberDrX(pcb, x) ((Coord) (x))
+#define gerberDrY(pcb, y) ((Coord) ((pcb)->MaxHeight - (y)))
 
 /*----------------------------------------------------------------------------*/
 /* Private data structures                                                    */
@@ -86,13 +83,21 @@ static void gerber_fill_polygon (hidGC gc, int n_coords, Coord *x, Coord *y);
 
 static int verbose;
 static int all_layers;
+static int metric;
+static char *x_convspec, *y_convspec;
 static int is_mask, was_drill;
 static int is_drill;
-static int current_mask;
+static enum mask_mode current_mask;
 static int flash_drills;
 static int copy_outline_mode;
 static int name_style;
-static LayerTypePtr outline_layer;
+static LayerType *outline_layer;
+
+#define print_xcoord(file, pcb, val)\
+	pcb_fprintf(file, x_convspec, gerberX(pcb, val))
+
+#define print_ycoord(file, pcb, val)\
+	pcb_fprintf(file, y_convspec, gerberY(pcb, val))
 
 enum ApertureShape
 {
@@ -169,6 +174,8 @@ deinitApertureList (ApertureList *list)
   initApertureList (list);
 }
 
+static int aperture_count;
+
 static void resetApertures()
 {
   int i;
@@ -179,13 +186,13 @@ static void resetApertures()
   curr_aptr_list  = NULL;
   layer_list_max = 0;
   layer_list_idx = 0;
+  aperture_count = 0;
 }
 
 /* Create and add a new aperture to the list */
 static Aperture *
 addAperture (ApertureList *list, Coord width, ApertureShape shape)
 {
-  static int aperture_count;
 
   Aperture *app = (Aperture *) malloc (sizeof *app);
   if (app == NULL)
@@ -229,13 +236,14 @@ fprintAperture (FILE *f, Aperture *aptr)
   switch (aptr->shape)
     {
     case ROUND:
-      pcb_fprintf (f, "%%ADD%dC,%.4mi*%%\r\n", aptr->dCode, aptr->width);
+      pcb_fprintf (f, metric ? "%%ADD%dC,%.3`mm*%%\r\n" : "%%ADD%dC,%.4`mi*%%\r\n", aptr->dCode, aptr->width);
       break;
     case SQUARE:
-      pcb_fprintf (f, "%%ADD%dR,%.4miX%.4mi*%%\r\n", aptr->dCode, aptr->width, aptr->width);
+      pcb_fprintf (f, metric ? "%%ADD%dR,%.3`mmX%.3`mm*%%\r\n" : "%%ADD%dR,%.4`miX%.4`mi*%%\r\n", aptr->dCode, aptr->width, aptr->width);
       break;
     case OCTAGON:
-      pcb_fprintf (f, "%%AMOCT%d*5,0,8,0,0,%.4mi,22.5*%%\r\n"
+      pcb_fprintf (f, metric ? "%%AMOCT%d*5,0,8,0,0,%.3`mm,22.5*%%\r\n"
+	       "%%ADD%dOCT%d*%%\r\n" : "%%AMOCT%d*5,0,8,0,0,%.3`mm,22.5*%%\r\n"
 	       "%%ADD%dOCT%d*%%\r\n", aptr->dCode,
 	       (Coord) ((double) aptr->width / COS_22_5_DEGREE), aptr->dCode,
 	       aptr->dCode);
@@ -283,6 +291,7 @@ setLayerApertureList (int layer_idx)
 /* --------------------------------------------------------------------------- */
 
 static HID gerber_hid;
+static HID_DRAW gerber_graphics;
 
 typedef struct hid_gc_struct
 {
@@ -304,7 +313,6 @@ static int pagecount = 0;
 static int linewidth = -1;
 static int lastgroup = -1;
 static int lastcap = -1;
-static int lastcolor = -1;
 static int print_group[MAX_LAYER];
 static int print_layer[MAX_LAYER];
 static int lastX, lastY;	/* the last X and Y coordinate */
@@ -330,6 +338,8 @@ static const char *name_style_names[] = {
   "first",
 #define NAME_STYLE_EAGLE 3
   "eagle",
+#define NAME_STYLE_HACKVANA 4
+  "hackvana",
   NULL
 };
 
@@ -367,12 +377,22 @@ Print file names and aperture counts on stdout.
   {"verbose", "Print file names and aperture counts on stdout",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_verbose 2
+/* %start-doc options "90 Gerber Export"
+ at ftable @code
+ at item --metric
+generate metric Gerber and drill files
+ at end ftable
+%end-doc
+*/
+  {"metric", "Generate metric Gerber and drill files",
+   HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
+#define HA_metric 3
   {"copy-outline", "Copy outline onto other layers",
    HID_Enum, 0, 0, {0, 0, 0}, copy_outline_names, 0},
-#define HA_copy_outline 3
+#define HA_copy_outline 4
   {"name-style", "Naming style for individual gerber files",
    HID_Enum, 0, 0, {0, 0, 0}, name_style_names, 0},
-#define HA_name_style 4
+#define HA_name_style 5
 };
 
 #define NUM_OPTIONS (sizeof(gerber_options)/sizeof(gerber_options[0]))
@@ -478,6 +498,61 @@ assign_eagle_file_suffix (char *dest, int idx)
   strcpy (dest, suff);
 }
 
+/* Very similar to layer_type_to_file_name() but appends only a
+   three-character suffix compatible with Hackvana's naming requirements  */
+static void
+assign_hackvana_file_suffix (char *dest, int idx)
+{
+  int group;
+  int nlayers;
+  char *suff = "defau.out";
+
+  switch (idx)
+    {
+    case SL (SILK,      TOP):    suff = "gto"; break;
+    case SL (SILK,      BOTTOM): suff = "gbo"; break;
+    case SL (MASK,      TOP):    suff = "gts"; break;
+    case SL (MASK,      BOTTOM): suff = "gbs"; break;
+    case SL (PDRILL,    0):      suff = "drl"; break;
+    case SL (UDRILL,    0):
+      suff = "_NPTH.drl";
+      break;
+    case SL (PASTE,     TOP):    suff = "gtp"; break;
+    case SL (PASTE,     BOTTOM): suff = "gbp"; break;
+    case SL (INVISIBLE, 0):      suff = "inv"; break;
+    case SL (FAB,       0):      suff = "fab"; break;
+    case SL (ASSY,      TOP):    suff = "ast"; break;
+    case SL (ASSY,      BOTTOM): suff = "asb"; break;
+
+    default:
+      group = GetLayerGroupNumberByNumber(idx);
+      nlayers = PCB->LayerGroups.Number[group];
+      if (group == GetLayerGroupNumberByNumber(component_silk_layer))
+      {
+        suff = "gtl";
+      }
+      else if (group == GetLayerGroupNumberByNumber(solder_silk_layer))
+      {
+        suff = "gbl";
+      }
+      else if (nlayers == 1
+        && (strcmp (PCB->Data->Layer[idx].Name, "route") == 0 ||
+            strcmp (PCB->Data->Layer[idx].Name, "outline") == 0))
+      {
+        suff = "gm1";
+      }
+      else
+      {
+        static char buf[20];
+        sprintf (buf, "g%d", group);
+        suff = buf;
+      }
+      break;
+    }
+
+  strcpy (dest, suff);
+}
+
 static void
 assign_file_suffix (char *dest, int idx)
 {
@@ -492,6 +567,9 @@ assign_file_suffix (char *dest, int idx)
     case NAME_STYLE_FIRST:  fns_style = FNS_first;  break;
     case NAME_STYLE_EAGLE:
       assign_eagle_file_suffix (dest, idx);
+      break;
+    case NAME_STYLE_HACKVANA:
+      assign_hackvana_file_suffix (dest, idx);
       return;
     }
 
@@ -536,6 +614,14 @@ gerber_do_export (HID_Attr_Val * options)
     fnbase = "pcb-out";
 
   verbose = options[HA_verbose].int_value;
+  metric = options[HA_metric].int_value;
+  if (metric) {
+	  x_convspec = "X%.0mu";
+	  y_convspec = "Y%.0mu";
+  } else {
+	  x_convspec = "X%.0mc";
+	  y_convspec = "Y%.0mc";
+  }
   all_layers = options[HA_all_layers].int_value;
 
   copy_outline_mode = options[HA_copy_outline].int_value;
@@ -588,7 +674,6 @@ gerber_do_export (HID_Attr_Val * options)
   linewidth = -1;
   lastcap = -1;
   lastgroup = -1;
-  lastcolor = -1;
 
   region.X1 = 0;
   region.Y1 = 0;
@@ -630,8 +715,8 @@ drill_sort (const void *va, const void *vb)
   if (a->diam != b->diam)
     return a->diam - b->diam;
   if (a->x != b->x)
-    return a->x - a->x;
-  return b->y - b->y;
+    return a->x - b->x;
+  return a->y - b->y;
 }
 
 static int
@@ -672,7 +757,7 @@ gerber_set_layer (const char *name, int group, int empty)
 	      Aperture *ap = findAperture (curr_aptr_list, pending_drills[i].diam, ROUND);
 	      fprintf (f, "T%02d\r\n", ap->dCode);
 	    }
-	  pcb_fprintf (f, "X%06.0mlY%06.0ml\r\n",
+	  pcb_fprintf (f, metric ? "X%06.0muY%06.0mu\r\n" : "X%06.0mtY%06.0mt\r\n",
 		   gerberDrX (PCB, pending_drills[i].x),
 		   gerberDrY (PCB, pending_drills[i].y));
 	}
@@ -683,7 +768,7 @@ gerber_set_layer (const char *name, int group, int empty)
 
   is_drill = (SL_TYPE (idx) == SL_PDRILL || SL_TYPE (idx) == SL_UDRILL);
   is_mask = (SL_TYPE (idx) == SL_MASK);
-  current_mask = 0;
+  current_mask = HID_MASK_OFF;
 #if 0
   printf ("Layer %s group %d drill %d mask %d\n", name, group, is_drill,
 	  is_mask);
@@ -702,7 +787,6 @@ gerber_set_layer (const char *name, int group, int empty)
       lastgroup = group;
       lastX = -1;
       lastY = -1;
-      lastcolor = 0;
       linewidth = -1;
       lastcap = -1;
 
@@ -738,10 +822,11 @@ gerber_set_layer (const char *name, int group, int empty)
       if (is_drill)
 	{
 	  /* We omit the ,TZ here because we are not omitting trailing zeros.  Our format is
-	     always six-digit 0.1 mil resolution (i.e. 001100 = 0.11")*/
-	  fprintf (f, "M48\r\n" "INCH\r\n");
+	     always six-digit 0.1 mil or µm resolution (i.e. 001100 = 0.11" or 1.1mm)*/
+	  fprintf (f, "M48\r\n");
+	  fprintf (f, metric ? "METRIC,000.000\r\n" : "INCH\r\n");
 	  for (search = aptr_list->data; search; search = search->next)
-	    pcb_fprintf (f, "T%02dC%.3mi\r\n", search->dCode, search->width);
+		  pcb_fprintf (f, metric ? "T%02dC%.3`mm\r\n" : "T%02dC%.3`mi\r\n", search->dCode, search->width);
 	  fprintf (f, "%%\r\n");
 	  /* FIXME */
 	  return 1;
@@ -770,15 +855,16 @@ gerber_set_layer (const char *name, int group, int empty)
 #endif
 
       fprintf (f, "G04 Format: Gerber/RS-274X *\r\n");
-      pcb_fprintf (f, "G04 PCB-Dimensions: %.0mc %.0mc *\r\n",
+      pcb_fprintf (f, metric ? "G04 PCB-Dimensions (mm): %.2mm %.2mm *\r\n" :
+	       "G04 PCB-Dimensions (mil): %.2ml %.2ml *\r\n",
 	       PCB->MaxWidth, PCB->MaxHeight);
       fprintf (f, "G04 PCB-Coordinate-Origin: lower left *\r\n");
 
       /* Signal data in inches. */
-      fprintf (f, "%%MOIN*%%\r\n");
+      fprintf (f, metric ? "%%MOMM*%%\r\n" : "%%MOIN*%%\r\n");
 
-      /* Signal Leading zero suppression, Absolute Data, 2.5 format */
-      fprintf (f, "%%FSLAX25Y25*%%\r\n");
+      /* Signal Leading zero suppression, Absolute Data, 2.5 format in inch, 4.3 in mm */
+      fprintf (f, metric ? "%%FSLAX43Y43*%%\r\n" : "%%FSLAX25Y25*%%\r\n");
 
       /* build a legal identifier. */
       if (layername)
@@ -833,19 +919,19 @@ gerber_set_layer (const char *name, int group, int empty)
 	DrawLayer (outline_layer, &region);
       else if (!outline_layer)
 	{
-	  hidGC gc = gui->make_gc ();
+	  hidGC gc = gui->graphics->make_gc ();
 	  printf("name %s idx %d\n", name, idx);
 	  if (SL_TYPE (idx) == SL_SILK)
-	    gui->set_line_width (gc, PCB->minSlk);
+	    gui->graphics->set_line_width (gc, PCB->minSlk);
 	  else if (group >= 0)
-	    gui->set_line_width (gc, PCB->minWid);
+	    gui->graphics->set_line_width (gc, PCB->minWid);
 	  else
-	    gui->set_line_width (gc, AUTO_OUTLINE_WIDTH);
-	  gui->draw_line (gc, 0, 0, PCB->MaxWidth, 0);
-	  gui->draw_line (gc, 0, 0, 0, PCB->MaxHeight);
-	  gui->draw_line (gc, PCB->MaxWidth, 0, PCB->MaxWidth, PCB->MaxHeight);
-	  gui->draw_line (gc, 0, PCB->MaxHeight, PCB->MaxWidth, PCB->MaxHeight);
-	  gui->destroy_gc (gc);
+	    gui->graphics->set_line_width (gc, AUTO_OUTLINE_WIDTH);
+	  gui->graphics->draw_line (gc, 0, 0, PCB->MaxWidth, 0);
+	  gui->graphics->draw_line (gc, 0, 0, 0, PCB->MaxHeight);
+	  gui->graphics->draw_line (gc, PCB->MaxWidth, 0, PCB->MaxWidth, PCB->MaxHeight);
+	  gui->graphics->draw_line (gc, 0, PCB->MaxHeight, PCB->MaxWidth, PCB->MaxHeight);
+	  gui->graphics->destroy_gc (gc);
 	}
     }
 
@@ -867,9 +953,9 @@ gerber_destroy_gc (hidGC gc)
 }
 
 static void
-gerber_use_mask (int use_it)
+gerber_use_mask (enum mask_mode mode)
 {
-  current_mask = use_it;
+  current_mask = mode;
 }
 
 static void
@@ -952,33 +1038,9 @@ use_gc (hidGC gc, int radius)
       if (aptr == NULL)
         pcb_fprintf (stderr, "error: aperture for width %$mS type %s is null\n",
                  linewidth, shape == ROUND ? "ROUND" : "SQUARE");
-      if (f)
+      else if (f)
 	fprintf (f, "G54D%d*", aptr->dCode);
     }
-#if 0
-  if (lastcolor != gc->color)
-    {
-      c = gc->color;
-      if (is_drill)
-	return;
-      if (is_mask)
-	c = (gc->erase ? 0 : 1);
-      lastcolor = gc->color;
-      if (f)
-	{
-	  if (c)
-	    {
-	      fprintf (f, "%%LN%s_C%d*%%\r\n", layername, lncount++);
-	      fprintf (f, "%%LPC*%%\r\n");
-	    }
-	  else
-	    {
-	      fprintf (f, "%%LN%s_D%d*%%\r\n", layername, lncount++);
-	      fprintf (f, "%%LPD*%%\r\n");
-	    }
-	}
-    }
-#endif
 }
 
 static void
@@ -1025,13 +1087,13 @@ gerber_draw_line (hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2)
     {
       m = true;
       lastX = x1;
-      pcb_fprintf (f, "X%.0mc", gerberX (PCB, lastX));
+      print_xcoord (f, PCB, lastX);
     }
   if (y1 != lastY)
     {
       m = true;
       lastY = y1;
-      pcb_fprintf (f, "Y%.0mc", gerberY (PCB, lastY));
+      print_ycoord (f, PCB, lastY);
     }
   if ((x1 == x2) && (y1 == y2))
     fprintf (f, "D03*\r\n");
@@ -1042,13 +1104,12 @@ gerber_draw_line (hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2)
       if (x2 != lastX)
 	{
 	  lastX = x2;
-	  pcb_fprintf (f, "X%.0mc", gerberX (PCB, lastX));
+	  print_xcoord (f, PCB, lastX);
 	}
       if (y2 != lastY)
 	{
 	  lastY = y2;
-	  pcb_fprintf (f, "Y%.0mc", gerberY (PCB, lastY));
-
+	  print_ycoord (f, PCB, lastY);
 	}
       fprintf (f, "D01*\r\n");
     }
@@ -1116,17 +1177,18 @@ gerber_draw_arc (hidGC gc, Coord cx, Coord cy, Coord width, Coord height,
     {
       m = true;
       lastX = arcStartX;
-      pcb_fprintf (f, "X%.0mc", gerberX (PCB, lastX));
+      print_xcoord (f, PCB, lastX);
     }
   if (arcStartY != lastY)
     {
       m = true;
       lastY = arcStartY;
-      pcb_fprintf (f, "Y%.0mc", gerberY (PCB, lastY));
+      print_ycoord (f, PCB, lastY);
     }
   if (m)
     fprintf (f, "D02*");
   pcb_fprintf (f,
+	   metric ? "G75*G0%1dX%.0muY%.0muI%.0muJ%.0muD01*G01*\r\n" :
 	   "G75*G0%1dX%.0mcY%.0mcI%.0mcJ%.0mcD01*G01*\r\n",
 	   (delta_angle < 0) ? 2 : 3,
 	   gerberX (PCB, arcStopX), gerberY (PCB, arcStopY),
@@ -1166,12 +1228,12 @@ gerber_fill_circle (hidGC gc, Coord cx, Coord cy, Coord radius)
   if (cx != lastX)
     {
       lastX = cx;
-      pcb_fprintf (f, "X%.0mc", gerberX (PCB, lastX));
+      print_xcoord (f, PCB, lastX);
     }
   if (cy != lastY)
     {
       lastY = cy;
-      pcb_fprintf (f, "Y%.0mc", gerberY (PCB, lastY));
+      print_ycoord (f, PCB, lastY);
     }
   fprintf (f, "D03*\r\n");
 }
@@ -1197,13 +1259,13 @@ gerber_fill_polygon (hidGC gc, int n_coords, Coord *x, Coord *y)
 	{
 	  m = true;
 	  lastX = x[i];
-	  pcb_fprintf (f, "X%.0mc", gerberX (PCB, lastX));
+	  print_xcoord (f, PCB, lastX);
 	}
       if (y[i] != lastY)
 	{
 	  m = true;
 	  lastY = y[i];
-	  pcb_fprintf (f, "Y%.0mc", gerberY (PCB, lastY));
+	  print_ycoord (f, PCB, lastY);
 	}
       if (firstTime)
 	{
@@ -1221,13 +1283,13 @@ gerber_fill_polygon (hidGC gc, int n_coords, Coord *x, Coord *y)
     {
       m = true;
       lastX = startX;
-      pcb_fprintf (f, "X%.0mc", gerberX (PCB, startX));
+      print_xcoord (f, PCB, startX);
     }
   if (startY != lastY)
     {
       m = true;
       lastY = startY;
-      pcb_fprintf (f, "Y%.0mc", gerberY (PCB, lastY));
+      print_ycoord (f, PCB, lastY);
     }
   if (m)
     fprintf (f, "D01*\r\n");
@@ -1265,9 +1327,10 @@ void
 hid_gerber_init ()
 {
   memset (&gerber_hid, 0, sizeof (gerber_hid));
+  memset (&gerber_graphics, 0, sizeof (gerber_graphics));
 
   common_nogui_init (&gerber_hid);
-  common_draw_helpers_init (&gerber_hid);
+  common_draw_helpers_init (&gerber_graphics);
 
   gerber_hid.struct_size         = sizeof (gerber_hid);
   gerber_hid.name                = "gerber";
@@ -1278,21 +1341,24 @@ hid_gerber_init ()
   gerber_hid.do_export           = gerber_do_export;
   gerber_hid.parse_arguments     = gerber_parse_arguments;
   gerber_hid.set_layer           = gerber_set_layer;
-  gerber_hid.make_gc             = gerber_make_gc;
-  gerber_hid.destroy_gc          = gerber_destroy_gc;
-  gerber_hid.use_mask            = gerber_use_mask;
-  gerber_hid.set_color           = gerber_set_color;
-  gerber_hid.set_line_cap        = gerber_set_line_cap;
-  gerber_hid.set_line_width      = gerber_set_line_width;
-  gerber_hid.set_draw_xor        = gerber_set_draw_xor;
-  gerber_hid.draw_line           = gerber_draw_line;
-  gerber_hid.draw_arc            = gerber_draw_arc;
-  gerber_hid.draw_rect           = gerber_draw_rect;
-  gerber_hid.fill_circle         = gerber_fill_circle;
-  gerber_hid.fill_polygon        = gerber_fill_polygon;
-  gerber_hid.fill_rect           = gerber_fill_rect;
   gerber_hid.calibrate           = gerber_calibrate;
   gerber_hid.set_crosshair       = gerber_set_crosshair;
 
+  gerber_hid.graphics            = &gerber_graphics;
+
+  gerber_graphics.make_gc        = gerber_make_gc;
+  gerber_graphics.destroy_gc     = gerber_destroy_gc;
+  gerber_graphics.use_mask       = gerber_use_mask;
+  gerber_graphics.set_color      = gerber_set_color;
+  gerber_graphics.set_line_cap   = gerber_set_line_cap;
+  gerber_graphics.set_line_width = gerber_set_line_width;
+  gerber_graphics.set_draw_xor   = gerber_set_draw_xor;
+  gerber_graphics.draw_line      = gerber_draw_line;
+  gerber_graphics.draw_arc       = gerber_draw_arc;
+  gerber_graphics.draw_rect      = gerber_draw_rect;
+  gerber_graphics.fill_circle    = gerber_fill_circle;
+  gerber_graphics.fill_polygon   = gerber_fill_polygon;
+  gerber_graphics.fill_rect      = gerber_fill_rect;
+
   hid_register_hid (&gerber_hid);
 }
diff --git a/src/hid/gtk/ghid-cell-renderer-visibility.c b/src/hid/gtk/ghid-cell-renderer-visibility.c
index 6e69744..7e540a9 100644
--- a/src/hid/gtk/ghid-cell-renderer-visibility.c
+++ b/src/hid/gtk/ghid-cell-renderer-visibility.c
@@ -116,6 +116,8 @@ ghid_cell_renderer_visibility_render (GtkCellRenderer      *cell,
     {
       GdkColor color;
       cairo_t *cr = gdk_cairo_create (window);
+      cairo_pattern_t *pattern;
+
       if (expose_area)
         {
           gdk_cairo_rectangle (cr, expose_area);
@@ -137,7 +139,25 @@ ghid_cell_renderer_visibility_render (GtkCellRenderer      *cell,
           color.green = (4*color.green + 65535) / 5;
           color.blue = (4*color.blue + 65535) / 5;
         }
-      gdk_cairo_set_source_color (cr, &color);
+
+      pattern = cairo_pattern_create_radial ((toggle_rect.width  - 1.) * 0.75 + toggle_rect.x + 0.5,
+                                             (toggle_rect.height - 1.) * 0.75 + toggle_rect.y + 0.5,
+                                             0.,
+                                             (toggle_rect.width  - 1.) * 0.50 + toggle_rect.x + 0.5,
+                                             (toggle_rect.height - 1.) * 0.50 + toggle_rect.y + 0.5,
+                                             (toggle_rect.width  - 1.) * 0.71);
+
+      cairo_pattern_add_color_stop_rgb (pattern, 0.0,
+                                        (color.red   / 65535. * 4. + 1.) / 5.,
+                                        (color.green / 65535. * 4. + 1.) / 5.,
+                                        (color.blue  / 65535. * 4. + 1.) / 5.);
+      cairo_pattern_add_color_stop_rgb (pattern, 1.0,
+                                        (color.red   / 65535. * 5. + 0.) / 5.,
+                                        (color.green / 65535. * 5. + 0.) / 5.,
+                                        (color.blue  / 65535. * 5. + 0.) / 5.);
+      cairo_set_source (cr, pattern);
+      cairo_pattern_destroy (pattern);
+
       if (pcb_cell->active)
         cairo_rectangle (cr, toggle_rect.x + 0.5, toggle_rect.y + 0.5,
                              toggle_rect.width - 1, toggle_rect.height - 1);
@@ -254,7 +274,7 @@ ghid_cell_renderer_visibility_class_init (GHidCellRendererVisibilityClass *klass
   * The ::toggled signal is emitted when the cell is toggled. 
   **/
   toggle_cell_signals[TOGGLED] =
-    g_signal_new (_("toggled"),
+    g_signal_new ("toggled",
                   G_OBJECT_CLASS_TYPE (object_class),
                   G_SIGNAL_RUN_LAST,
                   G_STRUCT_OFFSET (GHidCellRendererVisibilityClass, toggled),
diff --git a/src/hid/gtk/ghid-layer-selector.c b/src/hid/gtk/ghid-layer-selector.c
index 639e2be..7e28028 100644
--- a/src/hid/gtk/ghid-layer-selector.c
+++ b/src/hid/gtk/ghid-layer-selector.c
@@ -29,6 +29,7 @@ static void menu_pick_cb (GtkRadioAction *action, struct _layer *ldata);
 enum {
   SELECT_LAYER_SIGNAL,
   TOGGLE_LAYER_SIGNAL,
+  RENAME_LAYER_SIGNAL,
   LAST_SIGNAL
 };
 
@@ -40,7 +41,8 @@ enum {
   COLOR_COL,
   TEXT_COL,
   FONT_COL,
-  ACTIVATABLE_COL,
+  EDITABLE_COL,
+  SELECTABLE_COL,
   SEPARATOR_COL,
   N_COLS
 };
@@ -64,8 +66,6 @@ struct _GHidLayerSelector
 
   gboolean accel_available[20];
 
-  gboolean last_activatable;
-
   gulong selection_changed_sig_id;
 };
 
@@ -75,6 +75,7 @@ struct _GHidLayerSelectorClass
 
   void (* select_layer) (GHidLayerSelector *, gint);
   void (* toggle_layer) (GHidLayerSelector *, gint);
+  void (* rename_layer) (GHidLayerSelector *, gint, gchar *);
 };
 
 struct _layer
@@ -87,6 +88,42 @@ struct _layer
   GtkTreeRowReference *rref;
 };
 
+static void
+g_cclosure_user_marshal_VOID__INT_STRING (GClosure     *closure,
+                                          GValue       *return_value G_GNUC_UNUSED,
+                                          guint         n_param_values,
+                                          const GValue *param_values,
+                                          gpointer      invocation_hint G_GNUC_UNUSED,
+                                          gpointer      marshal_data)
+{
+  typedef void (*GMarshalFunc_VOID__INT_STRING) (gpointer     data1,
+                                                 gint         arg_1,
+                                                 gpointer     arg_2,
+                                                 gpointer     data2);
+  register GMarshalFunc_VOID__INT_STRING callback;
+  register GCClosure *cc = (GCClosure*) closure;
+  register gpointer data1, data2;
+
+  g_return_if_fail (n_param_values == 3);
+
+  if (G_CCLOSURE_SWAP_DATA (closure))
+    {
+      data1 = closure->data;
+      data2 = g_value_peek_pointer (param_values + 0);
+    }
+  else
+    {
+      data1 = g_value_peek_pointer (param_values + 0);
+      data2 = closure->data;
+    }
+  callback = (GMarshalFunc_VOID__INT_STRING) (marshal_data ? marshal_data : cc->callback);
+
+  callback (data1,
+            g_value_get_int (param_values + 1),
+            (char *)g_value_get_string (param_values + 2),
+            data2);
+}
+
 /*! \brief Deletes the action and accelerator from a layer */
 static void
 free_ldata (GHidLayerSelector *ls, struct _layer *ldata)
@@ -175,9 +212,9 @@ tree_selection_func (GtkTreeSelection *selection, GtkTreeModel *model,
 
   if (gtk_tree_model_get_iter (model, &iter, path))
     {
-      gboolean activatable;
-      gtk_tree_model_get (model, &iter, ACTIVATABLE_COL, &activatable, -1);
-      return activatable;
+      gboolean selectable;
+      gtk_tree_model_get (model, &iter, SELECTABLE_COL, &selectable, -1);
+      return selectable;
     }
 
   return FALSE;
@@ -205,14 +242,15 @@ button_press_cb (GHidLayerSelector *ls, GdkEventButton *event)
                                      &path, &column, NULL, NULL))
     {
       GtkTreeIter iter;
-      gboolean activatable, separator;
+      gboolean selectable;
+      gboolean separator;
       gtk_tree_model_get_iter (GTK_TREE_MODEL (ls->list_store), &iter, path);
       gtk_tree_model_get (GTK_TREE_MODEL (ls->list_store), &iter,
-                          ACTIVATABLE_COL, &activatable,
+                          SELECTABLE_COL, &selectable,
                           SEPARATOR_COL, &separator, -1);
-      /* Toggle visibility for non-activatable layers no matter
+      /* Toggle visibility for non-selectable layers no matter
        *  where you click. */
-      if (!separator && (column == ls->visibility_column || !activatable))
+      if (!separator && (column == ls->visibility_column || !selectable))
         {
           toggle_visibility (ls, &iter, TRUE);
           return TRUE; 
@@ -244,6 +282,70 @@ selection_changed_cb (GtkTreeSelection *selection, GHidLayerSelector *ls)
     }
 }
 
+/*! \brief Callback for when a layer name has been edited  */
+static void
+layer_name_editing_started_cb (GtkCellRenderer *renderer,
+                               GtkCellEditable *editable,
+                               gchar           *path,
+                               gpointer         user_data)
+{
+  /* When editing begins, we need to detach PCB's accelerators
+   * so they don't steal all the user's keystrokes.
+   *
+   * XXX: We should not have to do this within a simple widget,
+   *
+   *      and this quick hack workaround breaks the widget's
+   *      abstraction from the rest of the application :(
+   */
+  ghid_remove_accel_groups (GTK_WINDOW (gport->top_window), ghidgui);
+}
+
+/*! \brief Callback for when layer name editing has been canceled */
+static void
+layer_name_editing_canceled_cb (GtkCellRenderer *renderer,
+                                 gpointer         user_data)
+{
+  /* Put PCB's accelerators back.
+   *
+   * XXX: We should not have to do this within a simple widget,
+   *      and this quick hack workaround breaks the widget's
+   *      abstraction from the rest of the application :(
+   */
+  ghid_install_accel_groups (GTK_WINDOW (gport->top_window), ghidgui);
+}
+
+/*! \brief Callback for when a layer name has been edited  */
+static void
+layer_name_edited_cb (GtkCellRendererText *renderer,
+                      gchar               *path,
+                      gchar               *new_text,
+                      gpointer             user_data)
+{
+  GHidLayerSelector *ls = user_data;
+  GtkTreeIter iter;
+  int user_id;
+
+  /* Put PCB's accelerators back.
+   *
+   * XXX: We should not have to do this within a simple widget,
+   *      and this quick hack workaround breaks the widget's
+   *      abstraction from the rest of the application :(
+   */
+  ghid_install_accel_groups (GTK_WINDOW (gport->top_window), ghidgui);
+
+  if (!gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (ls->list_store), &iter, path))
+    return;
+
+  gtk_tree_model_get (GTK_TREE_MODEL (ls->list_store),
+                      &iter,
+                      USER_ID_COL, &user_id,
+                      -1);
+
+  g_signal_emit (ls, ghid_layer_selector_signals[RENAME_LAYER_SIGNAL],
+                 0, user_id, new_text);
+}
+
+
 /*! \brief Callback for menu actions: sync layer selection list, emit signal */
 static void
 menu_view_cb (GtkToggleAction *action, struct _layer *ldata)
@@ -290,11 +392,75 @@ menu_pick_cb (GtkRadioAction *action, struct _layer *ldata)
     }
 }
 
-/* CONSTRUCTOR */
 static void
 ghid_layer_selector_init (GHidLayerSelector *ls)
 {
-  /* Hookup signal handlers */
+  int i;
+  GtkCellRenderer *renderer1;
+  GtkCellRenderer *renderer2;
+  GtkTreeViewColumn *opacity_col;
+  GtkTreeViewColumn *name_col;
+
+  renderer1 = ghid_cell_renderer_visibility_new ();
+  renderer2 = gtk_cell_renderer_text_new ();
+  g_object_set (renderer2, "editable-set", TRUE, NULL);
+  g_signal_connect (renderer2, "editing-started",
+                    G_CALLBACK (layer_name_editing_started_cb), ls);
+  g_signal_connect (renderer2, "editing-canceled",
+                    G_CALLBACK (layer_name_editing_canceled_cb), ls);
+  g_signal_connect (renderer2, "edited",
+                    G_CALLBACK (layer_name_edited_cb), ls);
+
+  opacity_col = gtk_tree_view_column_new_with_attributes ("",
+                                                          renderer1,
+                                                          "active", VISIBLE_COL,
+                                                          "color",  COLOR_COL,
+                                                          NULL);
+  name_col = gtk_tree_view_column_new_with_attributes ("",
+                                                       renderer2,
+                                                       "text", TEXT_COL,
+                                                       "font", FONT_COL,
+                                                       "editable", EDITABLE_COL,
+                                                       NULL);
+
+  ls->list_store = gtk_list_store_new (N_COLS,
+                 /* STRUCT_COL      */ G_TYPE_POINTER,
+                 /* USER_ID_COL     */ G_TYPE_INT,
+                 /* VISIBLE_COL     */ G_TYPE_BOOLEAN,
+                 /* COLOR_COL       */ G_TYPE_STRING,
+                 /* TEXT_COL        */ G_TYPE_STRING,
+                 /* FONT_COL        */ G_TYPE_STRING,
+                 /* EDITABLE_COL    */ G_TYPE_BOOLEAN,
+                 /* ACTIVATABLE_COL */ G_TYPE_BOOLEAN,
+                 /* SEPARATOR_COL   */ G_TYPE_BOOLEAN);
+
+  gtk_tree_view_insert_column (GTK_TREE_VIEW (ls), opacity_col, -1);
+  gtk_tree_view_insert_column (GTK_TREE_VIEW (ls), name_col, -1);
+  gtk_tree_view_set_model (GTK_TREE_VIEW (ls), GTK_TREE_MODEL (ls->list_store));
+  gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (ls), FALSE);
+
+  ls->visibility_column = opacity_col;
+  ls->selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ls));
+  ls->accel_group = gtk_accel_group_new ();
+  ls->action_group = gtk_action_group_new ("LayerSelector");
+  ls->n_actions = 0;
+
+  for (i = 0; i < 20; ++i)
+    ls->accel_available[i] = TRUE;
+
+  gtk_tree_view_set_row_separator_func (GTK_TREE_VIEW (ls),
+                                        tree_view_separator_func,
+                                        NULL, NULL);
+  gtk_tree_selection_set_select_function (ls->selection, tree_selection_func,
+                                          NULL, NULL);
+  gtk_tree_selection_set_mode (ls->selection, GTK_SELECTION_BROWSE);
+
+  g_object_set_data (G_OBJECT (ls->list_store), "layer-selector", ls);
+  g_signal_connect (ls, "button_press_event",
+                    G_CALLBACK (button_press_cb), NULL);
+  ls->selection_changed_sig_id =
+    g_signal_connect (ls->selection, "changed",
+                      G_CALLBACK (selection_changed_cb), ls);
 }
 
 static void
@@ -318,6 +484,14 @@ ghid_layer_selector_class_init (GHidLayerSelectorClass *klass)
                   NULL, NULL,
                   g_cclosure_marshal_VOID__INT, G_TYPE_NONE,
                   1, G_TYPE_INT);
+  ghid_layer_selector_signals[RENAME_LAYER_SIGNAL] =
+    g_signal_new ("rename-layer",
+                  G_TYPE_FROM_CLASS (klass),
+                  G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
+                  G_STRUCT_OFFSET (GHidLayerSelectorClass, rename_layer),
+                  NULL, NULL,
+                  g_cclosure_user_marshal_VOID__INT_STRING, G_TYPE_NONE,
+                  2, G_TYPE_INT, G_TYPE_STRING);
 
   object_class->finalize = ghid_layer_selector_finalize;
 }
@@ -383,57 +557,7 @@ ghid_layer_selector_get_type (void)
 GtkWidget *
 ghid_layer_selector_new (void)
 {
-  int i;
-  GtkCellRenderer *renderer1 = ghid_cell_renderer_visibility_new ();
-  GtkCellRenderer *renderer2 = gtk_cell_renderer_text_new ();
-  GtkTreeViewColumn *opacity_col =
-      gtk_tree_view_column_new_with_attributes ("", renderer1,
-                                                "active", VISIBLE_COL,
-                                                "color", COLOR_COL, NULL);
-  GtkTreeViewColumn *name_col =
-      gtk_tree_view_column_new_with_attributes ("", renderer2,
-                                                "text", TEXT_COL,
-                                                "font", FONT_COL,
-                                                NULL);
-
-  GHidLayerSelector *ls = g_object_new (GHID_LAYER_SELECTOR_TYPE, NULL);
-
-  /* action index, active, color, text, font, is_separator */
-  ls->list_store = gtk_list_store_new (N_COLS, G_TYPE_POINTER, G_TYPE_INT,
-                                       G_TYPE_BOOLEAN, G_TYPE_STRING,
-                                       G_TYPE_STRING, G_TYPE_STRING,
-                                       G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);
-  gtk_tree_view_insert_column (GTK_TREE_VIEW (ls), opacity_col, -1);
-  gtk_tree_view_insert_column (GTK_TREE_VIEW (ls), name_col, -1);
-  gtk_tree_view_set_model (GTK_TREE_VIEW (ls), GTK_TREE_MODEL (ls->list_store));
-  gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (ls), FALSE);
-
-  ls->last_activatable = TRUE;
-  ls->visibility_column = opacity_col;
-  ls->selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ls));
-  ls->accel_group = gtk_accel_group_new ();
-  ls->action_group = gtk_action_group_new ("LayerSelector");
-  ls->n_actions = 0;
-  for (i = 0; i < 20; ++i)
-    ls->accel_available[i] = TRUE;
-
-  gtk_tree_view_set_row_separator_func (GTK_TREE_VIEW (ls),
-                                        tree_view_separator_func,
-                                        NULL, NULL);
-  gtk_tree_selection_set_select_function (ls->selection, tree_selection_func,
-                                          NULL, NULL);
-  gtk_tree_selection_set_mode (ls->selection, GTK_SELECTION_BROWSE);
-
-  g_object_set_data (G_OBJECT (ls->list_store), "layer-selector", ls);
-  g_signal_connect (ls, "button_press_event",
-                    G_CALLBACK (button_press_cb), NULL);
-  ls->selection_changed_sig_id =
-    g_signal_connect (ls->selection, "changed",
-                      G_CALLBACK (selection_changed_cb), ls);
-
-  g_object_ref (ls->accel_group);
-
-  return GTK_WIDGET (ls);
+  return GTK_WIDGET (g_object_new (GHID_LAYER_SELECTOR_TYPE, NULL));
 }
 
 /*! \brief Add a layer to a GHidLayerSelector.
@@ -451,7 +575,8 @@ ghid_layer_selector_new (void)
  *  \param [in] name          The name of the layer; will be used on selector and menus
  *  \param [in] color_string  The color of the layer on selector
  *  \param [in] visibile      Whether the layer is visible
- *  \param [in] activatable   Whether the layer appears in menus and can be selected
+ *  \param [in] selectable    Whether the layer appears in menus and can be selected
+ *  \param [in] renameable    Whether the layer is renameable
  */
 void
 ghid_layer_selector_add_layer (GHidLayerSelector *ls,
@@ -459,12 +584,13 @@ ghid_layer_selector_add_layer (GHidLayerSelector *ls,
                                const gchar *name,
                                const gchar *color_string,
                                gboolean visible,
-                               gboolean activatable)
+                               gboolean selectable,
+                               gboolean renameable)
 {
   struct _layer *new_layer = NULL;
   gchar *pname, *vname;
   gboolean new_iter = TRUE;
-  gboolean last_activatable = TRUE;
+  gboolean last_selectable = TRUE;
   GtkTreePath *path;
   GtkTreeIter iter;
   int i;
@@ -473,20 +599,23 @@ ghid_layer_selector_add_layer (GHidLayerSelector *ls,
   if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (ls->list_store), &iter))
     do
       {
-        gboolean is_sep, active;
+        gboolean is_sep;
+        gboolean this_selectable;
         gint read_id;
+
         gtk_tree_model_get (GTK_TREE_MODEL (ls->list_store),
                             &iter, USER_ID_COL, &read_id,
                             SEPARATOR_COL, &is_sep,
-                            ACTIVATABLE_COL, &active, -1);
-        if (!is_sep)
+                            SELECTABLE_COL, &this_selectable, -1);
+
+        if (is_sep)
+          continue;
+
+        last_selectable = this_selectable;
+        if (read_id == user_id)
           {
-            last_activatable = active;
-            if(read_id == user_id)
-              {
-                new_iter = FALSE;
-                break;
-              }
+            new_iter = FALSE;
+            break;
           }
       }
     while (gtk_tree_model_iter_next (GTK_TREE_MODEL (ls->list_store), &iter));
@@ -494,27 +623,16 @@ ghid_layer_selector_add_layer (GHidLayerSelector *ls,
   /* Handle separator addition */
   if (new_iter)
     {
-      if (activatable != last_activatable)
+      if (selectable != last_selectable)
         {
-          /* Add separator between activatable/non-activatable boundaries */
+          /* Add separator between selectable / non-selectable boundaries */
           gtk_list_store_append (ls->list_store, &iter);
           gtk_list_store_set (ls->list_store, &iter,
                               STRUCT_COL, NULL,
                               SEPARATOR_COL, TRUE, -1);
         }
       /* Create new layer */
-      new_layer = malloc (sizeof (*new_layer));
       gtk_list_store_append (ls->list_store, &iter);
-      gtk_list_store_set (ls->list_store, &iter,
-                          STRUCT_COL, new_layer,
-                          USER_ID_COL, user_id,
-                          VISIBLE_COL, visible,
-                          COLOR_COL, color_string,
-                          TEXT_COL, name,
-                          FONT_COL, activatable ? NULL : "Italic",
-                          ACTIVATABLE_COL, activatable,
-                          SEPARATOR_COL, FALSE,
-                          -1);
     }
   else
     {
@@ -523,18 +641,23 @@ ghid_layer_selector_add_layer (GHidLayerSelector *ls,
       gtk_tree_model_get (GTK_TREE_MODEL (ls->list_store), &iter,
                           STRUCT_COL, &new_layer, -1);
       free_ldata (ls, new_layer);
-      new_layer = malloc (sizeof (*new_layer));
-
-      gtk_list_store_set (ls->list_store, &iter,
-                          STRUCT_COL, new_layer,
-                          VISIBLE_COL, visible,
-                          COLOR_COL, color_string,
-                          TEXT_COL, name,
-                          FONT_COL, activatable ? NULL : "Italic",
-                          ACTIVATABLE_COL, activatable,
-                          -1);
     }
 
+  new_layer = g_malloc (sizeof (*new_layer));
+
+  gtk_list_store_set (ls->list_store,
+                      &iter,
+                      STRUCT_COL,      new_layer,
+                      USER_ID_COL,     user_id,
+                      VISIBLE_COL,     visible,
+                      COLOR_COL,       color_string,
+                      TEXT_COL,        name,
+                      FONT_COL,        selectable ? NULL : "Italic",
+                      EDITABLE_COL,    renameable,
+                      SELECTABLE_COL,  selectable,
+                      SEPARATOR_COL,   FALSE,
+                      -1);
+
   /* -- Setup new actions -- */
   vname = g_strdup_printf ("LayerView%d", ls->n_actions);
   pname = g_strdup_printf ("LayerPick%d", ls->n_actions);
@@ -546,7 +669,7 @@ ghid_layer_selector_add_layer (GHidLayerSelector *ls,
   gtk_tree_path_free (path);
 
   /* Create selection action */
-  if (activatable)
+  if (selectable)
     {
       new_layer->pick_action
         = gtk_radio_action_new (pname, name, NULL, NULL, user_id);
@@ -574,7 +697,7 @@ ghid_layer_selector_add_layer (GHidLayerSelector *ls,
                                        i < 10 ? "" : "<Alt>",
                                        (i + 1) % 10);
 
-      if (activatable)
+      if (selectable)
         {
           GtkAction *action = GTK_ACTION (new_layer->pick_action);
           gtk_action_set_accel_group (action, ls->accel_group);
@@ -699,19 +822,23 @@ ghid_layer_selector_get_accel_group (GHidLayerSelector *ls)
   return ls->accel_group;
 }
 
+struct layer_data {
+  GHidLayerSelector *ls;
+  gint user_id;
+};
+
 /*! \brief used internally */
 static gboolean
 toggle_foreach_func (GtkTreeModel *model, GtkTreePath *path,
-                     GtkTreeIter *iter, gpointer data)
+                     GtkTreeIter *iter, gpointer user_data)
 {
+  struct layer_data *data = (struct layer_data *) user_data;
   gint id;
-  GHidLayerSelector *ls = g_object_get_data (G_OBJECT (model),
-                                               "layer-selector");
-  
+
   gtk_tree_model_get (model, iter, USER_ID_COL, &id, -1);
-  if (id == *(gint *) data)
+  if (id == data->user_id)
     {
-      toggle_visibility (ls, iter, TRUE);
+      toggle_visibility (data->ls, iter, TRUE);
       return TRUE;
     }
   return FALSE;
@@ -727,23 +854,27 @@ toggle_foreach_func (GtkTreeModel *model, GtkTreePath *path,
 void
 ghid_layer_selector_toggle_layer (GHidLayerSelector *ls, gint user_id)
 {
+  struct layer_data data;
+
+  data.ls = ls;
+  data.user_id = user_id;
+
   gtk_tree_model_foreach (GTK_TREE_MODEL (ls->list_store),
-                          toggle_foreach_func, &user_id);
+                          toggle_foreach_func, &data);
 }
 
 /*! \brief used internally */
 static gboolean
 select_foreach_func (GtkTreeModel *model, GtkTreePath *path,
-                     GtkTreeIter *iter, gpointer data)
+                     GtkTreeIter *iter, gpointer user_data)
 {
+  struct layer_data *data = (struct layer_data *) user_data;
   gint id;
-  GHidLayerSelector *ls = g_object_get_data (G_OBJECT (model),
-                                               "layer-selector");
-  
+
   gtk_tree_model_get (model, iter, USER_ID_COL, &id, -1);
-  if (id == *(gint *) data)
+  if (id == data->user_id)
     {
-      gtk_tree_selection_select_path (ls->selection, path);
+      gtk_tree_selection_select_path (data->ls->selection, path);
       return TRUE;
     }
   return FALSE;
@@ -759,8 +890,13 @@ select_foreach_func (GtkTreeModel *model, GtkTreePath *path,
 void
 ghid_layer_selector_select_layer (GHidLayerSelector *ls, gint user_id)
 {
+  struct layer_data data;
+
+  data.ls = ls;
+  data.user_id = user_id;
+
   gtk_tree_model_foreach (GTK_TREE_MODEL (ls->list_store),
-                          select_foreach_func, &user_id);
+                          select_foreach_func, &data);
 }
 
 /*! \brief Selects the next visible layer
@@ -783,11 +919,13 @@ ghid_layer_selector_select_next_visible (GHidLayerSelector *ls)
       /* Scan forward, looking for selectable iter */
       do
         {
-          gboolean visible, activatable;
+          gboolean visible;
+          gboolean selectable;
+
           gtk_tree_model_get (GTK_TREE_MODEL (ls->list_store),
                               &iter, VISIBLE_COL, &visible,
-                              ACTIVATABLE_COL, &activatable, -1);
-          if (visible && activatable)
+                              SELECTABLE_COL, &selectable, -1);
+          if (visible && selectable)
             {
               gtk_tree_selection_select_iter (ls->selection, &iter);
               return TRUE;
@@ -798,11 +936,13 @@ ghid_layer_selector_select_next_visible (GHidLayerSelector *ls)
       gtk_tree_model_get_iter_first (GTK_TREE_MODEL (ls->list_store), &iter);
       do
         {
-          gboolean visible, activatable;
+          gboolean visible;
+          gboolean selectable;
+
           gtk_tree_model_get (GTK_TREE_MODEL (ls->list_store),
                               &iter, VISIBLE_COL, &visible,
-                              ACTIVATABLE_COL, &activatable, -1);
-          if (visible && activatable)
+                              SELECTABLE_COL, &selectable, -1);
+          if (visible && selectable)
             {
               gtk_tree_selection_select_iter (ls->selection, &iter);
               return TRUE;
@@ -953,6 +1093,3 @@ ghid_layer_selector_show_layers (GHidLayerSelector *ls,
   while (gtk_tree_model_iter_next (GTK_TREE_MODEL (ls->list_store), &iter));
 }
 
-
-
-
diff --git a/src/hid/gtk/ghid-layer-selector.h b/src/hid/gtk/ghid-layer-selector.h
index 09fa182..c89112d 100644
--- a/src/hid/gtk/ghid-layer-selector.h
+++ b/src/hid/gtk/ghid-layer-selector.h
@@ -24,7 +24,8 @@ void ghid_layer_selector_add_layer (GHidLayerSelector *ls,
                                     const gchar *name,
                                     const gchar *color_string,
                                     gboolean visible,
-                                    gboolean activatable);
+                                    gboolean selectable,
+                                    gboolean renameable);
 
 gint ghid_layer_selector_install_pick_items (GHidLayerSelector *ls,
                                              GtkMenuShell *shell, gint pos);
diff --git a/src/hid/gtk/ghid-main-menu.c b/src/hid/gtk/ghid-main-menu.c
index 4ae8c9a..67f49ad 100644
--- a/src/hid/gtk/ghid-main-menu.c
+++ b/src/hid/gtk/ghid-main-menu.c
@@ -85,6 +85,8 @@ translate_accelerator (const char *text)
     {"]", "bracketright"},
     {".", "period"},
     {"|", "bar"},
+    {"+", "plus"},
+    {"-", "minus"},
     {NULL, NULL}
   };
 
@@ -141,6 +143,12 @@ translate_accelerator (const char *text)
   return g_string_free (ret_val, FALSE);
 }
 
+static gboolean
+g_str_case_equal (gconstpointer v1, gconstpointer v2)
+{
+  return strcasecmp (v1, v2);
+}
+
 /*! \brief Check that translated accelerators are unique; warn otherwise. */
 static const char *
 check_unique_accel (const char *accelerator)
@@ -151,7 +159,7 @@ check_unique_accel (const char *accelerator)
     return accelerator;
 
   if (!accel_table)
-    accel_table = g_hash_table_new (g_str_hash, g_str_equal);
+    accel_table = g_hash_table_new (g_str_hash, g_str_case_equal);
 
   if (g_hash_table_lookup (accel_table, accelerator))
     {
@@ -213,7 +221,7 @@ ghid_main_menu_real_add_resource (GHidMainMenu *menu, GtkMenuShell *shell,
           for (j = 0; j < sub_res->c; ++j)
             if (resource_type (sub_res->v[j]) == 10)
               {
-                res_val = sub_res->v[j].value;
+                res_val = _(sub_res->v[j].value);
                 break;
               }
           /* Hack '_' in based on mnemonic value */
@@ -380,7 +388,7 @@ ghid_main_menu_real_add_resource (GHidMainMenu *menu, GtkMenuShell *shell,
                * when you're starting to build a new menu and you're looking
                * to get the layout right. */
               GtkWidget *item
-                = gtk_menu_item_new_with_label (res->v[i].value);
+                = gtk_menu_item_new_with_label (_(res->v[i].value));
               gtk_menu_shell_append (shell, item);
             }
           break;
diff --git a/src/hid/gtk/ghid-route-style-selector.c b/src/hid/gtk/ghid-route-style-selector.c
index 6c5e26f..01f2a96 100644
--- a/src/hid/gtk/ghid-route-style-selector.c
+++ b/src/hid/gtk/ghid-route-style-selector.c
@@ -52,6 +52,9 @@ struct _GHidRouteStyleSelector
 
   GtkActionGroup *action_group;
   GtkAccelGroup *accel_group;
+  GtkRadioAction *null_action;
+  GtkWidget *null_button;
+  gint shortcut_key_idx;
 
   GtkListStore *model;
   struct _route_style *active_style;
@@ -67,7 +70,7 @@ struct _GHidRouteStyleSelectorClass
 
 struct _route_style
 {
-  gboolean temporary;   /* TODO: actually use this for something */
+  gboolean temporary;
   GtkRadioAction *action;
   GtkWidget *button;
   GtkWidget *menu_item;
@@ -76,6 +79,17 @@ struct _route_style
   gulong sig_id;
 };
 
+static void
+init_radio_groups (GHidRouteStyleSelector *rss)
+{
+  gtk_radio_action_set_group (rss->null_action, rss->action_radio_group);
+  rss->action_radio_group = gtk_radio_action_get_group (rss->null_action);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (rss->null_button),
+                              rss->button_radio_group);
+  rss->button_radio_group = gtk_radio_button_get_group
+                              (GTK_RADIO_BUTTON (rss->null_button));
+}
+
 /* SIGNAL HANDLERS */
 /*! \brief Callback for user selection of a route style */
 static void
@@ -391,6 +405,13 @@ ghid_route_style_selector_new ()
 
   rss->accel_group = gtk_accel_group_new ();
   rss->action_group = gtk_action_group_new ("RouteStyleSelector");
+  rss->null_action = gtk_radio_action_new ("RouteStyleXX", "",
+                                           NULL, NULL, -1);
+  rss->null_button = gtk_radio_button_new (rss->button_radio_group);
+  init_radio_groups (rss);
+  gtk_activatable_set_related_action (GTK_ACTIVATABLE (rss->null_button),
+                                      GTK_ACTION (rss->null_action));
+  rss->shortcut_key_idx = 1;
 
   /* Create edit button */
   rss->edit_button = gtk_button_new_with_label (_("Route Styles"));
@@ -439,15 +460,16 @@ ghid_route_style_selector_real_add_route_style (GHidRouteStyleSelector *rss,
   gtk_tree_path_free (path);
 
   /* Setup accelerator */
-  if (action_count < 12)
+  if (rss->shortcut_key_idx < 12)
     {
-      gchar *accel = g_strdup_printf ("<Ctrl>F%d", action_count + 1);
+      gchar *accel = g_strdup_printf ("<Ctrl>F%d", rss->shortcut_key_idx);
       gtk_action_set_accel_group (GTK_ACTION (new_style->action),
                                   rss->accel_group);
       gtk_action_group_add_action_with_accel (rss->action_group,
                                               GTK_ACTION (new_style->action),
                                               accel);
       g_free (accel);
+      ++rss->shortcut_key_idx;
     }
 
   /* Hookup and install radio button */
@@ -584,6 +606,7 @@ ghid_route_style_selector_sync (GHidRouteStyleSelector *rss,
                                 Coord Thick, Coord Hole,
                                 Coord Diameter, Coord Keepaway)
 {
+  gboolean found_match = FALSE;
   GtkTreeIter iter;
   gtk_tree_model_get_iter_first (GTK_TREE_MODEL (rss->model), &iter);
   do
@@ -601,9 +624,13 @@ ghid_route_style_selector_sync (GHidRouteStyleSelector *rss,
             (GTK_TOGGLE_ACTION (style->action), TRUE);
           g_signal_handler_unblock (G_OBJECT (style->action), style->sig_id);
           rss->active_style = style;
+          found_match = TRUE;
         }
     }
   while (gtk_tree_model_iter_next (GTK_TREE_MODEL (rss->model), &iter));
+
+  if (!found_match)
+    gtk_radio_action_set_current_value (rss->null_action, -1);
 }
 
 /*! \brief Removes all styles from a route style selector */
@@ -619,18 +646,26 @@ ghid_route_style_selector_empty (GHidRouteStyleSelector *rss)
                           &iter, DATA_COL, &rsdata, -1);
       if (rsdata->action)
         {
-          gtk_action_disconnect_accelerator (GTK_ACTION (rsdata->action));
           gtk_action_group_remove_action (rss->action_group,
                                 GTK_ACTION (rsdata->action));
           g_object_unref (G_OBJECT (rsdata->action));
         }
       if (rsdata->button)
-        gtk_widget_destroy (GTK_WIDGET (rsdata->button));;
+        gtk_widget_destroy (GTK_WIDGET (rsdata->button));
+      if (rsdata->menu_item)
+        gtk_widget_destroy (GTK_WIDGET (rsdata->menu_item));
+      if (rsdata->temporary)
+        {
+          free (rsdata->rst->Name);
+          g_free (rsdata->rst);
+        }
       gtk_tree_row_reference_free (rsdata->rref);
       free (rsdata);
     }
   while (gtk_list_store_remove (rss->model, &iter));
   rss->action_radio_group = NULL;
   rss->button_radio_group = NULL;
+  rss->shortcut_key_idx = 1;
+  init_radio_groups (rss);
 }
 
diff --git a/src/hid/gtk/gtkhid-gdk.c b/src/hid/gtk/gtkhid-gdk.c
index 2d2d4c7..54e5598 100644
--- a/src/hid/gtk/gtkhid-gdk.c
+++ b/src/hid/gtk/gtkhid-gdk.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -16,17 +14,13 @@
 #include <dmalloc.h>
 #endif
 
-
-RCSID ("$Id$");
-
-
 extern HID ghid_hid;
 
 /* Sets priv->u_gc to the "right" GC to use (wrt mask or window)
 */
 #define USE_GC(gc) if (!use_gc(gc)) return
 
-static int cur_mask = -1;
+static enum mask_mode cur_mask = HID_MASK_OFF;
 static int mask_seq = 0;
 
 typedef struct render_priv {
@@ -264,7 +258,7 @@ ghid_draw_bg_image (void)
 #define WHICH_GC(gc) (cur_mask == HID_MASK_CLEAR ? priv->mask_gc : (gc)->gc)
 
 void
-ghid_use_mask (int use_it)
+ghid_use_mask (enum mask_mode mode)
 {
   static int mask_seq_id = 0;
   GdkColor color;
@@ -272,9 +266,9 @@ ghid_use_mask (int use_it)
 
   if (!gport->pixmap)
     return;
-  if (use_it == cur_mask)
+  if (mode == cur_mask)
     return;
-  switch (use_it)
+  switch (mode)
     {
     case HID_MASK_OFF:
       gport->drawable = gport->pixmap;
@@ -314,7 +308,7 @@ ghid_use_mask (int use_it)
       break;
 
     }
-  cur_mask = use_it;
+  cur_mask = mode;
 }
 
 
@@ -1005,26 +999,11 @@ draw_dozen_cross (GdkGC *xor_gc, gint x, gint y)
 }
 
 static void
-draw_crosshair (GdkGC *xor_gc, gint x, gint y)
-{
-  static enum crosshair_shape prev = Basic_Crosshair_Shape;
-
-  draw_right_cross (xor_gc, x, y);
-  if (prev == Union_Jack_Crosshair_Shape)
-    draw_slanted_cross (xor_gc, x, y);
-  if (prev == Dozen_Crosshair_Shape)
-    draw_dozen_cross (xor_gc, x, y);
-  prev = Crosshair.shape;
-}
-
-static void
-show_crosshair (gboolean paint_new_location)
+draw_crosshair (render_priv *priv)
 {
-  render_priv *priv = gport->render_priv;
   GdkWindow *window = gtk_widget_get_window (gport->drawing_area);
   GtkStyle *style = gtk_widget_get_style (gport->drawing_area);
   gint x, y;
-  static gint x_prev = -1, y_prev = -1;
   static GdkGC *xor_gc;
   static GdkColor cross_color;
 
@@ -1041,22 +1020,17 @@ show_crosshair (gboolean paint_new_location)
       /* FIXME: when CrossColor changed from config */
       ghid_map_color_string (Settings.CrossColor, &cross_color);
     }
-  x = DRAW_X (gport->crosshair_x);
-  y = DRAW_Y (gport->crosshair_y);
 
   gdk_gc_set_foreground (xor_gc, &cross_color);
 
-  if (x_prev >= 0 && !paint_new_location)
-    draw_crosshair (xor_gc, x_prev, y_prev);
+  x = DRAW_X (gport->crosshair_x);
+  y = DRAW_Y (gport->crosshair_y);
 
-  if (x >= 0 && paint_new_location)
-    {
-      draw_crosshair (xor_gc, x, y);
-      x_prev = x;
-      y_prev = y;
-    }
-  else
-    x_prev = y_prev = -1;
+  draw_right_cross (xor_gc, x, y);
+  if (Crosshair.shape == Union_Jack_Crosshair_Shape)
+    draw_slanted_cross (xor_gc, x, y);
+  if (Crosshair.shape == Dozen_Crosshair_Shape)
+    draw_dozen_cross (xor_gc, x, y);
 }
 
 void
@@ -1115,7 +1089,7 @@ ghid_screen_update (void)
 
   gdk_draw_drawable (window, priv->bg_gc, gport->pixmap,
                      0, 0, 0, 0, gport->width, gport->height);
-  show_crosshair (TRUE);
+  draw_crosshair (priv);
 }
 
 gboolean
@@ -1129,7 +1103,7 @@ ghid_drawing_area_expose_cb (GtkWidget *widget,
   gdk_draw_drawable (window, priv->bg_gc, port->pixmap,
                      ev->area.x, ev->area.y, ev->area.x, ev->area.y,
                      ev->area.width, ev->area.height);
-  show_crosshair (TRUE);
+  draw_crosshair (priv);
   return FALSE;
 }
 
@@ -1148,6 +1122,8 @@ ghid_pinout_preview_expose (GtkWidget *widget,
   GtkAllocation allocation;
   view_data save_view;
   int save_width, save_height;
+  Coord save_max_width;
+  Coord save_max_height;
   double xz, yz;
   render_priv *priv = gport->render_priv;
 
@@ -1157,6 +1133,8 @@ ghid_pinout_preview_expose (GtkWidget *widget,
   save_view = gport->view;
   save_width = gport->width;
   save_height = gport->height;
+  save_max_width = PCB->MaxWidth;
+  save_max_height = PCB->MaxHeight;
 
   gtk_widget_get_allocation (widget, &allocation);
   xz = (double) pinout->x_max / allocation.width;
@@ -1173,18 +1151,22 @@ ghid_pinout_preview_expose (GtkWidget *widget,
   gport->view.height = allocation.height * gport->view.coord_per_px;
   gport->view.x0 = (pinout->x_max - gport->view.width) / 2;
   gport->view.y0 = (pinout->y_max - gport->view.height) / 2;
+  PCB->MaxWidth =  pinout->x_max;
+  PCB->MaxHeight = pinout->y_max;
 
   /* clear background */
   gdk_draw_rectangle (window, priv->bg_gc, TRUE,
                       0, 0, allocation.width, allocation.height);
 
   /* call the drawing routine */
-  hid_expose_callback (&ghid_hid, NULL, &pinout->element);
+  hid_expose_callback (&ghid_hid, NULL, pinout->element);
 
   gport->drawable = save_drawable;
   gport->view = save_view;
   gport->width = save_width;
   gport->height = save_height;
+  PCB->MaxWidth = save_max_width;
+  PCB->MaxHeight = save_max_height;
 
   return FALSE;
 }
diff --git a/src/hid/gtk/gtkhid-gl.c b/src/hid/gtk/gtkhid-gl.c
index 15c9468..ac695e8 100644
--- a/src/hid/gtk/gtkhid-gl.c
+++ b/src/hid/gtk/gtkhid-gl.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -27,16 +25,16 @@
 
 #include <gtk/gtkgl.h>
 #include "hid/common/hidgl.h"
+
 #include "hid/common/draw_helpers.h"
+#include "hid/common/trackball.h"
 
 #ifdef HAVE_LIBDMALLOC
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
-
 extern HID ghid_hid;
+extern HID_DRAW ghid_graphics;
 
 static hidGC current_gc = NULL;
 
@@ -44,7 +42,16 @@ static hidGC current_gc = NULL;
 */
 #define USE_GC(gc) if (!use_gc(gc)) return
 
-static int cur_mask = -1;
+static enum mask_mode cur_mask = HID_MASK_OFF;
+static GLfloat view_matrix[4][4] = {{1.0, 0.0, 0.0, 0.0},
+                                    {0.0, 1.0, 0.0, 0.0},
+                                    {0.0, 0.0, 1.0, 0.0},
+                                    {0.0, 0.0, 0.0, 1.0}};
+static GLfloat last_modelview_matrix[4][4] = {{1.0, 0.0, 0.0, 0.0},
+                                              {0.0, 1.0, 0.0, 0.0},
+                                              {0.0, 0.0, 1.0, 0.0},
+                                              {0.0, 0.0, 0.0, 1.0}};
+static int global_view_2d = 1;
 
 typedef struct render_priv {
   GdkGLConfig *glconfig;
@@ -53,6 +60,7 @@ typedef struct render_priv {
   int subcomposite_stencil_bit;
   char *current_colorname;
   double current_alpha_mult;
+  GTimer *time_since_expose;
 
   /* Feature for leading the user to a particular location */
   guint lead_user_timeout;
@@ -73,12 +81,12 @@ typedef struct hid_gc_struct
   double alpha_mult;
   Coord width;
   gint cap, join;
-  gchar xor;
 }
 hid_gc_struct;
 
 
 static void draw_lead_user (render_priv *priv);
+static void ghid_unproject_to_z_plane (int ex, int ey, Coord pcb_z, Coord *pcb_x, Coord *pcb_y);
 
 
 static void
@@ -198,7 +206,7 @@ ghid_make_gc (void)
 }
 
 static void
-ghid_draw_grid (BoxTypePtr drawn_area)
+ghid_draw_grid (BoxType *drawn_area)
 {
   if (Vz (PCB->Grid) < MIN_GRID_DISTANCE)
     return;
@@ -280,17 +288,17 @@ ghid_draw_bg_image (void)
 }
 
 void
-ghid_use_mask (int use_it)
+ghid_use_mask (enum mask_mode mode)
 {
   static int stencil_bit = 0;
 
-  if (use_it == cur_mask)
+  if (mode == cur_mask)
     return;
 
   /* Flush out any existing geoemtry to be rendered */
   hidgl_flush_triangles (&buffer);
 
-  switch (use_it)
+  switch (mode)
     {
     case HID_MASK_BEFORE:
       /* The HID asks not to receive this mask type, so warn if we get it */
@@ -319,7 +327,7 @@ ghid_use_mask (int use_it)
       glDisable (GL_STENCIL_TEST);                /* Disable Stencil test */
       break;
     }
-  cur_mask = use_it;
+  cur_mask = mode;
 }
 
 
@@ -361,8 +369,6 @@ typedef struct
 {
   int color_set;
   GdkColor color;
-  int xor_set;
-  GdkColor xor_color;
   double red;
   double green;
   double blue;
@@ -425,20 +431,6 @@ set_gl_color_for_gc (hidGC gc)
           cc->blue  = cc->color.blue  / 65535.;
           cc->color_set = 1;
         }
-      if (gc->xor)
-        {
-          if (!cc->xor_set)
-            {
-              cc->xor_color.red = cc->color.red ^ gport->bg_color.red;
-              cc->xor_color.green = cc->color.green ^ gport->bg_color.green;
-              cc->xor_color.blue = cc->color.blue ^ gport->bg_color.blue;
-              gdk_color_alloc (gport->colormap, &cc->xor_color);
-              cc->red   = cc->color.red   / 65535.;
-              cc->green = cc->color.green / 65535.;
-              cc->blue  = cc->color.blue  / 65535.;
-              cc->xor_set = 1;
-            }
-        }
       r = cc->red;
       g = cc->green;
       b = cc->blue;
@@ -596,7 +588,7 @@ ghid_thindraw_pcb_polygon (hidGC gc, PolygonType *poly, const BoxType *clip_box)
 {
   common_thindraw_pcb_polygon (gc, poly, clip_box);
   ghid_set_alpha_mult (gc, 0.25);
-  ghid_fill_pcb_polygon (gc, poly, clip_box);
+  gui->graphics->fill_pcb_polygon (gc, poly, clip_box);
   ghid_set_alpha_mult (gc, 1.0);
 }
 
@@ -614,10 +606,17 @@ ghid_invalidate_lr (int left, int right, int top, int bottom)
   ghid_invalidate_all ();
 }
 
+#define MAX_ELAPSED (50. / 1000.) /* 50ms */
 void
 ghid_invalidate_all ()
 {
+  render_priv *priv = gport->render_priv;
+  double elapsed = g_timer_elapsed (priv->time_since_expose, NULL);
+
   ghid_draw_area_update (gport, NULL);
+
+  if (elapsed > MAX_ELAPSED)
+    gdk_window_process_all_updates ();
 }
 
 void
@@ -731,34 +730,19 @@ draw_dozen_cross (gint x, gint y, gint z)
 }
 
 static void
-draw_crosshair (gint x, gint y, gint z)
-{
-  static enum crosshair_shape prev = Basic_Crosshair_Shape;
-
-  draw_right_cross (x, y, z);
-  if (prev == Union_Jack_Crosshair_Shape)
-    draw_slanted_cross (x, y, z);
-  if (prev == Dozen_Crosshair_Shape)
-    draw_dozen_cross (x, y, z);
-  prev = Crosshair.shape;
-}
-
-void
-ghid_show_crosshair (gboolean paint_new_location)
+draw_crosshair (render_priv *priv)
 {
   gint x, y, z;
   static int done_once = 0;
   static GdkColor cross_color;
 
-  if (!paint_new_location)
-    return;
-
   if (!done_once)
     {
       done_once = 1;
       /* FIXME: when CrossColor changed from config */
       ghid_map_color_string (Settings.CrossColor, &cross_color);
     }
+
   x = gport->crosshair_x;
   y = gport->crosshair_y;
   z = 0;
@@ -770,12 +754,15 @@ ghid_show_crosshair (gboolean paint_new_location)
              cross_color.green / 65535.,
              cross_color.blue / 65535.);
 
-  if (x >= 0 && paint_new_location)
-    {
-      glBegin (GL_LINES);
-      draw_crosshair (x, y, z);
-      glEnd ();
-    }
+  glBegin (GL_LINES);
+
+  draw_right_cross (x, y, z);
+  if (Crosshair.shape == Union_Jack_Crosshair_Shape)
+    draw_slanted_cross (x, y, z);
+  if (Crosshair.shape == Dozen_Crosshair_Shape)
+    draw_dozen_cross (x, y, z);
+
+  glEnd ();
 
   glDisable (GL_COLOR_LOGIC_OP);
 }
@@ -787,6 +774,8 @@ ghid_init_renderer (int *argc, char ***argv, GHidPort *port)
 
   port->render_priv = priv = g_new0 (render_priv, 1);
 
+  priv->time_since_expose = g_timer_new ();
+
   gtk_gl_init(argc, argv);
 
   /* setup GL-context */
@@ -801,8 +790,8 @@ ghid_init_renderer (int *argc, char ***argv, GHidPort *port)
 
   /* Setup HID function pointers specific to the GL renderer*/
   ghid_hid.end_layer = ghid_end_layer;
-  ghid_hid.fill_pcb_polygon = ghid_fill_pcb_polygon;
-  ghid_hid.thindraw_pcb_polygon = ghid_thindraw_pcb_polygon;
+  ghid_graphics.fill_pcb_polygon = ghid_fill_pcb_polygon;
+  ghid_graphics.thindraw_pcb_polygon = ghid_thindraw_pcb_polygon;
 }
 
 void
@@ -831,9 +820,8 @@ ghid_drawing_area_configure_hook (GHidPort *port)
 }
 
 gboolean
-ghid_start_drawing (GHidPort *port)
+ghid_start_drawing (GHidPort *port, GtkWidget *widget)
 {
-  GtkWidget *widget = port->drawing_area;
   GdkGLContext *pGlContext = gtk_widget_get_gl_context (widget);
   GdkGLDrawable *pGlDrawable = gtk_widget_get_gl_drawable (widget);
 
@@ -847,9 +835,8 @@ ghid_start_drawing (GHidPort *port)
 }
 
 void
-ghid_end_drawing (GHidPort *port)
+ghid_end_drawing (GHidPort *port, GtkWidget *widget)
 {
-  GtkWidget *widget = port->drawing_area;
   GdkGLDrawable *pGlDrawable = gtk_widget_get_gl_drawable (widget);
 
   if (gdk_gl_drawable_is_double_buffered (pGlDrawable))
@@ -877,18 +864,22 @@ ghid_drawing_area_expose_cb (GtkWidget *widget,
   render_priv *priv = port->render_priv;
   GtkAllocation allocation;
   BoxType region;
+  Coord min_x, min_y;
+  Coord max_x, max_y;
+  Coord new_x, new_y;
+  Coord min_depth;
+  Coord max_depth;
 
   gtk_widget_get_allocation (widget, &allocation);
 
-  ghid_start_drawing (port);
-
-  hidgl_init ();
+  ghid_start_drawing (port, widget);
+  hidgl_start_render ();
 
   /* If we don't have any stencil bits available,
      we can't use the hidgl polygon drawing routine */
   /* TODO: We could use the GLU tessellator though */
   if (hidgl_stencil_bits() == 0)
-    ghid_hid.fill_pcb_polygon = common_fill_pcb_polygon;
+    ghid_graphics.fill_pcb_polygon = common_fill_pcb_polygon;
 
   glEnable (GL_BLEND);
   glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -902,18 +893,20 @@ ghid_drawing_area_expose_cb (GtkWidget *widget,
 
   glMatrixMode (GL_PROJECTION);
   glLoadIdentity ();
-  glOrtho (0, allocation.width, allocation.height, 0, 0, 100);
+  glOrtho (0, allocation.width, allocation.height, 0, -100000, 100000);
   glMatrixMode (GL_MODELVIEW);
   glLoadIdentity ();
-  glTranslatef (0.0f, 0.0f, -Z_NEAR);
-
+  glTranslatef (widget->allocation.width / 2., widget->allocation.height / 2., 0);
+  glMultMatrixf ((GLfloat *)view_matrix);
+  glTranslatef (-widget->allocation.width / 2., -widget->allocation.height / 2., 0);
   glScalef ((port->view.flip_x ? -1. : 1.) / port->view.coord_per_px,
             (port->view.flip_y ? -1. : 1.) / port->view.coord_per_px,
             ((port->view.flip_x == port->view.flip_y) ? 1. : -1.) / port->view.coord_per_px);
-  glTranslatef (port->view.flip_x ? port->view.x0 - PCB->MaxWidth  :
-                             -port->view.x0,
-                port->view.flip_y ? port->view.y0 - PCB->MaxHeight :
-                             -port->view.y0, 0);
+  glTranslatef (port->view.flip_x ?  port->view.x0 - PCB->MaxWidth  :
+                                    -port->view.x0,
+                port->view.flip_y ?  port->view.y0 - PCB->MaxHeight :
+                                    -port->view.y0, 0);
+  glGetFloatv (GL_MODELVIEW_MATRIX, (GLfloat *)last_modelview_matrix);
 
   glEnable (GL_STENCIL_TEST);
   glClearColor (port->offlimits_color.red / 65535.,
@@ -930,10 +923,64 @@ ghid_drawing_area_expose_cb (GtkWidget *widget,
   glStencilMask (0);
   glStencilFunc (GL_ALWAYS, 0, 0);
 
-  region.X1 = MIN (Px (ev->area.x), Px (ev->area.x + ev->area.width + 1));
-  region.X2 = MAX (Px (ev->area.x), Px (ev->area.x + ev->area.width + 1));
-  region.Y1 = MIN (Py (ev->area.y), Py (ev->area.y + ev->area.height + 1));
-  region.Y2 = MAX (Py (ev->area.y), Py (ev->area.y + ev->area.height + 1));
+  /* Test the 8 corners of a cube spanning the event */
+  min_depth = -50; /* FIXME */
+  max_depth =  0;  /* FIXME */
+
+  ghid_unproject_to_z_plane (ev->area.x,
+                             ev->area.y,
+                             min_depth, &new_x, &new_y);
+  max_x = min_x = new_x;
+  max_y = min_y = new_y;
+
+  ghid_unproject_to_z_plane (ev->area.x,
+                             ev->area.y,
+                             max_depth, &new_x, &new_y);
+  min_x = MIN (min_x, new_x);  max_x = MAX (max_x, new_x);
+  min_y = MIN (min_y, new_y);  max_y = MAX (max_y, new_y);
+
+  /* */
+  ghid_unproject_to_z_plane (ev->area.x + ev->area.width,
+                             ev->area.y,
+                             min_depth, &new_x, &new_y);
+  min_x = MIN (min_x, new_x);  max_x = MAX (max_x, new_x);
+  min_y = MIN (min_y, new_y);  max_y = MAX (max_y, new_y);
+
+  ghid_unproject_to_z_plane (ev->area.x + ev->area.width, ev->area.y,
+                             max_depth, &new_x, &new_y);
+  min_x = MIN (min_x, new_x);  max_x = MAX (max_x, new_x);
+  min_y = MIN (min_y, new_y);  max_y = MAX (max_y, new_y);
+
+  /* */
+  ghid_unproject_to_z_plane (ev->area.x + ev->area.width,
+                             ev->area.y + ev->area.height,
+                             min_depth, &new_x, &new_y);
+  min_x = MIN (min_x, new_x);  max_x = MAX (max_x, new_x);
+  min_y = MIN (min_y, new_y);  max_y = MAX (max_y, new_y);
+
+  ghid_unproject_to_z_plane (ev->area.x + ev->area.width,
+                             ev->area.y + ev->area.height,
+                             max_depth, &new_x, &new_y);
+  min_x = MIN (min_x, new_x);  max_x = MAX (max_x, new_x);
+  min_y = MIN (min_y, new_y);  max_y = MAX (max_y, new_y);
+
+  /* */
+  ghid_unproject_to_z_plane (ev->area.x,
+                             ev->area.y + ev->area.height,
+                             min_depth,
+                             &new_x, &new_y);
+  min_x = MIN (min_x, new_x);  max_x = MAX (max_x, new_x);
+  min_y = MIN (min_y, new_y);  max_y = MAX (max_y, new_y);
+
+  ghid_unproject_to_z_plane (ev->area.x,
+                             ev->area.y + ev->area.height,
+                             max_depth,
+                             &new_x, &new_y);
+  min_x = MIN (min_x, new_x);  max_x = MAX (max_x, new_x);
+  min_y = MIN (min_y, new_y);  max_y = MAX (max_y, new_y);
+
+  region.X1 = min_x;  region.X2 = max_x + 1;
+  region.Y1 = min_y;  region.Y2 = max_y + 1;
 
   region.X1 = MAX (0, MIN (PCB->MaxWidth,  region.X1));
   region.X2 = MAX (0, MIN (PCB->MaxWidth,  region.X2));
@@ -945,15 +992,14 @@ ghid_drawing_area_expose_cb (GtkWidget *widget,
              port->bg_color.blue / 65535.);
 
   glBegin (GL_QUADS);
-  glVertex3i (0,             0,              0);
-  glVertex3i (PCB->MaxWidth, 0,              0);
-  glVertex3i (PCB->MaxWidth, PCB->MaxHeight, 0);
-  glVertex3i (0,             PCB->MaxHeight, 0);
+  glVertex3i (0,             0,              -50);
+  glVertex3i (PCB->MaxWidth, 0,              -50);
+  glVertex3i (PCB->MaxWidth, PCB->MaxHeight, -50);
+  glVertex3i (0,             PCB->MaxHeight, -50);
   glEnd ();
 
   ghid_draw_bg_image ();
 
-  hidgl_init_triangle_array (&buffer);
   ghid_invalidate_current_gc ();
   hid_expose_callback (&ghid_hid, &region, 0);
   hidgl_flush_triangles (&buffer);
@@ -966,13 +1012,15 @@ ghid_drawing_area_expose_cb (GtkWidget *widget,
   DrawMark ();
   hidgl_flush_triangles (&buffer);
 
-  ghid_show_crosshair (TRUE);
-
+  draw_crosshair (priv);
   hidgl_flush_triangles (&buffer);
 
   draw_lead_user (priv);
 
-  ghid_end_drawing (port);
+  hidgl_finish_render ();
+  ghid_end_drawing (port, widget);
+
+  g_timer_start (priv->time_since_expose);
 
   return FALSE;
 }
@@ -999,17 +1047,19 @@ gboolean
 ghid_pinout_preview_expose (GtkWidget *widget,
                             GdkEventExpose *ev)
 {
-  GdkGLContext* pGlContext = gtk_widget_get_gl_context (widget);
-  GdkGLDrawable* pGlDrawable = gtk_widget_get_gl_drawable (widget);
   GhidPinoutPreview *pinout = GHID_PINOUT_PREVIEW (widget);
   GtkAllocation allocation;
   view_data save_view;
   int save_width, save_height;
+  Coord save_max_width;
+  Coord save_max_height;
   double xz, yz;
 
   save_view = gport->view;
   save_width = gport->width;
   save_height = gport->height;
+  save_max_width = PCB->MaxWidth;
+  save_max_height = PCB->MaxHeight;
 
   /* Setup zoom factor for drawing routines */
 
@@ -1027,26 +1077,56 @@ ghid_pinout_preview_expose (GtkWidget *widget,
   gport->view.height = allocation.height * gport->view.coord_per_px;
   gport->view.x0 = (pinout->x_max - gport->view.width) / 2;
   gport->view.y0 = (pinout->y_max - gport->view.height) / 2;
+  PCB->MaxWidth = pinout->x_max;
+  PCB->MaxHeight = pinout->y_max;
 
-  /* make GL-context "current" */
-  if (!gdk_gl_drawable_gl_begin (pGlDrawable, pGlContext)) {
-    return FALSE;
-  }
-  gport->render_priv->in_context = true;
+  ghid_start_drawing (gport, widget);
+  hidgl_start_render ();
+
+#if 0  /* We disable alpha blending here, as hid_expose_callback() does not
+        * call set_layer() as appropriate for us to sub-composite rendering
+        * from each layer when drawing a single element. If we leave alpha-
+        * blending on, it means text and overlapping pads are rendered ugly.
+        */
 
   glEnable (GL_BLEND);
   glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+#endif
 
   glViewport (0, 0, allocation.width, allocation.height);
 
+#if 0  /* We disable the scissor test here, as it is interacting badly with
+        * being handed expose events which don't cover the whole window.
+        * As we have a double-buffered GL window, we end up with unintialised
+        * contents remaining in the unpainted areas (outside the scissor
+        * region), and these are being flipped onto the screen.
+        *
+        * The debugging code below shows multiple expose events when the
+        * window is shown the first time, some of which are very small.
+        *
+        * XXX: There is clearly a perforamnce issue here, in that we may
+        *      be rendering the preview more times, and over a larger area
+        *      than is really required.
+        */
+
   glEnable (GL_SCISSOR_TEST);
   glScissor (ev->area.x,
              allocation.height - ev->area.height - ev->area.y,
              ev->area.width, ev->area.height);
+#endif
+
+#ifdef DEBUG
+  printf ("EVT: %i, %i, w=%i, h=%i, Scissor setup: glScissor (%f, %f, %f, %f);\n",
+          ev->area.x, ev->area.y, ev->area.width, ev->area.height,
+             (double)ev->area.x,
+             (double)(allocation.height - ev->area.height - ev->area.y),
+             (double)ev->area.width,
+             (double)ev->area.height);
+#endif
 
   glMatrixMode (GL_PROJECTION);
   glLoadIdentity ();
-  glOrtho (0, allocation.width, allocation.height, 0, 0, 100);
+  glOrtho (0, allocation.width, allocation.height, 0, -100000, 100000);
   glMatrixMode (GL_MODELVIEW);
   glLoadIdentity ();
   glTranslatef (0.0f, 0.0f, -Z_NEAR);
@@ -1058,35 +1138,36 @@ ghid_pinout_preview_expose (GtkWidget *widget,
   glStencilMask (~0);
   glClearStencil (0);
   glClear (GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
-
   hidgl_reset_stencil_usage ();
 
+  /* Disable the stencil test until we need it - otherwise it gets dirty */
+  glDisable (GL_STENCIL_TEST);
+  glStencilMask (0);
+  glStencilFunc (GL_ALWAYS, 0, 0);
+
   /* call the drawing routine */
-  hidgl_init_triangle_array (&buffer);
   ghid_invalidate_current_gc ();
   glPushMatrix ();
   glScalef ((gport->view.flip_x ? -1. : 1.) / gport->view.coord_per_px,
-            (gport->view.flip_y ? -1. : 1.) / gport->view.coord_per_px, 1);
+            (gport->view.flip_y ? -1. : 1.) / gport->view.coord_per_px,
+            ((gport->view.flip_x == gport->view.flip_y) ? 1. : -1.) / gport->view.coord_per_px);
   glTranslatef (gport->view.flip_x ? gport->view.x0 - PCB->MaxWidth  :
                                     -gport->view.x0,
                 gport->view.flip_y ? gport->view.y0 - PCB->MaxHeight :
                                     -gport->view.y0, 0);
-  hid_expose_callback (&ghid_hid, NULL, &pinout->element);
+
+  hid_expose_callback (&ghid_hid, NULL, pinout->element);
   hidgl_flush_triangles (&buffer);
   glPopMatrix ();
 
-  if (gdk_gl_drawable_is_double_buffered (pGlDrawable))
-    gdk_gl_drawable_swap_buffers (pGlDrawable);
-  else
-    glFlush ();
-
-  /* end drawing to current GL-context */
-  gport->render_priv->in_context = false;
-  gdk_gl_drawable_gl_end (pGlDrawable);
+  hidgl_finish_render ();
+  ghid_end_drawing (gport, widget);
 
   gport->view = save_view;
   gport->width = save_width;
   gport->height = save_height;
+  PCB->MaxWidth = save_max_width;
+  PCB->MaxHeight = save_max_height;
 
   return FALSE;
 }
@@ -1118,7 +1199,7 @@ ghid_render_pixmap (int cx, int cy, double zoom, int width, int height, int dept
   pixmap = gdk_pixmap_new (NULL, width, height, depth);
   glpixmap = gdk_pixmap_set_gl_capability (pixmap, glconfig, NULL);
   gldrawable = GDK_GL_DRAWABLE (glpixmap);
-  glcontext = gdk_gl_context_new (gldrawable, NULL, FALSE, GDK_GL_RGBA_TYPE);
+  glcontext = gdk_gl_context_new (gldrawable, NULL, TRUE, GDK_GL_RGBA_TYPE);
 
   /* Setup zoom factor for drawing routines */
 
@@ -1136,6 +1217,7 @@ ghid_render_pixmap (int cx, int cy, double zoom, int width, int height, int dept
   if (!gdk_gl_drawable_gl_begin (gldrawable, glcontext)) {
     return NULL;
   }
+  hidgl_start_render ();
   gport->render_priv->in_context = true;
 
   glEnable (GL_BLEND);
@@ -1148,7 +1230,7 @@ ghid_render_pixmap (int cx, int cy, double zoom, int width, int height, int dept
 
   glMatrixMode (GL_PROJECTION);
   glLoadIdentity ();
-  glOrtho (0, width, height, 0, 0, 100);
+  glOrtho (0, width, height, 0, -100000, 100000);
   glMatrixMode (GL_MODELVIEW);
   glLoadIdentity ();
   glTranslatef (0.0f, 0.0f, -Z_NEAR);
@@ -1162,12 +1244,17 @@ ghid_render_pixmap (int cx, int cy, double zoom, int width, int height, int dept
   glClear (GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
   hidgl_reset_stencil_usage ();
 
+  /* Disable the stencil test until we need it - otherwise it gets dirty */
+  glDisable (GL_STENCIL_TEST);
+  glStencilMask (0);
+  glStencilFunc (GL_ALWAYS, 0, 0);
+
   /* call the drawing routine */
-  hidgl_init_triangle_array (&buffer);
   ghid_invalidate_current_gc ();
   glPushMatrix ();
   glScalef ((gport->view.flip_x ? -1. : 1.) / gport->view.coord_per_px,
-            (gport->view.flip_y ? -1. : 1.) / gport->view.coord_per_px, 1);
+            (gport->view.flip_y ? -1. : 1.) / gport->view.coord_per_px,
+            ((gport->view.flip_x == gport->view.flip_y) ? 1. : -1.) / gport->view.coord_per_px);
   glTranslatef (gport->view.flip_x ? gport->view.x0 - PCB->MaxWidth  :
                                     -gport->view.x0,
                 gport->view.flip_y ? gport->view.y0 - PCB->MaxHeight :
@@ -1189,6 +1276,8 @@ ghid_render_pixmap (int cx, int cy, double zoom, int width, int height, int dept
 
   glFlush ();
 
+  hidgl_finish_render ();
+
   /* end drawing to current GL-context */
   gport->render_priv->in_context = false;
   gdk_gl_drawable_gl_end (gldrawable);
@@ -1214,7 +1303,8 @@ ghid_request_debug_draw (void)
 
   gtk_widget_get_allocation (widget, &allocation);
 
-  ghid_start_drawing (port);
+  ghid_start_drawing (port, widget);
+  hidgl_start_render ();
 
   glViewport (0, 0, allocation.width, allocation.height);
 
@@ -1225,7 +1315,6 @@ ghid_request_debug_draw (void)
   glLoadIdentity ();
   glTranslatef (0.0f, 0.0f, -Z_NEAR);
 
-  hidgl_init_triangle_array (&buffer);
   ghid_invalidate_current_gc ();
 
   /* Setup stenciling */
@@ -1234,7 +1323,7 @@ ghid_request_debug_draw (void)
   glPushMatrix ();
   glScalef ((port->view.flip_x ? -1. : 1.) / port->view.coord_per_px,
             (port->view.flip_y ? -1. : 1.) / port->view.coord_per_px,
-            (port->view.flip_x == port->view.flip_y) ? 1. : -1.);
+            ((gport->view.flip_x == port->view.flip_y) ? 1. : -1.) / gport->view.coord_per_px);
   glTranslatef (port->view.flip_x ? port->view.x0 - PCB->MaxWidth  :
                              -port->view.x0,
                 port->view.flip_y ? port->view.y0 - PCB->MaxHeight :
@@ -1263,14 +1352,177 @@ ghid_finish_debug_draw (void)
   hidgl_flush_triangles (&buffer);
   glPopMatrix ();
 
-  ghid_end_drawing (gport);
+  hidgl_finish_render ();
+  ghid_end_drawing (gport, gport->drawing_area);
+}
+
+static float
+determinant_2x2 (float m[2][2])
+{
+  float det;
+  det = m[0][0] * m[1][1] -
+        m[0][1] * m[1][0];
+  return det;
+}
+
+#if 0
+static float
+determinant_4x4 (float m[4][4])
+{
+  float det;
+  det = m[0][3] * m[1][2] * m[2][1] * m[3][0]-m[0][2] * m[1][3] * m[2][1] * m[3][0] -
+        m[0][3] * m[1][1] * m[2][2] * m[3][0]+m[0][1] * m[1][3] * m[2][2] * m[3][0] +
+        m[0][2] * m[1][1] * m[2][3] * m[3][0]-m[0][1] * m[1][2] * m[2][3] * m[3][0] -
+        m[0][3] * m[1][2] * m[2][0] * m[3][1]+m[0][2] * m[1][3] * m[2][0] * m[3][1] +
+        m[0][3] * m[1][0] * m[2][2] * m[3][1]-m[0][0] * m[1][3] * m[2][2] * m[3][1] -
+        m[0][2] * m[1][0] * m[2][3] * m[3][1]+m[0][0] * m[1][2] * m[2][3] * m[3][1] +
+        m[0][3] * m[1][1] * m[2][0] * m[3][2]-m[0][1] * m[1][3] * m[2][0] * m[3][2] -
+        m[0][3] * m[1][0] * m[2][1] * m[3][2]+m[0][0] * m[1][3] * m[2][1] * m[3][2] +
+        m[0][1] * m[1][0] * m[2][3] * m[3][2]-m[0][0] * m[1][1] * m[2][3] * m[3][2] -
+        m[0][2] * m[1][1] * m[2][0] * m[3][3]+m[0][1] * m[1][2] * m[2][0] * m[3][3] +
+        m[0][2] * m[1][0] * m[2][1] * m[3][3]-m[0][0] * m[1][2] * m[2][1] * m[3][3] -
+        m[0][1] * m[1][0] * m[2][2] * m[3][3]+m[0][0] * m[1][1] * m[2][2] * m[3][3];
+   return det;
+}
+#endif
+
+static void
+invert_2x2 (float m[2][2], float out[2][2])
+{
+  float scale = 1 / determinant_2x2 (m);
+  out[0][0] =  m[1][1] * scale;
+  out[0][1] = -m[0][1] * scale;
+  out[1][0] = -m[1][0] * scale;
+  out[1][1] =  m[0][0] * scale;
+}
+
+#if 0
+static void
+invert_4x4 (float m[4][4], float out[4][4])
+{
+  float scale = 1 / determinant_4x4 (m);
+
+  out[0][0] = (m[1][2] * m[2][3] * m[3][1] - m[1][3] * m[2][2] * m[3][1] +
+               m[1][3] * m[2][1] * m[3][2] - m[1][1] * m[2][3] * m[3][2] -
+               m[1][2] * m[2][1] * m[3][3] + m[1][1] * m[2][2] * m[3][3]) * scale;
+  out[0][1] = (m[0][3] * m[2][2] * m[3][1] - m[0][2] * m[2][3] * m[3][1] -
+               m[0][3] * m[2][1] * m[3][2] + m[0][1] * m[2][3] * m[3][2] +
+               m[0][2] * m[2][1] * m[3][3] - m[0][1] * m[2][2] * m[3][3]) * scale;
+  out[0][2] = (m[0][2] * m[1][3] * m[3][1] - m[0][3] * m[1][2] * m[3][1] +
+               m[0][3] * m[1][1] * m[3][2] - m[0][1] * m[1][3] * m[3][2] -
+               m[0][2] * m[1][1] * m[3][3] + m[0][1] * m[1][2] * m[3][3]) * scale;
+  out[0][3] = (m[0][3] * m[1][2] * m[2][1] - m[0][2] * m[1][3] * m[2][1] -
+               m[0][3] * m[1][1] * m[2][2] + m[0][1] * m[1][3] * m[2][2] +
+               m[0][2] * m[1][1] * m[2][3] - m[0][1] * m[1][2] * m[2][3]) * scale;
+  out[1][0] = (m[1][3] * m[2][2] * m[3][0] - m[1][2] * m[2][3] * m[3][0] -
+               m[1][3] * m[2][0] * m[3][2] + m[1][0] * m[2][3] * m[3][2] +
+               m[1][2] * m[2][0] * m[3][3] - m[1][0] * m[2][2] * m[3][3]) * scale;
+  out[1][1] = (m[0][2] * m[2][3] * m[3][0] - m[0][3] * m[2][2] * m[3][0] +
+               m[0][3] * m[2][0] * m[3][2] - m[0][0] * m[2][3] * m[3][2] -
+               m[0][2] * m[2][0] * m[3][3] + m[0][0] * m[2][2] * m[3][3]) * scale;
+  out[1][2] = (m[0][3] * m[1][2] * m[3][0] - m[0][2] * m[1][3] * m[3][0] -
+               m[0][3] * m[1][0] * m[3][2] + m[0][0] * m[1][3] * m[3][2] +
+               m[0][2] * m[1][0] * m[3][3] - m[0][0] * m[1][2] * m[3][3]) * scale;
+  out[1][3] = (m[0][2] * m[1][3] * m[2][0] - m[0][3] * m[1][2] * m[2][0] +
+               m[0][3] * m[1][0] * m[2][2] - m[0][0] * m[1][3] * m[2][2] -
+               m[0][2] * m[1][0] * m[2][3] + m[0][0] * m[1][2] * m[2][3]) * scale;
+  out[2][0] = (m[1][1] * m[2][3] * m[3][0] - m[1][3] * m[2][1] * m[3][0] +
+               m[1][3] * m[2][0] * m[3][1] - m[1][0] * m[2][3] * m[3][1] -
+               m[1][1] * m[2][0] * m[3][3] + m[1][0] * m[2][1] * m[3][3]) * scale;
+  out[2][1] = (m[0][3] * m[2][1] * m[3][0] - m[0][1] * m[2][3] * m[3][0] -
+               m[0][3] * m[2][0] * m[3][1] + m[0][0] * m[2][3] * m[3][1] +
+               m[0][1] * m[2][0] * m[3][3] - m[0][0] * m[2][1] * m[3][3]) * scale;
+  out[2][2] = (m[0][1] * m[1][3] * m[3][0] - m[0][3] * m[1][1] * m[3][0] +
+               m[0][3] * m[1][0] * m[3][1] - m[0][0] * m[1][3] * m[3][1] -
+               m[0][1] * m[1][0] * m[3][3] + m[0][0] * m[1][1] * m[3][3]) * scale;
+  out[2][3] = (m[0][3] * m[1][1] * m[2][0] - m[0][1] * m[1][3] * m[2][0] -
+               m[0][3] * m[1][0] * m[2][1] + m[0][0] * m[1][3] * m[2][1] +
+               m[0][1] * m[1][0] * m[2][3] - m[0][0] * m[1][1] * m[2][3]) * scale;
+  out[3][0] = (m[1][2] * m[2][1] * m[3][0] - m[1][1] * m[2][2] * m[3][0] -
+               m[1][2] * m[2][0] * m[3][1] + m[1][0] * m[2][2] * m[3][1] +
+               m[1][1] * m[2][0] * m[3][2] - m[1][0] * m[2][1] * m[3][2]) * scale;
+  out[3][1] = (m[0][1] * m[2][2] * m[3][0] - m[0][2] * m[2][1] * m[3][0] +
+               m[0][2] * m[2][0] * m[3][1] - m[0][0] * m[2][2] * m[3][1] -
+               m[0][1] * m[2][0] * m[3][2] + m[0][0] * m[2][1] * m[3][2]) * scale;
+  out[3][2] = (m[0][2] * m[1][1] * m[3][0] - m[0][1] * m[1][2] * m[3][0] -
+               m[0][2] * m[1][0] * m[3][1] + m[0][0] * m[1][2] * m[3][1] +
+               m[0][1] * m[1][0] * m[3][2] - m[0][0] * m[1][1] * m[3][2]) * scale;
+  out[3][3] = (m[0][1] * m[1][2] * m[2][0] - m[0][2] * m[1][1] * m[2][0] +
+               m[0][2] * m[1][0] * m[2][1] - m[0][0] * m[1][2] * m[2][1] -
+               m[0][1] * m[1][0] * m[2][2] + m[0][0] * m[1][1] * m[2][2]) * scale;
 }
+#endif
+
+
+static void
+ghid_unproject_to_z_plane (int ex, int ey, Coord pcb_z, Coord *pcb_x, Coord *pcb_y)
+{
+  float mat[2][2];
+  float inv_mat[2][2];
+  float x, y;
+
+  /*
+    ex = view_matrix[0][0] * vx +
+         view_matrix[0][1] * vy +
+         view_matrix[0][2] * vz +
+         view_matrix[0][3] * 1;
+    ey = view_matrix[1][0] * vx +
+         view_matrix[1][1] * vy +
+         view_matrix[1][2] * vz +
+         view_matrix[1][3] * 1;
+    UNKNOWN ez = view_matrix[2][0] * vx +
+                 view_matrix[2][1] * vy +
+                 view_matrix[2][2] * vz +
+                 view_matrix[2][3] * 1;
+
+    ex - view_matrix[0][3] * 1
+       - view_matrix[0][2] * vz
+      = view_matrix[0][0] * vx +
+        view_matrix[0][1] * vy;
+
+    ey - view_matrix[1][3] * 1
+       - view_matrix[1][2] * vz
+      = view_matrix[1][0] * vx +
+        view_matrix[1][1] * vy;
+  */
+
+  /* NB: last_modelview_matrix is transposed in memory! */
+  x = (float)ex - last_modelview_matrix[3][0] * 1
+                - last_modelview_matrix[2][0] * pcb_z;
+
+  y = (float)ey - last_modelview_matrix[3][1] * 1
+                - last_modelview_matrix[2][1] * pcb_z;
+
+  /*
+    x = view_matrix[0][0] * vx +
+        view_matrix[0][1] * vy;
+
+    y = view_matrix[1][0] * vx +
+        view_matrix[1][1] * vy;
+
+    [view_matrix[0][0] view_matrix[0][1]] [vx] = [x]
+    [view_matrix[1][0] view_matrix[1][1]] [vy]   [y]
+  */
+
+  mat[0][0] = last_modelview_matrix[0][0];
+  mat[0][1] = last_modelview_matrix[1][0];
+  mat[1][0] = last_modelview_matrix[0][1];
+  mat[1][1] = last_modelview_matrix[1][1];
+
+  /*    if (determinant_2x2 (mat) < 0.00001)       */
+  /*      printf ("Determinant is quite small\n"); */
+
+  invert_2x2 (mat, inv_mat);
+
+  *pcb_x = (int)(inv_mat[0][0] * x + inv_mat[0][1] * y);
+  *pcb_y = (int)(inv_mat[1][0] * x + inv_mat[1][1] * y);
+}
+
 
 bool
 ghid_event_to_pcb_coords (int event_x, int event_y, Coord *pcb_x, Coord *pcb_y)
 {
-  *pcb_x = EVENT_TO_PCB_X (event_x);
-  *pcb_y = EVENT_TO_PCB_Y (event_y);
+  ghid_unproject_to_z_plane (event_x, event_y, 0, pcb_x, pcb_y);
 
   return true;
 }
@@ -1278,12 +1530,54 @@ ghid_event_to_pcb_coords (int event_x, int event_y, Coord *pcb_x, Coord *pcb_y)
 bool
 ghid_pcb_to_event_coords (Coord pcb_x, Coord pcb_y, int *event_x, int *event_y)
 {
-  *event_x = DRAW_X (pcb_x);
-  *event_y = DRAW_Y (pcb_y);
+  /* NB: last_modelview_matrix is transposed in memory */
+  float w = last_modelview_matrix[0][3] * (float)pcb_x +
+            last_modelview_matrix[1][3] * (float)pcb_y +
+            last_modelview_matrix[2][3] * 0. +
+            last_modelview_matrix[3][3] * 1.;
+
+  *event_x = (last_modelview_matrix[0][0] * (float)pcb_x +
+              last_modelview_matrix[1][0] * (float)pcb_y +
+              last_modelview_matrix[2][0] * 0. +
+              last_modelview_matrix[3][0] * 1.) / w;
+  *event_y = (last_modelview_matrix[0][1] * (float)pcb_x +
+              last_modelview_matrix[1][1] * (float)pcb_y +
+              last_modelview_matrix[2][1] * 0. +
+              last_modelview_matrix[3][1] * 1.) / w;
 
   return true;
 }
 
+void
+ghid_view_2d (void *ball, gboolean view_2d, gpointer userdata)
+{
+  global_view_2d = view_2d;
+  ghid_invalidate_all ();
+}
+
+void
+ghid_port_rotate (void *ball, float *quarternion, gpointer userdata)
+{
+#ifdef DEBUG_ROTATE
+  int row, column;
+#endif
+
+  build_rotmatrix (view_matrix, quarternion);
+
+#ifdef DEBUG_ROTATE
+  for (row = 0; row < 4; row++) {
+    printf ("[ %f", view_matrix[row][0]);
+    for (column = 1; column < 4; column++) {
+      printf (",\t%f", view_matrix[row][column]);
+    }
+    printf ("\t]\n");
+  }
+  printf ("\n");
+#endif
+
+  ghid_invalidate_all ();
+}
+
 
 #define LEAD_USER_WIDTH           0.2          /* millimeters */
 #define LEAD_USER_PERIOD          (1000 / 20)  /* 20fps (in ms) */
diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index 9b239e1..b24b9f7 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -26,10 +24,6 @@
 #include <dmalloc.h>
 #endif
 
-
-RCSID ("$Id$");
-
-
 static void
 pan_common (GHidPort *port)
 {
@@ -245,12 +239,10 @@ ghid_calibrate (double xval, double yval)
   printf (_("ghid_calibrate() -- not implemented\n"));
 }
 
-static int ghid_gui_is_up = 0;
-
 void
 ghid_notify_gui_is_up ()
 {
-  ghid_gui_is_up = 1;
+  ghidgui->is_up = 1;
 }
 
 int
@@ -259,7 +251,7 @@ ghid_shift_is_pressed ()
   GdkModifierType mask;
   GHidPort *out = &ghid_port;
 
-  if( ! ghid_gui_is_up ) 
+  if (!ghidgui->is_up)
     return 0;
 
   gdk_window_get_pointer (gtk_widget_get_window (out->drawing_area),
@@ -273,7 +265,7 @@ ghid_control_is_pressed ()
   GdkModifierType mask;
   GHidPort *out = &ghid_port;
 
-  if( ! ghid_gui_is_up )
+  if (!ghidgui->is_up)
     return 0;
 
   gdk_window_get_pointer (gtk_widget_get_window (out->drawing_area),
@@ -287,7 +279,7 @@ ghid_mod1_is_pressed ()
   GdkModifierType mask;
   GHidPort *out = &ghid_port;
 
-  if( ! ghid_gui_is_up )
+  if (!ghidgui->is_up)
     return 0;
 
   gdk_window_get_pointer (gtk_widget_get_window (out->drawing_area),
@@ -659,7 +651,7 @@ ghid_fileselect (const char *title, const char *descr,
 void
 ghid_show_item (void *item)
 {
-  ghid_pinout_window_show (&ghid_port, (ElementTypePtr) item);
+  ghid_pinout_window_show (&ghid_port, (ElementType *) item);
 }
 
 void
@@ -892,7 +884,7 @@ ghid_attributes_need_rows (int new_max)
   while (attr_max_rows < new_max)
     {
       /* add [attr_max_rows] */
-      attr_row[attr_max_rows].del = gtk_button_new_with_label ("del");
+      attr_row[attr_max_rows].del = gtk_button_new_with_label (_("del"));
       gtk_table_attach (GTK_TABLE (attr_table), attr_row[attr_max_rows].del,
 			0, 1,
 			attr_max_rows, attr_max_rows+1,
@@ -998,8 +990,8 @@ ghid_attributes (char *owner, AttributeListType *attrs)
 						   GTK_WINDOW (ghid_port.top_window),
 						   GTK_DIALOG_MODAL,
 						   GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-						   "Revert", GA_RESPONSE_REVERT,
-						   "New", GA_RESPONSE_NEW,
+						   _("Revert"), GA_RESPONSE_REVERT,
+						   _("New"), GA_RESPONSE_NEW,
 						   GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
 
   attr_table = gtk_table_new (attrs->Number, 3, 0);
@@ -1818,7 +1810,7 @@ SetUnits (int argc, char **argv, Coord x, Coord y)
   if (new_unit != NULL && new_unit->allow != NO_PRINT)
     {
       Settings.grid_unit = new_unit;
-      Settings.increments = get_increments_struct (Settings.grid_unit->suffix);
+      Settings.increments = get_increments_struct (Settings.grid_unit->family);
       AttributePut (PCB, "PCB::grid::unit", argv[0]);
     }
 
@@ -1936,7 +1928,8 @@ N_("Bring up the popup menu specified by @code{MenuName}.\n"
 
 This just pops up the specified menu.  The menu must have been defined
 as a named subresource of the Popups resource in the menu resource
-file.
+file. The second, optional (and ignored) argument represents the mouse
+button number which is triggering the popup.
 
 %end-doc */
 
@@ -1981,25 +1974,38 @@ Asks user which schematics to import into PCB.
 static int
 ImportGUI (int argc, char **argv, Coord x, Coord y)
 {
-    char *name = NULL;
+    GSList *names = NULL;
+    gchar *name = NULL;
+    gchar sname[128];
     static gchar *current_layout_dir = NULL;
     static int I_am_recursing = 0; 
-    int rv;
+    int rv, nsources;
 
     if (I_am_recursing)
 	return 1;
 
 
-    name = ghid_dialog_file_select_open (_("Load schematics"),
-					 &current_layout_dir,
-					 Settings.FilePath);
+    names = ghid_dialog_file_select_multiple (_("Load schematics"),
+					      &current_layout_dir,
+					      Settings.FilePath);
+
+    nsources = 0;
+    while (names != NULL)
+      {
+        name = names->data;
 
 #ifdef DEBUG
-    printf("File selected = %s\n", name);
+        printf("File selected = %s\n", name);
 #endif
 
-    AttributePut (PCB, "import::src0", name);
-    free (name);
+        sprintf (sname, "import::src%d", nsources);
+        AttributePut (PCB, sname, name);
+
+        g_free (name);
+        nsources++;
+        names = g_slist_next (names);
+      }
+    g_slist_free (names);
 
     I_am_recursing = 1;
     rv = hid_action ("Import");
@@ -2030,7 +2036,7 @@ HID_Action ghid_main_action_list[] = {
   {"LayerGroupsChanged", 0, LayerGroupsChanged},
   {"LibraryChanged", 0, LibraryChanged},
   {"Load", 0, Load},
-  {"Pan", N_("Click on a place to pan"), PanAction, pan_help, pan_syntax},
+  {"Pan", 0, PanAction, pan_help, pan_syntax},
   {"PCBChanged", 0, PCBChanged},
   {"PointCursor", 0, PointCursor},
   {"Popup", 0, Popup, popup_help, popup_syntax},
@@ -2050,20 +2056,20 @@ REGISTER_ACTIONS (ghid_main_action_list)
 
 
 static int
-flag_flipx (int x)
+flag_flipx (void *data)
 {
   return gport->view.flip_x;
 }
 
 static int
-flag_flipy (int x)
+flag_flipy (void *data)
 {
   return gport->view.flip_y;
 }
 
 HID_Flag ghid_main_flag_list[] = {
-  {"flip_x", flag_flipx, 0},
-  {"flip_y", flag_flipy, 0}
+  {"flip_x", flag_flipx, NULL},
+  {"flip_y", flag_flipy, NULL}
 };
 
 REGISTER_FLAGS (ghid_main_flag_list)
@@ -2081,6 +2087,7 @@ REGISTER_FLAGS (ghid_main_flag_list)
 #endif
 
 HID ghid_hid;
+HID_DRAW ghid_graphics;
 
 void
 hid_gtk_init ()
@@ -2116,12 +2123,14 @@ hid_gtk_init ()
   free (tmps);
 #undef REST_OF_PATH
   printf ("\"Share\" installation path is \"%s\"\n", share_dir);
+  free (share_dir);
 #endif
 
   memset (&ghid_hid, 0, sizeof (HID));
+  memset (&ghid_graphics, 0, sizeof (HID_DRAW));
 
   common_nogui_init (&ghid_hid);
-  common_draw_helpers_init (&ghid_hid);
+  common_draw_helpers_init (&ghid_graphics);
 
   ghid_hid.struct_size              = sizeof (HID);
   ghid_hid.name                     = "gtk";
@@ -2137,19 +2146,6 @@ hid_gtk_init ()
   ghid_hid.notify_crosshair_change  = ghid_notify_crosshair_change;
   ghid_hid.notify_mark_change       = ghid_notify_mark_change;
   ghid_hid.set_layer                = ghid_set_layer;
-  ghid_hid.make_gc                  = ghid_make_gc;
-  ghid_hid.destroy_gc               = ghid_destroy_gc;
-  ghid_hid.use_mask                 = ghid_use_mask;
-  ghid_hid.set_color                = ghid_set_color;
-  ghid_hid.set_line_cap             = ghid_set_line_cap;
-  ghid_hid.set_line_width           = ghid_set_line_width;
-  ghid_hid.set_draw_xor             = ghid_set_draw_xor;
-  ghid_hid.draw_line                = ghid_draw_line;
-  ghid_hid.draw_arc                 = ghid_draw_arc;
-  ghid_hid.draw_rect                = ghid_draw_rect;
-  ghid_hid.fill_circle              = ghid_fill_circle;
-  ghid_hid.fill_polygon             = ghid_fill_polygon;
-  ghid_hid.fill_rect                = ghid_fill_rect;
 
   ghid_hid.calibrate                = ghid_calibrate;
   ghid_hid.shift_is_pressed         = ghid_shift_is_pressed;
@@ -2185,6 +2181,24 @@ hid_gtk_init ()
   ghid_hid.notify_save_pcb          = ghid_notify_save_pcb;
   ghid_hid.notify_filename_changed  = ghid_notify_filename_changed;
 
+  ghid_hid.graphics                 = &ghid_graphics;
+
+  ghid_graphics.make_gc             = ghid_make_gc;
+  ghid_graphics.destroy_gc          = ghid_destroy_gc;
+  ghid_graphics.use_mask            = ghid_use_mask;
+  ghid_graphics.set_color           = ghid_set_color;
+  ghid_graphics.set_line_cap        = ghid_set_line_cap;
+  ghid_graphics.set_line_width      = ghid_set_line_width;
+  ghid_graphics.set_draw_xor        = ghid_set_draw_xor;
+  ghid_graphics.draw_line           = ghid_draw_line;
+  ghid_graphics.draw_arc            = ghid_draw_arc;
+  ghid_graphics.draw_rect           = ghid_draw_rect;
+  ghid_graphics.fill_circle         = ghid_fill_circle;
+  ghid_graphics.fill_polygon        = ghid_fill_polygon;
+  ghid_graphics.fill_rect           = ghid_fill_rect;
+
+  ghid_graphics.draw_pcb_polygon    = common_gui_draw_pcb_polygon;
+
   hid_register_hid (&ghid_hid);
 #include "gtk_lists.h"
 }
diff --git a/src/hid/gtk/gtkhid.h b/src/hid/gtk/gtkhid.h
index f55845b..d6e9887 100644
--- a/src/hid/gtk/gtkhid.h
+++ b/src/hid/gtk/gtkhid.h
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 #ifndef PCB_HID_GTK_GTKHID_H
 #define PCB_HID_GTK_GTKHID_H
 
diff --git a/src/hid/gtk/gui-command-window.c b/src/hid/gtk/gui-command-window.c
index d913cae..25b0154 100644
--- a/src/hid/gtk/gui-command-window.c
+++ b/src/hid/gtk/gui-command-window.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -42,8 +40,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 static GtkWidget *command_window;
 static GtkWidget *combo_vbox;
 static GList *history_list;
diff --git a/src/hid/gtk/gui-config.c b/src/hid/gtk/gui-config.c
index dba0635..5cd2fa5 100644
--- a/src/hid/gtk/gui-config.c
+++ b/src/hid/gtk/gui-config.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -57,9 +55,8 @@
 #endif
 
 extern int	MoveLayerAction(int argc, char **argv, int x, int y);
-
-
-RCSID ("$Id$");
+/* This is defined in main.c */
+void save_increments (const Increments *mm, const Increments *mil);
 
 enum ConfigType
 {
@@ -127,6 +124,15 @@ static ConfigAttribute config_attributes[] = {
   {"grid-units", CONFIG_Unused, NULL},
   {"grid", CONFIG_Unused, NULL},
 
+  {"grid-increment-mm", CONFIG_Unused, NULL},
+  {"line-increment-mm", CONFIG_Unused, NULL},
+  {"size-increment-mm", CONFIG_Unused, NULL},
+  {"clear-increment-mm", CONFIG_Unused, NULL},
+  {"grid-increment-mil", CONFIG_Unused, NULL},
+  {"line-increment-mil", CONFIG_Unused, NULL},
+  {"size-increment-mil", CONFIG_Unused, NULL},
+  {"clear-increment-mil", CONFIG_Unused, NULL},
+
   {"history-size", CONFIG_Integer, &_ghidgui.history_size},
   {"top-window-width", CONFIG_Integer, &_ghidgui.top_window_width},
   {"top-window-height", CONFIG_Integer, &_ghidgui.top_window_height},
@@ -169,6 +175,20 @@ static ConfigAttribute config_attributes[] = {
   {"layer-name-8", CONFIG_Unused, NULL},
 };
 
+static gboolean
+dup_core_string (gchar ** dst, const gchar * src)
+{
+  if (dst == NULL || (*dst == NULL && src == NULL))
+    return FALSE;
+
+  if (*dst != NULL && src != NULL && strcmp (*dst, src) == 0)
+    return FALSE;
+
+  free (*dst);
+  *dst = (src == NULL) ? NULL : strdup (src);
+
+  return TRUE;
+}
 
 static FILE *
 config_file_open (gchar * mode)
@@ -774,6 +794,10 @@ ghid_config_files_write (void)
 	  fprintf (f, "%s = %f\n", ca->name, *(double *) ca->value);
 	  break;
 
+	case CONFIG_Coord:
+	  pcb_fprintf (f, "%s = %$mS\n", ca->name, *(Coord *) ca->value);
+	  break;
+
 	case CONFIG_String:
 	  if (*(char **) ca->value == NULL)
 	    fprintf (f, "# %s = NULL\n", ca->name);
@@ -919,7 +943,8 @@ static GtkWidget *config_sizes_vbox,
   *config_sizes_tab_vbox, *config_text_spin_button;
 
 static GtkWidget *use_board_size_default_button,
-  *use_drc_sizes_default_button;
+  *use_drc_sizes_default_button,
+  *use_increments_default_button;
 
 static Coord new_board_width, new_board_height;
 
@@ -953,6 +978,16 @@ config_sizes_apply (void)
       ghidgui->config_modified = TRUE;
     }
 
+  active =
+    gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
+				  (use_increments_default_button));
+  if (active)
+    {
+      save_increments (get_increments_struct (METRIC),
+                       get_increments_struct (IMPERIAL));
+      ghidgui->config_modified = TRUE;
+    }
+
   if (PCB->MaxWidth != new_board_width || PCB->MaxHeight != new_board_height)
     ChangePCBSize (new_board_width, new_board_height);
 }
@@ -1103,8 +1138,9 @@ increment_spin_button_cb (GHidCoordEntry * ce, void * dst)
 static void
 config_increments_tab_create (GtkWidget * tab_vbox)
 {
-  GtkWidget *vbox;
-  Coord *target;
+  Increments *incr_mm  = get_increments_struct (METRIC);
+  Increments *incr_mil = get_increments_struct (IMPERIAL);
+  GtkWidget *vbox, *hbox, *table;
 
   /* Need a vbox we can destroy if user changes grid units.
    */
@@ -1117,61 +1153,67 @@ config_increments_tab_create (GtkWidget * tab_vbox)
       config_increments_tab_vbox = tab_vbox;
     }
 
-  /* ---- Grid Increment/Decrement ---- */
+#define INCR_ENTRY(row, name, family, type, msg)	\
+  gtk_table_attach_defaults (GTK_TABLE (table),	\
+                             gtk_label_new (name),	\
+                             0, 1, row, row + 1);	\
+  ghid_table_coord_entry (table, row, 1, NULL,	\
+                          incr_##family->type,	\
+                          incr_##family->type##_min,	\
+                          incr_##family->type##_max,	\
+			  CE_SMALL, 0, increment_spin_button_cb,	\
+			  &incr_##family->type, FALSE,	\
+                          msg)
+  
+  /* ---- Metric Settings ---- */
   vbox = ghid_category_vbox (config_increments_vbox,
-			     _("Grid Increment/Decrement"), 4, 2, TRUE, TRUE);
-
-  target = &Settings.increments->grid;
-  ghid_coord_entry (vbox, NULL,
-                    Settings.increments->grid,
-                    Settings.increments->grid_min,
-                    Settings.increments->grid_max,
-                    CE_SMALL, 0, increment_spin_button_cb,
-		    target, FALSE,
-		    _("For 'g' and '<shift>g' grid change actions"));
-
+			     _("Metric Increment Settings"), 4, 2, TRUE, TRUE);
+  hbox = gtk_hbox_new (FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+  table = gtk_table_new (4, 3, FALSE);
+  gtk_box_pack_start (GTK_BOX (hbox), table, FALSE, FALSE, 0);
+  gtk_table_set_col_spacings (GTK_TABLE (table), 6);
+  gtk_table_set_row_spacings (GTK_TABLE (table), 18);
+
+  INCR_ENTRY (0, _("Grid:"), mm, grid,
+              _("For 'g' and '<shift>g' grid change actions"));
+  INCR_ENTRY (1, _("Size:"), mm, size,
+              _("For 's' and '<shift>s' size change actions on lines,\n"
+                "pads, pins and text.\n"
+                "Use '<ctrl>s' and '<shift><ctrl>s' for drill holes."));
+  INCR_ENTRY (2, _("Line:"), mm, line,
+              _("For 'l' and '<shift>l' routing line width change actions"));
+  INCR_ENTRY (3, _("Clear:"), mm, clear,
+              _("For 'k' and '<shift>k' line clearance inside polygon size\n"
+                "change actions"));
 
-  /* ---- Size Increment/Decrement ---- */
-  vbox = ghid_category_vbox (config_increments_vbox,
-			     _("Size Increment/Decrement"), 4, 2, TRUE, TRUE);
-
-  target = &Settings.increments->size;
-  ghid_coord_entry (vbox, NULL,
-                    Settings.increments->size,
-                    Settings.increments->size_min,
-                    Settings.increments->size_max,
-                    CE_SMALL, 0, increment_spin_button_cb,
-		    target, FALSE,
-		    _("For 's' and '<shift>s' size change actions on lines,\n"
-		      "pads, pins and text.\n"
-		      "Use '<ctrl>s' and '<shift><ctrl>s' for drill holes."));
-
-  /* ---- Line Increment/Decrement ---- */
   vbox = ghid_category_vbox (config_increments_vbox,
-			     _("Line Increment/Decrement"), 4, 2, TRUE, TRUE);
-
-  target = &Settings.increments->line;
-  ghid_coord_entry (vbox, NULL,
-                    Settings.increments->line,
-                    Settings.increments->line_min,
-                    Settings.increments->line_max,
-                    CE_SMALL, 0, increment_spin_button_cb,
-		    target, FALSE,
-		    _("For 'l' and '<shift>l' routing line width change actions"));
-
-  /* ---- Clear Increment/Decrement ---- */
+			     _("Imperial Increment Settings"), 4, 2, TRUE, TRUE);
+  hbox = gtk_hbox_new (FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+  table = gtk_table_new (4, 3, FALSE);
+  gtk_box_pack_start (GTK_BOX (hbox), table, FALSE, FALSE, 0);
+  gtk_table_set_col_spacings (GTK_TABLE (table), 6);
+  gtk_table_set_row_spacings (GTK_TABLE (table), 18);
+
+  INCR_ENTRY (0, _("Grid:"), mil, grid,
+              _("For 'g' and '<shift>g' grid change actions"));
+  INCR_ENTRY (1, _("Size:"), mil, size,
+              _("For 's' and '<shift>s' size change actions on lines,\n"
+                "pads, pins and text.\n"
+                "Use '<ctrl>s' and '<shift><ctrl>s' for drill holes."));
+  INCR_ENTRY (2, _("Line:"), mil, line,
+              _("For 'l' and '<shift>l' routing line width change actions"));
+  INCR_ENTRY (3, _("Clear:"), mil, clear,
+              _("For 'k' and '<shift>k' line clearance inside polygon size\n"
+                "change actions"));
+#undef INCR_ENTRY
+
   vbox = ghid_category_vbox (config_increments_vbox,
-			     _("Clear Increment/Decrement"), 4, 2, TRUE, TRUE);
-
-  target = &Settings.increments->clear;
-  ghid_coord_entry (vbox, NULL,
-                    Settings.increments->clear,
-                    Settings.increments->clear_min,
-                    Settings.increments->clear_max,
-                    CE_SMALL, 0, increment_spin_button_cb,
-		    target, FALSE,
-		    _("For 'k' and '<shift>k' line clearance inside polygon size\n"
-		     "change actions"));
+			     _("Save as Default"), 4, 2, TRUE, TRUE);
+  ghid_check_button_connected (vbox, &use_increments_default_button, FALSE,
+			       TRUE, FALSE, FALSE, 0, NULL, NULL,
+			       _("Use values as the default for new layouts"));
 
   gtk_widget_show_all (config_increments_vbox);
 }
@@ -1192,27 +1234,24 @@ static void
 config_library_tab_create (GtkWidget * tab_vbox)
 {
   GtkWidget *vbox, *label, *entry;
+  GString *string;
 
   gtk_container_set_border_width (GTK_CONTAINER (tab_vbox), 6);
   vbox = ghid_category_vbox (tab_vbox, _("Element Directories"),
 			     4, 2, TRUE, TRUE);
-  label = gtk_label_new ("");
-  gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
-  gtk_label_set_markup (GTK_LABEL (label),
-			_
-			("<small>Enter a \""
-			 PCB_PATH_DELIMETER 
-			 "\" separated list of custom top level\n"
-			 "element directories.  For example:\n"
-			 "\t<b>~/gaf/pcb-elements"
-			 PCB_PATH_DELIMETER
-			 "packages"
-			 PCB_PATH_DELIMETER
-			 "/usr/local/pcb-elements</b>\n"
+  string = g_string_new ("");
+  g_string_printf (string, _("<small>Enter a \"%s\" "
+			 "separated list of custom top level\n"
+			 "element directories.  For example:\n%s\n"
 			 "Elements should be organized into subdirectories below each\n"
 			 "top level directory.  Restart program for changes to take effect."
-			 "</small>"));
-
+			 "</small>"), PCB_PATH_DELIMETER,
+			 "\t<b>~/gaf/pcb-elements" PCB_PATH_DELIMETER
+			 "packages" PCB_PATH_DELIMETER "/usr/local/pcb-elements</b>\n");
+  label = gtk_label_new ("");
+  gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
+  gtk_label_set_markup (GTK_LABEL (label), string->str);
+  g_string_free (string, TRUE);
   gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
   entry = gtk_entry_new ();
   library_newlib_entry = entry;
@@ -1243,7 +1282,7 @@ static gboolean groups_modified, groups_holdoff, layers_applying;
 static gchar *layer_info_text[] = {
   N_("<h>Layer Names\n"),
   N_("You may enter layer names for the layers drawn on the screen.\n"
-     "The special 'component side' and 'solder side' are layers which\n"
+     "The special 'top side' and 'bottom side' are layers which\n"
      "will be printed out, so they must have in their group at least one\n"
      "of the other layers that are drawn on the screen.\n"),
   "\n",
@@ -1257,7 +1296,7 @@ static gchar *layer_info_text[] = {
   "\n",
   N_("For example, for a 4 layer board a useful layer group arrangement\n"
      "can be to have 3 screen displayed layers grouped into the same group\n"
-     "as the 'component side' and 'solder side' printout layers.  Then\n"
+     "as the 'top side' and 'bottom side' printout layers.  Then\n"
      "groups such as signals, ground, and supply traces can be color\n"
      "coded on the screen while printing as a single layer.  For this\n"
      "you would select buttons and enter names on the Setup page to\n"
@@ -1265,23 +1304,23 @@ static gchar *layer_info_text[] = {
   "\n",
   N_("<b>Group 1:"),
   "\n\t",
-  N_("solder"),
+  N_("top"),
   "\n\t",
-  N_("GND-solder"),
+  N_("GND-top"),
   "\n\t",
-  N_("Vcc-solder"),
+  N_("Vcc-top"),
   "\n\t",
-  N_("solder side"),
+  N_("top side"),
   "\n",
   N_("<b>Group 2:"),
   "\n\t",
-  N_("component"),
+  N_("bottom"),
   "\n\t",
-  N_("GND-component"),
+  N_("GND-bottom"),
   "\n\t",
-  N_("Vcc-component"),
+  N_("Vcc-bottom"),
   "\n\t",
-  N_("component side"),
+  N_("bottom side"),
   "\n",
   N_("<b>Group 3:"),
   "\n\t",
@@ -1362,10 +1401,10 @@ config_layers_apply (void)
     {
       layer = &PCB->Data->Layer[i];
       s = ghid_entry_get_text (layer_entry[i]);
-      if (dup_string (&layer->Name, s))
+      if (dup_core_string (&layer->Name, s))
 	layers_modified = TRUE;
 /* FIXME */
-      if (use_as_default && dup_string (&Settings.DefaultLayerName[i], s))
+      if (use_as_default && dup_core_string (&Settings.DefaultLayerName[i], s))
 	ghidgui->config_modified = TRUE;
 
     }
@@ -1396,21 +1435,21 @@ config_layers_apply (void)
 	}
 
       /* do some cross-checking
-         |  solder-side and component-side must be in different groups
-         |  solder-side and component-side must not be the only one in the group
+         |  top-side and bottom-side must be in different groups
+         |  top-side and bottom-side must not be the only one in the group
        */
       if (layer_groups.Number[soldergroup] <= 1
 	  || layer_groups.Number[componentgroup] <= 1)
 	{
 	  Message (_
-		   ("Both 'solder side' or 'component side' layers must have at least\n"
+		   ("Both, 'top side' and 'bottom side' layer must have at least\n"
 		    "\tone other layer in their group.\n"));
 	  return;
 	}
       else if (soldergroup == componentgroup)
 	{
 	  Message (_
-		   ("The 'solder side' and 'component side' layers are not allowed\n"
+		   ("The 'top side' and 'bottom side' layers are not allowed\n"
 		    "\tto be in the same layer group #\n"));
 	  return;
 	}
@@ -1421,7 +1460,7 @@ config_layers_apply (void)
   if (use_as_default)
     {
       s = make_layer_group_string (&PCB->LayerGroups);
-      if (dup_string (&Settings.Groups, s))
+      if (dup_core_string (&Settings.Groups, s))
 	{
 	  ParseGroupString (Settings.Groups, &Settings.LayerGroups, max_copper_layer);
 	  ghidgui->config_modified = TRUE;
@@ -1460,7 +1499,7 @@ layer_name_entry_cb(GtkWidget *entry, gpointer data)
 
 	layer = &PCB->Data->Layer[i];
 	name = ghid_entry_get_text(entry);
-	if (dup_string (&layer->Name, name))
+	if (dup_core_string (&layer->Name, name))
 		ghid_layer_buttons_update();
 }
 
@@ -1521,9 +1560,9 @@ ghid_config_groups_changed(void)
   for (layer = 0; layer < max_copper_layer + 2; ++layer)
     {
       if (layer == component_silk_layer)
-	name = _("component side");
+	name = _("top side");
       else if (layer == solder_silk_layer)
-	name = _("solder side");
+	name = _("bottom side");
       else
 	name = (gchar *) UNKNOWN (PCB->Data->Layer[layer].Name);
 
@@ -1646,7 +1685,7 @@ config_layers_tab_create (GtkWidget * tab_vbox)
 
 
 /* -- Info tab */
-  vbox = ghid_notebook_page (tabs, _("Info"), 0, 6);
+  vbox = ghid_notebook_page (tabs, C_("tab", "Info"), 0, 6);
 
   text = ghid_scrolled_text_view (vbox, NULL,
 				  GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
@@ -1712,7 +1751,7 @@ config_color_defaults_cb (gpointer data)
     {
       cc = (ConfigColor *) list->data;
       ha = cc->attributes;
-      dup_string ((char **) ha->value, ha->default_val.str_value);
+      dup_core_string ((char **) ha->value, ha->default_val.str_value);
       cc->color_is_mapped = FALSE;
       ghid_set_special_colors (ha);
     }
diff --git a/src/hid/gtk/gui-dialog-print.c b/src/hid/gtk/gui-dialog-print.c
index 5d7d003..2f08171 100644
--- a/src/hid/gtk/gui-dialog-print.c
+++ b/src/hid/gtk/gui-dialog-print.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -43,8 +41,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 static GtkWidget *export_dialog = NULL;
 
 static void
@@ -146,9 +142,9 @@ ghid_attribute_dialog (HID_Attribute * attrs,
       switch (attrs[j].type)
 	{
 	case HID_Label:
-	  widget = gtk_label_new (attrs[j].name);
+	  widget = gtk_label_new (_(attrs[j].name));
 	  gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
-	  gtk_widget_set_tooltip_text (widget, attrs[j].help_text);
+	  gtk_widget_set_tooltip_text (widget, _(attrs[j].help_text));
 	  break;
 
 	case HID_Integer:
@@ -164,9 +160,9 @@ ghid_attribute_dialog (HID_Attribute * attrs,
 			    attrs[j].min_val, attrs[j].max_val, 1.0, 1.0, 0, 0,
 			    intspinner_changed_cb,
 			    &(attrs[j].default_val.int_value), FALSE, NULL);
-	  gtk_widget_set_tooltip_text (widget, attrs[j].help_text);
+	  gtk_widget_set_tooltip_text (widget, _(attrs[j].help_text));
 
-	  widget = gtk_label_new (attrs[j].name);
+	  widget = gtk_label_new (_(attrs[j].name));
 	  gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
 	  break;
 
@@ -181,12 +177,12 @@ ghid_attribute_dialog (HID_Attribute * attrs,
 	  if(attrs[j].default_val.str_value != NULL)
 	    gtk_entry_set_text (GTK_ENTRY (entry),
 				attrs[j].default_val.str_value);
-	  gtk_widget_set_tooltip_text (entry, attrs[j].help_text);
+	  gtk_widget_set_tooltip_text (entry, _(attrs[j].help_text));
 	  g_signal_connect (G_OBJECT (entry), "changed",
 			    G_CALLBACK (coordentry_changed_cb),
 			    &(attrs[j].default_val.coord_value));
 
-	  widget = gtk_label_new (attrs[j].name);
+	  widget = gtk_label_new (_(attrs[j].name));
 	  gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
 	  break;
 
@@ -205,9 +201,9 @@ ghid_attribute_dialog (HID_Attribute * attrs,
 			    dblspinner_changed_cb,
 			    &(attrs[j].default_val.real_value), FALSE, NULL);
 
-	  gtk_widget_set_tooltip_text (widget, attrs[j].help_text);
+	  gtk_widget_set_tooltip_text (widget, _(attrs[j].help_text));
 
-	  widget = gtk_label_new (attrs[j].name);
+	  widget = gtk_label_new (_(attrs[j].name));
 	  gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
 	  break;
 
@@ -220,12 +216,12 @@ ghid_attribute_dialog (HID_Attribute * attrs,
 	  if(attrs[j].default_val.str_value != NULL)
 	    gtk_entry_set_text (GTK_ENTRY (entry),
 				attrs[j].default_val.str_value);
-	  gtk_widget_set_tooltip_text (entry, attrs[j].help_text);
+	  gtk_widget_set_tooltip_text (entry, _(attrs[j].help_text));
 	  g_signal_connect (G_OBJECT (entry), "changed",
 			    G_CALLBACK (entry_changed_cb),
 			    &(attrs[j].default_val.str_value));
 
-	  widget = gtk_label_new (attrs[j].name);
+	  widget = gtk_label_new (_(attrs[j].name));
 	  gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
 	  break;
 
@@ -235,8 +231,8 @@ ghid_attribute_dialog (HID_Attribute * attrs,
 				       attrs[j].default_val.int_value,
 				       TRUE, FALSE, FALSE, 0, set_flag_cb,
 				       &(attrs[j].default_val.int_value),
-				       attrs[j].name);
-	  gtk_widget_set_tooltip_text (widget, attrs[j].help_text);
+				       _(attrs[j].name));
+	  gtk_widget_set_tooltip_text (widget, _(attrs[j].help_text));
 	  break;
 
 	case HID_Enum:
@@ -245,7 +241,7 @@ ghid_attribute_dialog (HID_Attribute * attrs,
 
         do_enum:
 	  combo = gtk_combo_box_new_text ();
-	  gtk_widget_set_tooltip_text (combo, attrs[j].help_text);
+	  gtk_widget_set_tooltip_text (combo, _(attrs[j].help_text));
 	  gtk_box_pack_start (GTK_BOX (hbox), combo, FALSE, FALSE, 0);
 	  g_signal_connect (G_OBJECT (combo), "changed",
 			    G_CALLBACK (enum_changed_cb),
@@ -265,7 +261,7 @@ ghid_attribute_dialog (HID_Attribute * attrs,
 	    }
 	  gtk_combo_box_set_active (GTK_COMBO_BOX (combo),
 				    attrs[j].default_val.int_value);
-	  widget = gtk_label_new (attrs[j].name);
+	  widget = gtk_label_new (_(attrs[j].name));
 	  gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
 	  break;
 
@@ -283,13 +279,13 @@ ghid_attribute_dialog (HID_Attribute * attrs,
 			    0,
 			    dblspinner_changed_cb,
 			    &(attrs[j].default_val.real_value), FALSE, NULL);
-	  gtk_widget_set_tooltip_text (widget, attrs[j].help_text);
+	  gtk_widget_set_tooltip_text (widget, _(attrs[j].help_text));
 
           goto do_enum;
 	  break;
 
 	case HID_Path:
-	  vbox1 = ghid_category_vbox (vbox, attrs[j].name, 4, 2, TRUE, TRUE);
+	  vbox1 = ghid_category_vbox (vbox, _(attrs[j].name), 4, 2, TRUE, TRUE);
 	  entry = gtk_entry_new ();
 	  gtk_box_pack_start (GTK_BOX (vbox1), entry, FALSE, FALSE, 0);
 	  gtk_entry_set_text (GTK_ENTRY (entry),
@@ -298,7 +294,7 @@ ghid_attribute_dialog (HID_Attribute * attrs,
 			    G_CALLBACK (entry_changed_cb),
 			    &(attrs[j].default_val.str_value));
 
-	  gtk_widget_set_tooltip_text (entry, attrs[j].help_text);
+	  gtk_widget_set_tooltip_text (entry, _(attrs[j].help_text));
 	  break;
 
 	case HID_Unit:
@@ -309,7 +305,7 @@ ghid_attribute_dialog (HID_Attribute * attrs,
 	  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
 
 	  combo = gtk_combo_box_new_text ();
-	  gtk_widget_set_tooltip_text (combo, attrs[j].help_text);
+	  gtk_widget_set_tooltip_text (combo, _(attrs[j].help_text));
 	  gtk_box_pack_start (GTK_BOX (hbox), combo, FALSE, FALSE, 0);
 	  g_signal_connect (G_OBJECT (combo), "changed",
 			    G_CALLBACK (enum_changed_cb),
@@ -324,11 +320,11 @@ ghid_attribute_dialog (HID_Attribute * attrs,
 					unit_list[i].in_suffix);
 	  gtk_combo_box_set_active (GTK_COMBO_BOX (combo),
 				    attrs[j].default_val.int_value);
-	  widget = gtk_label_new (attrs[j].name);
+	  widget = gtk_label_new (_(attrs[j].name));
 	  gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
           break;
 	default:
-	  printf ("%s: unknown type of HID attribute\n", __FUNCTION__);
+	  printf (_("%s: unknown type of HID attribute\n"), __FUNCTION__);
 	  break;
 	}
     }
@@ -383,7 +379,7 @@ ghid_dialog_print (HID *hid)
       results = (HID_Attr_Val *) malloc (n * sizeof (HID_Attr_Val));
       if (results == NULL)
 	{
-	  fprintf (stderr, "%s() -- malloc failed\n", __FUNCTION__);
+	  fprintf (stderr, _("%s() -- malloc failed\n"), __FUNCTION__);
 	  exit (1);
 	}
       
@@ -446,7 +442,7 @@ ghid_dialog_export (void)
       if (hids[i]->exporter)
 	{
 	  no_exporter = FALSE;
-	  button = gtk_button_new_with_label (hids[i]->name);
+	  button = gtk_button_new_with_label (_(hids[i]->name));
 	  gtk_widget_set_tooltip_text (button, hids[i]->description);
 	  gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
 	  g_signal_connect (G_OBJECT (button), "clicked",
diff --git a/src/hid/gtk/gui-dialog.c b/src/hid/gtk/gui-dialog.c
index 1770bba..56e0d25 100644
--- a/src/hid/gtk/gui-dialog.c
+++ b/src/hid/gtk/gui-dialog.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -42,8 +40,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 /* ---------------------------------------------- */
 gchar *
 ghid_dialog_input (const char * prompt, const char * initial)
@@ -55,7 +51,7 @@ ghid_dialog_input (const char * prompt, const char * initial)
   gboolean response;
   GHidPort *out = &ghid_port;
 
-  dialog = gtk_dialog_new_with_buttons ("PCB User Input",
+  dialog = gtk_dialog_new_with_buttons (_("PCB User Input"),
 					GTK_WINDOW (out->top_window),
 					GTK_DIALOG_MODAL,
 					GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
@@ -69,7 +65,7 @@ ghid_dialog_input (const char * prompt, const char * initial)
 
   gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
   gtk_label_set_markup (GTK_LABEL (label),
-			prompt ? prompt : "Enter something");
+			prompt ? prompt : _("Enter something"));
 
   entry = gtk_entry_new ();
   if (initial)
@@ -119,13 +115,13 @@ ghid_dialog_confirm_all (gchar * all_message)
   gint response;
   GHidPort *out = &ghid_port;
 
-  dialog = gtk_dialog_new_with_buttons ("Confirm",
+  dialog = gtk_dialog_new_with_buttons (_("Confirm"),
 					GTK_WINDOW (out->top_window),
 					(GtkDialogFlags)(GTK_DIALOG_MODAL |
 							 GTK_DIALOG_DESTROY_WITH_PARENT),
 					GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
 					GTK_STOCK_OK, GTK_RESPONSE_OK,
-					"Sequence OK",
+					_("Sequence OK"),
 					GUI_DIALOG_RESPONSE_ALL, NULL);
 
   content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
@@ -334,6 +330,13 @@ ghid_dialog_file_select_open (gchar * title, gchar ** path, gchar * shortcuts)
 
   if (path && *path)
     gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), *path);
+  else
+  {
+	gchar *default_path;
+	default_path = g_get_current_dir();
+	gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), default_path);
+	g_free(default_path);
+  }
 
   if (shortcuts && *shortcuts)
     {
@@ -365,6 +368,90 @@ ghid_dialog_file_select_open (gchar * title, gchar ** path, gchar * shortcuts)
   return result;
 }
 
+
+/* ---------------------------------------------- */
+/* Caller must g_slist_free() the returned list .*/
+GSList *
+ghid_dialog_file_select_multiple(gchar * title, gchar ** path, gchar * shortcuts)
+{
+  GtkWidget *dialog;
+  GSList *result = NULL;
+  gchar *folder, *seed;
+  GHidPort *out = &ghid_port;
+  GtkFileFilter *no_filter;
+
+  dialog = gtk_file_chooser_dialog_new (title,
+					GTK_WINDOW (out->top_window),
+					GTK_FILE_CHOOSER_ACTION_OPEN,
+					GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+					GTK_STOCK_OK, GTK_RESPONSE_OK,
+					NULL);
+
+  gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+
+  gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER (dialog), TRUE);
+
+  /* add a default filter for not filtering files */
+  no_filter = gtk_file_filter_new ();
+  gtk_file_filter_set_name (no_filter, "all");
+  gtk_file_filter_add_pattern (no_filter, "*.*");
+  gtk_file_filter_add_pattern (no_filter, "*");
+  gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), no_filter);
+
+  /* in case we have a dialog for loading schematic files */
+  if (strcmp (title, _("Load schematics")) == 0)
+  {
+    /* add a filter for schematic files */
+    GtkFileFilter *sch_filter;
+    sch_filter = gtk_file_filter_new ();
+    gtk_file_filter_set_name (sch_filter, "sch");
+    gtk_file_filter_add_mime_type (sch_filter, "application/x-geda-schematic");
+    gtk_file_filter_add_pattern (sch_filter, "*.sch");
+    gtk_file_filter_add_pattern (sch_filter, "*.SCH");
+    gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), sch_filter);
+  }
+
+  if (path && *path)
+    gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), *path);
+  else
+  {
+	gchar *default_path;
+	default_path = g_get_current_dir();
+	gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), default_path);
+	g_free(default_path);
+  }
+
+  if (shortcuts && *shortcuts)
+    {
+      folder = g_strdup (shortcuts);
+      seed = folder;
+      while ((folder = strtok (seed, ":")) != NULL)
+	{
+	  gtk_file_chooser_add_shortcut_folder (GTK_FILE_CHOOSER (dialog),
+						folder, NULL);
+	  seed = NULL;
+	}
+      g_free (folder);
+    }
+
+  if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK)
+    {
+      result = gtk_file_chooser_get_filenames (GTK_FILE_CHOOSER (dialog));
+      folder =
+	gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (dialog));
+      if (folder && path)
+	{
+	  dup_string (path, folder);
+	  g_free (folder);
+	}
+    }
+  gtk_widget_destroy (dialog);
+
+
+  return result;
+}
+
+
 /* ---------------------------------------------- */
 /* Caller must g_free() the returned filename. */
 gchar *
@@ -388,6 +475,13 @@ ghid_dialog_file_select_save (gchar * title, gchar ** path, gchar * file,
 
   if (path && *path && **path)
     gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), *path);
+  else
+  {
+	gchar *default_path;
+	default_path = g_get_current_dir();
+	gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), default_path);
+	g_free(default_path);
+  }
 
   if (file && *file)
     {
@@ -460,7 +554,7 @@ ghid_fileselect (const char *title, const char *descr,
   gchar *path = NULL, *base = NULL;
   int history_pool = -1;
   int i;
- 
+
   if (history_tag && *history_tag)
     {
       /* 
@@ -527,6 +621,13 @@ ghid_fileselect (const char *title, const char *descr,
       gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), path);
       g_free (path);
     }
+  else
+	{
+	  gchar *default_path;
+	  default_path = g_get_current_dir();
+	  gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), default_path);
+	  g_free(default_path);
+	}
 
   if (base && *base)
     {
diff --git a/src/hid/gtk/gui-drc-window.c b/src/hid/gtk/gui-drc-window.c
index ce0210c..981624c 100644
--- a/src/hid/gtk/gui-drc-window.c
+++ b/src/hid/gtk/gui-drc-window.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -33,6 +31,7 @@
 #include "error.h"
 #include "search.h"
 #include "draw.h"
+#include "find.h"
 #include "pcb-printf.h"
 #include "undo.h"
 #include "set.h"
@@ -47,8 +46,6 @@
 #define VIOLATION_PIXMAP_PIXEL_BORDER 5
 #define VIOLATION_PIXMAP_PCB_SIZE     MIL_TO_COORD (100)
 
-RCSID ("$Id$");
-
 static GtkWidget *drc_window, *drc_list;
 static GtkListStore *drc_list_model = NULL;
 static int num_violations = 0;
@@ -95,104 +92,6 @@ enum {
 
 
 static void
-unset_found_flags (int AndDraw)
-{
-  int flag = FOUNDFLAG;
-  int change = 0;
-
-  VIA_LOOP (PCB->Data);
-  {
-    if (TEST_FLAG (flag, via))
-      {
-	AddObjectToFlagUndoList (VIA_TYPE, via, via, via);
-	CLEAR_FLAG (flag, via);
-	DrawVia (via);
-	change = true;
-      }
-  }
-  END_LOOP;
-  ELEMENT_LOOP (PCB->Data);
-  {
-    PIN_LOOP (element);
-    {
-      if (TEST_FLAG (flag, pin))
-	{
-	  AddObjectToFlagUndoList (PIN_TYPE, element, pin, pin);
-	  CLEAR_FLAG (flag, pin);
-	  DrawPin (pin);
-	  change = true;
-	}
-    }
-    END_LOOP;
-    PAD_LOOP (element);
-    {
-      if (TEST_FLAG (flag, pad))
-	{
-	  AddObjectToFlagUndoList (PAD_TYPE, element, pad, pad);
-	  CLEAR_FLAG (flag, pad);
-	  DrawPad (pad);
-	  change = true;
-	}
-    }
-    END_LOOP;
-  }
-  END_LOOP;
-  RAT_LOOP (PCB->Data);
-  {
-    if (TEST_FLAG (flag, line))
-      {
-	AddObjectToFlagUndoList (RATLINE_TYPE, line, line, line);
-	CLEAR_FLAG (flag, line);
-	DrawRat (line);
-	change = true;
-      }
-  }
-  END_LOOP;
-  COPPERLINE_LOOP (PCB->Data);
-  {
-    if (TEST_FLAG (flag, line))
-      {
-	AddObjectToFlagUndoList (LINE_TYPE, layer, line, line);
-	CLEAR_FLAG (flag, line);
-	DrawLine (layer, line);
-	change = true;
-      }
-  }
-  ENDALL_LOOP;
-  COPPERARC_LOOP (PCB->Data);
-  {
-    if (TEST_FLAG (flag, arc))
-      {
-	AddObjectToFlagUndoList (ARC_TYPE, layer, arc, arc);
-	CLEAR_FLAG (flag, arc);
-	DrawArc (layer, arc);
-	change = true;
-      }
-  }
-  ENDALL_LOOP;
-  COPPERPOLYGON_LOOP (PCB->Data);
-  {
-    if (TEST_FLAG (flag, polygon))
-      {
-	AddObjectToFlagUndoList (POLYGON_TYPE, layer, polygon, polygon);
-	CLEAR_FLAG (flag, polygon);
-	DrawPolygon (layer, polygon);
-	change = true;
-      }
-  }
-  ENDALL_LOOP;
-  if (change)
-    {
-      SetChangedFlag (true);
-      if (AndDraw)
-	{
-	  IncrementUndoSerialNumber ();
-	  Draw ();
-	}
-    }
-}
-
-static void
 selection_changed_cb (GtkTreeSelection *selection, gpointer user_data)
 {
   GtkTreeModel *model;
@@ -202,7 +101,11 @@ selection_changed_cb (GtkTreeSelection *selection, gpointer user_data)
 
   if (!gtk_tree_selection_get_selected (selection, &model, &iter))
     {
-      unset_found_flags (true);
+      if (ClearFlagOnAllObjects (true, FOUNDFLAG))
+        {
+          IncrementUndoSerialNumber ();
+          Draw ();
+        }
       return;
     }
 
@@ -212,7 +115,7 @@ selection_changed_cb (GtkTreeSelection *selection, gpointer user_data)
 
   gtk_tree_model_get (model, &iter, DRC_VIOLATION_OBJ_COL, &violation, -1);
 
-  unset_found_flags (false);
+  ClearFlagOnAllObjects (true, FOUNDFLAG);
 
   if (violation == NULL)
     return;
@@ -240,7 +143,7 @@ selection_changed_cb (GtkTreeSelection *selection, gpointer user_data)
 	case LINE_TYPE:
 	case ARC_TYPE:
 	case POLYGON_TYPE:
-	  ChangeGroupVisibility (GetLayerNumber (PCB->Data, (LayerTypePtr) ptr1), true, true);
+	  ChangeGroupVisibility (GetLayerNumber (PCB->Data, (LayerType *) ptr1), true, true);
 	}
       DrawObject (object_type, ptr1, ptr2);
     }
@@ -630,13 +533,13 @@ ghid_violation_renderer_set_property (GObject * object, guint property_id,
 
   if (renderer->violation->have_measured)
     {
-      markup = pcb_g_strdup_printf ("%m+<b>%s (%$mS)</b>\n"
+      markup = pcb_g_strdup_printf (_("%m+<b>%s (%$mS)</b>\n"
 				"<span size='1024'> </span>\n"
 				"<small>"
 				  "<i>%s</i>\n"
 				  "<span size='5120'> </span>\n"
 				  "Required: %$mS"
-				"</small>",
+				"</small>"),
                                 Settings.grid_unit->allow,
 				renderer->violation->title,
 				renderer->violation->measured_value,
@@ -645,13 +548,13 @@ ghid_violation_renderer_set_property (GObject * object, guint property_id,
     }
   else
     {
-      markup = pcb_g_strdup_printf ("%m+<b>%s</b>\n"
+      markup = pcb_g_strdup_printf (_("%m+<b>%s</b>\n"
 				"<span size='1024'> </span>\n"
 				"<small>"
 				  "<i>%s</i>\n"
 				  "<span size='5120'> </span>\n"
 				  "Required: %$mS"
-				"</small>",
+				"</small>"),
                                 Settings.grid_unit->allow,
 				renderer->violation->title,
 				renderer->violation->explanation,
diff --git a/src/hid/gtk/gui-drc-window.h b/src/hid/gtk/gui-drc-window.h
index 8b3558a..367cb8f 100644
--- a/src/hid/gtk/gui-drc-window.h
+++ b/src/hid/gtk/gui-drc-window.h
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
diff --git a/src/hid/gtk/gui-icons-misc.data b/src/hid/gtk/gui-icons-misc.data
index 0d121b9..f0d2ec7 100644
--- a/src/hid/gtk/gui-icons-misc.data
+++ b/src/hid/gtk/gui-icons-misc.data
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 
diff --git a/src/hid/gtk/gui-icons-mode-buttons.data b/src/hid/gtk/gui-icons-mode-buttons.data
index be040f1..19e9ce8 100644
--- a/src/hid/gtk/gui-icons-mode-buttons.data
+++ b/src/hid/gtk/gui-icons-mode-buttons.data
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
diff --git a/src/hid/gtk/gui-keyref-window.c b/src/hid/gtk/gui-keyref-window.c
index 6eaf3eb..e2632ca 100644
--- a/src/hid/gtk/gui-keyref-window.c
+++ b/src/hid/gtk/gui-keyref-window.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -38,8 +36,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 static GtkWidget *keyref_window;
 
 
diff --git a/src/hid/gtk/gui-library-window.c b/src/hid/gtk/gui-library-window.c
index 74b55e9..1d22dd4 100644
--- a/src/hid/gtk/gui-library-window.c
+++ b/src/hid/gtk/gui-library-window.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -69,8 +67,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 static GtkWidget *library_window;
 
 #include "gui-pinout-preview.h"
@@ -387,8 +383,11 @@ library_window_callback_tree_selection_changed (GtkTreeSelection * selection,
   if (entry->Template == (char *) -1)
     {
       if (LoadElementToBuffer (PASTEBUFFER, entry->AllocatedMemory, true))
-	SetMode (PASTEBUFFER_MODE);
-      goto out;
+        {
+          SetMode (PASTEBUFFER_MODE);
+          goto out;
+        }
+      return;
     }
 
   /* Otherwise, it's a m4 element and we need to create a string of
@@ -399,8 +398,14 @@ library_window_callback_tree_selection_changed (GtkTreeSelection * selection,
 			     EMPTY (entry->Value), EMPTY (entry->Package));
 
   if (LoadElementToBuffer (PASTEBUFFER, m4_args, false))
-    SetMode (PASTEBUFFER_MODE);
+    {
+      SetMode (PASTEBUFFER_MODE);
+      g_free (m4_args);
+      goto out;
+    }
+
   g_free (m4_args);
+  return;
 
 out:
 
diff --git a/src/hid/gtk/gui-log-window.c b/src/hid/gtk/gui-log-window.c
index 01daaee..46413c1 100644
--- a/src/hid/gtk/gui-log-window.c
+++ b/src/hid/gtk/gui-log-window.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -40,8 +38,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 static GtkWidget *log_window, *log_text;
 static gboolean log_show_on_append = FALSE;
 
diff --git a/src/hid/gtk/gui-misc.c b/src/hid/gtk/gui-misc.c
index 0f8daf7..64a6011 100644
--- a/src/hid/gtk/gui-misc.c
+++ b/src/hid/gtk/gui-misc.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -43,8 +41,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 #define CUSTOM_CURSOR_CLOCKWISE		(GDK_LAST_CURSOR + 10)
 #define CUSTOM_CURSOR_DRAG			(GDK_LAST_CURSOR + 11)
 #define CUSTOM_CURSOR_LOCK			(GDK_LAST_CURSOR + 12)
@@ -328,7 +324,10 @@ run_get_location_loop (const gchar * message)
 		      G_CALLBACK (loop_key_press_cb), &loop);
 
   loop = g_main_loop_new (NULL, FALSE);
+
+  GDK_THREADS_LEAVE ();
   g_main_loop_run (loop);
+  GDK_THREADS_ENTER ();
 
   g_main_loop_unref (loop);
 
@@ -413,7 +412,7 @@ ghid_set_status_line_label (void)
           "<b>text</b>=%i%%  "
           "<b>buffer</b>=#%i"),
       Settings.grid_unit->allow,
-      Settings.ShowSolderSide ? _("solder") : _("component"),
+      Settings.ShowSolderSide ? C_("status", "bottom") : C_("status", "top"),
       PCB->Grid,
       flag, TEST_FLAG (RUBBERBANDFLAG, PCB) ? ",R  " : "  ",
       Settings.LineThickness,
@@ -442,17 +441,17 @@ ghid_set_cursor_position_labels (void)
       Coord r  = Distance (Crosshair.X, Crosshair.Y, Marked.X, Marked.Y);
       double a = atan2 (dy, dx) * RAD_TO_DEG;
 
-      text = pcb_g_strdup_printf ("%m+r %-mS; phi %-.1f; %-mS %-mS",
+      text = pcb_g_strdup_printf (_("%m+r %-mS; phi %-.1f; %-mS %-mS"),
                                   Settings.grid_unit->allow,
                                   r, a, dx, dy);
       ghid_cursor_position_relative_label_set_text (text);
       g_free (text);
     }
   else
-    ghid_cursor_position_relative_label_set_text ("r __.__; phi __._; __.__ __.__");
-
+    ghid_cursor_position_relative_label_set_text (
+                                  _("r __.__; phi __._; __.__ __.__"));
 
-  text = pcb_g_strdup_printf ("%m+%-mS %-mS",
+  text = pcb_g_strdup_printf (_("%m+%-mS %-mS"),
                               Settings.grid_unit->allow,
                               Crosshair.X, Crosshair.Y);
   ghid_cursor_position_label_set_text (text);
diff --git a/src/hid/gtk/gui-netlist-window.c b/src/hid/gtk/gui-netlist-window.c
index 35b5427..58fe107 100644
--- a/src/hid/gtk/gui-netlist-window.c
+++ b/src/hid/gtk/gui-netlist-window.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -64,14 +62,11 @@
 
 #define NET_HIERARCHY_SEPARATOR "/"
 
-RCSID ("$Id$");
-
 static GtkWidget	*netlist_window;
 static GtkWidget	*disable_all_button;
 
 static GtkTreeModel *node_model;
 static GtkTreeView *node_treeview;
-static GtkTreeSelection *node_selection;
 
 static gboolean selection_holdoff;
 
@@ -284,7 +279,7 @@ node_selection_changed_cb (GtkTreeSelection * selection, gpointer data)
     switch (conn.type) {
       case PIN_TYPE:
         {
-          PinTypePtr pin = (PinTypePtr) conn.ptr2;
+          PinType *pin = (PinType *) conn.ptr2;
           x = pin->X;
           y = pin->Y;
           gui->set_crosshair (x, y, 0);
@@ -293,9 +288,9 @@ node_selection_changed_cb (GtkTreeSelection * selection, gpointer data)
         }
       case PAD_TYPE:
         {
-          PadTypePtr pad = (PadTypePtr) conn.ptr2;
+          PadType *pad = (PadType *) conn.ptr2;
           x = pad->Point1.X + (pad->Point2.X - pad->Point1.X) / 2;
-          y = pad->Point1.Y + (pad->Point2.Y - pad->Point2.Y) / 2;
+          y = pad->Point1.Y + (pad->Point2.Y - pad->Point1.Y) / 2;
           gui->set_crosshair (x, y, 0);
           ghid_lead_user_to_location (x, y);
           break;
@@ -541,14 +536,14 @@ netlist_select_cb (GtkWidget * widget, gpointer data)
     node_selected_net = NULL;
 
   InitConnectionLookup ();
-  ResetConnections (true);
+  ClearFlagOnAllObjects (true, FOUNDFLAG);
 
   for (i = selected_net->EntryN, entry = selected_net->Entry; i; i--, entry++)
     if (SeekPad (entry, &conn, false))
-      RatFindHook (conn.type, conn.ptr1, conn.ptr2, conn.ptr2, true, true);
+      RatFindHook (conn.type, conn.ptr1, conn.ptr2, conn.ptr2, true, FOUNDFLAG, true);
 
-  SelectConnection (select_flag);
-  ResetConnections (false);
+  SelectByFlag (FOUNDFLAG, select_flag);
+  ClearFlagOnAllObjects (false, FOUNDFLAG);
   FreeConnectionLookupMemory ();
   IncrementUndoSerialNumber ();
   Draw ();
@@ -701,15 +696,9 @@ ghid_netlist_window_create (GHidPort * out)
   GtkWidget *vbox, *hbox, *button, *label, *sep;
   GtkTreeView *treeview;
   GtkTreeModel *model;
-  GtkTreeSelection *selection;
   GtkCellRenderer *renderer;
   GtkTreeViewColumn *column;
 
-  /* No point in putting up the window if no netlist is loaded.
-   */
-  if (!PCB->NetlistLib.MenuN)
-    return;
-
   if (netlist_window)
     return;
 
@@ -760,10 +749,10 @@ ghid_netlist_window_create (GHidPort * out)
    */
   gtk_tree_view_expand_all (treeview);
 
-  selection = ghid_scrolled_selection (treeview, hbox,
-				       GTK_SELECTION_SINGLE,
-				       GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC,
-				       net_selection_changed_cb, NULL);
+  ghid_scrolled_selection (treeview, hbox,
+                           GTK_SELECTION_SINGLE,
+                           GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC,
+                           net_selection_changed_cb, NULL);
 
   /* Connect to the double click event.
    */
@@ -785,11 +774,10 @@ ghid_netlist_window_create (GHidPort * out)
 					       "text", NODE_NAME_COLUMN,
 					       NULL);
 
-  selection = ghid_scrolled_selection (treeview, hbox,
-				       GTK_SELECTION_SINGLE,
-				       GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC,
-				       node_selection_changed_cb, NULL);
-  node_selection = selection;
+  ghid_scrolled_selection (treeview, hbox,
+                           GTK_SELECTION_SINGLE,
+                           GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC,
+                           node_selection_changed_cb, NULL);
 
   hbox = gtk_hbox_new (FALSE, 0);
   gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
@@ -800,7 +788,7 @@ ghid_netlist_window_create (GHidPort * out)
   hbox = gtk_hbox_new (FALSE, 0);
   gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 4);
 
-  button = gtk_button_new_with_label (_("Select"));
+  button = gtk_button_new_with_label (C_("netlist", "Select"));
   gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
   g_signal_connect (G_OBJECT (button), "clicked",
 		    G_CALLBACK (netlist_select_cb), GINT_TO_POINTER (1));
@@ -1016,6 +1004,15 @@ ghid_netlist_window_update (gboolean init_nodes)
 static gint
 GhidNetlistChanged (int argc, char **argv, Coord x, Coord y)
 {
+  /* XXX: We get called before the GUI is up when
+   *         exporting from the command-line. */
+  if (ghidgui == NULL || !ghidgui->is_up)
+    return 0;
+
+  /* There is no need to update if the netlist window isn't open */
+  if (netlist_window == NULL)
+    return 0;
+
   loading_new_netlist = TRUE;
   ghid_netlist_window_update (TRUE);
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (disable_all_button),
diff --git a/src/hid/gtk/gui-output-events.c b/src/hid/gtk/gui-output-events.c
index 20e8e03..cc612c4 100644
--- a/src/hid/gtk/gui-output-events.c
+++ b/src/hid/gtk/gui-output-events.c
@@ -409,11 +409,12 @@ describe_location (Coord X, Coord Y)
 
   /* don't mess with silk objects! */
   if (type & SILK_TYPE &&
-      GetLayerNumber (PCB->Data, (LayerTypePtr) ptr1) >= max_copper_layer)
+      GetLayerNumber (PCB->Data, (LayerType *) ptr1) >= max_copper_layer)
     return NULL;
 
   if (type == PIN_TYPE || type == PAD_TYPE)
-    elename = (char *)UNKNOWN (NAMEONPCB_NAME ((ElementTypePtr) ptr1));
+    elename = (char *)UNKNOWN_NAME (NAMEONPCB_NAME ((ElementType *) ptr1),
+	_("--"));
 
   pinname = ConnectionName (type, ptr1, ptr2);
 
@@ -445,12 +446,12 @@ describe_location (Coord X, Coord Y)
   }
   END_LOOP;
 
-  description = g_strdup_printf ("Element name: %s\n"
+  description = g_strdup_printf (_("Element name: %s\n"
                                  "Pinname : %s\n"
-                                 "Netname : %s",
+                                 "Netname : %s"),
                                  elename,
-                                 (pinname != NULL) ? pinname : "--",
-                                 (netname != NULL) ? netname : "--");
+                                 (pinname != NULL) ? pinname : _("--"),
+                                 (netname != NULL) ? netname : _("--"));
 
   g_free (netname);
 
diff --git a/src/hid/gtk/gui-pinout-preview.c b/src/hid/gtk/gui-pinout-preview.c
index 79fc0f2..2e0f2cd 100644
--- a/src/hid/gtk/gui-pinout-preview.c
+++ b/src/hid/gtk/gui-pinout-preview.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -49,8 +47,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 /* Just define a sensible scale, lets say (for example), 100 pixel per 150 mil */
 #define SENSIBLE_VIEW_SCALE  (100. / MIL_TO_COORD (150.))
 static void
@@ -58,21 +54,27 @@ pinout_set_view (GhidPinoutPreview * pinout)
 {
   float scale = SENSIBLE_VIEW_SCALE;
 
-  pinout->x_max = pinout->element.BoundingBox.X2 + Settings.PinoutOffsetX;
-  pinout->y_max = pinout->element.BoundingBox.Y2 + Settings.PinoutOffsetY;
-  pinout->w_pixels = scale * (pinout->element.BoundingBox.X2 -
-                              pinout->element.BoundingBox.X1);
-  pinout->h_pixels = scale * (pinout->element.BoundingBox.Y2 -
-                              pinout->element.BoundingBox.Y1);
+  pinout->x_max = pinout->element->BoundingBox.X2 + Settings.PinoutOffsetX;
+  pinout->y_max = pinout->element->BoundingBox.Y2 + Settings.PinoutOffsetY;
+  pinout->w_pixels = scale * (pinout->element->BoundingBox.X2 -
+                              pinout->element->BoundingBox.X1);
+  pinout->h_pixels = scale * (pinout->element->BoundingBox.Y2 -
+                              pinout->element->BoundingBox.Y1);
 }
 
 
 static void
 pinout_set_data (GhidPinoutPreview * pinout, ElementType * element)
 {
+  if (pinout->element != NULL)
+    {
+      FreeElementMemory (pinout->element);
+      g_slice_free (ElementType, pinout->element);
+      pinout->element = NULL;
+    }
+
   if (element == NULL)
     {
-      FreeElementMemory (&pinout->element);
       pinout->w_pixels = 0;
       pinout->h_pixels = 0;
       return;
@@ -84,35 +86,35 @@ pinout_set_data (GhidPinoutPreview * pinout, ElementType * element)
    * move element to a 5% offset from zero position
    * set all package lines/arcs to zero width
    */
-  CopyElementLowLevel (NULL, &pinout->element, element, FALSE, 0, 0);
-  PIN_LOOP (&pinout->element);
+  pinout->element = CopyElementLowLevel (NULL, element, FALSE, 0, 0, FOUNDFLAG);
+  PIN_LOOP (pinout->element);
   {
     SET_FLAG (DISPLAYNAMEFLAG, pin);
   }
   END_LOOP;
 
-  PAD_LOOP (&pinout->element);
+  PAD_LOOP (pinout->element);
   {
     SET_FLAG (DISPLAYNAMEFLAG, pad);
   }
   END_LOOP;
 
 
-  MoveElementLowLevel (NULL, &pinout->element,
+  MoveElementLowLevel (NULL, pinout->element,
 		       Settings.PinoutOffsetX -
-		       pinout->element.BoundingBox.X1,
+		       pinout->element->BoundingBox.X1,
 		       Settings.PinoutOffsetY -
-		       pinout->element.BoundingBox.Y1);
+		       pinout->element->BoundingBox.Y1);
 
   pinout_set_view (pinout);
 
-  ELEMENTLINE_LOOP (&pinout->element);
+  ELEMENTLINE_LOOP (pinout->element);
   {
     line->Thickness = 0;
   }
   END_LOOP;
 
-  ARC_LOOP (&pinout->element);
+  ARC_LOOP (pinout->element);
   {
     /* 
      * for whatever reason setting a thickness of 0 causes the arcs to
diff --git a/src/hid/gtk/gui-pinout-preview.h b/src/hid/gtk/gui-pinout-preview.h
index 77fdd1b..754e557 100644
--- a/src/hid/gtk/gui-pinout-preview.h
+++ b/src/hid/gtk/gui-pinout-preview.h
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -51,7 +49,7 @@ struct _GhidPinoutPreview
 {
   GtkDrawingArea parent_instance;
 
-  ElementType element;		/* element data to display */
+  ElementType *element;		/* element data to display */
   gint x_max, y_max;
   gint w_pixels, h_pixels;	/* natural size of element preview */
 };
diff --git a/src/hid/gtk/gui-pinout-window.c b/src/hid/gtk/gui-pinout-window.c
index 6433fb1..ea6e8bb 100644
--- a/src/hid/gtk/gui-pinout-window.c
+++ b/src/hid/gtk/gui-pinout-window.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -49,9 +47,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
-
 static void
 pinout_close_cb (GtkWidget * widget, GtkWidget *top_window)
 {
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 98bfcfe..6ab819f 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -123,13 +121,12 @@ a zoom in/out.
 
 #include "gui-icons-mode-buttons.data"
 #include "gui-icons-misc.data"
+#include "gui-trackball.h"
 
 #ifdef HAVE_LIBDMALLOC
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 static bool ignore_layer_update;
 
 static GtkWidget *ghid_load_menus (void);
@@ -269,8 +266,8 @@ show_file_modified_externally_prompt (void)
 
   file_path_utf8 = g_filename_to_utf8 (PCB->Filename, -1, NULL, NULL, NULL);
 
-  secondary_text = PCB->Changed ? "Do you want to drop your changes and reload the file?" :
-                                  "Do you want to reload the file?";
+  secondary_text = PCB->Changed ? _("Do you want to drop your changes and reload the file?") :
+                                  _("Do you want to reload the file?");
 
   markup =  g_markup_printf_escaped (_("<b>The file %s has changed on disk</b>\n\n%s"),
                                      file_path_utf8, secondary_text);
@@ -553,6 +550,33 @@ layer_selector_select_callback (GHidLayerSelector *ls, int layer, gpointer d)
   ghid_invalidate_all ();
 }
 
+/*! \brief Callback for GHidLayerSelector layer renaming */
+static void
+layer_selector_rename_callback (GHidLayerSelector *ls,
+                                int layer_id,
+                                char *new_name,
+                                void *userdata)
+{
+  LayerType *layer = LAYER_PTR (layer_id);
+
+  /* Check for a legal layer name - for now, allow anything non-empty */
+  if (new_name[0] == '\0')
+    return;
+
+  /* Don't bother if the name is identical to the current one */
+  if (strcmp (layer->Name, new_name) == 0)
+    return;
+
+  free (layer->Name);
+  layer->Name = strdup (new_name);
+  ghid_layer_buttons_update ();
+  if (!PCB->Changed)
+    {
+      SetChangedFlag (true);
+      ghid_window_set_name_label (PCB->Name);
+    }
+}
+
 /*! \brief Callback for GHidLayerSelector layer toggling */
 static void
 layer_selector_toggle_callback (GHidLayerSelector *ls, int layer, gpointer d)
@@ -772,22 +796,22 @@ make_virtual_layer_buttons (GtkWidget *layer_selector)
  
   layer_process (&color_string, &text, &active, LAYER_BUTTON_SILK);
   ghid_layer_selector_add_layer (layersel, LAYER_BUTTON_SILK,
-                                 text, color_string, active, TRUE);
+                                 text, color_string, active, TRUE, FALSE);
   layer_process (&color_string, &text, &active, LAYER_BUTTON_RATS);
   ghid_layer_selector_add_layer (layersel, LAYER_BUTTON_RATS,
-                                 text, color_string, active, TRUE);
+                                 text, color_string, active, TRUE, FALSE);
   layer_process (&color_string, &text, &active, LAYER_BUTTON_PINS);
   ghid_layer_selector_add_layer (layersel, LAYER_BUTTON_PINS,
-                                 text, color_string, active, FALSE);
+                                 text, color_string, active, FALSE, FALSE);
   layer_process (&color_string, &text, &active, LAYER_BUTTON_VIAS);
   ghid_layer_selector_add_layer (layersel, LAYER_BUTTON_VIAS,
-                                 text, color_string, active, FALSE);
+                                 text, color_string, active, FALSE, FALSE);
   layer_process (&color_string, &text, &active, LAYER_BUTTON_FARSIDE);
   ghid_layer_selector_add_layer (layersel, LAYER_BUTTON_FARSIDE,
-                                 text, color_string, active, FALSE);
+                                 text, color_string, active, FALSE, FALSE);
   layer_process (&color_string, &text, &active, LAYER_BUTTON_MASK);
   ghid_layer_selector_add_layer (layersel, LAYER_BUTTON_MASK,
-                                 text, color_string, active, FALSE);
+                                 text, color_string, active, FALSE, FALSE);
 }
 
 /*! \brief callback for ghid_layer_selector_update_colors */
@@ -821,7 +845,7 @@ make_layer_buttons (GtkWidget *layersel)
     {
       layer_process (&color_string, &text, &active, i);
       ghid_layer_selector_add_layer (GHID_LAYER_SELECTOR (layersel), i,
-                                     text, color_string, active, TRUE);
+                                     text, color_string, active, TRUE, TRUE);
     }
 }
 
@@ -904,6 +928,9 @@ make_route_style_buttons (GHidRouteStyleSelector *rss)
                     G_CALLBACK (route_style_changed_cb), NULL);
   g_signal_connect (G_OBJECT (rss), "style_edited",
                     G_CALLBACK (route_styles_edited_cb), NULL);
+  ghid_main_menu_install_route_style_selector
+      (GHID_MAIN_MENU (ghidgui->menu_bar),
+       GHID_ROUTE_STYLE_SELECTOR (ghidgui->route_style_selector));
 }
 
 /*
@@ -924,20 +951,20 @@ ModeButton;
 
 
 static ModeButton mode_buttons[] = {
-  {NULL, NULL, 0, 0, "via", VIA_MODE, via},
-  {NULL, NULL, 0, 0, "line", LINE_MODE, line},
-  {NULL, NULL, 0, 0, "arc", ARC_MODE, arc},
-  {NULL, NULL, 0, 0, "text", TEXT_MODE, text},
-  {NULL, NULL, 0, 0, "rectangle", RECTANGLE_MODE, rect},
-  {NULL, NULL, 0, 0, "polygon", POLYGON_MODE, poly},
-  {NULL, NULL, 0, 0, "polygonhole", POLYGONHOLE_MODE, polyhole},
-  {NULL, NULL, 0, 0, "buffer", PASTEBUFFER_MODE, buf},
-  {NULL, NULL, 0, 0, "remove", REMOVE_MODE, del},
-  {NULL, NULL, 0, 0, "rotate", ROTATE_MODE, rot},
-  {NULL, NULL, 0, 0, "insertPoint", INSERTPOINT_MODE, ins},
-  {NULL, NULL, 0, 0, "thermal", THERMAL_MODE, thrm},
-  {NULL, NULL, 0, 0, "select", ARROW_MODE, sel},
-  {NULL, NULL, 0, 0, "lock", LOCK_MODE, lock}
+  {NULL, NULL, 0, 0, N_("via"), VIA_MODE, via},
+  {NULL, NULL, 0, 0, N_("line"), LINE_MODE, line},
+  {NULL, NULL, 0, 0, N_("arc"), ARC_MODE, arc},
+  {NULL, NULL, 0, 0, N_("text"), TEXT_MODE, text},
+  {NULL, NULL, 0, 0, N_("rectangle"), RECTANGLE_MODE, rect},
+  {NULL, NULL, 0, 0, N_("polygon"), POLYGON_MODE, poly},
+  {NULL, NULL, 0, 0, N_("polygonhole"), POLYGONHOLE_MODE, polyhole},
+  {NULL, NULL, 0, 0, N_("buffer"), PASTEBUFFER_MODE, buf},
+  {NULL, NULL, 0, 0, N_("remove"), REMOVE_MODE, del},
+  {NULL, NULL, 0, 0, N_("rotate"), ROTATE_MODE, rot},
+  {NULL, NULL, 0, 0, N_("insertPoint"), INSERTPOINT_MODE, ins},
+  {NULL, NULL, 0, 0, N_("thermal"), THERMAL_MODE, thrm},
+  {NULL, NULL, 0, 0, N_("select"), ARROW_MODE, sel},
+  {NULL, NULL, 0, 0, N_("lock"), LOCK_MODE, lock}
 };
 
 static gint n_mode_buttons = G_N_ELEMENTS (mode_buttons);
@@ -1045,11 +1072,13 @@ make_mode_buttons_and_toolbar (GtkWidget **mode_frame,
 
       /* Create tool button for mode frame */
       mb->button = gtk_radio_button_new (group);
+      gtk_widget_set_tooltip_text (mb->button, _(mb->name));
       group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (mb->button));
       gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (mb->button), FALSE);
 
       /* Create tool button for toolbar */
       mb->toolbar_button = gtk_radio_button_new (toolbar_group);
+      gtk_widget_set_tooltip_text (mb->toolbar_button, _(mb->name));
       toolbar_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (mb->toolbar_button));
       gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (mb->toolbar_button), FALSE);
 
@@ -1215,6 +1244,10 @@ ghid_build_pcb_top_window (void)
   GtkWidget *vbox_main, *hbox_middle, *hbox;
   GtkWidget *vbox, *frame;
   GtkWidget *label;
+  /* FIXME: IFDEF HACK */
+#ifdef ENABLE_GL
+  GtkWidget *trackball;
+#endif
   GHidPort *port = &ghid_port;
   GtkWidget *scrolled;
 
@@ -1248,12 +1281,15 @@ ghid_build_pcb_top_window (void)
   ghidgui->layer_selector = ghid_layer_selector_new ();
   make_layer_buttons (ghidgui->layer_selector);
   make_virtual_layer_buttons (ghidgui->layer_selector);
-  g_signal_connect (G_OBJECT (ghidgui->layer_selector), "select_layer",
+  g_signal_connect (G_OBJECT (ghidgui->layer_selector), "select-layer",
                     G_CALLBACK (layer_selector_select_callback),
                     NULL);
-  g_signal_connect (G_OBJECT (ghidgui->layer_selector), "toggle_layer",
+  g_signal_connect (G_OBJECT (ghidgui->layer_selector), "toggle-layer",
                     G_CALLBACK (layer_selector_toggle_callback),
                     NULL);
+  g_signal_connect (G_OBJECT (ghidgui->layer_selector), "rename-layer",
+                    G_CALLBACK (layer_selector_rename_callback),
+                    NULL);
   /* Build main menu */
   ghidgui->menu_bar = ghid_load_menus ();
   gtk_box_pack_start (GTK_BOX (ghidgui->menubar_toolbar_vbox),
@@ -1290,6 +1326,17 @@ ghid_build_pcb_top_window (void)
   gtk_box_pack_start (GTK_BOX(vbox), ghidgui->layer_selector,
                       FALSE, FALSE, 0);
 
+  /* FIXME: IFDEF HACK */
+#ifdef ENABLE_GL
+  trackball = ghid_trackball_new ();
+  g_signal_connect (trackball, "rotation-changed",
+                    G_CALLBACK (ghid_port_rotate), NULL);
+  g_signal_connect (trackball, "view-2d-changed",
+                    G_CALLBACK (ghid_view_2d), NULL);
+  gtk_box_pack_start (GTK_BOX(ghidgui->left_toolbar),
+                      trackball, FALSE, FALSE, 0);
+#endif
+
   /* ghidgui->mode_buttons_frame was created above in the call to
    * make_mode_buttons_and_toolbar (...);
    */
@@ -1393,8 +1440,6 @@ ghid_build_pcb_top_window (void)
 
   ghid_interface_input_signals_connect ();
 
-  g_signal_connect (G_OBJECT (gport->drawing_area), "scroll_event",
-		    G_CALLBACK (ghid_port_window_mouse_scroll_cb), port);
   g_signal_connect (G_OBJECT (gport->drawing_area), "enter_notify_event",
 		    G_CALLBACK (ghid_port_window_enter_cb), port);
   g_signal_connect (G_OBJECT (gport->drawing_area), "leave_notify_event",
@@ -1426,8 +1471,11 @@ ghid_build_pcb_top_window (void)
      |  During these times normal button/key presses are intercepted, either
      |  by new signal handlers or the command_combo_box entry.
    */
-static gulong button_press_handler, button_release_handler,
-  key_press_handler, key_release_handler;
+static gulong button_press_handler;
+static gulong button_release_handler;
+static gulong scroll_event_handler;
+static gulong key_press_handler;
+static gulong key_release_handler;
 
 void
 ghid_interface_input_signals_connect (void)
@@ -1440,6 +1488,10 @@ ghid_interface_input_signals_connect (void)
     g_signal_connect (G_OBJECT (gport->drawing_area), "button_release_event",
 		      G_CALLBACK (ghid_port_button_release_cb), NULL);
 
+  scroll_event_handler =
+    g_signal_connect (G_OBJECT (gport->drawing_area), "scroll_event",
+		    G_CALLBACK (ghid_port_window_mouse_scroll_cb), NULL);
+
   key_press_handler =
     g_signal_connect (G_OBJECT (gport->drawing_area), "key_press_event",
 		      G_CALLBACK (ghid_port_key_press_cb), NULL);
@@ -1458,15 +1510,20 @@ ghid_interface_input_signals_disconnect (void)
   if (button_release_handler)
     g_signal_handler_disconnect (gport->drawing_area, button_release_handler);
 
+  if (scroll_event_handler)
+    g_signal_handler_disconnect (gport->drawing_area, scroll_event_handler);
+
   if (key_press_handler)
     g_signal_handler_disconnect (gport->drawing_area, key_press_handler);
 
   if (key_release_handler)
     g_signal_handler_disconnect (gport->drawing_area, key_release_handler);
 
-  button_press_handler = button_release_handler = 0;
-  key_press_handler = key_release_handler = 0;
-
+  button_press_handler = 0;
+  button_release_handler = 0;
+  scroll_event_handler = 0;
+  key_press_handler = 0;
+  key_release_handler = 0;
 }
 
 
@@ -1551,7 +1608,7 @@ ghid_listener_cb (GIOChannel *source,
 
   if (condition & G_IO_HUP)
     {
-      gui->log ("Read end of pipe died!\n");
+      gui->log (_("Read end of pipe died!\n"));
       return FALSE;
     }
 
@@ -1566,30 +1623,30 @@ ghid_listener_cb (GIOChannel *source,
 	  break;
 
 	case G_IO_STATUS_ERROR:
-	  gui->log ("ERROR status from g_io_channel_read_line\n");
+	  gui->log (_("ERROR status from g_io_channel_read_line\n"));
 	  return FALSE;
 	  break;
 
 	case G_IO_STATUS_EOF:
-	  gui->log ("Input pipe returned EOF.  The --listen option is \n"
-		    "probably not running anymore in this session.\n");
+	  gui->log (_("Input pipe returned EOF.  The --listen option is \n"
+		    "probably not running anymore in this session.\n"));
 	  return FALSE;
 	  break;
 
 	case G_IO_STATUS_AGAIN:
-	  gui->log ("AGAIN status from g_io_channel_read_line\n");
+	  gui->log (_("AGAIN status from g_io_channel_read_line\n"));
 	  return FALSE;
 	  break;
 
 	default:
-	  fprintf (stderr, "ERROR:  unhandled case in ghid_listener_cb\n");
+	  fprintf (stderr, _("ERROR:  unhandled case in ghid_listener_cb\n"));
 	  return FALSE;
 	  break;
 	}
 
     }
   else
-    fprintf (stderr, "Unknown condition in ghid_listener_cb\n");
+    fprintf (stderr, _("Unknown condition in ghid_listener_cb\n"));
   
   return TRUE;
 }
@@ -1619,7 +1676,7 @@ Listen for actions on stdin.
 @end ftable
 %end-doc
 */
-  {"listen", "Listen for actions on stdin",
+  {"listen", N_("Listen for actions on stdin"),
    HID_Boolean, 0, 0, {0, 0, 0}, 0, &stdin_listen},
 #define HA_listen 0
 
@@ -1632,7 +1689,7 @@ automatically scaled to fit the canvas.
 @end ftable
 %end-doc
 */
-  {"bg-image", "Background Image",
+  {"bg-image", N_("Background Image"),
    HID_String, 0, 0, {0, 0, 0}, 0, &bg_image_file},
 #define HA_bg_image 1
 
@@ -1643,7 +1700,7 @@ Location of the @file{gpcb-menu.res} file which defines the menu for the GTK+ GU
 @end ftable
 %end-doc
 */
-{"pcb-menu", "Location of gpcb-menu.res file",
+{"pcb-menu", N_("Location of gpcb-menu.res file"),
    HID_String, 0, 0, {0, PCBLIBDIR "/gpcb-menu.res", 0}, 0, &pcbmenu_path}
 #define HA_pcbmenu 2
 };
@@ -1803,12 +1860,12 @@ LayersChanged (int argc, char **argv, Coord x, Coord y)
 }
 
 static const char toggleview_syntax[] =
-"ToggleView(1..MAXLAYER)\n"
-"ToggleView(layername)\n"
-"ToggleView(Silk|Rats|Pins|Vias|Mask|BackSide)";
+    N_("ToggleView(1..MAXLAYER)\n"
+       "ToggleView(layername)\n"
+       "ToggleView(Silk|Rats|Pins|Vias|Mask|BackSide)");
 
 static const char toggleview_help[] =
-"Toggle the visibility of the specified layer or layer group.";
+    N_("Toggle the visibility of the specified layer or layer group.");
 
 /* %start-doc actions ToggleView
 
@@ -1877,10 +1934,10 @@ ToggleView (int argc, char **argv, Coord x, Coord y)
 }
 
 static const char selectlayer_syntax[] =
-"SelectLayer(1..MAXLAYER|Silk|Rats)";
+    N_("SelectLayer(1..MAXLAYER|Silk|Rats)");
 
 static const char selectlayer_help[] =
-"Select which layer is the current layer.";
+    N_("Select which layer is the current layer.");
 
 /* %start-doc actions SelectLayer
 
@@ -1892,15 +1949,20 @@ visible if it is not already visible
 static int
 SelectLayer (int argc, char **argv, Coord x, Coord y)
 {
-  int newl;
+  int i;
+  int newl = -1;
   if (argc == 0)
     AFAIL (selectlayer);
 
+  for (i = 0; i < max_copper_layer; ++i)
+    if (strcasecmp (argv[0], PCB->Data->Layer[i].Name) == 0)
+      newl = i;
+
   if (strcasecmp (argv[0], "silk") == 0)
     newl = LAYER_BUTTON_SILK;
   else if (strcasecmp (argv[0], "rats") == 0)
     newl = LAYER_BUTTON_RATS;
-  else
+  else if (newl == -1)
     newl = atoi (argv[0]) - 1;
 
 #ifdef DEBUG_MENUS
@@ -1996,8 +2058,8 @@ ghid_check_special_key (const char *accel, GtkAction *action,
     {
       if (ind >= N_HOTKEY_ACTIONS)
 	{
-	  fprintf (stderr, "ERROR:  overflow of the ghid_hotkey_actions array.  Index = %d\n"
-		   "Please report this.\n", ind);
+	  fprintf (stderr, _("ERROR:  overflow of the ghid_hotkey_actions array.  Index = %d\n"
+		   "Please report this.\n"), ind);
 	  exit (1);
 	}
 
@@ -2062,13 +2124,13 @@ ghid_load_menus (void)
   filename = get_menu_filename ();
   if (filename)
     {
-      Message ("Loading menus from %s\n", filename);
+      Message (_("Loading menus from %s\n"), filename);
       r = resource_parse (filename, 0);
     }
 
   if (!r)
     {
-      Message ("Using default menus\n");
+      Message (_("Using default menus\n"));
       r = bir;
     }
   free (filename);
@@ -2114,10 +2176,10 @@ ghid_load_menus (void)
 /* ------------------------------------------------------------ */
 
 static const char adjuststyle_syntax[] =
-"AdjustStyle()\n";
+    N_("AdjustStyle()\n");
 
 static const char adjuststyle_help[] =
-"Open the window which allows editing of the route styles.";
+    N_("Open the window which allows editing of the route styles.");
 
 /* %start-doc actions AdjustStyle
 
@@ -2139,10 +2201,10 @@ AdjustStyle(int argc, char **argv, Coord x, Coord y)
 /* ------------------------------------------------------------ */
 
 static const char editlayergroups_syntax[] =
-"EditLayerGroups()\n";
+    N_("EditLayerGroups()\n");
 
 static const char editlayergroups_help[] =
-"Open the preferences window which allows editing of the layer groups.";
+    N_("Open the preferences window which allows editing of the layer groups.");
 
 /* %start-doc actions EditLayerGroups
 
diff --git a/src/hid/gtk/gui-trackball.c b/src/hid/gtk/gui-trackball.c
new file mode 100644
index 0000000..2165af7
--- /dev/null
+++ b/src/hid/gtk/gui-trackball.c
@@ -0,0 +1,459 @@
+/*
+ *                            COPYRIGHT
+ *
+ *  PCB, interactive printed circuit board design
+ *  Copyright (C) 2009 PCB Contributors (See ChangeLog for details)
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Contact addresses for paper mail and Email:
+ *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
+ *  Thomas.Nau at rz.uni-ulm.de
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "global.h"
+
+#include "gui.h"
+
+#include "copy.h"
+#include "data.h"
+#include "draw.h"
+#include "mymem.h"
+#include "move.h"
+#include "rotate.h"
+#include "hid/common/trackball.h"
+#include "gui-trackball.h"
+
+#ifdef HAVE_LIBDMALLOC
+#include <dmalloc.h>
+#endif
+
+enum {
+  ROTATION_CHANGED,
+  VIEW_2D_CHANGED,
+  LAST_SIGNAL
+};
+
+
+static guint ghid_trackball_signals[ LAST_SIGNAL ] = { 0 };
+static GObjectClass *ghid_trackball_parent_class = NULL;
+
+
+static gboolean
+button_press_cb (GtkWidget *widget, GdkEventButton *ev, gpointer userdata)
+{
+  GhidTrackball *ball = GHID_TRACKBALL (userdata);
+  float axis[3];
+
+  /* Only respond to left mouse button for now */
+  if (ev->button != 1)
+    return TRUE;
+
+  switch (ev->type) {
+
+    case GDK_BUTTON_PRESS:
+      ball->x1 = 2. * ev->x / widget->allocation.width - 1.;
+      ball->y1 = 2. * ev->y / widget->allocation.height - 1.;
+      ball->dragging = TRUE;
+      break;
+
+    case GDK_2BUTTON_PRESS:
+      /* Reset the rotation of the trackball */
+      /* TODO: Would be nice to animate this! */
+      axis[0] = 1.; axis[1] = 0.; axis[2] = 0.;
+      axis_to_quat (axis, 0, ball->quart1);
+      axis_to_quat (axis, 0, ball->quart2);
+      g_signal_emit (ball, ghid_trackball_signals[ROTATION_CHANGED], 0,
+                     ball->quart2);
+      break;
+
+    default:
+      break;
+  }
+
+  return TRUE;
+}
+
+
+static gboolean
+button_release_cb (GtkWidget *widget, GdkEventButton *ev, gpointer userdata)
+{
+  GhidTrackball *ball = GHID_TRACKBALL (userdata);
+
+  /* Only respond to left mouse button for now */
+  if (ev->button != 1)
+    return TRUE;
+
+  ball->quart1[0] = ball->quart2[0];
+  ball->quart1[1] = ball->quart2[1];
+  ball->quart1[2] = ball->quart2[2];
+  ball->quart1[3] = ball->quart2[3];
+
+  ball->dragging = FALSE;
+
+  return TRUE;
+}
+
+
+static gboolean
+motion_notify_cb (GtkWidget *widget, GdkEventMotion *ev, gpointer userdata)
+{
+  GhidTrackball *ball = GHID_TRACKBALL (userdata);
+  double x1, y1;
+  double x2, y2;
+  float q[4];
+
+  if (!ball->dragging) {
+    gdk_event_request_motions (ev);
+    return TRUE;
+  }
+
+  x1 = ball->x1;
+  y1 = ball->y1;
+
+  x2 = 2. * ev->x / widget->allocation.width - 1.;
+  y2 = 2. * ev->y / widget->allocation.height - 1.;
+
+  /* Trackball computation */
+  trackball (q, x1, y1, x2, y2);
+  add_quats (q, ball->quart1, ball->quart2);
+
+  g_signal_emit (ball, ghid_trackball_signals[ROTATION_CHANGED], 0,
+                 ball->quart2);
+
+  gdk_event_request_motions (ev);
+  return TRUE;
+}
+
+static gboolean
+ghid_trackball_expose (GtkWidget * widget, GdkEventExpose * ev)
+{
+  cairo_t *cr;
+  cairo_pattern_t *pattern;
+  GtkAllocation allocation;
+  GdkColor color;
+  double radius;
+
+  cr = gdk_cairo_create (gtk_widget_get_window (widget));
+
+          /* set a clip region for the expose event */
+  cairo_rectangle (cr,
+                   ev->area.x, ev->area.y,
+                   ev->area.width, ev->area.height);
+  cairo_clip (cr);
+
+  gtk_widget_get_allocation (widget, &allocation);
+
+  radius = (MIN (allocation.width, allocation.height) - 5) / 2.;
+  pattern = cairo_pattern_create_radial (2 * radius * 0.8,
+                                         2 * radius * 0.3,
+                                         0.,
+                                         2 * radius * 0.50,
+                                         2 * radius * 0.50,
+                                         2 * radius * 0.71);
+
+  color = widget->style->fg[GTK_WIDGET_STATE (widget)];
+
+  cairo_pattern_add_color_stop_rgb (pattern, 0.0,
+                                    (color.red   / 65535. * 0.5 + 4.5) / 5.,
+                                    (color.green / 65535. * 0.5 + 4.5) / 5.,
+                                    (color.blue  / 65535. * 0.5 + 4.5) / 5.);
+  cairo_pattern_add_color_stop_rgb (pattern, 0.2,
+                                    (color.red   / 65535. * 1.5 + 3.7) / 5.,
+                                    (color.green / 65535. * 1.5 + 3.7) / 5.,
+                                    (color.blue  / 65535. * 1.5 + 3.7) / 5.);
+  cairo_pattern_add_color_stop_rgb (pattern, 1.0,
+                                    (color.red   / 65535. * 5. + 0.) / 5.,
+                                    (color.green / 65535. * 5. + 0.) / 5.,
+                                    (color.blue  / 65535. * 5. + 0.) / 5.);
+  cairo_set_source (cr, pattern);
+  cairo_pattern_destroy (pattern);
+
+  cairo_save (cr);
+  cairo_translate (cr, allocation.width / 2., allocation.height / 2.);
+  cairo_scale (cr, radius, radius);
+  cairo_arc (cr, 0., 0., 1., 0., 2 * M_PI);
+  cairo_restore (cr);
+
+  cairo_fill_preserve (cr);
+
+  gdk_cairo_set_source_color (cr, &widget->style->bg[GTK_WIDGET_STATE (widget)]);
+  cairo_set_line_width (cr, 0.4);
+  cairo_stroke (cr);
+
+  cairo_destroy (cr);
+
+  return FALSE;
+}
+
+static gboolean
+view_2d_toggled_cb (GtkToggleButton *toggle, gpointer userdata)
+{
+  GhidTrackball *ball = GHID_TRACKBALL (userdata);
+  float axis[3];
+  float quart[4];
+  gboolean view_2d;
+
+  view_2d = gtk_toggle_button_get_active (toggle);
+  if (view_2d)
+    {
+      axis[0] = 1.; axis[1] = 0.; axis[2] = 0.;
+      axis_to_quat (axis, 0, quart);
+
+      g_signal_emit (ball, ghid_trackball_signals[ROTATION_CHANGED], 0, quart);
+      gtk_widget_set_sensitive (ball->drawing_area, FALSE);
+    }
+  else
+    {
+      g_signal_emit (ball, ghid_trackball_signals[ROTATION_CHANGED], 0, ball->quart1);
+      gtk_widget_set_sensitive (ball->drawing_area, TRUE);
+    }
+
+  g_signal_emit (ball, ghid_trackball_signals[VIEW_2D_CHANGED], 0, view_2d);
+
+  return TRUE;
+}
+/*! \brief GObject constructor
+ *
+ *  \par Function Description
+ *  Chain up and construct the object, then setup the
+ *  necessary state for our widget now it is constructed.
+ *
+ *  \param [in] type                    The GType of object to be constructed
+ *  \param [in] n_construct_properties  Number of construct properties
+ *  \param [in] contruct_params         The construct properties
+ *
+ *  \returns The GObject having just been constructed.
+ */
+static GObject *
+ghid_trackball_constructor (GType type,
+                            guint n_construct_properties,
+                            GObjectConstructParam *construct_properties)
+{
+  GhidTrackball *ball;
+  float axis[3];
+
+  /* chain up to constructor of parent class */
+  ball = GHID_TRACKBALL (G_OBJECT_CLASS (ghid_trackball_parent_class)->
+    constructor (type, n_construct_properties, construct_properties));
+
+  gtk_widget_set_size_request (GTK_WIDGET (ball), 140, 140);
+
+  ball->view_2d = gtk_toggle_button_new_with_label (_("2D View"));
+  gtk_box_pack_start (GTK_BOX (ball), ball->view_2d, FALSE, FALSE, 0);
+  gtk_widget_show (ball->view_2d);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ball->view_2d), TRUE);
+
+  ball->drawing_area = gtk_drawing_area_new ();
+  gtk_box_pack_start (GTK_BOX (ball), ball->drawing_area, TRUE, TRUE, 0);
+  gtk_widget_set_sensitive (ball->drawing_area, FALSE);
+  gtk_widget_show (ball->drawing_area);
+
+  axis[0] = 1.; axis[1] = 0.; axis[2] = 0.;
+  axis_to_quat (axis, 0, ball->quart1);
+  axis_to_quat (axis, 0, ball->quart2);
+
+  g_signal_connect (ball->view_2d, "toggled",
+                    G_CALLBACK (view_2d_toggled_cb), ball);
+
+  g_signal_connect (ball->drawing_area, "expose-event",
+                    G_CALLBACK (ghid_trackball_expose), ball);
+  g_signal_connect (ball->drawing_area, "button-press-event",
+                    G_CALLBACK (button_press_cb), ball);
+  g_signal_connect (ball->drawing_area, "button-release-event",
+                    G_CALLBACK (button_release_cb), ball);
+  g_signal_connect (ball->drawing_area, "motion-notify-event",
+                    G_CALLBACK (motion_notify_cb), ball);
+
+  gtk_widget_add_events (ball->drawing_area, GDK_BUTTON_PRESS_MASK   |
+                                             GDK_BUTTON_RELEASE_MASK |
+                                             GDK_POINTER_MOTION_MASK |
+                                             GDK_POINTER_MOTION_HINT_MASK);
+
+  return G_OBJECT (ball);
+}
+
+
+
+/*! \brief GObject finalise handler
+ *
+ *  \par Function Description
+ *  Just before the GhidTrackball GObject is finalized, free our
+ *  allocated data, and then chain up to the parent's finalize handler.
+ *
+ *  \param [in] widget  The GObject being finalized.
+ */
+static void
+ghid_trackball_finalize (GObject * object)
+{
+  G_OBJECT_CLASS (ghid_trackball_parent_class)->finalize (object);
+}
+
+
+/*! \brief GObject property setter function
+ *
+ *  \par Function Description
+ *  Setter function for GhidTrackball's GObject properties,
+ *  "settings-name" and "toplevel".
+ *
+ *  \param [in]  object       The GObject whose properties we are setting
+ *  \param [in]  property_id  The numeric id. under which the property was
+ *                            registered with g_object_class_install_property()
+ *  \param [in]  value        The GValue the property is being set from
+ *  \param [in]  pspec        A GParamSpec describing the property being set
+ */
+static void
+ghid_trackball_set_property (GObject * object, guint property_id,
+				  const GValue * value, GParamSpec * pspec)
+{
+  switch (property_id)
+    {
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+    }
+}
+
+
+/*! \brief GObject property getter function
+ *
+ *  \par Function Description
+ *  Getter function for GhidTrackball's GObject properties,
+ *  "settings-name" and "toplevel".
+ *
+ *  \param [in]  object       The GObject whose properties we are getting
+ *  \param [in]  property_id  The numeric id. under which the property was
+ *                            registered with g_object_class_install_property()
+ *  \param [out] value        The GValue in which to return the value of the property
+ *  \param [in]  pspec        A GParamSpec describing the property being got
+ */
+static void
+ghid_trackball_get_property (GObject * object, guint property_id,
+				  GValue * value, GParamSpec * pspec)
+{
+  switch (property_id)
+    {
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+    }
+
+}
+
+
+/*! \brief GType class initialiser for GhidTrackball
+ *
+ *  \par Function Description
+ *  GType class initialiser for GhidTrackball. We override our parent
+ *  virtual class methods as needed and register our GObject properties.
+ *
+ *  \param [in]  klass       The GhidTrackballClass we are initialising
+ */
+static void
+ghid_trackball_class_init (GhidTrackballClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+  gobject_class->constructor  = ghid_trackball_constructor;
+  gobject_class->finalize     = ghid_trackball_finalize;
+  gobject_class->set_property = ghid_trackball_set_property;
+  gobject_class->get_property = ghid_trackball_get_property;
+
+  ghid_trackball_parent_class = g_type_class_peek_parent (klass);
+
+  ghid_trackball_signals[ROTATION_CHANGED] =
+    g_signal_new ("rotation-changed",
+                  G_OBJECT_CLASS_TYPE( gobject_class ),
+                  G_SIGNAL_RUN_FIRST,     /*signal_flags */
+                  G_STRUCT_OFFSET( GhidTrackballClass, rotation_changed ),
+                  NULL, /* accumulator */
+                  NULL, /* accu_data */
+                  g_cclosure_marshal_VOID__POINTER,
+                  G_TYPE_NONE,
+                  1,    /* n_params */
+                  G_TYPE_POINTER
+                 );
+
+  ghid_trackball_signals[VIEW_2D_CHANGED] =
+    g_signal_new ("view-2d-changed",
+                  G_OBJECT_CLASS_TYPE( gobject_class ),
+                  G_SIGNAL_RUN_FIRST,     /*signal_flags */
+                  G_STRUCT_OFFSET( GhidTrackballClass, view_2d_changed ),
+                  NULL, /* accumulator */
+                  NULL, /* accu_data */
+                  g_cclosure_marshal_VOID__BOOLEAN,
+                  G_TYPE_NONE,
+                  1,    /* n_params */
+                  G_TYPE_BOOLEAN
+                 );
+}
+
+
+/*! \brief Function to retrieve GhidTrackball's GType identifier.
+ *
+ *  \par Function Description
+ *  Function to retrieve GhidTrackball's GType identifier.
+ *  Upon first call, this registers the GhidTrackball in the GType system.
+ *  Subsequently it returns the saved value from its first execution.
+ *
+ *  \return the GType identifier associated with GhidTrackball.
+ */
+GType
+ghid_trackball_get_type ()
+{
+  static GType ghid_trackball_type = 0;
+
+  if (!ghid_trackball_type)
+    {
+      static const GTypeInfo ghid_trackball_info = {
+	sizeof (GhidTrackballClass),
+	NULL,			/* base_init */
+	NULL,			/* base_finalize */
+	(GClassInitFunc) ghid_trackball_class_init,
+	NULL,			/* class_finalize */
+	NULL,			/* class_data */
+	sizeof (GhidTrackball),
+	0,			/* n_preallocs */
+	NULL,			/* instance_init */
+      };
+
+      ghid_trackball_type =
+	g_type_register_static (GTK_TYPE_VBOX, "GhidTrackball",
+				&ghid_trackball_info, 0);
+    }
+
+  return ghid_trackball_type;
+}
+
+
+/*! \brief Convenience function to create a new trackball widget
+ *
+ *  \par Function Description
+ *  Convenience function which creates a GhidTrackball.
+ *
+ *  \return  The GhidTrackball created.
+ */
+GtkWidget *
+ghid_trackball_new (void)
+{
+  GhidTrackball *ball;
+
+  ball = g_object_new (GHID_TYPE_TRACKBALL, NULL);
+
+  return GTK_WIDGET (ball);
+}
diff --git a/src/hid/gtk/gui-trackball.h b/src/hid/gtk/gui-trackball.h
new file mode 100644
index 0000000..5c8a1f1
--- /dev/null
+++ b/src/hid/gtk/gui-trackball.h
@@ -0,0 +1,68 @@
+/*
+ *                            COPYRIGHT
+ *
+ *  PCB, interactive printed circuit board design
+ *  Copyright (C) 2009  PCB Contributors (see ChangeLog for details)
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Contact addresses for paper mail and Email:
+ *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
+ *  Thomas.Nau at rz.uni-ulm.de
+ *
+ */
+
+#ifndef __GHID_TRACKBALL_H__
+#define __GHID_TRACKBALL_H__
+
+
+#define GHID_TYPE_TRACKBALL           (ghid_trackball_get_type())
+#define GHID_TRACKBALL(obj)           (G_TYPE_CHECK_INSTANCE_CAST ((obj), GHID_TYPE_TRACKBALL, GhidTrackball))
+#define GHID_TRACKBALL_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass),  GHID_TYPE_TRACKBALL, GhidTrackballClass))
+#define GHID_IS_TRACKBALL(obj)        (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GHID_TYPE_TRACKBALL))
+#define GHID_TRACKBALL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),  GHID_TYPE_TRACKBALL, GhidTrackballClass))
+
+typedef struct _GhidTrackballClass GhidTrackballClass;
+typedef struct _GhidTrackball GhidTrackball;
+
+
+struct _GhidTrackballClass
+{
+  GtkVBoxClass parent_class;
+
+  void (*rotation_changed) (GhidTrackball *ball, gpointer rotation, gpointer user_data);
+  void (*view_2d_changed) (GhidTrackball *ball, gboolean view_2d, gpointer user_data);
+};
+
+struct _GhidTrackball
+{
+  GtkVBox parent_instance;
+
+  GtkWidget *drawing_area;
+  GtkWidget *view_2d;
+
+  gboolean dragging;
+  gdouble x1, y1;
+
+  float quart1[4];
+  float quart2[4];
+};
+
+
+GType ghid_trackball_get_type (void);
+
+GtkWidget *ghid_trackball_new (void);
+
+#endif /* __GHID_TRACKBALL_H__ */
diff --git a/src/hid/gtk/gui-utils.c b/src/hid/gtk/gui-utils.c
index 7136fbb..4e1bf60 100644
--- a/src/hid/gtk/gui-utils.c
+++ b/src/hid/gtk/gui-utils.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -39,8 +37,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 /* Not a gui function, but no better place to put it...
  */
 gboolean
@@ -220,7 +216,7 @@ ghid_check_button_connected (GtkWidget * box,
 
   if (!string)
     return;
-  b = gtk_check_button_new_with_label (string);
+  b = gtk_check_button_new_with_mnemonic (string);
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (b), active);
   if (box && pack_start)
     gtk_box_pack_start (GTK_BOX (box), b, expand, fill, pad);
@@ -243,7 +239,7 @@ ghid_button_connected (GtkWidget * box, GtkWidget ** button,
 
   if (!string)
     return;
-  b = gtk_button_new_with_label (string);
+  b = gtk_button_new_with_mnemonic (string);
   if (box && pack_start)
     gtk_box_pack_start (GTK_BOX (box), b, expand, fill, pad);
   else if (box && !pack_start)
@@ -838,34 +834,3 @@ ghid_scrolled_text_view (GtkWidget * box,
     *scr = scrolled;
   return view;
 }
-
-
-/* If src is not utf8, *dst is converted to utf8.
- */
-gboolean
-utf8_dup_string (gchar ** dst_utf8, const gchar * src)
-{
-  if (!dst_utf8 || (!*dst_utf8 && !src))
-    return FALSE;
-  if (*dst_utf8)
-    {
-      if (src && !strcmp (*dst_utf8, src))
-	return FALSE;
-      g_free (*dst_utf8);
-    }
-  if (src)
-    {
-      if (g_utf8_validate (src, -1, NULL))
-	*dst_utf8 = g_strdup (src);
-      else
-	{
-	  *dst_utf8 = g_locale_to_utf8 (src, -1, NULL, NULL, NULL);
-	  if (!*dst_utf8)
-	    *dst_utf8 = g_strdup (src);
-	}
-    }
-  else
-    *dst_utf8 = NULL;
-
-  return TRUE;
-}
diff --git a/src/hid/gtk/gui.h b/src/hid/gtk/gui.h
index 5ba5aeb..2bbd2de 100644
--- a/src/hid/gtk/gui.h
+++ b/src/hid/gtk/gui.h
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -29,6 +27,7 @@
 
 #include "global.h"
 #include "hid.h"
+#include "hid_draw.h"
 #include "hid/common/hid_resource.h"
 
 #include "data.h"
@@ -148,6 +147,8 @@ typedef struct
     library_window_width,
     library_window_height,
     netlist_window_height, history_size, settings_mode;
+
+  bool is_up;
 }
 GhidGui;
 
@@ -296,7 +297,6 @@ gint ghid_port_window_motion_cb (GtkWidget * widget,
 gint ghid_port_window_mouse_scroll_cb (GtkWidget * widget,
 				       GdkEventScroll * ev, GHidPort * out);
 
-
 gint ghid_port_drawing_area_configure_event_cb (GtkWidget * widget,
 						GdkEventConfigure * ev,
 						GHidPort * out);
@@ -308,6 +308,8 @@ gint ghid_port_drawing_area_configure_event_cb (GtkWidget * widget,
 
 gchar *ghid_dialog_file_select_open (gchar * title, gchar ** path,
 				     gchar * shortcuts);
+GSList *ghid_dialog_file_select_multiple (gchar * title, gchar ** path,
+				          gchar * shortcuts);
 gchar *ghid_dialog_file_select_save (gchar * title, gchar ** path,
 				     gchar * file, gchar * shortcuts);
 void ghid_dialog_message (gchar * message);
@@ -347,11 +349,10 @@ void make_route_style_buttons (GHidRouteStyleSelector *rss);
 /* gui-utils.c
 */
 gboolean dup_string (gchar ** dst, const gchar * src);
-gboolean utf8_dup_string (gchar ** dst_utf8, const gchar * src);
 void free_glist_and_data (GList ** list_head);
 
-ModifierKeysState ghid_modifier_keys_state (GdkModifierType * state);
-ButtonState ghid_button_state (GdkModifierType * state);
+ModifierKeysState ghid_modifier_keys_state (GdkModifierType *state);
+ButtonState ghid_button_state (GdkModifierType *state);
 gboolean ghid_is_modifier_key_sym (gint ksym);
 gboolean ghid_control_is_pressed (void);
 gboolean ghid_mod1_is_pressed (void);
@@ -466,13 +467,13 @@ void ghid_log (const char *fmt, ...);
 void ghid_logv (const char *fmt, va_list args);
 
 /* gui-pinout-window.c */
-void ghid_pinout_window_show (GHidPort * out, ElementTypePtr Element);
+void ghid_pinout_window_show (GHidPort *out, ElementType *Element);
 
 /* gtkhid-gdk.c AND gtkhid-gl.c */
 int ghid_set_layer (const char *name, int group, int empty);
 hidGC ghid_make_gc (void);
 void ghid_destroy_gc (hidGC);
-void ghid_use_mask (int use_it);
+void ghid_use_mask (enum mask_mode mode);
 void ghid_set_color (hidGC gc, const char *name);
 void ghid_set_line_cap (hidGC gc, EndCapStyle style);
 void ghid_set_line_width (hidGC gc, Coord width);
@@ -504,6 +505,8 @@ void ghid_flush_debug_draw (void);
 void ghid_finish_debug_draw (void);
 bool ghid_event_to_pcb_coords (int event_x, int event_y, Coord *pcb_x, Coord *pcb_y);
 bool ghid_pcb_to_event_coords (Coord pcb_x, Coord pcb_y, int *event_x, int *event_y);
+void ghid_port_rotate (void *ball, float *quarternion, gpointer userdata);
+void ghid_view_2d (void *ball, gboolean view_2d, gpointer userdata);
 
 void ghid_lead_user_to_location (Coord x, Coord y);
 void ghid_cancel_lead_user (void);
diff --git a/src/hid/hidint.h b/src/hid/hidint.h
index b986f78..8d62d6b 100644
--- a/src/hid/hidint.h
+++ b/src/hid/hidint.h
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /* HID internal interfaces.  These may ONLY be called from the HID
    modules, not from the common PCB code.  */
 
diff --git a/src/hid/lesstif/dialogs.c b/src/hid/lesstif/dialogs.c
index 5d744f9..59a44c8 100644
--- a/src/hid/lesstif/dialogs.c
+++ b/src/hid/lesstif/dialogs.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -26,8 +24,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 #define CRASH fprintf(stderr, "HID error: pcb called unimplemented GUI function %s\n", __FUNCTION__), abort()
 
 static Arg args[30];
diff --git a/src/hid/lesstif/lesstif.h b/src/hid/lesstif/lesstif.h
index 235bf57..ccbe89b 100644
--- a/src/hid/lesstif/lesstif.h
+++ b/src/hid/lesstif/lesstif.h
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 #define app_context lesstif_app_context
 #define appwidget lesstif_appwidget
 #define display lesstif_display
diff --git a/src/hid/lesstif/library.c b/src/hid/lesstif/library.c
index 029a023..3c8d7d7 100644
--- a/src/hid/lesstif/library.c
+++ b/src/hid/lesstif/library.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -26,8 +24,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 static Arg args[30];
 static int n;
 #define stdarg(t,v) XtSetArg(args[n], t, v); n++
diff --git a/src/hid/lesstif/main.c b/src/hid/lesstif/main.c
index a4b34ee..4cd8d4a 100644
--- a/src/hid/lesstif/main.c
+++ b/src/hid/lesstif/main.c
@@ -1,6 +1,3 @@
-/* $Id$ */
-/* 15 Oct 2008 Ineiev: add different crosshair shapes */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -28,6 +25,7 @@
 #include "error.h"
 
 #include "hid.h"
+#include "hid_draw.h"
 #include "../hidint.h"
 #include "hid/common/hidnogui.h"
 #include "hid/common/draw_helpers.h"
@@ -40,8 +38,6 @@
 
 #include <sys/poll.h>
 
-RCSID ("$Id$");
-
 #ifndef XtRDouble
 #define XtRDouble "Double"
 #endif
@@ -62,6 +58,7 @@ typedef struct hid_gc_struct
 } hid_gc_struct;
 
 static HID lesstif_hid;
+static HID_DRAW lesstif_graphics;
 
 #define CRASH fprintf(stderr, "HID error: pcb called unimplemented GUI function %s\n", __FUNCTION__), abort()
 
@@ -162,19 +159,19 @@ ShowCrosshair (bool show)
 }
 
 static int
-flag_flipx (int x)
+flag_flipx (void *data)
 {
   return flip_x;
 }
 static int
-flag_flipy (int x)
+flag_flipy (void *data)
 {
   return flip_y;
 }
 
 HID_Flag lesstif_main_flag_list[] = {
-  {"flip_x", flag_flipx, 0},
-  {"flip_y", flag_flipy, 0}
+  {"flip_x", flag_flipx, NULL},
+  {"flip_y", flag_flipy, NULL}
 };
 
 REGISTER_FLAGS (lesstif_main_flag_list)
@@ -435,7 +432,7 @@ SetUnits (int argc, char **argv, Coord x, Coord y)
   if (new_unit != NULL && new_unit->allow != NO_PRINT)
     {
       Settings.grid_unit = new_unit;
-      Settings.increments = get_increments_struct (Settings.grid_unit->suffix);
+      Settings.increments = get_increments_struct (Settings.grid_unit->family);
       AttributePut (PCB, "PCB::grid::unit", argv[0]);
     }
   lesstif_sizes_reset ();
@@ -750,7 +747,7 @@ static const char command_help[] =
 The command window allows the user to manually enter actions to be
 executed.  Action syntax can be done one of two ways:
 
- at table @code
+ at itemize @bullet
 
 @item
 Follow the action name by an open parenthesis, arguments separated by
@@ -760,7 +757,7 @@ commas, end with a close parenthesis.  Example: @code{Abc(1,2,3)}
 Separate the action name and arguments by spaces.  Example: @code{Abc
 1 2 3}.
 
- at end table
+ at end itemize
 
 The first option allows you to have arguments with spaces in them,
 but the second is more ``natural'' to type for most people.
@@ -2596,7 +2593,7 @@ idle_proc (XtPointer dummy)
   {
     static int c_x = -2, c_y = -2;
     static MarkType saved_mark;
-    static Unit *old_grid_unit = NULL;
+    static const Unit *old_grid_unit = NULL;
     if (crosshair_x != c_x || crosshair_y != c_y
 	|| Settings.grid_unit != old_grid_unit
 	|| memcmp (&saved_mark, &Marked, sizeof (MarkType)))
@@ -4044,9 +4041,10 @@ void
 hid_lesstif_init ()
 {
   memset (&lesstif_hid, 0, sizeof (HID));
+  memset (&lesstif_graphics, 0, sizeof (HID_DRAW));
 
   common_nogui_init (&lesstif_hid);
-  common_draw_helpers_init (&lesstif_hid);
+  common_draw_helpers_init (&lesstif_graphics);
 
   lesstif_hid.struct_size             = sizeof (HID);
   lesstif_hid.name                    = "lesstif";
@@ -4062,19 +4060,6 @@ hid_lesstif_init ()
   lesstif_hid.notify_crosshair_change = lesstif_notify_crosshair_change;
   lesstif_hid.notify_mark_change      = lesstif_notify_mark_change;
   lesstif_hid.set_layer               = lesstif_set_layer;
-  lesstif_hid.make_gc                 = lesstif_make_gc;
-  lesstif_hid.destroy_gc              = lesstif_destroy_gc;
-  lesstif_hid.use_mask                = lesstif_use_mask;
-  lesstif_hid.set_color               = lesstif_set_color;
-  lesstif_hid.set_line_cap            = lesstif_set_line_cap;
-  lesstif_hid.set_line_width          = lesstif_set_line_width;
-  lesstif_hid.set_draw_xor            = lesstif_set_draw_xor;
-  lesstif_hid.draw_line               = lesstif_draw_line;
-  lesstif_hid.draw_arc                = lesstif_draw_arc;
-  lesstif_hid.draw_rect               = lesstif_draw_rect;
-  lesstif_hid.fill_circle             = lesstif_fill_circle;
-  lesstif_hid.fill_polygon            = lesstif_fill_polygon;
-  lesstif_hid.fill_rect               = lesstif_fill_rect;
 
   lesstif_hid.calibrate               = lesstif_calibrate;
   lesstif_hid.shift_is_pressed        = lesstif_shift_is_pressed;
@@ -4106,6 +4091,24 @@ hid_lesstif_init ()
   lesstif_hid.flush_debug_draw        = lesstif_flush_debug_draw;
   lesstif_hid.finish_debug_draw       = lesstif_finish_debug_draw;
 
+  lesstif_hid.graphics                = &lesstif_graphics;
+
+  lesstif_graphics.make_gc             = lesstif_make_gc;
+  lesstif_graphics.destroy_gc          = lesstif_destroy_gc;
+  lesstif_graphics.use_mask            = lesstif_use_mask;
+  lesstif_graphics.set_color           = lesstif_set_color;
+  lesstif_graphics.set_line_cap        = lesstif_set_line_cap;
+  lesstif_graphics.set_line_width      = lesstif_set_line_width;
+  lesstif_graphics.set_draw_xor        = lesstif_set_draw_xor;
+  lesstif_graphics.draw_line           = lesstif_draw_line;
+  lesstif_graphics.draw_arc            = lesstif_draw_arc;
+  lesstif_graphics.draw_rect           = lesstif_draw_rect;
+  lesstif_graphics.fill_circle         = lesstif_fill_circle;
+  lesstif_graphics.fill_polygon        = lesstif_fill_polygon;
+  lesstif_graphics.fill_rect           = lesstif_fill_rect;
+
+  lesstif_graphics.draw_pcb_polygon    = common_gui_draw_pcb_polygon;
+
   hid_register_hid (&lesstif_hid);
 #include "lesstif_lists.h"
 }
diff --git a/src/hid/lesstif/menu.c b/src/hid/lesstif/menu.c
index 8c71c61..ddaddcb 100644
--- a/src/hid/lesstif/menu.c
+++ b/src/hid/lesstif/menu.c
@@ -1,5 +1,3 @@
-//* $Id$ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -31,8 +29,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 #ifndef R_OK
 /* Common value for systems that don't define it.  */
 #define R_OK 4
@@ -436,14 +432,20 @@ visible if it is not already visible
 static int
 SelectLayer (int argc, char **argv, Coord x, Coord y)
 {
-  int newl;
+  int i;
+  int newl = -1;
   if (argc == 0)
     return 1;
+
+  for (i = 0; i < max_copper_layer; ++i)
+    if (strcasecmp (argv[0], PCB->Data->Layer[i].Name) == 0)
+      newl = i;
+
   if (strcasecmp (argv[0], "silk") == 0)
     newl = LB_SILK;
   else if (strcasecmp (argv[0], "rats") == 0)
     newl = LB_RATS;
-  else
+  else if (newl == -1)
     newl = atoi (argv[0]) - 1;
   layerpick_button_callback (0, newl, 0);
   return 0;
diff --git a/src/hid/lesstif/netlist.c b/src/hid/lesstif/netlist.c
index ce28539..598d106 100644
--- a/src/hid/lesstif/netlist.c
+++ b/src/hid/lesstif/netlist.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -31,8 +29,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 static Arg args[30];
 static int n;
 #define stdarg(t,v) XtSetArg(args[n], t, v); n++
@@ -74,7 +70,7 @@ netlist_select (Widget w, void *v, XmListCallbackStruct * cbs)
 {
   XmString str;
   int pos = cbs->item_position;
-  LibraryMenuTypePtr net = & (PCB->NetlistLib.Menu[pos - 1]);
+  LibraryMenuType *net = & (PCB->NetlistLib.Menu[pos - 1]);
   char *name = net->Name;
   if (name[0] == ' ')
     {
@@ -100,10 +96,10 @@ netlist_extend (Widget w, void *v, XmListCallbackStruct * cbs)
     pick_net (cbs->item_position - 1);
 }
 
-typedef void (*Std_Nbcb_Func)(LibraryMenuTypePtr, int);
+typedef void (*Std_Nbcb_Func)(LibraryMenuType *, int);
 
 static void
-nbcb_rat_on (LibraryMenuTypePtr net, int pos)
+nbcb_rat_on (LibraryMenuType *net, int pos)
 {
   XmString str;
   char *name = net->Name;
@@ -115,7 +111,7 @@ nbcb_rat_on (LibraryMenuTypePtr net, int pos)
 }
 
 static void
-nbcb_rat_off (LibraryMenuTypePtr net, int pos)
+nbcb_rat_off (LibraryMenuType *net, int pos)
 {
   XmString str;
   char *name = net->Name;
@@ -130,40 +126,40 @@ nbcb_rat_off (LibraryMenuTypePtr net, int pos)
 /* Select on the layout the current net treeview selection
  */
 static void
-nbcb_select_common (LibraryMenuTypePtr net, int pos, int select_flag)
+nbcb_select_common (LibraryMenuType *net, int pos, int select_flag)
 {
   LibraryEntryType *entry;
   ConnectionType conn;
   int i;
 
   InitConnectionLookup ();
-  ResetConnections (true);
+  ClearFlagOnAllObjects (true, FOUNDFLAG);
 
   for (i = net->EntryN, entry = net->Entry; i; i--, entry++)
     if (SeekPad (entry, &conn, false))
-      RatFindHook (conn.type, conn.ptr1, conn.ptr2, conn.ptr2, true, true);
+      RatFindHook (conn.type, conn.ptr1, conn.ptr2, conn.ptr2, true, FOUNDFLAG, true);
 
-  SelectConnection (select_flag);
-  ResetConnections (false);
+  SelectByFlag (FOUNDFLAG, select_flag);
+  ClearFlagOnAllObjects (false, FOUNDFLAG);
   FreeConnectionLookupMemory ();
   IncrementUndoSerialNumber ();
   Draw ();
 }
 
 static void
-nbcb_select (LibraryMenuTypePtr net, int pos)
+nbcb_select (LibraryMenuType *net, int pos)
 {
   nbcb_select_common (net, pos, 1);
 }
 
 static void
-nbcb_deselect (LibraryMenuTypePtr net, int pos)
+nbcb_deselect (LibraryMenuType *net, int pos)
 {
   nbcb_select_common (net, pos, 0);
 }
 
 static void
-nbcb_find (LibraryMenuTypePtr net, int pos)
+nbcb_find (LibraryMenuType *net, int pos)
 {
   char *name = net->Name + 2;
   hid_actionl ("netlist", "find", name, NULL);
@@ -180,7 +176,7 @@ nbcb_std_callback (Widget w, Std_Nbcb_Func v, XmPushButtonCallbackStruct * cbs)
     hid_actionl ("connection", "reset", NULL);
   for (i=0; i<posc; i++)
     {
-      LibraryMenuTypePtr net = & (PCB->NetlistLib.Menu[posl[i] - 1]);
+      LibraryMenuType *net = & (PCB->NetlistLib.Menu[posl[i] - 1]);
       v(net, posl[i]);
     }
   n = 0;
@@ -426,7 +422,7 @@ LesstifNetlistShow (int argc, char **argv, Coord x, Coord y)
 
   if (argc == 1)
     {
-      LibraryMenuTypePtr net;
+      LibraryMenuType *net;
 
       net = netnode_to_netname(argv[0]);
       if (net)
diff --git a/src/hid/lesstif/styles.c b/src/hid/lesstif/styles.c
index 5ec19d8..824b7f3 100644
--- a/src/hid/lesstif/styles.c
+++ b/src/hid/lesstif/styles.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -27,8 +25,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 /* There are three places where styles are kept:
 
    First, the "active" style is in Settings.LineThickness et al.
diff --git a/src/hid/lesstif/xincludes.h b/src/hid/lesstif/xincludes.h
index af1314c..d8e7b09 100644
--- a/src/hid/lesstif/xincludes.h
+++ b/src/hid/lesstif/xincludes.h
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  * Some of the X headers are not very friendly in terms of namespace.
  * For example, X.h typedef's Mask but we use Mask in the core of pcb
diff --git a/src/hid/lpr/lpr.c b/src/hid/lpr/lpr.c
index 259812c..238cca1 100644
--- a/src/hid/lpr/lpr.c
+++ b/src/hid/lpr/lpr.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -24,9 +22,9 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
-#define CRASH fprintf(stderr, "HID error: pcb called unimplemented PS function %s.\n", __FUNCTION__); abort()
+#define CRASH fprintf(stderr, \
+    _("HID error: pcb called unimplemented PS function %s.\n"), \
+    __FUNCTION__); abort()
 
 static HID_Attribute base_lpr_options[] = {
 
@@ -40,7 +38,7 @@ PDF output with a virtual PDF printer. Example: @*
 @noindent In addition, all @ref{Postscript Export} options are valid.
 %end-doc
 */
-  {"lprcommand", "Command to use for printing",
+  {N_("lprcommand"), N_("Command to use for printing"),
    HID_String, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_lprcommand 0
 };
@@ -96,7 +94,7 @@ lpr_do_export (HID_Attr_Val * options)
 
   filename = options[HA_lprcommand].str_value;
 
-  printf ("LPR: open %s\n", filename);
+  printf (_("LPR: open %s\n"), filename);
   f = popen (filename, "w");
   if (!f)
     {
@@ -106,7 +104,7 @@ lpr_do_export (HID_Attr_Val * options)
 
   ps_hid_export_to_file (f, options);
 
-  fclose (f);
+  pclose (f);
 }
 
 static void
@@ -135,7 +133,7 @@ hid_lpr_init ()
 
   lpr_hid.struct_size         = sizeof (HID);
   lpr_hid.name                = "lpr";
-  lpr_hid.description         = "Postscript print";
+  lpr_hid.description         = N_("Postscript print");
   lpr_hid.printer             = 1;
   lpr_hid.poly_before         = 1;
 
diff --git a/src/hid/nelma/nelma.c b/src/hid/nelma/nelma.c
index 9659b66..7151f82 100644
--- a/src/hid/nelma/nelma.c
+++ b/src/hid/nelma/nelma.c
@@ -70,6 +70,7 @@
 #include "rats.h"
 
 #include "hid.h"
+#include "hid_draw.h"
 #include "../hidint.h"
 #include "hid/common/hidnogui.h"
 #include "hid/common/draw_helpers.h"
@@ -82,8 +83,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID("$Id$");
-
 #define CRASH fprintf(stderr, "HID error: pcb called unimplemented PNG function %s.\n", __FUNCTION__); abort()
 
 /* Needed for PNG export */
@@ -102,17 +101,16 @@ struct hid_gc_struct {
 	Coord           width;
 	unsigned char   r, g, b;
 	int             erase;
-	int             faded;
 	struct color_struct *color;
 	gdImagePtr      brush;
 };
 
 static HID nelma_hid;
+static HID_DRAW nelma_graphics;
 
 static struct color_struct *black = NULL, *white = NULL;
 static Coord    linewidth = -1;
 static gdImagePtr lastbrush = (gdImagePtr)((void *) -1);
-static int      lastcolor = -1;
 
 /* gd image and file for PNG export */
 static gdImagePtr nelma_im = NULL;
@@ -328,8 +326,8 @@ static void
 nelma_write_nets(FILE * out)
 {
 	LibraryType     netlist;
-	LibraryMenuTypePtr net;
-	LibraryEntryTypePtr pin;
+	LibraryMenuType *net;
+	LibraryEntryType *pin;
 
 	int             n, m, i, idx;
 
@@ -377,8 +375,8 @@ nelma_write_layer(FILE * out, int z, int h,
 		  char *mat)
 {
 	LibraryType     netlist;
-	LibraryMenuTypePtr net;
-	LibraryEntryTypePtr pin;
+	LibraryMenuType *net;
+	LibraryEntryType *pin;
 
 	int             n, m;
 
@@ -457,7 +455,7 @@ nelma_write_layers(FILE * out)
 }
 
 static void 
-nelma_write_object(FILE * out, LibraryEntryTypePtr pin)
+nelma_write_object(FILE * out, LibraryEntryType *pin)
 {
 	int             i, idx;
 	Coord           px = 0, py = 0;
@@ -498,8 +496,8 @@ static void
 nelma_write_objects(FILE * out)
 {
 	LibraryType     netlist;
-	LibraryMenuTypePtr net;
-	LibraryEntryTypePtr pin;
+	LibraryMenuType *net;
+	LibraryEntryType *pin;
 
 	int             n, m;
 
@@ -648,7 +646,6 @@ nelma_start_png_export()
 
 	linewidth = -1;
 	lastbrush = (gdImagePtr)((void *) -1);
-	lastcolor = -1;
 
 	hid_expose_callback(&nelma_hid, &region, 0);
 }
@@ -781,7 +778,7 @@ nelma_destroy_gc(hidGC gc)
 }
 
 static void 
-nelma_use_mask(int use_it)
+nelma_use_mask(enum mask_mode mode)
 {
 	/* does nothing */
 }
@@ -832,7 +829,6 @@ nelma_set_draw_xor(hidGC gc, int xor_)
 static void
 nelma_set_draw_faded(hidGC gc, int faded)
 {
-	gc->faded = faded;
 }
 
 static void
@@ -911,32 +907,6 @@ use_gc(hidGC gc)
 		lastbrush = gc->brush;
 
 	}
-#define CBLEND(gc) (((gc->r)<<24)|((gc->g)<<16)|((gc->b)<<8)|(gc->faded))
-	if (lastcolor != CBLEND(gc)) {
-		if (is_drill || is_mask) {
-#ifdef FIXME
-			fprintf(f, "%d gray\n", gc->erase ? 0 : 1);
-#endif
-			lastcolor = 0;
-		} else {
-			double          r, g, b;
-			r = gc->r;
-			g = gc->g;
-			b = gc->b;
-			if (gc->faded) {
-				r = 0.8 * 255 + 0.2 * r;
-				g = 0.8 * 255 + 0.2 * g;
-				b = 0.8 * 255 + 0.2 * b;
-			}
-#ifdef FIXME
-			if (gc->r == gc->g && gc->g == gc->b)
-				fprintf(f, "%g gray\n", r / 255.0);
-			else
-				fprintf(f, "%g %g %g rgb\n", r / 255.0, g / 255.0, b / 255.0);
-#endif
-			lastcolor = CBLEND(gc);
-		}
-	}
 }
 
 static void
@@ -1068,9 +1038,10 @@ void
 hid_nelma_init()
 {
   memset (&nelma_hid, 0, sizeof (HID));
+  memset (&nelma_graphics, 0, sizeof (HID_DRAW));
 
   common_nogui_init (&nelma_hid);
-  common_draw_helpers_init (&nelma_hid);
+  common_draw_helpers_init (&nelma_graphics);
 
   nelma_hid.struct_size         = sizeof (HID);
   nelma_hid.name                = "nelma";
@@ -1082,23 +1053,26 @@ hid_nelma_init()
   nelma_hid.do_export           = nelma_do_export;
   nelma_hid.parse_arguments     = nelma_parse_arguments;
   nelma_hid.set_layer           = nelma_set_layer;
-  nelma_hid.make_gc             = nelma_make_gc;
-  nelma_hid.destroy_gc          = nelma_destroy_gc;
-  nelma_hid.use_mask            = nelma_use_mask;
-  nelma_hid.set_color           = nelma_set_color;
-  nelma_hid.set_line_cap        = nelma_set_line_cap;
-  nelma_hid.set_line_width      = nelma_set_line_width;
-  nelma_hid.set_draw_xor        = nelma_set_draw_xor;
-  nelma_hid.set_draw_faded      = nelma_set_draw_faded;
-  nelma_hid.draw_line           = nelma_draw_line;
-  nelma_hid.draw_arc            = nelma_draw_arc;
-  nelma_hid.draw_rect           = nelma_draw_rect;
-  nelma_hid.fill_circle         = nelma_fill_circle;
-  nelma_hid.fill_polygon        = nelma_fill_polygon;
-  nelma_hid.fill_rect           = nelma_fill_rect;
   nelma_hid.calibrate           = nelma_calibrate;
   nelma_hid.set_crosshair       = nelma_set_crosshair;
 
+  nelma_hid.graphics            = &nelma_graphics;
+
+  nelma_graphics.make_gc        = nelma_make_gc;
+  nelma_graphics.destroy_gc     = nelma_destroy_gc;
+  nelma_graphics.use_mask       = nelma_use_mask;
+  nelma_graphics.set_color      = nelma_set_color;
+  nelma_graphics.set_line_cap   = nelma_set_line_cap;
+  nelma_graphics.set_line_width = nelma_set_line_width;
+  nelma_graphics.set_draw_xor   = nelma_set_draw_xor;
+  nelma_graphics.set_draw_faded = nelma_set_draw_faded;
+  nelma_graphics.draw_line      = nelma_draw_line;
+  nelma_graphics.draw_arc       = nelma_draw_arc;
+  nelma_graphics.draw_rect      = nelma_draw_rect;
+  nelma_graphics.fill_circle    = nelma_fill_circle;
+  nelma_graphics.fill_polygon   = nelma_fill_polygon;
+  nelma_graphics.fill_rect      = nelma_fill_rect;
+
   hid_register_hid (&nelma_hid);
 
 #include "nelma_lists.h"
diff --git a/src/hid/png/png.c b/src/hid/png/png.c
index f00d407..ff60a76 100644
--- a/src/hid/png/png.c
+++ b/src/hid/png/png.c
@@ -41,6 +41,7 @@
 #include "misc.h"
 
 #include "hid.h"
+#include "hid_draw.h"
 #include "../hidint.h"
 #include "hid/common/hidnogui.h"
 #include "hid/common/draw_helpers.h"
@@ -58,6 +59,7 @@
 #define CRASH fprintf(stderr, "HID error: pcb called unimplemented PNG function %s.\n", __FUNCTION__); abort()
 
 static HID png_hid;
+static HID_DRAW png_graphics;
 
 static void *color_cache = NULL;
 static void *brush_cache = NULL;
@@ -70,7 +72,7 @@ static int show_solder_side;
 #define SCALE(w)   ((int)((w)/scale + 0.5))
 #define SCALE_X(x) ((int)(((x) - x_shift)/scale))
 #define SCALE_Y(y) ((int)(((show_solder_side ? (PCB->MaxHeight-(y)) : (y)) - y_shift)/scale))
-#define SWAP_IF_SOLDER(a,b) do { int c; if (show_solder_side) { c=a; a=b; b=c; }} while (0)
+#define SWAP_IF_SOLDER(a,b) do { Coord c; if (show_solder_side) { c=a; a=b; b=c; }} while (0)
 
 /* Used to detect non-trivial outlines */
 #define NOT_EDGE_X(x) ((x) != 0 && (x) != PCB->MaxWidth)
@@ -162,6 +164,72 @@ static const char *filetypes[] = {
   NULL
 };
 
+
+static const char *mask_colour_names[] = {
+  "green",
+  "red",
+  "blue",
+  "purple",
+  "black",
+  "white",
+  NULL
+};
+
+// These values were arrived at through trial and error.
+// One potential improvement (especially for white) is
+// to use separate color_structs for the multiplication
+// and addition parts of the mask math.
+static const color_struct mask_colours[] = {
+#define MASK_COLOUR_GREEN 0
+  {.r = 60, .g = 160, .b = 60},
+#define MASK_COLOUR_RED 1
+  {.r = 140, .g = 25, .b = 25},
+#define MASK_COLOUR_BLUE 2
+  {.r = 50, .g = 50, .b = 160},
+#define MASK_COLOUR_PURPLE 3
+  {.r = 60, .g = 20, .b = 70},
+#define MASK_COLOUR_BLACK 4
+  {.r = 20, .g = 20, .b = 20},
+#define MASK_COLOUR_WHITE 5
+  {.r = 167, .g = 230, .b = 162}, // <-- needs improvement over FR4
+  {}
+};
+
+
+static const char *plating_type_names[] = {
+#define PLATING_TIN 0
+  "tinned",
+#define PLATING_GOLD 1
+  "gold",
+#define PLATING_SILVER 2
+  "silver",
+#define PLATING_COPPER 3
+  "copper",
+  NULL
+};
+
+
+
+static const char *silk_colour_names[] = {
+  "white",
+  "black",
+  "yellow",
+  NULL
+};
+
+static const color_struct silk_colours[] = {
+#define SILK_COLOUR_WHITE 0
+  {.r = 224, .g = 224, .b = 224},
+#define SILK_COLOUR_BLACK 1
+  {.r = 14, .g = 14, .b = 14},
+#define SILK_COLOUR_YELLOW 2
+  {.r = 185, .g = 185, .b = 10},
+  {}
+};
+
+static const color_struct silk_top_shadow = {.r = 21, .g = 21, .b = 21};
+static const color_struct silk_bottom_shadow = {.r = 14, .g = 14, .b = 14};
+
 HID_Attribute png_attribute_list[] = {
   /* other HIDs expect this to be first.  */
 
@@ -244,7 +312,7 @@ Convert output to monochrome.
 
 /* %start-doc options "93 PNG Options"
 @ftable @code
- at item --only-vivible
+ at item --only-visible
 Limit the bounds of the exported PNG image to the visible items.
 @end ftable
 %end-doc
@@ -266,6 +334,17 @@ Make the background and any holes transparent.
 
 /* %start-doc options "93 PNG Options"
 @ftable @code
+ at item --fill-holes
+Drill holes in pins/pads are filled, not hollow.
+ at end ftable
+%end-doc
+*/
+  {"fill-holes", "Drill holes in pins/pads are filled, not hollow",
+   HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
+#define HA_fill_holes 9
+
+/* %start-doc options "93 PNG Options"
+ at ftable @code
 @item --format <string>
 File format to be exported. Parameter @code{<string>} can be @samp{PNG},
 @samp{GIF}, or @samp{JPEG}.
@@ -274,7 +353,7 @@ File format to be exported. Parameter @code{<string>} can be @samp{PNG},
 */
   {"format", "Export file format",
    HID_Enum, 0, 0, {0, 0, 0}, filetypes, 0},
-#define HA_filetype 9
+#define HA_filetype 10
 
 /* %start-doc options "93 PNG Options"
 @ftable @code
@@ -287,7 +366,7 @@ Amount of extra thickness to add to traces, pads, or pin edges. The parameter
 */
   {"png-bloat", "Amount (in/mm/mil/pix) to add to trace/pad/pin edges (1 = 1/100 mil)",
    HID_String, 0, 0, {0, 0, 0}, 0, 0},
-#define HA_bloat 10
+#define HA_bloat 11
 
 /* %start-doc options "93 PNG Options"
 @ftable @code
@@ -299,7 +378,7 @@ Export a photo realistic image of the layout.
 */
   {"photo-mode", "Photo-realistic export mode",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
-#define HA_photo_mode 11
+#define HA_photo_mode 12
 
 /* %start-doc options "93 PNG Options"
 @ftable @code
@@ -310,7 +389,7 @@ In photo-realistic mode, export the reverse side of the layout. Left-right flip.
 */
   {"photo-flip-x", "Show reverse side of the board, left-right flip",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
-#define HA_photo_flip_x 12
+#define HA_photo_flip_x 13
 
 /* %start-doc options "93 PNG Options"
 @ftable @code
@@ -321,19 +400,59 @@ In photo-realistic mode, export the reverse side of the layout. Up-down flip.
 */
   {"photo-flip-y", "Show reverse side of the board, up-down flip",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
-#define HA_photo_flip_y 13
+#define HA_photo_flip_y 14
+
+/* %start-doc options "93 PNG Options"
+ at ftable @code
+ at cindex photo-mask-colour
+ at item --photo-mask-colour <colour>
+In photo-realistic mode, export the solder mask as this colour. Parameter
+ at code{<colour>} can be @samp{green}, @samp{red}, @samp{blue}, or @samp{purple}.
+ at end ftable
+%end-doc
+*/
+  {"photo-mask-colour", "Colour for the exported colour mask",
+   HID_Enum, 0, 0, {0, 0, 0}, mask_colour_names, 0},
+#define HA_photo_mask_colour 15
+
+/* %start-doc options "93 PNG Options"
+ at ftable @code
+ at cindex photo-plating
+ at item --photo-plating
+In photo-realistic mode, export the exposed copper as though it has this type
+of plating. Parameter @code{<colour>} can be @samp{tinned}, @samp{gold},
+ at samp{silver}, or @samp{copper}.
+ at end ftable
+%end-doc
+*/
+  {"photo-plating", "Type of plating applied to exposed copper in photo-mode",
+   HID_Enum, 0, 0, {0, 0, 0}, plating_type_names, 0},
+#define HA_photo_plating 16
+
+/* %start-doc options "93 PNG Options"
+ at ftable @code
+ at cindex photo-silk-colour
+ at item --photo-silk-colour
+In photo-realistic mode, export the silk screen as this colour. Parameter
+ at code{<colour>} can be @samp{white}, @samp{black}, or @samp{yellow}.
+ at end ftable
+%end-doc
+*/
+  {"photo-silk-colour", "Colour for the exported colour mask",
+   HID_Enum, 0, 0, {0, 0, 0}, silk_colour_names, 0},
+#define HA_photo_silk_colour 17
 
   {"ben-mode", ATTR_UNDOCUMENTED,
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
-#define HA_ben_mode 11
+#define HA_ben_mode 12
 
   {"ben-flip-x", ATTR_UNDOCUMENTED,
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
-#define HA_ben_flip_x 12
+#define HA_ben_flip_x 13
 
   {"ben-flip-y", ATTR_UNDOCUMENTED,
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
-#define HA_ben_flip_y 13
+#define HA_ben_flip_y 14
 };
 
 #define NUM_OPTIONS (sizeof(png_attribute_list)/sizeof(png_attribute_list[0]))
@@ -417,7 +536,7 @@ layer_sort (const void *va, const void *vb)
 
 static const char *filename;
 static BoxType *bounds;
-static int in_mono, as_shown;
+static int in_mono, as_shown, fill_holes;
 
 static void
 parse_bloat (const char *str)
@@ -473,6 +592,8 @@ png_hid_export_to_file (FILE * the_file, HID_Attr_Val * options)
   saved_show_solder_side = Settings.ShowSolderSide;
 
   as_shown = options[HA_as_shown].int_value;
+  fill_holes = options[HA_fill_holes].int_value;
+
   if (!options[HA_as_shown].int_value)
     {
       CLEAR_FLAG (SHOWMASKFLAG, PCB);
@@ -551,7 +672,21 @@ png_hid_export_to_file (FILE * the_file, HID_Attr_Val * options)
 }
 
 static void
-blend (color_struct *dest, float a_amount, color_struct *a, color_struct *b)
+clip (color_struct *dest, color_struct *source)
+{
+#define CLIP(var) \
+  dest->var = source->var;	\
+  if (dest->var > 255) dest->var = 255;	\
+  if (dest->var < 0)   dest->var = 0;
+
+  CLIP (r);
+  CLIP (g);
+  CLIP (b);
+#undef CLIP
+}
+
+static void
+blend (color_struct *dest, double a_amount, color_struct *a, color_struct *b)
 {
   dest->r = a->r * a_amount + b->r * (1 - a_amount);
   dest->g = a->g * a_amount + b->g * (1 - a_amount);
@@ -559,6 +694,34 @@ blend (color_struct *dest, float a_amount, color_struct *a, color_struct *b)
 }
 
 static void
+multiply (color_struct *dest, color_struct *a, color_struct *b)
+{
+  dest->r = (a->r * b->r) / 255;
+  dest->g = (a->g * b->g) / 255;
+  dest->b = (a->b * b->b) / 255;
+}
+
+static void
+add (color_struct *dest, double a_amount, const color_struct *a, double b_amount, const color_struct *b)
+{
+  dest->r = a->r * a_amount + b->r * b_amount;
+  dest->g = a->g * a_amount + b->g * b_amount;
+  dest->b = a->b * a_amount + b->b * b_amount;
+
+  clip (dest, dest);
+}
+
+static void
+subtract (color_struct *dest, double a_amount, const color_struct *a, double b_amount, const color_struct *b)
+{
+  dest->r = a->r * a_amount - b->r * b_amount;
+  dest->g = a->g * a_amount - b->g * b_amount;
+  dest->b = a->b * a_amount - b->b * b_amount;
+
+  clip (dest, dest);
+}
+
+static void
 rgb (color_struct *dest, int r, int g, int b)
 {
   dest->r = r;
@@ -634,8 +797,9 @@ png_do_export (HID_Attr_Val * options)
   int save_ons[MAX_LAYER + 2];
   int i;
   BoxType *bbox;
-  int w, h;
-  int xmax, ymax, dpi;
+  Coord w, h;
+  Coord xmax, ymax;
+  int dpi;
   const char *fmt;
   bool format_error = false;
 
@@ -868,6 +1032,7 @@ png_do_export (HID_Attr_Val * options)
 	  for (y=0; y<gdImageSY (im); y++)
 	    {
 	      color_struct p, cop;
+	      color_struct mask_colour, silk_colour;
 	      int cc, mask, silk;
 	      int transparent;
 	     
@@ -898,27 +1063,50 @@ png_do_export (HID_Attr_Val * options)
 		    rgb (&cop, 220, 145, 230);
 		  else
 		    {
-		      rgb (&cop, 140, 150, 160);
-
-		      r = (rand() % 5 - 2) * 2;
-		      cop.r += r;
-		      cop.g += r;
-		      cop.b += r;
-
+		      if (options[HA_photo_plating].int_value == PLATING_GOLD)
+			{
+			  // ENIG
+			  rgb (&cop, 185, 146, 52);
+
+			  // increase top shadow to increase shininess
+			  if (cc == TOP_SHADOW)
+			    blend (&cop, 0.7, &cop, &white);
+			}
+		      else if (options[HA_photo_plating].int_value == PLATING_TIN)
+			{
+			  // tinned
+			  rgb (&cop, 140, 150, 160);
+
+			  // add some variation to make it look more matte
+			  r = (rand() % 5 - 2) * 2;
+			  cop.r += r;
+			  cop.g += r;
+			  cop.b += r;
+			}
+		      else if (options[HA_photo_plating].int_value == PLATING_SILVER)
+			{
+			  // silver
+			  rgb (&cop, 192, 192, 185);
+
+			  // increase top shadow to increase shininess
+			  if (cc == TOP_SHADOW)
+			    blend (&cop, 0.7, &cop, &white);
+			}
+		      else if (options[HA_photo_plating].int_value == PLATING_COPPER)
+			{
+			  // copper
+			  rgb (&cop, 184, 115, 51);
+
+			  // increase top shadow to increase shininess
+			  if (cc == TOP_SHADOW)
+			    blend (&cop, 0.7, &cop, &white);
+			}
 		    }
 		  
 		  if (cc == TOP_SHADOW)
-		    {
-		      cop.r = 255 - (255 - cop.r) * 0.7;
-		      cop.g = 255 - (255 - cop.g) * 0.7;
-		      cop.b = 255 - (255 - cop.b) * 0.7;
-		    }
+		    blend (&cop, 0.7, &cop, &white);
 		  if (cc == BOTTOM_SHADOW)
-		    {
-		      cop.r *= 0.7;
-		      cop.g *= 0.7;
-		      cop.b *= 0.7;
-		    }
+		    blend (&cop, 0.7, &cop, &black);
 		}
 
 	      if (photo_drill && !gdImageGetPixel (photo_drill, x, y)) 
@@ -928,18 +1116,19 @@ png_do_export (HID_Attr_Val * options)
 		}
 	      else if (silk)
 		{
+		  silk_colour = silk_colours[options[HA_photo_silk_colour].int_value];
+		  blend (&p, 1.0, &silk_colour, &silk_colour);
 		  if (silk == TOP_SHADOW)
-		    rgb (&p, 255, 255, 255);
+		    add (&p, 1.0, &p, 1.0, &silk_top_shadow);
 		  else if (silk == BOTTOM_SHADOW)
-		    rgb (&p, 192, 192, 192);
-		  else
-		    rgb (&p, 224, 224, 224);
+		    subtract (&p, 1.0, &p, 1.0, &silk_bottom_shadow);
 		}
 	      else if (mask)
 		{
 		  p = cop;
-		  p.r /= 2;
-		  p.b /= 2;
+		  mask_colour = mask_colours[options[HA_photo_mask_colour].int_value];
+		  multiply (&p, &p, &mask_colour);
+		  add (&p, 1, &p, 0.2, &mask_colour);
 		  if (mask == TOP_SHADOW)
 		    blend (&p, 0.7, &p, &white);
 		  if (mask == BOTTOM_SHADOW)
@@ -1017,6 +1206,7 @@ png_parse_arguments (int *argc, char ***argv)
 
 static int is_mask;
 static int is_drill;
+static int is_copper;
 
 static int
 png_set_layer (const char *name, int group, int empty)
@@ -1039,6 +1229,10 @@ png_set_layer (const char *name, int group, int empty)
 
   is_drill = (SL_TYPE (idx) == SL_PDRILL || SL_TYPE (idx) == SL_UDRILL);
   is_mask = (SL_TYPE (idx) == SL_MASK);
+  is_copper = (SL_TYPE (idx) == 0);
+
+  if (is_drill && fill_holes)
+    return 0;
 
   if (SL_TYPE (idx) == SL_PASTE)
     return 0;
@@ -1183,16 +1377,16 @@ png_destroy_gc (hidGC gc)
 }
 
 static void
-png_use_mask (int use_it)
+png_use_mask (enum mask_mode mode)
 {
   if (photo_mode)
     return;
 
-  if (use_it == HID_MASK_CLEAR)
+  if (mode == HID_MASK_CLEAR)
     {
       return;
     }
-  if (use_it)
+  if (mode != HID_MASK_OFF)
     {
       if (mask_im == NULL)
 	{
@@ -1424,18 +1618,6 @@ png_fill_rect (hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2)
   gdImageSetThickness (im, 0);
   linewidth = 0;
 
-  if (x1 > x2)
-    {
-      Coord t = x1;
-      x2 = x2;
-      x2 = t;
-    }
-  if (y1 > y2)
-    {
-      Coord t = y1;
-      y2 = y2;
-      y2 = t;
-    }
   y1 -= bloat;
   y2 += bloat;
   SWAP_IF_SOLDER (y1, y2);
@@ -1493,13 +1675,15 @@ png_draw_line (hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2)
        * it as a filled polygon.
        */
       int fg = gdImageColorResolve (im, gc->color->r, gc->color->g,
-				    gc->color->b),
-	w = gc->width, dx = x2 - x1, dy = y2 - y1, dwx, dwy;
+				    gc->color->b);
+      Coord w = gc->width;
+      Coord dwx, dwy;
+
       gdPoint p[4];
-      double l = sqrt (dx * dx + dy * dy) * 2;
+      double l = Distance(x1, y1, x2, y2) * 2;
 
       w += 2 * bloat;
-      dwx = -w / l * dy; dwy =  w / l * dx;
+      dwx = -w / l * (y2 - y1); dwy =  w / l * (x2 - x1);
       p[0].x = SCALE_X (x1 + dwx - dwy); p[0].y = SCALE_Y(y1 + dwy + dwx);
       p[1].x = SCALE_X (x1 - dwx - dwy); p[1].y = SCALE_Y(y1 - dwy + dwx);
       p[2].x = SCALE_X (x2 - dwx + dwy); p[2].y = SCALE_Y(y2 - dwy - dwx);
@@ -1579,6 +1763,9 @@ png_fill_circle (hidGC gc, Coord cx, Coord cy, Coord radius)
 
   use_gc (gc);
 
+  if (fill_holes && gc->is_erase && is_copper)
+    return;
+
   if (gc->is_erase)
     my_bloat = -2 * bloat;
   else
@@ -1638,9 +1825,10 @@ void
 hid_png_init ()
 {
   memset (&png_hid, 0, sizeof (HID));
+  memset (&png_graphics, 0, sizeof (HID_DRAW));
 
   common_nogui_init (&png_hid);
-  common_draw_helpers_init (&png_hid);
+  common_draw_helpers_init (&png_graphics);
 
   png_hid.struct_size = sizeof (HID);
   png_hid.name        = "png";
@@ -1652,22 +1840,25 @@ hid_png_init ()
   png_hid.do_export           = png_do_export;
   png_hid.parse_arguments     = png_parse_arguments;
   png_hid.set_layer           = png_set_layer;
-  png_hid.make_gc             = png_make_gc;
-  png_hid.destroy_gc          = png_destroy_gc;
-  png_hid.use_mask            = png_use_mask;
-  png_hid.set_color           = png_set_color;
-  png_hid.set_line_cap        = png_set_line_cap;
-  png_hid.set_line_width      = png_set_line_width;
-  png_hid.set_draw_xor        = png_set_draw_xor;
-  png_hid.draw_line           = png_draw_line;
-  png_hid.draw_arc            = png_draw_arc;
-  png_hid.draw_rect           = png_draw_rect;
-  png_hid.fill_circle         = png_fill_circle;
-  png_hid.fill_polygon        = png_fill_polygon;
-  png_hid.fill_rect           = png_fill_rect;
   png_hid.calibrate           = png_calibrate;
   png_hid.set_crosshair       = png_set_crosshair;
 
+  png_hid.graphics            = &png_graphics;
+
+  png_graphics.make_gc        = png_make_gc;
+  png_graphics.destroy_gc     = png_destroy_gc;
+  png_graphics.use_mask       = png_use_mask;
+  png_graphics.set_color      = png_set_color;
+  png_graphics.set_line_cap   = png_set_line_cap;
+  png_graphics.set_line_width = png_set_line_width;
+  png_graphics.set_draw_xor   = png_set_draw_xor;
+  png_graphics.draw_line      = png_draw_line;
+  png_graphics.draw_arc       = png_draw_arc;
+  png_graphics.draw_rect      = png_draw_rect;
+  png_graphics.fill_circle    = png_fill_circle;
+  png_graphics.fill_polygon   = png_fill_polygon;
+  png_graphics.fill_rect      = png_fill_rect;
+
 #ifdef HAVE_SOME_FORMAT
   hid_register_hid (&png_hid);
 
diff --git a/src/hid/png/png.h b/src/hid/png/png.h
index e528753..bdd06e1 100644
--- a/src/hid/png/png.h
+++ b/src/hid/png/png.h
@@ -1,3 +1 @@
-/* $Id$ */
-
 extern void png_hid_export_to_file (FILE *, HID_Attr_Val *);
diff --git a/src/hid/ps/eps.c b/src/hid/ps/eps.c
index a406f38..1445491 100644
--- a/src/hid/ps/eps.c
+++ b/src/hid/ps/eps.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -16,6 +14,7 @@
 #include "pcb-printf.h"
 
 #include "hid.h"
+#include "hid_draw.h"
 #include "../hidint.h"
 #include "hid/common/hidnogui.h"
 #include "hid/common/draw_helpers.h"
@@ -26,8 +25,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 #define CRASH fprintf(stderr, "HID error: pcb called unimplemented EPS function %s.\n", __FUNCTION__); abort()
 
 /*----------------------------------------------------------------------------*/
@@ -39,7 +36,7 @@ static void eps_parse_arguments (int *argc, char ***argv);
 static int eps_set_layer (const char *name, int group, int empty);
 static hidGC eps_make_gc (void);
 static void eps_destroy_gc (hidGC gc);
-static void eps_use_mask (int use_it);
+static void eps_use_mask (enum mask_mode mode);
 static void eps_set_color (hidGC gc, const char *name);
 static void eps_set_line_cap (hidGC gc, EndCapStyle style);
 static void eps_set_line_width (hidGC gc, Coord width);
@@ -63,6 +60,7 @@ typedef struct hid_gc_struct
 } hid_gc_struct;
 
 static HID eps_hid;
+static HID_DRAW eps_graphics;
 
 static FILE *f = 0;
 static Coord linewidth = -1;
@@ -273,7 +271,10 @@ eps_hid_export_to_file (FILE * the_file, HID_Attr_Val * options)
   in_mono = options[HA_mono].int_value;
 
 #define pcb2em(x) 1 + COORD_TO_INCH (x) * 72.0 * options[HA_scale].real_value
-  fprintf (f, "%%%%BoundingBox: 0 0 %f %f\n",
+  fprintf (f, "%%%%BoundingBox: 0 0 %lli %lli\n",
+	   llrint (pcb2em (bounds->X2 - bounds->X1)),
+	   llrint (pcb2em (bounds->Y2 - bounds->Y1)) );
+  fprintf (f, "%%%%HiResBoundingBox: 0.000000 0.000000 %.6f %.6f\n",
 	   pcb2em (bounds->X2 - bounds->X1),
 	   pcb2em (bounds->Y2 - bounds->Y1));
 #undef pcb2em
@@ -443,10 +444,10 @@ eps_destroy_gc (hidGC gc)
 }
 
 static void
-eps_use_mask (int use_it)
+eps_use_mask (enum mask_mode mode)
 {
   static int mask_pending = 0;
-  switch (use_it)
+  switch (mode)
     {
     case HID_MASK_CLEAR:
       if (!mask_pending)
@@ -455,6 +456,7 @@ eps_use_mask (int use_it)
 	  fprintf (f, "gsave\n");
 	}
       break;
+    case HID_MASK_BEFORE:
     case HID_MASK_AFTER:
       break;
     case HID_MASK_OFF:
@@ -666,9 +668,10 @@ void
 hid_eps_init ()
 {
   memset (&eps_hid, 0, sizeof (HID));
+  memset (&eps_graphics, 0, sizeof (HID_DRAW));
 
   common_nogui_init (&eps_hid);
-  common_draw_helpers_init (&eps_hid);
+  common_draw_helpers_init (&eps_graphics);
 
   eps_hid.struct_size         = sizeof (HID);
   eps_hid.name                = "eps";
@@ -680,21 +683,24 @@ hid_eps_init ()
   eps_hid.do_export           = eps_do_export;
   eps_hid.parse_arguments     = eps_parse_arguments;
   eps_hid.set_layer           = eps_set_layer;
-  eps_hid.make_gc             = eps_make_gc;
-  eps_hid.destroy_gc          = eps_destroy_gc;
-  eps_hid.use_mask            = eps_use_mask;
-  eps_hid.set_color           = eps_set_color;
-  eps_hid.set_line_cap        = eps_set_line_cap;
-  eps_hid.set_line_width      = eps_set_line_width;
-  eps_hid.set_draw_xor        = eps_set_draw_xor;
-  eps_hid.draw_line           = eps_draw_line;
-  eps_hid.draw_arc            = eps_draw_arc;
-  eps_hid.draw_rect           = eps_draw_rect;
-  eps_hid.fill_circle         = eps_fill_circle;
-  eps_hid.fill_polygon        = eps_fill_polygon;
-  eps_hid.fill_rect           = eps_fill_rect;
   eps_hid.calibrate           = eps_calibrate;
   eps_hid.set_crosshair       = eps_set_crosshair;
 
+  eps_hid.graphics            = &eps_graphics;
+
+  eps_graphics.make_gc        = eps_make_gc;
+  eps_graphics.destroy_gc     = eps_destroy_gc;
+  eps_graphics.use_mask       = eps_use_mask;
+  eps_graphics.set_color      = eps_set_color;
+  eps_graphics.set_line_cap   = eps_set_line_cap;
+  eps_graphics.set_line_width = eps_set_line_width;
+  eps_graphics.set_draw_xor   = eps_set_draw_xor;
+  eps_graphics.draw_line      = eps_draw_line;
+  eps_graphics.draw_arc       = eps_draw_arc;
+  eps_graphics.draw_rect      = eps_draw_rect;
+  eps_graphics.fill_circle    = eps_fill_circle;
+  eps_graphics.fill_polygon   = eps_fill_polygon;
+  eps_graphics.fill_rect      = eps_fill_rect;
+
   hid_register_hid (&eps_hid);
 }
diff --git a/src/hid/ps/ps.c b/src/hid/ps/ps.c
index 8e29fd5..c7a1901 100644
--- a/src/hid/ps/ps.c
+++ b/src/hid/ps/ps.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -19,6 +17,7 @@
 #include "pcb-printf.h"
 
 #include "hid.h"
+#include "hid_draw.h"
 #include "../hidint.h"
 #include "hid/common/hidnogui.h"
 #include "hid/common/draw_helpers.h"
@@ -30,8 +29,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 #define CRASH fprintf(stderr, "HID error: pcb called unimplemented PS function %s.\n", __FUNCTION__); abort()
 
 static int ps_set_layer (const char *name, int group, int empty);
@@ -65,7 +62,7 @@ typedef struct
   char *name;
   Coord Width, Height;
   Coord MarginX, MarginY;
-} MediaType, *MediaTypePtr;
+} MediaType;
 
 /*
  * Metric ISO sizes in mm.  See http://en.wikipedia.org/wiki/ISO_paper_sizes
@@ -153,7 +150,7 @@ Name of the postscript output file. Can contain a path.
 @end ftable
 %end-doc
 */
-  {"psfile", "Postscript output file",
+  {N_("psfile"), N_("Postscript output file"),
    HID_String, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_psfile 0
 
@@ -165,7 +162,7 @@ Print a centering target in large drill holes.
 @end ftable
 %end-doc
 */
-  {"drill-helper", "Print a centering target in large drill holes",
+  {N_("drill-helper"), N_("Print a centering target in large drill holes"),
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_drillhelper 1
 
@@ -177,7 +174,7 @@ Print alignment marks on each sheet. This is meant to ease alignment during expo
 @end ftable
 %end-doc
 */
-  {"align-marks", "Print alignment marks on each sheet",
+  {N_("align-marks"), N_("Print alignment marks on each sheet"),
    HID_Boolean, 0, 0, {1, 0, 0}, 0, 0},
 #define HA_alignmarks 2
 
@@ -188,7 +185,7 @@ Print the contents of the outline layer on each sheet.
 @end ftable
 %end-doc
 */
-  {"outline", "Print outline on each sheet",
+  {N_("outline"), N_("Print outline on each sheet"),
    HID_Boolean, 0, 0, {1, 0, 0}, 0, 0},
 #define HA_outline 3
 /* %start-doc options "91 Postscript Export"
@@ -198,7 +195,7 @@ Print mirror image.
 @end ftable
 %end-doc
 */
-  {"mirror", "Print mirror image of every page",
+  {N_("mirror"), N_("Print mirror image of every page"),
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_mirror 4
 
@@ -209,7 +206,7 @@ Scale output to make the board fit the page.
 @end ftable
 %end-doc
 */
-  {"fill-page", "Scale board to fill page",
+  {N_("fill-page"), N_("Scale board to fill page"),
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_fillpage 5
 
@@ -220,7 +217,7 @@ Print mirror image of appropriate layers.
 @end ftable
 %end-doc
 */
-  {"auto-mirror", "Print mirror image of appropriate layers",
+  {N_("auto-mirror"), N_("Print mirror image of appropriate layers"),
    HID_Boolean, 0, 0, {1, 0, 0}, 0, 0},
 #define HA_automirror 6
 
@@ -231,7 +228,7 @@ Postscript output in color.
 @end ftable
 %end-doc
 */
-  {"ps-color", "Prints in color",
+  {N_("ps-color"), N_("Prints in color"),
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_color 7
 
@@ -243,7 +240,7 @@ Amount to add to trace/pad/pin edges.
 @end ftable
 %end-doc
 */
-  {"ps-bloat", "Amount to add to trace/pad/pin edges",
+  {N_("ps-bloat"), N_("Amount to add to trace/pad/pin edges"),
    HID_Coord, -MIL_TO_COORD (100), MIL_TO_COORD (100), {0, 0, 0}, 0, 0},
 #define HA_psbloat 8
 
@@ -255,7 +252,7 @@ Draw objects as white-on-black.
 @end ftable
 %end-doc
 */
- {"ps-invert", "Draw objects as white-on-black",
+ {N_("ps-invert"), N_("Draw objects as white-on-black"),
    HID_Boolean, 0, 0, {0, 0, 0}, 0, 0},
 #define HA_psinvert 9
 
@@ -271,7 +268,7 @@ to @samp{A10}, @samp{B0} to @samp{B10}, @samp{Letter}, @samp{11x17},
 @end ftable
 %end-doc
 */
-  {"media", "media type",
+  {N_("media"), N_("Media type"),
    HID_Enum, 0, 0, {22, 0, 0}, medias, 0},
 #define HA_media 10
 
@@ -283,7 +280,8 @@ Fade amount for assembly drawings (0.0=missing, 1.0=solid).
 @end ftable
 %end-doc
 */
-  {"psfade", "Fade amount for assembly drawings (0.0=missing, 1.0=solid)",
+  {N_("psfade"),
+   N_("Fade amount for assembly drawings (0.0=missing, 1.0=solid)"),
    HID_Real, 0, 1, {0, 0, 0.40}, 0, 0},
 #define HA_psfade 11
 
@@ -294,7 +292,8 @@ Scale value to compensate for printer sizing errors (1.0 = full scale).
 @end ftable
 %end-doc
 */
-  {"scale", "Scale value to compensate for printer sizing errors (1.0 = full scale)",
+  {N_("scale"),
+   N_("Scale value to compensate for printer sizing errors (1.0 = full scale)"),
    HID_Real, 0.01, 4, {0, 0, 1.00}, 0, 0},
 #define HA_scale 12
 
@@ -306,7 +305,8 @@ Produce multiple files, one per page, instead of a single multi page file.
 @end ftable
 %end-doc
 */
-  {"multi-file", "Produce multiple files, one per page, instead of a single file",
+  {N_("multi-file"),
+   N_("Produce multiple files, one per page, instead of a single file"),
    HID_Boolean, 0, 0, {0, 0, 0.40}, 0, 0},
 #define HA_multifile 13
 
@@ -317,7 +317,7 @@ Paper width. Used for x-Axis calibration.
 @end ftable
 %end-doc
 */
-  {"xcalib", "Paper width. Used for x-Axis calibration",
+  {N_("xcalib"), N_("Paper width. Used for x-Axis calibration"),
    HID_Real, 0, 0, {0, 0, 1.0}, 0, 0},
 #define HA_xcalib 14
 
@@ -328,7 +328,7 @@ Paper height. Used for y-Axis calibration.
 @end ftable
 %end-doc
 */
-  {"ycalib", "Paper height. Used for y-Axis calibration",
+  {N_("ycalib"), N_("Paper height. Used for y-Axis calibration"),
    HID_Real, 0, 0, {0, 0, 1.0}, 0, 0},
 #define HA_ycalib 15
 
@@ -339,7 +339,8 @@ Draw drill holes in pins / vias, instead of leaving solid copper.
 @end ftable
 %end-doc
 */
-  {"drill-copper", "Draw drill holes in pins / vias, instead of leaving solid copper",
+  {N_("drill-copper"),
+   N_("Draw drill holes in pins / vias, instead of leaving solid copper"),
    HID_Boolean, 0, 0, {1, 0, 0}, 0, 0},
 #define HA_drillcopper 16
 
@@ -351,7 +352,7 @@ Print file name and scale on printout.
 @end ftable
 %end-doc
 */
-  {"show-legend", "Print file name and scale on printout",
+  {N_("show-legend"), N_("Print file name and scale on printout"),
    HID_Boolean, 0, 0, {1, 0, 0}, 0, 0},
 #define HA_legend 17
 };
@@ -388,7 +389,7 @@ static struct {
   bool drillcopper;
   bool legend;
 
-  LayerTypePtr outline_layer;
+  LayerType *outline_layer;
 
   double scale_factor;
 
@@ -611,7 +612,7 @@ ps_hid_export_to_file (FILE * the_file, HID_Attr_Val * options)
   global.fillpage     = options[HA_fillpage].int_value;
   global.automirror   = options[HA_automirror].int_value;
   global.incolor      = options[HA_color].int_value;
-  global.bloat        = options[HA_psbloat].int_value;
+  global.bloat        = options[HA_psbloat].coord_value;
   global.invert       = options[HA_psinvert].int_value;
   global.fade_ratio   = CLAMP (options[HA_psfade].real_value, 0, 1);
   global.media_idx    = options[HA_media].int_value;
@@ -761,7 +762,7 @@ ps_parse_arguments (int *argc, char ***argv)
 }
 
 static void
-corner (FILE *fh, Coord x, Coord y, Coord dx, Coord dy)
+corner (FILE *fh, Coord x, Coord y, int dx, int dy)
 {
   Coord len   = MIL_TO_COORD (2000);
   Coord len2  = MIL_TO_COORD (200);
@@ -775,7 +776,7 @@ corner (FILE *fh, Coord x, Coord y, Coord dx, Coord dy)
    * of the thick line.
    */
 
-  pcb_fprintf (fh, "gsave %mi setlinewidth %mi %mi translate %mi %mi scale\n",
+  pcb_fprintf (fh, "gsave %mi setlinewidth %mi %mi translate %d %d scale\n",
                thick * 2, x, y, dx, dy);
   pcb_fprintf (fh, "%mi %mi moveto %mi %mi %mi 0 90 arc %mi %mi lineto\n",
                len, thick, thick, thick, len2 + thick, thick, len);
@@ -996,10 +997,11 @@ ps_set_layer (const char *name, int group, int empty)
     fprintf (global.f, "gsave tx ty translate 1 -1 scale 0 0 moveto ( ) show grestore newpath /ty ty ts sub def\n");
 #endif
 
-  /* If we're printing a layer other than the outline layer, and
-     we want to "print outlines", and we have an outline layer,
+  /* If we're printing a copper layer other than the outline layer,
+     and we want to "print outlines", and we have an outline layer,
      print the outline layer on this layer also.  */
   if (global.outline &&
+      global.is_copper &&
       global.outline_layer != NULL &&
       global.outline_layer != PCB->Data->Layer+idx &&
       strcmp (name, "outline") != 0 &&
@@ -1028,7 +1030,7 @@ ps_destroy_gc (hidGC gc)
 }
 
 static void
-ps_use_mask (int use_it)
+ps_use_mask (enum mask_mode mode)
 {
   /* does nothing */
 }
@@ -1246,7 +1248,7 @@ ps_fill_polygon (hidGC gc, int n_coords, Coord *x, Coord *y)
 }
 
 static void
-ps_fill_pcb_polygon (hidGC gc, PolygonType * poly, const BoxType * clip_box)
+fill_polyarea (hidGC gc, POLYAREA * pa, const BoxType * clip_box)
 {
   /* Ignore clip_box, just draw everything */
 
@@ -1256,7 +1258,7 @@ ps_fill_pcb_polygon (hidGC gc, PolygonType * poly, const BoxType * clip_box)
 
   use_gc (gc);
 
-  pl = poly->Clipped->contours;
+  pl = pa->contours;
 
   do
     {
@@ -1275,6 +1277,19 @@ ps_fill_pcb_polygon (hidGC gc, PolygonType * poly, const BoxType * clip_box)
 }
 
 static void
+ps_draw_pcb_polygon (hidGC gc, PolygonType * poly, const BoxType * clip_box)
+{
+  fill_polyarea (gc, poly->Clipped, clip_box);
+  if (TEST_FLAG (FULLPOLYFLAG, poly))
+    {
+      POLYAREA *pa;
+
+      for (pa = poly->Clipped->f; pa != poly->Clipped; pa = pa->f)
+        fill_polyarea (gc, pa, clip_box);
+    }
+}
+
+static void
 ps_fill_rect (hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2)
 {
   use_gc (gc);
@@ -1311,7 +1326,7 @@ ps_fill_rect (hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2)
 }
 
 HID_Attribute ps_calib_attribute_list[] = {
-  {"lprcommand", "Command to print",
+  {N_("lprcommand"), N_("Command to print"),
    HID_String, 0, 0, {0, 0, 0}, 0, 0},
 };
 
@@ -1377,13 +1392,13 @@ static const char * const calib_lines[] = {
   "    /y y 0.25 sub def\n",
   "} bind def\n",
   "\n",
-  "(Please measure ONE of the horizontal lines, in the units indicated for)t\n",
-  "(that line, and enter that value as X.  Similarly, measure ONE of the)t\n",
-  "(vertical lines and enter that value as Y.  Measurements should be)t\n",
-  "(between the flat faces of the semicircles.)t\n",
+  "(Please measure between the flat faces of ONE pair of semi-circles on)t\n",
+  "(both X and Y in the indicated units. Enter these values as X and Y)t\n",
+  "(respectively. One member of each pair must be one of the semicircles)t\n",
+  "(in the lower left corner. Nominal lengths on X are 4 in, 15 cm and 7.5 in.)t\n",
+  "(Nominal lengths on Y are 4 in, 20 cm and 10 in.)t\n",
   "()t\n",
-  "(The large box is 10.25 by 7.75 inches)t\n",
-  "\n",
+  "(The large box is 10.25 by 7.75 inches and is not used for calibration.)t\n",  "\n",
   "/in { } bind def\n",
   "/cm { 2.54 div } bind def\n",
   "/mm { 25.4 div } bind def\n",
@@ -1420,8 +1435,9 @@ ps_calibrate_1 (double xval, double yval, int use_command)
 		ps_attribute_list[HA_xcalib].default_val.real_value =
 		  global.calibration_x = xval;
 	      else
-		Message("X value of %g is too far off.\n"
-			"Expecting it near: 1.0, 4.0, 15.0, 7.5\n", xval);
+		Message(_("X value of %g is too far off.\n"
+			"Expecting it near: %.1f, %.1f, %.1f, %.1f\n"),
+			xval, 1.0, 4.0, 15.0, 7.5);
 	    }
       if (guess (yval, 4, &global.calibration_y))
 	if (guess (yval, 20, &global.calibration_y))
@@ -1431,8 +1447,9 @@ ps_calibrate_1 (double xval, double yval, int use_command)
 		ps_attribute_list[HA_ycalib].default_val.real_value =
 		  global.calibration_y = yval;
 	      else
-		Message("Y value of %g is too far off.\n"
-			"Expecting it near: 1.0, 4.0, 20.0, 10.0\n", yval);
+		Message(_("Y value of %g is too far off.\n"
+			"Expecting it near: %.1f, %.1f, %.1f, %.1f\n"),
+			yval, 1.0, 4.0, 20.0, 10.0);
 	    }
       return;
     }
@@ -1459,14 +1476,13 @@ ps_calibrate_1 (double xval, double yval, int use_command)
   for (c=0; calib_lines[c]; c++)
     fputs(calib_lines[c], ps_cal_file);
 
-  fprintf (ps_cal_file, "4 in 0.5 (Y in) cbar\n");
-  fprintf (ps_cal_file, "20 cm 1.5 (Y cm) cbar\n");
-  fprintf (ps_cal_file, "10 in 2.5 (Y in) cbar\n");
+  fprintf (ps_cal_file, "4 in 0.5 (Y in nom=4) cbar\n");
+  fprintf (ps_cal_file, "20 cm 1.5 (Y cm nom=20) cbar\n");
+  fprintf (ps_cal_file, "10 in 2.5 (Y in nom=10) cbar\n");
   fprintf (ps_cal_file, "-90 rotate\n");
-  fprintf (ps_cal_file, "4 in -0.5 (X in) cbar\n");
-  fprintf (ps_cal_file, "15 cm -1.5 (X cm) cbar\n");
-  fprintf (ps_cal_file, "7.5 in -2.5 (X in) cbar\n");
-
+  fprintf (ps_cal_file, "4 in -0.5 (X in nom=4) cbar\n");
+  fprintf (ps_cal_file, "15 cm -1.5 (X cm nom=15) cbar\n");
+  fprintf (ps_cal_file, "7.5 in -2.5 (X in nom=7.5) cbar\n");
   fprintf (ps_cal_file, "showpage\n");
 
   fprintf (ps_cal_file, "%%%%EOF\n");
@@ -1491,6 +1507,7 @@ ps_set_crosshair (int x, int y, int action)
 #include "dolists.h"
 
 HID ps_hid;
+static HID_DRAW ps_graphics;
 
 void ps_ps_init (HID *hid)
 {
@@ -1498,40 +1515,49 @@ void ps_ps_init (HID *hid)
   hid->do_export          = ps_do_export;
   hid->parse_arguments    = ps_parse_arguments;
   hid->set_layer          = ps_set_layer;
-  hid->make_gc            = ps_make_gc;
-  hid->destroy_gc         = ps_destroy_gc;
-  hid->use_mask           = ps_use_mask;
-  hid->set_color          = ps_set_color;
-  hid->set_line_cap       = ps_set_line_cap;
-  hid->set_line_width     = ps_set_line_width;
-  hid->set_draw_xor       = ps_set_draw_xor;
-  hid->set_draw_faded     = ps_set_draw_faded;
-  hid->draw_line          = ps_draw_line;
-  hid->draw_arc           = ps_draw_arc;
-  hid->draw_rect          = ps_draw_rect;
-  hid->fill_circle        = ps_fill_circle;
-  hid->fill_polygon       = ps_fill_polygon;
-  hid->fill_pcb_polygon   = ps_fill_pcb_polygon;
-  hid->fill_rect          = ps_fill_rect;
   hid->calibrate          = ps_calibrate;
   hid->set_crosshair      = ps_set_crosshair;
 }
 
+void ps_ps_graphics_init (HID_DRAW *graphics)
+{
+  graphics->make_gc            = ps_make_gc;
+  graphics->destroy_gc         = ps_destroy_gc;
+  graphics->use_mask           = ps_use_mask;
+  graphics->set_color          = ps_set_color;
+  graphics->set_line_cap       = ps_set_line_cap;
+  graphics->set_line_width     = ps_set_line_width;
+  graphics->set_draw_xor       = ps_set_draw_xor;
+  graphics->set_draw_faded     = ps_set_draw_faded;
+  graphics->draw_line          = ps_draw_line;
+  graphics->draw_arc           = ps_draw_arc;
+  graphics->draw_rect          = ps_draw_rect;
+  graphics->fill_circle        = ps_fill_circle;
+  graphics->fill_polygon       = ps_fill_polygon;
+  graphics->fill_rect          = ps_fill_rect;
+
+  graphics->draw_pcb_polygon   = ps_draw_pcb_polygon;
+}
+
 void
 hid_ps_init ()
 {
   memset (&ps_hid, 0, sizeof (HID));
+  memset (&ps_graphics, 0, sizeof (HID_DRAW));
 
   common_nogui_init (&ps_hid);
-  common_draw_helpers_init (&ps_hid);
+  common_draw_helpers_init (&ps_graphics);
   ps_ps_init (&ps_hid);
+  ps_ps_graphics_init (&ps_graphics);
 
   ps_hid.struct_size        = sizeof (HID);
   ps_hid.name               = "ps";
-  ps_hid.description        = "Postscript export";
+  ps_hid.description        = N_("Postscript export");
   ps_hid.exporter           = 1;
   ps_hid.poly_before        = 1;
 
+  ps_hid.graphics           = &ps_graphics;
+
   hid_register_hid (&ps_hid);
 
   hid_eps_init ();
diff --git a/src/hid/ps/ps.h b/src/hid/ps/ps.h
index 661eaa8..cda1dec 100644
--- a/src/hid/ps/ps.h
+++ b/src/hid/ps/ps.h
@@ -1,8 +1,7 @@
-/* $Id$ */
-
 extern HID ps_hid;
 extern void ps_hid_export_to_file (FILE *, HID_Attr_Val *);
 extern void ps_start_file (FILE *);
 extern void ps_calibrate_1 (double , double , int);
 extern void hid_eps_init ();
 void ps_ps_init (HID *hid);
+void ps_ps_graphics_init (HID_DRAW *graphics);
diff --git a/src/hid_draw.h b/src/hid_draw.h
new file mode 100644
index 0000000..b65d804
--- /dev/null
+++ b/src/hid_draw.h
@@ -0,0 +1,66 @@
+enum mask_mode {
+  HID_MASK_OFF    = 0, /* Flush the buffer and return to non-mask operation. */
+  HID_MASK_BEFORE = 1, /* Polygons being drawn before clears.                */
+  HID_MASK_CLEAR  = 2, /* Clearances being drawn.                            */
+  HID_MASK_AFTER  = 3, /* Polygons being drawn after clears.                 */
+};
+
+/* Low level drawing API */
+
+struct hid_draw_st
+{
+  /* Drawing Functions.  Coordinates and distances are ALWAYS in PCB's
+     default coordinates (1 nm at the time this comment was written).
+     Angles are always in degrees, with 0 being "right" (positive X)
+     and 90 being "up" (positive Y).  */
+
+  /* Make an empty graphics context.  */
+  hidGC (*make_gc) (void);
+  void (*destroy_gc) (hidGC gc);
+  void (*use_mask) (enum mask_mode mode);
+
+  /* Set a color.  Names can be like "red" or "#rrggbb" or special
+     names like "erase".  *Always* use the "erase" color for removing
+     ink (like polygon reliefs or thermals), as you cannot rely on
+     knowing the background color or special needs of the HID.  Always
+     use the "drill" color to draw holes.  You may assume this is
+     cheap enough to call inside the redraw callback, but not cheap
+     enough to call for each item drawn. */
+  void (*set_color) (hidGC gc, const char *name);
+
+  /* Set the line style.  While calling this is cheap, calling it with
+     different values each time may be expensive, so grouping items by
+     line style is helpful.  */
+  void (*set_line_cap) (hidGC gc, EndCapStyle style);
+  void (*set_line_width) (hidGC gc, Coord width);
+  void (*set_draw_xor) (hidGC gc, int xor_);
+
+  /* Blends 20% or so color with 80% background.  Only used for
+     assembly drawings so far. */
+  void (*set_draw_faded) (hidGC gc, int faded);
+
+  /* The usual drawing functions.  "draw" means to use segments of the
+     given width, whereas "fill" means to fill to a zero-width
+     outline.  */
+  void (*draw_line)    (hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2);
+  void (*draw_arc)     (hidGC gc, Coord cx, Coord cy, Coord xradius, Coord yradius, Angle start_angle, Angle delta_angle);
+  void (*draw_rect)    (hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2);
+  void (*fill_circle)  (hidGC gc, Coord cx, Coord cy, Coord radius);
+  void (*fill_polygon) (hidGC gc, int n_coords, Coord *x, Coord *y);
+  void (*fill_rect)    (hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2);
+
+  /* The following APIs render using PCB data-structures, not immediate parameters */
+
+  void (*draw_pcb_line) (hidGC gc, LineType *line);
+  void (*draw_pcb_arc) (hidGC gc, ArcType *arc);
+  void (*draw_pcb_text) (hidGC gc, TextType *, Coord);
+  void (*draw_pcb_polygon) (hidGC gc, PolygonType *poly, const BoxType *clip_box);
+
+  void (*fill_pcb_polygon) (hidGC gc, PolygonType *poly, const BoxType *clip_box);
+  void (*thindraw_pcb_polygon) (hidGC gc, PolygonType *poly, const BoxType *clip_box);
+  void (*fill_pcb_pad) (hidGC gc, PadType *pad, bool clip, bool mask);
+  void (*thindraw_pcb_pad) (hidGC gc, PadType *pad, bool clip, bool mask);
+  void (*fill_pcb_pv) (hidGC fg_gc, hidGC bg_gc, PinType *pv, bool drawHole, bool mask);
+  void (*thindraw_pcb_pv) (hidGC fg_gc, hidGC bg_gc, PinType *pv, bool drawHole, bool mask);
+
+};
diff --git a/src/icons/Makefile.am b/src/icons/Makefile.am
index 23cc5a4..f2c29ff 100644
--- a/src/icons/Makefile.am
+++ b/src/icons/Makefile.am
@@ -1,4 +1,2 @@
-## $Id$
-
 EXTRA_DIST= hand.dat hcurs.dat lcurs.dat lock.dat
 
diff --git a/src/icons/Makefile.in b/src/icons/Makefile.in
index 90e25de..73dbb8f 100644
--- a/src/icons/Makefile.in
+++ b/src/icons/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -359,10 +387,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/src/insert.c b/src/insert.c
index 514754f..a254998 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -56,17 +54,12 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
-
-
-
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static void *InsertPointIntoLine (LayerTypePtr, LineTypePtr);
-static void *InsertPointIntoPolygon (LayerTypePtr, PolygonTypePtr);
-static void *InsertPointIntoRat (RatTypePtr);
+static void *InsertPointIntoLine (LayerType *, LineType *);
+static void *InsertPointIntoPolygon (LayerType *, PolygonType *);
+static void *InsertPointIntoRat (RatType *);
 
 /* ---------------------------------------------------------------------------
  * some local identifiers
@@ -94,9 +87,9 @@ static ObjectFunctionType InsertFunctions = {
  * inserts a point into a rat-line
  */
 static void *
-InsertPointIntoRat (RatTypePtr Rat)
+InsertPointIntoRat (RatType *Rat)
 {
-  LineTypePtr newone;
+  LineType *newone;
 
   newone = CreateDrawnLineOnLayer (CURRENT, Rat->Point1.X, Rat->Point1.Y,
 				InsertX, InsertY, Settings.LineThickness,
@@ -123,9 +116,9 @@ InsertPointIntoRat (RatTypePtr Rat)
  * inserts a point into a line
  */
 static void *
-InsertPointIntoLine (LayerTypePtr Layer, LineTypePtr Line)
+InsertPointIntoLine (LayerType *Layer, LineType *Line)
 {
-  LineTypePtr line;
+  LineType *line;
   Coord X, Y;
 
   if (((Line->Point1.X == InsertX) && (Line->Point1.Y == InsertY)) ||
@@ -136,12 +129,12 @@ InsertPointIntoLine (LayerTypePtr Layer, LineTypePtr Line)
   AddObjectToMoveUndoList (LINEPOINT_TYPE, Layer, Line, &Line->Point2,
 			   InsertX - X, InsertY - Y);
   EraseLine (Line);
-  r_delete_entry (Layer->line_tree, (BoxTypePtr) Line);
+  r_delete_entry (Layer->line_tree, (BoxType *) Line);
   RestoreToPolygon (PCB->Data, LINE_TYPE, Layer, Line);
   Line->Point2.X = InsertX;
   Line->Point2.Y = InsertY;
   SetLineBoundingBox (Line);
-  r_insert_entry (Layer->line_tree, (BoxTypePtr) Line, 0);
+  r_insert_entry (Layer->line_tree, (BoxType *) Line, 0);
   ClearFromPolygon (PCB->Data, LINE_TYPE, Layer, Line);
   DrawLine (Layer, Line);
   /* we must create after playing with Line since creation may
@@ -165,7 +158,7 @@ InsertPointIntoLine (LayerTypePtr Layer, LineTypePtr Line)
  * inserts a point into a polygon
  */
 static void *
-InsertPointIntoPolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
+InsertPointIntoPolygon (LayerType *Layer, PolygonType *Polygon)
 {
   PointType save;
   Cardinal n;
@@ -186,7 +179,7 @@ InsertPointIntoPolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
    * second, shift the points up to make room for the new point
    */
   ErasePolygon (Polygon);
-  r_delete_entry (Layer->polygon_tree, (BoxTypePtr) Polygon);
+  r_delete_entry (Layer->polygon_tree, (BoxType *) Polygon);
   save = *CreateNewPointInPolygon (Polygon, InsertX, InsertY);
   for (n = Polygon->PointN - 1; n > InsertAt; n--)
     Polygon->Points[n] = Polygon->Points[n - 1];
@@ -240,13 +233,13 @@ InsertPointIntoObject (int Type, void *Ptr1, void *Ptr2, Cardinal * Ptr3,
 /* ---------------------------------------------------------------------------
  *  adjusts the insert point to make 45 degree lines as necessary
  */
-PointTypePtr
+PointType *
 AdjustInsertPoint (void)
 {
   static PointType InsertedPoint;
   double m;
   Coord x, y, m1, m2;
-  LineTypePtr line = (LineTypePtr) Crosshair.AttachedObject.Ptr2;
+  LineType *line = (LineType *) Crosshair.AttachedObject.Ptr2;
 
   if (Crosshair.AttachedObject.State == STATE_FIRST)
     return NULL;
@@ -275,7 +268,7 @@ AdjustInsertPoint (void)
     m1 = 2;			/* 2 signals infinite slope */
   else
     {
-      m = (double) (Crosshair.X - line->Point1.X) / (Crosshair.Y - line->Point1.Y);
+      m = (double) (Crosshair.Y - line->Point1.Y) / (Crosshair.X - line->Point1.X);
       m1 = 0;
       if (m > TAN_30_DEGREE)
 	m1 = (m > TAN_60_DEGREE) ? 2 : 1;
@@ -286,7 +279,7 @@ AdjustInsertPoint (void)
     m2 = 2;			/* 2 signals infinite slope */
   else
     {
-      m = (double) (Crosshair.X - line->Point1.X) / (Crosshair.Y - line->Point1.Y);
+      m = (double) (Crosshair.Y - line->Point2.Y) / (Crosshair.X - line->Point2.X);
       m2 = 0;
       if (m > TAN_30_DEGREE)
 	m2 = (m > TAN_60_DEGREE) ? 2 : 1;
diff --git a/src/insert.h b/src/insert.h
index 0476e8d..31fc6dc 100644
--- a/src/insert.h
+++ b/src/insert.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for inserting points into objects
@@ -40,6 +39,6 @@
  */
 void *InsertPointIntoObject (int, void *, void *, Cardinal *, Coord,
 			     Coord, bool, bool);
-PointTypePtr AdjustInsertPoint (void);
+PointType * AdjustInsertPoint (void);
 
 #endif
diff --git a/src/intersect.c b/src/intersect.c
index a3ee03f..59aa064 100644
--- a/src/intersect.c
+++ b/src/intersect.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -50,9 +48,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
-
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
@@ -90,7 +85,7 @@ LocationList;
  * Create a sorted list of unique y coords from a BoxList.
  */
 static LocationList
-createSortedYList (BoxListTypePtr boxlist)
+createSortedYList (BoxListType *boxlist)
 {
   LocationList yCoords;
   Coord last;
@@ -200,7 +195,7 @@ deleteSegment (SegmentTree * st, int n, Coord Y1, Coord Y2)
  * Runs in O(N ln N) time.
  */
 double
-ComputeIntersectionArea (BoxListTypePtr boxlist)
+ComputeIntersectionArea (BoxListType *boxlist)
 {
   Cardinal i;
   double area = 0.0;
@@ -217,9 +212,9 @@ ComputeIntersectionArea (BoxListTypePtr boxlist)
  * O(N ln N) time.
  */
 double
-ComputeUnionArea (BoxListTypePtr boxlist)
+ComputeUnionArea (BoxListType *boxlist)
 {
-  BoxTypePtr *rectLeft, *rectRight;
+  BoxType **rectLeft, **rectRight;
   Cardinal i, j;
   LocationList yCoords;
   SegmentTree segtree;
@@ -234,8 +229,8 @@ ComputeUnionArea (BoxListTypePtr boxlist)
   segtree = createSegmentTree (yCoords.p, yCoords.size);
   free (yCoords.p);
   /* create sorted list of left and right X coordinates of rectangles */
-  rectLeft = (BoxTypePtr *)calloc (boxlist->BoxN, sizeof (*rectLeft));
-  rectRight = (BoxTypePtr *)calloc (boxlist->BoxN, sizeof (*rectRight));
+  rectLeft = (BoxType **)calloc (boxlist->BoxN, sizeof (*rectLeft));
+  rectRight = (BoxType **)calloc (boxlist->BoxN, sizeof (*rectRight));
   for (i = 0; i < boxlist->BoxN; i++)
     {
       assert (boxlist->Box[i].X1 <= boxlist->Box[i].X2);
@@ -254,7 +249,7 @@ ComputeUnionArea (BoxListTypePtr boxlist)
       if (i == boxlist->BoxN || rectRight[j]->X2 < rectLeft[i]->X1)
         {
           /* right edge of rectangle */
-          BoxTypePtr b = rectRight[j++];
+          BoxType *b = rectRight[j++];
           /* check lastX */
           if (b->X2 != lastX)
             {
@@ -268,7 +263,7 @@ ComputeUnionArea (BoxListTypePtr boxlist)
       else
         {
           /* left edge of rectangle */
-          BoxTypePtr b = rectLeft[i++];
+          BoxType *b = rectLeft[i++];
           /* check lastX */
           if (b->X1 != lastX)
             {
@@ -288,13 +283,15 @@ ComputeUnionArea (BoxListTypePtr boxlist)
 static int
 compareleft (const void *ptr1, const void *ptr2)
 {
-  BoxTypePtr *b1 = (BoxTypePtr *) ptr1, *b2 = (BoxTypePtr *) ptr2;
+  BoxType **b1 = (BoxType **) ptr1;
+  BoxType **b2 = (BoxType **) ptr2;
   return (*b1)->X1 - (*b2)->X1;
 }
 static int
 compareright (const void *ptr1, const void *ptr2)
 {
-  BoxTypePtr *b1 = (BoxTypePtr *) ptr1, *b2 = (BoxTypePtr *) ptr2;
+  BoxType **b1 = (BoxType **) ptr1;
+  BoxType **b2 = (BoxType **) ptr2;
   return (*b1)->X2 - (*b2)->X2;
 }
 static int
diff --git a/src/intersect.h b/src/intersect.h
index 2c1e7f5..f3e3205 100644
--- a/src/intersect.h
+++ b/src/intersect.h
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -39,7 +37,7 @@
 
 #include "global.h"
 
-double ComputeIntersectionArea (BoxListTypePtr boxlist);	/* will sort boxlist */
-double ComputeUnionArea (BoxListTypePtr boxlist);
+double ComputeIntersectionArea (BoxListType *boxlist);	/* will sort boxlist */
+double ComputeUnionArea (BoxListType *boxlist);
 
 #endif
diff --git a/src/line.c b/src/line.c
index 22efc2b..47e3125 100644
--- a/src/line.c
+++ b/src/line.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -48,9 +46,7 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
-static double drc_lines (PointTypePtr end, bool way);
+static double drc_lines (PointType *end, bool way);
 
 /* ---------------------------------------------------------------------------
  * Adjust the attached line to 45 degrees if necessary
@@ -58,7 +54,7 @@ static double drc_lines (PointTypePtr end, bool way);
 void
 AdjustAttachedLine (void)
 {
-  AttachedLineTypePtr line = &Crosshair.AttachedLine;
+  AttachedLineType *line = &Crosshair.AttachedLine;
 
   /* I need at least one point */
   if (line->State == STATE_FIRST)
@@ -86,16 +82,16 @@ AdjustAttachedLine (void)
  *
  * directions:
  *
- *           0
- *          7 1
- *         6   2
- *          5 3
  *           4
+ *          5 3
+ *         6   2
+ *          7 1
+ *           0
  */
 void
-FortyFiveLine (AttachedLineTypePtr Line)
+FortyFiveLine (AttachedLineType *Line)
 {
-  Coord dx, dy, min;
+  Coord dx, dy, min, max;
   unsigned direction = 0;
   double m;
 
@@ -103,22 +99,20 @@ FortyFiveLine (AttachedLineTypePtr Line)
   dx = Crosshair.X - Line->Point1.X;
   dy = Crosshair.Y - Line->Point1.Y;
 
-  if (!dx)
-    {
-      if (!dy)
-	/* zero length line, don't draw anything */
-	return;
-      else
-	direction = dy > 0 ? 0 : 4;
-    }
+  /* zero length line, don't draw anything */
+  if (dx == 0 && dy == 0)
+    return;
+
+  if (dx == 0)
+    direction = dy > 0 ? 0 : 4;
   else
     {
-      m = (double) dy / dx;
+      m = (double)dy / (double)dx;
       direction = 2;
       if (m > TAN_30_DEGREE)
-	direction = m > TAN_60_DEGREE ? 0 : 1;
+        direction = m > TAN_60_DEGREE ? 0 : 1;
       else if (m < -TAN_30_DEGREE)
-	direction = m < -TAN_60_DEGREE ? 0 : 3;
+        direction = m < -TAN_60_DEGREE ? 4 : 3;
     }
   if (dx < 0)
     direction += 4;
@@ -126,19 +120,28 @@ FortyFiveLine (AttachedLineTypePtr Line)
   dx = abs (dx);
   dy = abs (dy);
   min = MIN (dx, dy);
+  max = MAX (dx, dy);
 
   /* now set up the second pair of coordinates */
   switch (direction)
     {
     case 0:
+      Line->Point2.X = Line->Point1.X;
+      Line->Point2.Y = Line->Point1.Y + max;
+      break;
+
     case 4:
       Line->Point2.X = Line->Point1.X;
-      Line->Point2.Y = Crosshair.Y;
+      Line->Point2.Y = Line->Point1.Y - max;
       break;
 
     case 2:
+      Line->Point2.X = Line->Point1.X + max;
+      Line->Point2.Y = Line->Point1.Y;
+      break;
+
     case 6:
-      Line->Point2.X = Crosshair.X;
+      Line->Point2.X = Line->Point1.X - max;
       Line->Point2.Y = Line->Point1.Y;
       break;
 
@@ -171,7 +174,7 @@ void
 AdjustTwoLine (bool way)
 {
   Coord dx, dy;
-  AttachedLineTypePtr line = &Crosshair.AttachedLine;
+  AttachedLineType *line = &Crosshair.AttachedLine;
 
   if (Crosshair.AttachedLine.State == STATE_FIRST)
     return;
@@ -224,7 +227,7 @@ AdjustTwoLine (bool way)
 
 struct drc_info
 {
-  LineTypePtr line;
+  LineType *line;
   bool solder;
   jmp_buf env;
 };
@@ -232,7 +235,7 @@ struct drc_info
 static int
 drcVia_callback (const BoxType * b, void *cl)
 {
-  PinTypePtr via = (PinTypePtr) b;
+  PinType *via = (PinType *) b;
   struct drc_info *i = (struct drc_info *) cl;
 
   if (!TEST_FLAG (FOUNDFLAG, via) && PinLineIntersect (via, i->line))
@@ -243,7 +246,7 @@ drcVia_callback (const BoxType * b, void *cl)
 static int
 drcPad_callback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   struct drc_info *i = (struct drc_info *) cl;
 
   if (TEST_FLAG (ONSOLDERFLAG, pad) == i->solder &&
@@ -255,7 +258,7 @@ drcPad_callback (const BoxType * b, void *cl)
 static int
 drcLine_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct drc_info *i = (struct drc_info *) cl;
 
   if (!TEST_FLAG (FOUNDFLAG, line) && LineLineIntersect (line, i->line))
@@ -266,7 +269,7 @@ drcLine_callback (const BoxType * b, void *cl)
 static int
 drcArc_callback (const BoxType * b, void *cl)
 {
-  ArcTypePtr arc = (ArcTypePtr) b;
+  ArcType *arc = (ArcType *) b;
   struct drc_info *i = (struct drc_info *) cl;
 
   if (!TEST_FLAG (FOUNDFLAG, arc) && LineArcIntersect (i->line, arc))
@@ -285,7 +288,7 @@ drcArc_callback (const BoxType * b, void *cl)
  */
 
 static double
-drc_lines (PointTypePtr end, bool way)
+drc_lines (PointType *end, bool way)
 {
   double f, s, f2, s2, len, best;
   Coord dx, dy, temp, last, length;
@@ -504,24 +507,14 @@ EnforceLineDRC (void)
   if (XOR (r1 > r2, shift))
     {
       if (PCB->Clipping)
-	{
-	  if (shift)
-	    PCB->Clipping = 2;
-	  else
-	    PCB->Clipping = 1;
-	}
+	PCB->Clipping = shift ? 2 : 1;
       Crosshair.X = rs.X;
       Crosshair.Y = rs.Y;
     }
   else
     {
       if (PCB->Clipping)
-	{
-	  if (shift)
-	    PCB->Clipping = 1;
-	  else
-	    PCB->Clipping = 2;
-	}
+	PCB->Clipping = shift ? 1 : 2;
       Crosshair.X = r45.X;
       Crosshair.Y = r45.Y;
     }
diff --git a/src/line.h b/src/line.h
index 82db33a..8552cae 100644
--- a/src/line.h
+++ b/src/line.h
@@ -23,7 +23,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for inserting points into objects
@@ -39,6 +38,6 @@
  */
 void AdjustAttachedLine (void);
 void AdjustTwoLine (bool);
-void FortyFiveLine (AttachedLineTypePtr);
+void FortyFiveLine (AttachedLineType *);
 void EnforceLineDRC (void);
 #endif
diff --git a/src/macro.h b/src/macro.h
index 025351f..0c680ab 100644
--- a/src/macro.h
+++ b/src/macro.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* some commonly used macros not related to a special C-file
@@ -63,6 +62,7 @@
 
 #define	ENTRIES(x)		(sizeof((x))/sizeof((x)[0]))
 #define	UNKNOWN(a)		((a) && *(a) ? (a) : "(unknown)")
+#define	UNKNOWN_NAME(a, n)	((a) && *(a) ? (a) : (n))
 #define NSTRCMP(a, b)		((a) ? ((b) ? strcmp((a),(b)) : 1) : -1)
 #define	EMPTY(a)		((a) ? (a) : "")
 #define	EMPTY_STRING_P(a)	((a) ? (a)[0]==0 : 1)
@@ -92,7 +92,7 @@
 /* ---------------------------------------------------------------------------
  * returns the object ID
  */
-#define	OBJECT_ID(p)		(((AnyObjectTypePtr) p)->ID)
+#define	OBJECT_ID(p)		(((AnyObjectType *) p)->ID)
 
 /* ---------------------------------------------------------------------------
  * access macro for current buffer
@@ -171,7 +171,7 @@ extern int mem_any_set (unsigned char *, int);
 
 #define STYLE_LOOP(top)  do {                                       \
         Cardinal n;                                                 \
-        RouteStyleTypePtr style;                                    \
+        RouteStyleType *style;                                      \
         for (n = 0; n < NUM_STYLES; n++)                            \
         {                                                           \
                 style = &(top)->RouteStyle[n]
@@ -186,28 +186,28 @@ extern int mem_any_set (unsigned char *, int);
 
 #define DRILL_LOOP(top) do             {               \
         Cardinal        n;                                      \
-        DrillTypePtr    drill;                                  \
+        DrillType *drill;                                       \
         for (n = 0; (top)->DrillN > 0 && n < (top)->DrillN; n++)                        \
         {                                                       \
                 drill = &(top)->Drill[n]
 
 #define NETLIST_LOOP(top) do   {                         \
         Cardinal        n;                                      \
-        NetListTypePtr   netlist;                               \
+        NetListType *netlist;                                   \
         for (n = (top)->NetListN-1; n != -1; n--)               \
         {                                                       \
                 netlist = &(top)->NetList[n]
 
 #define NET_LOOP(top) do   {                             \
         Cardinal        n;                                      \
-        NetTypePtr   net;                                       \
+        NetType *net;                                           \
         for (n = (top)->NetN-1; n != -1; n--)                   \
         {                                                       \
                 net = &(top)->Net[n]
 
 #define CONNECTION_LOOP(net) do {                         \
         Cardinal        n;                                      \
-        ConnectionTypePtr       connection;                     \
+        ConnectionType *connection;                             \
         for (n = (net)->ConnectionN-1; n != -1; n--)            \
         {                                                       \
                 connection = & (net)->Connection[n]
@@ -230,7 +230,7 @@ extern int mem_any_set (unsigned char *, int);
 
 #define	ELEMENTTEXT_LOOP(element) do { 	\
 	Cardinal	n;				\
-	TextTypePtr	text;				\
+	TextType *text;					\
 	for (n = MAX_ELEMENTNAMES-1; n != -1; n--)	\
 	{						\
 		text = &(element)->Name[n]
@@ -309,7 +309,7 @@ extern int mem_any_set (unsigned char *, int);
 
 #define	POLYGONPOINT_LOOP(polygon) do	{	\
 	Cardinal			n;		\
-	PointTypePtr	point;				\
+	PointType *point;				\
 	for (n = (polygon)->PointN-1; n != -1; n--)	\
 	{						\
 		point = &(polygon)->Points[n]
@@ -326,49 +326,49 @@ extern int mem_any_set (unsigned char *, int);
 
 #define	ALLLINE_LOOP(top) do	{		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	for (l = 0; l < max_copper_layer + 2; l++, layer++)	\
 	{ \
 		LINE_LOOP(layer)
 
 #define ALLARC_LOOP(top) do {		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	for (l =0; l < max_copper_layer + 2; l++, layer++)		\
 	{ \
 		ARC_LOOP(layer)
 
 #define	ALLPOLYGON_LOOP(top)	do {		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	for (l = 0; l < max_copper_layer + 2; l++, layer++)	\
 	{ \
 		POLYGON_LOOP(layer)
 
 #define	COPPERLINE_LOOP(top) do	{		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	for (l = 0; l < max_copper_layer; l++, layer++)	\
 	{ \
 		LINE_LOOP(layer)
 
 #define COPPERARC_LOOP(top) do	{		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	for (l =0; l < max_copper_layer; l++, layer++)		\
 	{ \
 		ARC_LOOP(layer)
 
 #define	COPPERPOLYGON_LOOP(top) do	{		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	for (l = 0; l < max_copper_layer; l++, layer++)	\
 	{ \
 		POLYGON_LOOP(layer)
 
 #define	SILKLINE_LOOP(top) do	{		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	layer += max_copper_layer;			\
 	for (l = 0; l < 2; l++, layer++)		\
 	{ \
@@ -376,7 +376,7 @@ extern int mem_any_set (unsigned char *, int);
 
 #define SILKARC_LOOP(top) do	{		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	layer += max_copper_layer;			\
 	for (l = 0; l < 2; l++, layer++)		\
 	{ \
@@ -384,7 +384,7 @@ extern int mem_any_set (unsigned char *, int);
 
 #define	SILKPOLYGON_LOOP(top) do	{		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	layer += max_copper_layer;			\
 	for (l = 0; l < 2; l++, layer++)		\
 	{ \
@@ -392,14 +392,14 @@ extern int mem_any_set (unsigned char *, int);
 
 #define	ALLTEXT_LOOP(top)	do {		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	for (l = 0; l < max_copper_layer + 2; l++, layer++)	\
 	{ \
 		TEXT_LOOP(layer)
 
 #define	VISIBLELINE_LOOP(top) do	{		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	for (l = 0; l < max_copper_layer + 2; l++, layer++)	\
 	{ \
 		if (layer->On)				\
@@ -407,7 +407,7 @@ extern int mem_any_set (unsigned char *, int);
 
 #define	VISIBLEARC_LOOP(top) do	{		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	for (l = 0; l < max_copper_layer + 2; l++, layer++)	\
 	{ \
 		if (layer->On)				\
@@ -415,7 +415,7 @@ extern int mem_any_set (unsigned char *, int);
 
 #define	VISIBLETEXT_LOOP(board) do	{		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (board)->Data->Layer;		\
+	LayerType *layer = (board)->Data->Layer;		\
 	for (l = 0; l < max_copper_layer + 2; l++, layer++)	\
 	{ \
                 TEXT_LOOP(layer);                                      \
@@ -423,7 +423,7 @@ extern int mem_any_set (unsigned char *, int);
 
 #define	VISIBLEPOLYGON_LOOP(top) do	{	\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	for (l = 0; l < max_copper_layer + 2; l++, layer++)	\
 	{ \
 		if (layer->On)				\
@@ -438,25 +438,25 @@ extern int mem_any_set (unsigned char *, int);
 
 #define MENU_LOOP(top)	do {	\
 	Cardinal	l;			\
-	LibraryMenuTypePtr menu;		\
+	LibraryMenuType *menu;			\
 	for (l = (top)->MenuN-1; l != -1; l--)	\
 	{					\
 		menu = &(top)->Menu[l]
 
 #define ENTRY_LOOP(top) do	{	\
 	Cardinal	n;			\
-	LibraryEntryTypePtr entry;		\
+	LibraryEntryType *entry;		\
 	for (n = (top)->EntryN-1; n != -1; n--)	\
 	{					\
 		entry = &(top)->Entry[n]
 
 #define GROUP_LOOP(data, group) do { 	\
 	Cardinal entry; \
-        for (entry = 0; entry < ((PCBTypePtr)(data->pcb))->LayerGroups.Number[(group)]; entry++) \
+        for (entry = 0; entry < ((PCBType *)(data->pcb))->LayerGroups.Number[(group)]; entry++) \
         { \
-		LayerTypePtr layer;		\
+		LayerType *layer;		\
 		Cardinal number; 		\
-		number = ((PCBTypePtr)(data->pcb))->LayerGroups.Entries[(group)][entry]; \
+		number = ((PCBType *)(data->pcb))->LayerGroups.Entries[(group)][entry]; \
 		if (number >= max_copper_layer)	\
 		  continue;			\
 		layer = &data->Layer[number];
@@ -465,7 +465,7 @@ extern int mem_any_set (unsigned char *, int);
         Cardinal n; \
 	for (n = 0; n < ml; n++) \
 	{ \
-	   LayerTypePtr layer = (&data->Layer[(n)]);
+	   LayerType *layer = (&data->Layer[(n)]);
 
 
 #endif
diff --git a/src/main.c b/src/main.c
index d5a8487..d80612d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -33,6 +31,9 @@
 #include "config.h"
 #endif
 
+#ifdef HAVE_LOCALE_H
+#include <locale.h>  /* setlocale() and LC_ALL */
+#endif
 #include <stdlib.h>
 #ifdef HAVE_STRING_H
 #include <string.h>
@@ -75,9 +76,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
-
 #define PCBLIBPATH ".:" PCBLIBDIR
 
 
@@ -273,7 +271,7 @@ usage (void)
 	n_exporter++;
     }
 
-  u ("PCB Printed Circuit Board editing program, http://pcb.gpleda.org");
+  u ("PCB Printed Circuit Board editing program, http://pcb.geda-project.org");
   u ("%s [-h|-V|--copyright]\t\t\tHelp, version, copyright", Progname);
   u ("%s [gui options] <pcb file>\t\tto edit", Progname);
   u ("Available GUI hid%s:", n_gui == 1 ? "" : "s");
@@ -428,6 +426,14 @@ static int show_defaults = 0;
 static int show_actions = 0;
 static int do_dump_actions = 0;
 static char *grid_units;
+static Increments increment_mm  = { 0 };
+static Increments increment_mil = { 0 };
+
+void save_increments (const Increments *mm, const Increments *mil)
+{
+  memcpy (&increment_mm,  mm,  sizeof (*mm));
+  memcpy (&increment_mil, mil, sizeof (*mil));
+}
 
 HID_Attribute main_attribute_list[] = {
 
@@ -510,6 +516,94 @@ Set default grid units. Can be mm or mil. Defaults to mil.
   {"grid-units", "Default grid units (mm|mil)", HID_String, 0, 0, {0, "mil", 0},
   0, &grid_units},
 
+/* %start-doc options "1 General Options"
+ at ftable @code
+ at item --clear-increment-mm <string>
+Set default clear increment (amount to change when user presses k or K)
+when user is using a metric grid unit.
+ at end ftable
+%end-doc
+*/
+  {"clear-increment-mm", "Default clear increment amount (metric)", HID_Coord, 0, 0, {0, 0, 0},
+  0, &increment_mm.clear},
+
+/* %start-doc options "1 General Options"
+ at ftable @code
+ at item --grid-increment-mm <string>
+Set default grid increment (amount to change when user presses g or G)
+when user is using a metric grid unit.
+ at end ftable
+%end-doc
+*/
+  {"grid-increment-mm", "Default grid increment amount (metric)", HID_Coord, 0, 0, {0, 0, 0},
+  0, &increment_mm.grid},
+
+/* %start-doc options "1 General Options"
+ at ftable @code
+ at item --line-increment-mm <string>
+Set default line increment (amount to change when user presses l or L)
+when user is using a metric grid unit.
+ at end ftable
+%end-doc
+*/
+  {"line-increment-mm", "Default line increment amount (metric)", HID_Coord, 0, 0, {0, 0, 0},
+  0, &increment_mm.line},
+
+/* %start-doc options "1 General Options"
+ at ftable @code
+ at item --size-increment-mm <string>
+Set default size increment (amount to change when user presses s or S)
+when user is using a metric grid unit.
+ at end ftable
+%end-doc
+*/
+  {"size-increment-mm", "Default size increment amount (metric)", HID_Coord, 0, 0, {0, 0, 0},
+  0, &increment_mm.size},
+
+/* %start-doc options "1 General Options"
+ at ftable @code
+ at item --clear-increment-mil <string>
+Set default clear increment (amount to change when user presses k or K)
+when user is using an imperial grid unit.
+ at end ftable
+%end-doc
+*/
+  {"clear-increment-mil", "Default clear increment amount (imperial)", HID_Coord, 0, 0, {0, 0, 0},
+  0, &increment_mil.clear},
+
+/* %start-doc options "1 General Options"
+ at ftable @code
+ at item --grid-increment-mil <string>
+Set default grid increment (amount to change when user presses g or G)
+when user is using a imperial grid unit.
+ at end ftable
+%end-doc
+*/
+  {"grid-increment-mil", "Default grid increment amount (imperial)", HID_Coord, 0, 0, {0, 0, 0},
+  0, &increment_mil.grid},
+
+/* %start-doc options "1 General Options"
+ at ftable @code
+ at item --line-increment-mil <string>
+Set default line increment (amount to change when user presses l or L)
+when user is using a imperial grid unit.
+ at end ftable
+%end-doc
+*/
+  {"line-increment-mil", "Default line increment amount (imperial)", HID_Coord, 0, 0, {0, 0, 0},
+  0, &increment_mil.line},
+
+/* %start-doc options "1 General Options"
+ at ftable @code
+ at item --size-increment-mil <string>
+Set default size increment (amount to change when user presses s or S)
+when user is using a imperial grid unit.
+ at end ftable
+%end-doc
+*/
+  {"size-increment-mil", "Default size increment amount (imperial)", HID_Coord, 0, 0, {0, 0, 0},
+  0, &increment_mil.size},
+
 /* %start-doc options "3 Colors"
 @ftable @code
 @item --black-color <string>
@@ -666,12 +760,22 @@ Color of selected rats. Default: @samp{#00ffff}
 /* %start-doc options "3 Colors"
 @ftable @code
 @item --connected-color <string>
-Color to indicate connections. Default: @samp{#00ff00}
+Color to indicate physical connections. Default: @samp{#00ff00}
 @end ftable
 %end-doc
 */
   COLOR (ConnectedColor, "#00ff00", "connected-color",
-	 "color to indicate connections"),
+	 "color to indicate physically connected objects"),
+
+/* %start-doc options "3 Colors"
+ at ftable @code
+ at item --found-color <string>
+Color to indicate logical connections. Default: @samp{#ff00ff}
+ at end ftable
+%end-doc
+*/
+  COLOR (FoundColor, "#ff00ff", "found-color",
+	 "color to indicate logically connected objects"),
 
 /* %start-doc options "3 Colors"
 @ftable @code
@@ -815,10 +919,12 @@ Default thickness of new lines. Default value is @code{10mil}.
 
 /* %start-doc options "5 Sizes"
 @ftable @code
- at item --rat-thickness <num>
-Thickness of rats. Values from 1 to 19 are fixed width in screen pixels.
-Anything larger means PCB units (i.e. 100 means "1 mil"). Default value
-is @code{10mil}.
+ at item --rat-thickness <num><unit>
+Thickness of rats. If no unit is given, PCB units are assumed (i.e. 100 
+means "1 nm"). This option allows for a special unit @code{px} which 
+sets the rat thickness to a fixed value in terms of screen pixels.
+Maximum fixed thickness is 100px. Minimum saling rat thickness is 101nm.  
+Default value is @code{10mil}.
 @end ftable
 %end-doc
 */
@@ -1508,7 +1614,10 @@ REGISTER_ATTRIBUTES (main_attribute_list)
   if (!grid_units || Settings.grid_unit == NULL)
     Settings.grid_unit = get_unit_struct ("mil");
 
-  Settings.increments = get_increments_struct (Settings.grid_unit->suffix);
+  copy_nonzero_increments (get_increments_struct (METRIC), &increment_mm);
+  copy_nonzero_increments (get_increments_struct (IMPERIAL), &increment_mil);
+
+  Settings.increments = get_increments_struct (Settings.grid_unit->family);
 }
 
 /* ---------------------------------------------------------------------- 
@@ -1931,6 +2040,8 @@ main (int argc, char *argv[])
 
   if (gui->printer || gui->exporter)
     {
+      // Workaround to fix batch output for non-C locales
+      setlocale(LC_NUMERIC,"C");
       gui->do_export (0);
       exit (0);
     }
diff --git a/src/mirror.c b/src/mirror.c
index c48ebf3..1adeda9 100644
--- a/src/mirror.c
+++ b/src/mirror.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -54,17 +52,12 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
-
-
-
 /* ---------------------------------------------------------------------------
  * mirrors the coordinates of an element
  * an additional offset is passed
  */
 void
-MirrorElementCoordinates (DataTypePtr Data, ElementTypePtr Element,
+MirrorElementCoordinates (DataType *Data, ElementType *Element,
 			  Coord yoff)
 {
   r_delete_element (Data, Element);
diff --git a/src/mirror.h b/src/mirror.h
index da61744..97ea0bb 100644
--- a/src/mirror.h
+++ b/src/mirror.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes to change objects mirror flag
@@ -41,6 +40,6 @@
 #define	MIRROR_TYPES	(TEXT_TYPE | ELEMENTNAME_TYPE)
 
 
-void MirrorElementCoordinates (DataTypePtr, ElementTypePtr, Coord);
+void MirrorElementCoordinates (DataType *, ElementType *, Coord);
 
 #endif
diff --git a/src/misc.c b/src/misc.c
index a2a678e..064c3e4 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -80,9 +78,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
-
 /*	forward declarations	*/
 static char *BumpName (char *);
 static void GetGridLockCoordinates (int, void *, void *, void *,
@@ -153,7 +148,8 @@ GetValueEx (const char *val, const char *units, bool * absolute, UnitList extra_
   if (*val == '=')
     {
       *absolute = true;
-      sscanf (val+1, "%lf%n", &value, &n);
+      if (sscanf (val+1, "%lf%n", &value, &n) < 1)
+        return 0;
       n++;
     }
   else
@@ -162,7 +158,8 @@ GetValueEx (const char *val, const char *units, bool * absolute, UnitList extra_
         *absolute = true;
       else
         *absolute = false;
-      sscanf (val, "%lf%n", &value, &n);
+      if (sscanf (val, "%lf%n", &value, &n) < 1)
+        return 0;
     }
   if (!units && n > 0)
     units = val + n;
@@ -218,7 +215,7 @@ GetValueEx (const char *val, const char *units, bool * absolute, UnitList extra_
  * sets the bounding box of a point (which is silly)
  */
 void
-SetPointBoundingBox (PointTypePtr Pnt)
+SetPointBoundingBox (PointType *Pnt)
 {
   Pnt->X2 = Pnt->X + 1;
   Pnt->Y2 = Pnt->Y + 1;
@@ -228,7 +225,7 @@ SetPointBoundingBox (PointTypePtr Pnt)
  * sets the bounding box of a pin or via
  */
 void
-SetPinBoundingBox (PinTypePtr Pin)
+SetPinBoundingBox (PinType *Pin)
 {
   Coord width;
 
@@ -251,7 +248,7 @@ SetPinBoundingBox (PinTypePtr Pin)
  * sets the bounding box of a pad
  */
 void
-SetPadBoundingBox (PadTypePtr Pad)
+SetPadBoundingBox (PadType *Pad)
 {
   Coord width;
   Coord deltax;
@@ -304,7 +301,7 @@ SetPadBoundingBox (PadTypePtr Pad)
  * sets the bounding box of a line
  */
 void
-SetLineBoundingBox (LineTypePtr Line)
+SetLineBoundingBox (LineType *Line)
 {
   Coord width = (Line->Thickness + Line->Clearance + 1) / 2;
 
@@ -324,7 +321,7 @@ SetLineBoundingBox (LineTypePtr Line)
  * sets the bounding box of a polygons
  */
 void
-SetPolygonBoundingBox (PolygonTypePtr Polygon)
+SetPolygonBoundingBox (PolygonType *Polygon)
 {
   Polygon->BoundingBox.X1 = Polygon->BoundingBox.Y1 = MAX_COORD;
   Polygon->BoundingBox.X2 = Polygon->BoundingBox.Y2 = 0;
@@ -344,10 +341,10 @@ SetPolygonBoundingBox (PolygonTypePtr Polygon)
  * sets the bounding box of an elements
  */
 void
-SetElementBoundingBox (DataTypePtr Data, ElementTypePtr Element,
-                       FontTypePtr Font)
+SetElementBoundingBox (DataType *Data, ElementType *Element,
+                       FontType *Font)
 {
-  BoxTypePtr box, vbox;
+  BoxType *box, *vbox;
 
   if (Data && Data->element_tree)
     r_delete_entry (Data->element_tree, (BoxType *) Element);
@@ -493,9 +490,9 @@ SetElementBoundingBox (DataTypePtr Data, ElementTypePtr Element,
  * creates the bounding box of a text object
  */
 void
-SetTextBoundingBox (FontTypePtr FontPtr, TextTypePtr Text)
+SetTextBoundingBox (FontType *FontPtr, TextType *Text)
 {
-  SymbolTypePtr symbol = FontPtr->Symbol;
+  SymbolType *symbol = FontPtr->Symbol;
   unsigned char *s = (unsigned char *) Text->TextString;
   int i;
   int space;
@@ -523,7 +520,7 @@ SetTextBoundingBox (FontTypePtr FontPtr, TextTypePtr Text)
     {
       if (*s <= MAX_FONTPOSITION && symbol[*s].Valid)
         {
-          LineTypePtr line = symbol[*s].Line;
+          LineType *line = symbol[*s].Line;
           for (i = 0; i < symbol[*s].LineN; line++, i++)
             {
               /* Clamp the width of text lines at the minimum thickness.
@@ -615,7 +612,7 @@ SetTextBoundingBox (FontTypePtr FontPtr, TextTypePtr Text)
  * returns true if data area is empty
  */
 bool
-IsDataEmpty (DataTypePtr Data)
+IsDataEmpty (DataType *Data)
 {
   bool hasNoObjects;
   Cardinal i;
@@ -641,7 +638,7 @@ FlagIsDataEmpty (int parm)
 /* FLAG(DataNonEmpty,FlagIsDataEmpty,1) */
 
 bool
-IsLayerEmpty (LayerTypePtr layer)
+IsLayerEmpty (LayerType *layer)
 {
   return (layer->LineN == 0
 	  && layer->TextN == 0
@@ -691,7 +688,7 @@ typedef struct
 static int
 hole_counting_callback (const BoxType * b, void *cl)
 {
-  PinTypePtr pin = (PinTypePtr) b;
+  PinType *pin = (PinType *) b;
   HoleCountStruct *hcs = (HoleCountStruct *) cl;
   if (TEST_FLAG (HOLEFLAG, pin))
     hcs->nunplated++;
@@ -722,8 +719,8 @@ CountHoles (int *plated, int *unplated, const BoxType *within_area)
  * gets minimum and maximum coordinates
  * returns NULL if layout is empty
  */
-BoxTypePtr
-GetDataBoundingBox (DataTypePtr Data)
+BoxType *
+GetDataBoundingBox (DataType *Data)
 {
   static BoxType box;
   /* FIX ME: use r_search to do this much faster */
@@ -748,7 +745,7 @@ GetDataBoundingBox (DataTypePtr Data)
     box.X2 = MAX (box.X2, element->BoundingBox.X2);
     box.Y2 = MAX (box.Y2, element->BoundingBox.Y2);
     {
-      TextTypePtr text = &NAMEONPCB_TEXT (element);
+      TextType *text = &NAMEONPCB_TEXT (element);
       box.X1 = MIN (box.X1, text->BoundingBox.X1);
       box.Y1 = MIN (box.Y1, text->BoundingBox.Y1);
       box.X2 = MAX (box.X2, text->BoundingBox.X2);
@@ -815,11 +812,11 @@ CenterDisplay (Coord X, Coord Y)
  * 
  */
 void
-SetFontInfo (FontTypePtr Ptr)
+SetFontInfo (FontType *Ptr)
 {
   Cardinal i, j;
-  SymbolTypePtr symbol;
-  LineTypePtr line;
+  SymbolType *symbol;
+  LineType *line;
   Coord totalminy = MAX_COORD;
 
   /* calculate cell with and height (is at least DEFAULT_CELLSIZE)
@@ -920,7 +917,7 @@ make_route_string (RouteStyleType rs[], int n_styles)
  * e.g. Signal,20,40,20,10:Power,40,60,28,10:...
  */
 int
-ParseRouteString (char *s, RouteStyleTypePtr routeStyle, const char *default_unit)
+ParseRouteString (char *s, RouteStyleType *routeStyle, const char *default_unit)
 {
   int i, style;
   char Name[256];
@@ -990,7 +987,7 @@ error:
  * comma separated layer numbers (1,2,b:4,6,8,t)
  */
 int
-ParseGroupString (char *s, LayerGroupTypePtr LayerGroup, int LayerN)
+ParseGroupString (char *s, LayerGroupType *LayerGroup, int LayerN)
 {
   int group, member, layer;
   bool c_set = false,        /* flags for the two special layers to */
@@ -1209,7 +1206,7 @@ ExpandFilename (char *Dirname, char *Filename)
  * returns the layer number for the passed pointer
  */
 int
-GetLayerNumber (DataTypePtr Data, LayerTypePtr Layer)
+GetLayerNumber (DataType *Data, LayerType *Layer)
 {
   int i;
 
@@ -1374,14 +1371,15 @@ LayerStringToLayerStack (char *s)
 	      }
 	  if (!found)
 	    {
-	      fprintf(stderr, "Warning: layer \"%s\" not known\n", args[i]);
+	      fprintf(stderr, _("Warning: layer \"%s\" not known\n"), args[i]);
 	      if (!listed_layers)
 		{
-		  fprintf (stderr, "Named layers in this board are:\n");
+		  fprintf (stderr, _("Named layers in this board are:\n"));
 		  listed_layers = 1;
 		  for (lno=0; lno < max_copper_layer; lno ++)
 		    fprintf(stderr, "\t%s\n", PCB->Data->Layer[lno].Name);
-		  fprintf(stderr, "Also: component, solder, rats, invisible, pins, vias, elements or silk, mask, solderside.\n");
+		  fprintf(stderr, _("Also: component, solder, rats, invisible, "
+			"pins, vias, elements or silk, mask, solderside.\n"));
 		}
 	    }
 	}
@@ -1412,7 +1410,7 @@ GetGroupOfLayer (int Layer)
  * returns the layergroup number for the passed pointer
  */
 int
-GetLayerGroupNumberByPointer (LayerTypePtr Layer)
+GetLayerGroupNumberByPointer (LayerType *Layer)
 {
   return (GetLayerGroupNumberByNumber (GetLayerNumber (PCB->Data, Layer)));
 }
@@ -1440,7 +1438,7 @@ GetLayerGroupNumberByNumber (Cardinal Layer)
  * returns a pointer to an objects bounding box;
  * data is valid until the routine is called again
  */
-BoxTypePtr
+BoxType *
 GetObjectBoundingBox (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 {
   switch (Type)
@@ -1460,7 +1458,7 @@ GetObjectBoundingBox (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
     case LINEPOINT_TYPE:
       return (BoxType *)Ptr3;
     default:
-      Message ("Request for bounding box of unsupported type %d\n", Type);
+      Message (_("Request for bounding box of unsupported type %d\n"), Type);
       return (BoxType *)Ptr2;
     }
 }
@@ -1469,7 +1467,7 @@ GetObjectBoundingBox (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
  * computes the bounding box of an arc
  */
 void
-SetArcBoundingBox (ArcTypePtr Arc)
+SetArcBoundingBox (ArcType *Arc)
 {
   double ca1, ca2, sa1, sa2;
   double minx, maxx, miny, maxy;
@@ -1529,6 +1527,12 @@ SetArcBoundingBox (ArcTypePtr Arc)
   Arc->BoundingBox.Y1 -= width;
   Arc->BoundingBox.Y2 += width;
   close_box(&Arc->BoundingBox);
+
+  /* Update the arc end-points */
+  Arc->Point1.X = Arc->X - (double)Arc->Width  * ca1;
+  Arc->Point1.Y = Arc->Y + (double)Arc->Height * sa1;
+  Arc->Point2.X = Arc->X - (double)Arc->Width  * ca2;
+  Arc->Point2.Y = Arc->Y + (double)Arc->Height * sa2;
 }
 
 /* ---------------------------------------------------------------------------
@@ -1650,7 +1654,7 @@ GetWorkingDirectory (char *path)
  * some special characters are quoted
  */
 void
-CreateQuotedString (DynamicStringTypePtr DS, char *S)
+CreateQuotedString (DynamicStringType *DS, char *S)
 {
   DSClearString (DS);
   DSAddCharacter (DS, '"');
@@ -1663,8 +1667,8 @@ CreateQuotedString (DynamicStringTypePtr DS, char *S)
   DSAddCharacter (DS, '"');
 }
 
-BoxTypePtr
-GetArcEnds (ArcTypePtr Arc)
+BoxType *
+GetArcEnds (ArcType *Arc)
 {
   static BoxType box;
   box.X1 = Arc->X - Arc->Width * cos (Arc->StartAngle * M180);
@@ -1677,7 +1681,7 @@ GetArcEnds (ArcTypePtr Arc)
 
 /* doesn't this belong in change.c ?? */
 void
-ChangeArcAngles (LayerTypePtr Layer, ArcTypePtr a,
+ChangeArcAngles (LayerType *Layer, ArcType *a,
                  Angle new_sa, Angle new_da)
 {
   if (new_da >= 360)
@@ -1686,12 +1690,12 @@ ChangeArcAngles (LayerTypePtr Layer, ArcTypePtr a,
       new_sa = 0;
     }
   RestoreToPolygon (PCB->Data, ARC_TYPE, Layer, a);
-  r_delete_entry (Layer->arc_tree, (BoxTypePtr) a);
+  r_delete_entry (Layer->arc_tree, (BoxType *) a);
   AddObjectToChangeAnglesUndoList (ARC_TYPE, a, a, a);
   a->StartAngle = new_sa;
   a->Delta = new_da;
   SetArcBoundingBox (a);
-  r_insert_entry (Layer->arc_tree, (BoxTypePtr) a, 0);
+  r_insert_entry (Layer->arc_tree, (BoxType *) a, 0);
   ClearFromPolygon (PCB->Data, ARC_TYPE, Layer, a);
 }
 
@@ -1727,7 +1731,7 @@ BumpName (char *Name)
  * this can alter the contents of the input string
  */
 char *
-UniqueElementName (DataTypePtr Data, char *Name)
+UniqueElementName (DataType *Data, char *Name)
 {
   bool unique = true;
   /* null strings are ok */
@@ -1761,37 +1765,37 @@ GetGridLockCoordinates (int type, void *ptr1,
   switch (type)
     {
     case VIA_TYPE:
-      *x = ((PinTypePtr) ptr2)->X;
-      *y = ((PinTypePtr) ptr2)->Y;
+      *x = ((PinType *) ptr2)->X;
+      *y = ((PinType *) ptr2)->Y;
       break;
     case LINE_TYPE:
-      *x = ((LineTypePtr) ptr2)->Point1.X;
-      *y = ((LineTypePtr) ptr2)->Point1.Y;
+      *x = ((LineType *) ptr2)->Point1.X;
+      *y = ((LineType *) ptr2)->Point1.Y;
       break;
     case TEXT_TYPE:
     case ELEMENTNAME_TYPE:
-      *x = ((TextTypePtr) ptr2)->X;
-      *y = ((TextTypePtr) ptr2)->Y;
+      *x = ((TextType *) ptr2)->X;
+      *y = ((TextType *) ptr2)->Y;
       break;
     case ELEMENT_TYPE:
-      *x = ((ElementTypePtr) ptr2)->MarkX;
-      *y = ((ElementTypePtr) ptr2)->MarkY;
+      *x = ((ElementType *) ptr2)->MarkX;
+      *y = ((ElementType *) ptr2)->MarkY;
       break;
     case POLYGON_TYPE:
-      *x = ((PolygonTypePtr) ptr2)->Points[0].X;
-      *y = ((PolygonTypePtr) ptr2)->Points[0].Y;
+      *x = ((PolygonType *) ptr2)->Points[0].X;
+      *y = ((PolygonType *) ptr2)->Points[0].Y;
       break;
 
     case LINEPOINT_TYPE:
     case POLYGONPOINT_TYPE:
-      *x = ((PointTypePtr) ptr3)->X;
-      *y = ((PointTypePtr) ptr3)->Y;
+      *x = ((PointType *) ptr3)->X;
+      *y = ((PointType *) ptr3)->Y;
       break;
     case ARC_TYPE:
       {
-        BoxTypePtr box;
+        BoxType *box;
 
-        box = GetArcEnds ((ArcTypePtr) ptr2);
+        box = GetArcEnds ((ArcType *) ptr2);
         *x = box->X1;
         *y = box->Y1;
         break;
@@ -1802,7 +1806,7 @@ GetGridLockCoordinates (int type, void *ptr1,
 void
 AttachForCopy (Coord PlaceX, Coord PlaceY)
 {
-  BoxTypePtr box;
+  BoxType *box;
   Coord mx = 0, my = 0;
 
   Crosshair.AttachedObject.RubberbandN = 0;
@@ -1978,7 +1982,7 @@ MoveLayerToGroup (int layer, int group)
 }
 
 char *
-LayerGroupsToString (LayerGroupTypePtr lg)
+LayerGroupsToString (LayerGroupType *lg)
 {
 #if MAX_LAYER < 9998
   /* Allows for layer numbers 0..9999 */
@@ -2185,33 +2189,34 @@ GetInfoString (void)
   if (first_time)
     {
       first_time = 0;
-      DSAddString (&info, "This is PCB, an interactive\n");
-      DSAddString (&info, "printed circuit board editor\n");
-      DSAddString (&info, "version ");
-      DSAddString (&info, VERSION);
-      DSAddString (&info, "\n\n");
-      DSAddString (&info, "Compiled on " __DATE__ " at " __TIME__);
-      DSAddString (&info, "\n\n" "by harry eaton\n\n");
-      DSAddString (&info,
-                   "Copyright (C) Thomas Nau 1994, 1995, 1996, 1997\n");
-      DSAddString (&info, "Copyright (C) harry eaton 1998-2007\n");
-      DSAddString (&info, "Copyright (C) C. Scott Ananian 2001\n");
       DSAddString (&info,
-                   "Copyright (C) DJ Delorie 2003, 2004, 2005, 2006, 2007, 2008\n");
+	  _("This is PCB, an interactive\n"
+	    "printed circuit board editor\n"
+	    "version "));
       DSAddString (&info,
-                   "Copyright (C) Dan McMahill 2003, 2004, 2005, 2006, 2007, 2008\n\n");
-      DSAddString (&info, "It is licensed under the terms of the GNU\n");
-      DSAddString (&info, "General Public License version 2\n");
-      DSAddString (&info, "See the LICENSE file for more information\n\n");
-      DSAddString (&info, "For more information see:\n\n");
-      DSAddString (&info, "PCB homepage: http://pcb.gpleda.org\n");
-      DSAddString (&info, "gEDA homepage: http://www.gpleda.org\n");
+	    VERSION "\n\n"
+	    "Compiled on " __DATE__ " at " __TIME__ "\n\n"
+	    "by harry eaton\n\n"
+	    "Copyright (C) Thomas Nau 1994, 1995, 1996, 1997\n"
+	    "Copyright (C) harry eaton 1998-2007\n"
+	    "Copyright (C) C. Scott Ananian 2001\n"
+	    "Copyright (C) DJ Delorie 2003, 2004, 2005, 2006, 2007, 2008\n"
+	    "Copyright (C) Dan McMahill 2003, 2004, 2005, 2006, 2007, 2008\n\n");
       DSAddString (&info,
-                   "gEDA Wiki: http://geda.seul.org/wiki/ \n\n");
-
-      DSAddString (&info, "----- Compile Time Options -----\n");
+	  _("It is licensed under the terms of the GNU\n"
+	    "General Public License version 2\n"
+	    "See the LICENSE file for more information\n\n"
+	    "For more information see:\n"));
+      DSAddString (&info, _("PCB homepage: "));
+      DSAddString (&info, "http://pcb.geda-project.org\n");
+      DSAddString (&info, _("gEDA homepage: "));
+      DSAddString (&info, "http://www.geda-project.org\n");
+      DSAddString (&info, _("gEDA Wiki: "));
+      DSAddString (&info, "http://wiki.geda-project.org\n");
+
+      DSAddString (&info, _("\n----- Compile Time Options -----\n"));
       hids = hid_enumerate ();
-      DSAddString (&info, "GUI:\n");
+      DSAddString (&info, _("GUI:\n"));
       for (i = 0; hids[i]; i++)
         {
           if (hids[i]->gui)
@@ -2224,7 +2229,7 @@ GetInfoString (void)
             }
         }
 
-      DSAddString (&info, "Exporters:\n");
+      DSAddString (&info, _("Exporters:\n"));
       for (i = 0; hids[i]; i++)
         {
           if (hids[i]->exporter)
@@ -2237,7 +2242,7 @@ GetInfoString (void)
             }
         }
 
-      DSAddString (&info, "Printers:\n");
+      DSAddString (&info, _("Printers:\n"));
       for (i = 0; hids[i]; i++)
         {
           if (hids[i]->printer)
diff --git a/src/misc.h b/src/misc.h
index a0220c0..9ce0905 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for misc routines
@@ -46,49 +45,49 @@ typedef struct {
 double Distance (double x1, double y1, double x2, double y2);
 Angle  NormalizeAngle (Angle a);
 
-void r_delete_element (DataTypePtr, ElementTypePtr);
-void SetLineBoundingBox (LineTypePtr);
-void SetArcBoundingBox (ArcTypePtr);
-void SetPointBoundingBox (PointTypePtr);
-void SetPinBoundingBox (PinTypePtr);
-void SetPadBoundingBox (PadTypePtr);
-void SetPolygonBoundingBox (PolygonTypePtr);
-void SetElementBoundingBox (DataTypePtr, ElementTypePtr, FontTypePtr);
-bool IsDataEmpty (DataTypePtr);
-bool IsLayerEmpty (LayerTypePtr);
+void r_delete_element (DataType *, ElementType *);
+void SetLineBoundingBox (LineType *);
+void SetArcBoundingBox (ArcType *);
+void SetPointBoundingBox (PointType *);
+void SetPinBoundingBox (PinType *);
+void SetPadBoundingBox (PadType *);
+void SetPolygonBoundingBox (PolygonType *);
+void SetElementBoundingBox (DataType *, ElementType *, FontType *);
+bool IsDataEmpty (DataType *);
+bool IsLayerEmpty (LayerType *);
 bool IsLayerNumEmpty (int);
 bool IsLayerGroupEmpty (int);
 bool IsPasteEmpty (int);
 void CountHoles (int *, int *, const BoxType *);
-BoxTypePtr GetDataBoundingBox (DataTypePtr);
+BoxType * GetDataBoundingBox (DataType *);
 void CenterDisplay (Coord, Coord);
-void SetFontInfo (FontTypePtr);
+void SetFontInfo (FontType *);
 char *make_route_string (RouteStyleType rs[], int n_styles);
-int ParseGroupString (char *, LayerGroupTypePtr, int /* LayerN */);
-int ParseRouteString (char *, RouteStyleTypePtr, const char *);
+int ParseGroupString (char *, LayerGroupType *, int /* LayerN */);
+int ParseRouteString (char *, RouteStyleType *, const char *);
 void QuitApplication (void);
 char *EvaluateFilename (char *, char *, char *, char *);
 char *ExpandFilename (char *, char *);
-void SetTextBoundingBox (FontTypePtr, TextTypePtr);
+void SetTextBoundingBox (FontType *, TextType *);
 
 void SaveOutputWindow (void);
-int GetLayerNumber (DataTypePtr, LayerTypePtr);
-int GetLayerGroupNumberByPointer (LayerTypePtr);
+int GetLayerNumber (DataType *, LayerType *);
+int GetLayerGroupNumberByPointer (LayerType *);
 int GetLayerGroupNumberByNumber (Cardinal);
 int GetGroupOfLayer (int);
 int ChangeGroupVisibility (int, bool, bool);
 void LayerStringToLayerStack (char *);
 
 
-BoxTypePtr GetObjectBoundingBox (int, void *, void *, void *);
+BoxType * GetObjectBoundingBox (int, void *, void *, void *);
 void ResetStackAndVisibility (void);
 void SaveStackAndVisibility (void);
 void RestoreStackAndVisibility (void);
 char *GetWorkingDirectory (char *);
-void CreateQuotedString (DynamicStringTypePtr, char *);
-BoxTypePtr GetArcEnds (ArcTypePtr);
-void ChangeArcAngles (LayerTypePtr, ArcTypePtr, Angle, Angle);
-char *UniqueElementName (DataTypePtr, char *);
+void CreateQuotedString (DynamicStringType *, char *);
+BoxType * GetArcEnds (ArcType *);
+void ChangeArcAngles (LayerType *, ArcType *, Angle, Angle);
+char *UniqueElementName (DataType *, char *);
 void AttachForCopy (Coord, Coord);
 double GetValue (const char *, const char *, bool *);
 double GetValueEx (const char *, const char *, bool *, UnitList, const char *);
@@ -125,7 +124,7 @@ FlagType MaskFlags (FlagType, unsigned int);
 /* Returns group actually moved to (i.e. either group or previous) */
 int MoveLayerToGroup (int layer, int group);
 /* returns pointer to private buffer */
-char *LayerGroupsToString (LayerGroupTypePtr);
+char *LayerGroupsToString (LayerGroupType *);
 /* Make the current layer groups the default.  */
 void MakeLayerGroupsDefault ();
 
diff --git a/src/move.c b/src/move.c
index 6b6359a..d785823 100644
--- a/src/move.c
+++ b/src/move.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -58,34 +56,29 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
-
-
-
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static void *MoveElementName (ElementTypePtr);
-static void *MoveElement (ElementTypePtr);
-static void *MoveVia (PinTypePtr);
-static void *MoveLine (LayerTypePtr, LineTypePtr);
-static void *MoveArc (LayerTypePtr, ArcTypePtr);
-static void *MoveText (LayerTypePtr, TextTypePtr);
-static void *MovePolygon (LayerTypePtr, PolygonTypePtr);
-static void *MoveLinePoint (LayerTypePtr, LineTypePtr, PointTypePtr);
-static void *MovePolygonPoint (LayerTypePtr, PolygonTypePtr, PointTypePtr);
-static void *MoveLineToLayer (LayerTypePtr, LineTypePtr);
-static void *MoveArcToLayer (LayerTypePtr, ArcTypePtr);
-static void *MoveRatToLayer (RatTypePtr);
-static void *MoveTextToLayer (LayerTypePtr, TextTypePtr);
-static void *MovePolygonToLayer (LayerTypePtr, PolygonTypePtr);
+static void *MoveElementName (ElementType *);
+static void *MoveElement (ElementType *);
+static void *MoveVia (PinType *);
+static void *MoveLine (LayerType *, LineType *);
+static void *MoveArc (LayerType *, ArcType *);
+static void *MoveText (LayerType *, TextType *);
+static void *MovePolygon (LayerType *, PolygonType *);
+static void *MoveLinePoint (LayerType *, LineType *, PointType *);
+static void *MovePolygonPoint (LayerType *, PolygonType *, PointType *);
+static void *MoveLineToLayer (LayerType *, LineType *);
+static void *MoveArcToLayer (LayerType *, ArcType *);
+static void *MoveRatToLayer (RatType *);
+static void *MoveTextToLayer (LayerType *, TextType *);
+static void *MovePolygonToLayer (LayerType *, PolygonType *);
 
 /* ---------------------------------------------------------------------------
  * some local identifiers
  */
 static Coord DeltaX, DeltaY;	/* used by local routines as offset */
-static LayerTypePtr Dest;
+static LayerType *Dest;
 static bool MoreToCome;
 static ObjectFunctionType MoveFunctions = {
   MoveLine,
@@ -112,7 +105,7 @@ MoveLineToLayer,
  * moves a element by +-X and +-Y
  */
 void
-MoveElementLowLevel (DataTypePtr Data, ElementTypePtr Element,
+MoveElementLowLevel (DataType *Data, ElementType *Element,
 		     Coord DX, Coord DY)
 {
   if (Data)
@@ -177,7 +170,7 @@ MoveElementLowLevel (DataTypePtr Data, ElementTypePtr Element,
  * moves all names of an element to a new position
  */
 static void *
-MoveElementName (ElementTypePtr Element)
+MoveElementName (ElementType *Element)
 {
   if (PCB->ElementOn && (FRONT (Element) || PCB->InvisibleObjectsOn))
     {
@@ -213,7 +206,7 @@ MoveElementName (ElementTypePtr Element)
  * moves an element
  */
 static void *
-MoveElement (ElementTypePtr Element)
+MoveElement (ElementType *Element)
 {
   bool didDraw = false;
 
@@ -245,7 +238,7 @@ MoveElement (ElementTypePtr Element)
  * moves a via
  */
 static void *
-MoveVia (PinTypePtr Via)
+MoveVia (PinType *Via)
 {
   r_delete_entry (PCB->Data->via_tree, (BoxType *)Via);
   RestoreToPolygon (PCB->Data, VIA_TYPE, Via, Via);
@@ -266,7 +259,7 @@ MoveVia (PinTypePtr Via)
  * moves a line
  */
 static void *
-MoveLine (LayerTypePtr Layer, LineTypePtr Line)
+MoveLine (LayerType *Layer, LineType *Line)
 {
   if (Layer->On)
     EraseLine (Line);
@@ -287,7 +280,7 @@ MoveLine (LayerTypePtr Layer, LineTypePtr Line)
  * moves an arc
  */
 static void *
-MoveArc (LayerTypePtr Layer, ArcTypePtr Arc)
+MoveArc (LayerType *Layer, ArcType *Arc)
 {
   RestoreToPolygon (PCB->Data, ARC_TYPE, Layer, Arc);
   r_delete_entry (Layer->arc_tree, (BoxType *)Arc);
@@ -311,7 +304,7 @@ MoveArc (LayerTypePtr Layer, ArcTypePtr Arc)
  * moves a text object
  */
 static void *
-MoveText (LayerTypePtr Layer, TextTypePtr Text)
+MoveText (LayerType *Layer, TextType *Text)
 {
   RestoreToPolygon (PCB->Data, TEXT_TYPE, Layer, Text);
   r_delete_entry (Layer->text_tree, (BoxType *)Text);
@@ -333,7 +326,7 @@ MoveText (LayerTypePtr Layer, TextTypePtr Text)
  * low level routine to move a polygon
  */
 void
-MovePolygonLowLevel (PolygonTypePtr Polygon, Coord DeltaX, Coord DeltaY)
+MovePolygonLowLevel (PolygonType *Polygon, Coord DeltaX, Coord DeltaY)
 {
   POLYGONPOINT_LOOP (Polygon);
   {
@@ -347,7 +340,7 @@ MovePolygonLowLevel (PolygonTypePtr Polygon, Coord DeltaX, Coord DeltaY)
  * moves a polygon
  */
 static void *
-MovePolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
+MovePolygon (LayerType *Layer, PolygonType *Polygon)
 {
   if (Layer->On)
     {
@@ -369,7 +362,7 @@ MovePolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
  * moves one end of a line
  */
 static void *
-MoveLinePoint (LayerTypePtr Layer, LineTypePtr Line, PointTypePtr Point)
+MoveLinePoint (LayerType *Layer, LineType *Line, PointType *Point)
 {
   if (Layer)
     {
@@ -391,14 +384,14 @@ MoveLinePoint (LayerTypePtr Layer, LineTypePtr Line, PointTypePtr Point)
   else				/* must be a rat */
     {
       if (PCB->RatOn)
-	EraseRat ((RatTypePtr) Line);
+	EraseRat ((RatType *) Line);
       r_delete_entry (PCB->Data->rat_tree, &Line->BoundingBox);
       MOVE (Point->X, Point->Y, DeltaX, DeltaY);
       SetLineBoundingBox (Line);
       r_insert_entry (PCB->Data->rat_tree, &Line->BoundingBox, 0);
       if (PCB->RatOn)
 	{
-	  DrawRat ((RatTypePtr) Line);
+	  DrawRat ((RatType *) Line);
 	  Draw ();
 	}
       return (Line);
@@ -409,8 +402,8 @@ MoveLinePoint (LayerTypePtr Layer, LineTypePtr Line, PointTypePtr Point)
  * moves a polygon-point
  */
 static void *
-MovePolygonPoint (LayerTypePtr Layer, PolygonTypePtr Polygon,
-		  PointTypePtr Point)
+MovePolygonPoint (LayerType *Layer, PolygonType *Polygon,
+		  PointType *Point)
 {
   if (Layer->On)
     {
@@ -477,7 +470,7 @@ MoveArcToLayerLowLevel (LayerType *Source, ArcType *arc,
 static void *
 MoveArcToLayer (LayerType *Layer, ArcType *Arc)
 {
-  ArcTypePtr newone;
+  ArcType *newone;
 
   if (TEST_FLAG (LOCKFLAG, Arc))
     {
@@ -495,7 +488,7 @@ MoveArcToLayer (LayerType *Layer, ArcType *Arc)
   RestoreToPolygon (PCB->Data, ARC_TYPE, Layer, Arc);
   if (Layer->On)
     EraseArc (Arc);
-  newone = (ArcTypePtr)MoveArcToLayerLowLevel (Layer, Arc, Dest);
+  newone = (ArcType *)MoveArcToLayerLowLevel (Layer, Arc, Dest);
   ClearFromPolygon (PCB->Data, ARC_TYPE, Dest, Arc);
   if (Dest->On)
     DrawArc (Dest, newone);
@@ -509,7 +502,7 @@ MoveArcToLayer (LayerType *Layer, ArcType *Arc)
 static void *
 MoveRatToLayer (RatType *Rat)
 {
-  LineTypePtr newone;
+  LineType *newone;
   //Coord X1 = Rat->Point1.X, Y1 = Rat->Point1.Y;
   //Coord X1 = Rat->Point1.X, Y1 = Rat->Point1.Y;
   // if VIAFLAG
@@ -548,7 +541,7 @@ static int
 moveline_callback (const BoxType * b, void *cl)
 {
   struct via_info *i = (struct via_info *) cl;
-  PinTypePtr via;
+  PinType *via;
 
   if ((via =
        CreateNewVia (PCB->Data, i->X, i->Y,
@@ -567,7 +560,7 @@ MoveLineToLayer (LayerType *Layer, LineType *Line)
 {
   struct via_info info;
   BoxType sb;
-  LineTypePtr newone;
+  LineType *newone;
   void *ptr1, *ptr2, *ptr3;
 
   if (TEST_FLAG (LOCKFLAG, Line))
@@ -587,7 +580,7 @@ MoveLineToLayer (LayerType *Layer, LineType *Line)
   if (Layer->On)
     EraseLine (Line);
   RestoreToPolygon (PCB->Data, LINE_TYPE, Layer, Line);
-  newone = (LineTypePtr)MoveLineToLayerLowLevel (Layer, Line, Dest);
+  newone = (LineType *)MoveLineToLayerLowLevel (Layer, Line, Dest);
   Line = NULL;
   ClearFromPolygon (PCB->Data, LINE_TYPE, Dest, newone);
   if (Dest->On)
@@ -712,14 +705,14 @@ struct mptlc
 {
   Cardinal snum, dnum;
   int type;
-  PolygonTypePtr polygon;
+  PolygonType *polygon;
 } mptlc;
 
 int
 mptl_pin_callback (const BoxType *b, void *cl)
 {
   struct mptlc *d = (struct mptlc *) cl;
-  PinTypePtr pin = (PinTypePtr) b;
+  PinType *pin = (PinType *) b;
   if (!TEST_THERM (d->snum, pin) || !
 	IsPointInPolygon (pin->X, pin->Y, pin->Thickness + pin->Clearance + 2,
 			  d->polygon))
@@ -739,7 +732,7 @@ mptl_pin_callback (const BoxType *b, void *cl)
 static void *
 MovePolygonToLayer (LayerType *Layer, PolygonType *Polygon)
 {
-  PolygonTypePtr newone;
+  PolygonType *newone;
   struct mptlc d;
 
   if (TEST_FLAG (LOCKFLAG, Polygon))
@@ -794,14 +787,12 @@ void *
 MoveObjectAndRubberband (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
 			 Coord DX, Coord DY)
 {
-  RubberbandTypePtr ptr;
+  RubberbandType *ptr;
   void *ptr2;
 
   /* setup offset */
   DeltaX = DX;
   DeltaY = DY;
-  if (DX == 0 && DY == 0)
-    return (NULL);
 
   /* move all the lines... and reset the counter */
   ptr = Crosshair.AttachedObject.Rubberband;
@@ -809,14 +800,21 @@ MoveObjectAndRubberband (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
     {
       /* first clear any marks that we made in the line flags */
       CLEAR_FLAG (RUBBERENDFLAG, ptr->Line);
-      AddObjectToMoveUndoList (LINEPOINT_TYPE,
-			       ptr->Layer, ptr->Line, ptr->MovedPoint, DX,
-			       DY);
-      MoveLinePoint (ptr->Layer, ptr->Line, ptr->MovedPoint);
+      /* only update undo list if an actual movement happened */
+      if (DX != 0 || DY != 0)
+        {
+          AddObjectToMoveUndoList (LINEPOINT_TYPE,
+                                   ptr->Layer, ptr->Line,
+                                   ptr->MovedPoint, DX, DY);
+          MoveLinePoint (ptr->Layer, ptr->Line, ptr->MovedPoint);
+        }
       Crosshair.AttachedObject.RubberbandN--;
       ptr++;
     }
 
+  if (DX == 0 && DY == 0)
+    return (NULL);
+
   AddObjectToMoveUndoList (Type, Ptr1, Ptr2, Ptr3, DX, DY);
   ptr2 = ObjectOperation (&MoveFunctions, Type, Ptr1, Ptr2, Ptr3);
   IncrementUndoSerialNumber ();
@@ -829,7 +827,7 @@ MoveObjectAndRubberband (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
  */
 void *
 MoveObjectToLayer (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
-		   LayerTypePtr Target, bool enmasse)
+		   LayerType *Target, bool enmasse)
 {
   void *result;
 
@@ -846,7 +844,7 @@ MoveObjectToLayer (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
  * positions
  */
 bool
-MoveSelectedObjectsToLayer (LayerTypePtr Target)
+MoveSelectedObjectsToLayer (LayerType *Target)
 {
   bool changed;
 
@@ -934,7 +932,7 @@ LastLayerInSolderGroup (int layer)
 int
 MoveLayer (int old_index, int new_index)
 {
-  int groups[MAX_LAYER + 2], l, g;
+  int group_of_layer[MAX_LAYER + 2], l, g, i;
   LayerType saved_layer;
   int saved_group;
 
@@ -970,16 +968,16 @@ MoveLayer (int old_index, int new_index)
       return 1;
     }
 
-  for (g = 0; g < MAX_LAYER+2; g++)
-    groups[g] = -1;
+  for (l = 0; l < MAX_LAYER+2; l++)
+    group_of_layer[l] = -1;
 
   for (g = 0; g < MAX_LAYER; g++)
-    for (l = 0; l < PCB->LayerGroups.Number[g]; l++)
-      groups[PCB->LayerGroups.Entries[g][l]] = g;
+    for (i = 0; i < PCB->LayerGroups.Number[g]; i++)
+      group_of_layer[PCB->LayerGroups.Entries[g][i]] = g;
 
   if (old_index == -1)
     {
-      LayerTypePtr lp;
+      LayerType *lp;
       if (max_copper_layer == MAX_LAYER)
 	{
 	  Message ("No room for new layers\n");
@@ -989,10 +987,10 @@ MoveLayer (int old_index, int new_index)
       lp = &PCB->Data->Layer[new_index];
       memmove (&PCB->Data->Layer[new_index + 1],
 	       &PCB->Data->Layer[new_index],
-	       (max_copper_layer - new_index + 2) * sizeof (LayerType));
-      memmove (&groups[new_index + 1],
-	       &groups[new_index],
-	       (max_copper_layer - new_index + 2) * sizeof (int));
+	       (max_copper_layer + 2 - new_index) * sizeof (LayerType));
+      memmove (&group_of_layer[new_index + 1],
+	       &group_of_layer[new_index],
+	       (max_copper_layer + 2 - new_index) * sizeof (int));
       max_copper_layer++;
       memset (lp, 0, sizeof (LayerType));
       lp->On = 1;
@@ -1009,11 +1007,11 @@ MoveLayer (int old_index, int new_index)
       /* Delete the layer at old_index */
       memmove (&PCB->Data->Layer[old_index],
 	       &PCB->Data->Layer[old_index + 1],
-	       (max_copper_layer - old_index + 2 - 1) * sizeof (LayerType));
-      memset (&PCB->Data->Layer[max_copper_layer + 1], 0, sizeof (LayerType));
-      memmove (&groups[old_index],
-	       &groups[old_index + 1],
-	       (max_copper_layer - old_index + 2 - 1) * sizeof (int));
+	       (max_copper_layer + 2 - old_index - 1) * sizeof (LayerType));
+      memset (&PCB->Data->Layer[max_copper_layer + 2 - 1], 0, sizeof (LayerType));
+      memmove (&group_of_layer[old_index],
+	       &group_of_layer[old_index + 1],
+	       (max_copper_layer + 2 - old_index - 1) * sizeof (int));
       for (l = 0; l < max_copper_layer; l++)
 	if (LayerStack[l] == old_index)
 	  memmove (LayerStack + l,
@@ -1028,14 +1026,14 @@ MoveLayer (int old_index, int new_index)
     {
       /* Move an existing layer */
       memcpy (&saved_layer, &PCB->Data->Layer[old_index], sizeof (LayerType));
-      saved_group = groups[old_index];
+      saved_group = group_of_layer[old_index];
       if (old_index < new_index)
 	{
 	  memmove (&PCB->Data->Layer[old_index],
 		   &PCB->Data->Layer[old_index + 1],
 		   (new_index - old_index) * sizeof (LayerType));
-	  memmove (&groups[old_index],
-		   &groups[old_index + 1],
+	  memmove (&group_of_layer[old_index],
+		   &group_of_layer[old_index + 1],
 		   (new_index - old_index) * sizeof (int));
 	}
       else
@@ -1043,12 +1041,12 @@ MoveLayer (int old_index, int new_index)
 	  memmove (&PCB->Data->Layer[new_index + 1],
 		   &PCB->Data->Layer[new_index],
 		   (old_index - new_index) * sizeof (LayerType));
-	  memmove (&groups[new_index + 1],
-		   &groups[new_index],
+	  memmove (&group_of_layer[new_index + 1],
+		   &group_of_layer[new_index],
 		   (old_index - new_index) * sizeof (int));
 	}
       memcpy (&PCB->Data->Layer[new_index], &saved_layer, sizeof (LayerType));
-      groups[new_index] = saved_group;
+      group_of_layer[new_index] = saved_group;
     }
 
   move_all_thermals(old_index, new_index);
@@ -1057,24 +1055,25 @@ MoveLayer (int old_index, int new_index)
     PCB->LayerGroups.Number[g] = 0;
   for (l = 0; l < max_copper_layer + 2; l++)
     {
-      int i;
-      g = groups[l];
-      if (g >= 0)
-	{
-	  i = PCB->LayerGroups.Number[g]++;
-	  PCB->LayerGroups.Entries[g][i] = l;
-	}
+      g = group_of_layer[l];
+
+      /* XXX: Should this ever happen? */
+      if (g < 0)
+        continue;
+
+      i = PCB->LayerGroups.Number[g]++;
+      PCB->LayerGroups.Entries[g][i] = l;
     }
 
-  for (g = 0; g < MAX_LAYER; g++)
-    if (PCB->LayerGroups.Number[g] == 0)
+  for (g = 1; g < MAX_LAYER; g++)
+    if (PCB->LayerGroups.Number[g - 1] == 0)
       {
-	memmove (&PCB->LayerGroups.Number[g],
-		 &PCB->LayerGroups.Number[g + 1],
-		 (MAX_LAYER - g - 1) * sizeof (PCB->LayerGroups.Number[g]));
-	memmove (&PCB->LayerGroups.Entries[g],
-		 &PCB->LayerGroups.Entries[g + 1],
-		 (MAX_LAYER - g - 1) * sizeof (PCB->LayerGroups.Entries[g]));
+	memmove (&PCB->LayerGroups.Number[g - 1],
+		 &PCB->LayerGroups.Number[g],
+		 (MAX_LAYER - g) * sizeof (PCB->LayerGroups.Number[g]));
+	memmove (&PCB->LayerGroups.Entries[g - 1],
+		 &PCB->LayerGroups.Entries[g],
+		 (MAX_LAYER - g) * sizeof (PCB->LayerGroups.Entries[g]));
       }
 
   hid_action ("LayersChanged");
diff --git a/src/move.h b/src/move.h
index e617eca..f91602e 100644
--- a/src/move.h
+++ b/src/move.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for move routines
@@ -61,6 +60,8 @@
 	{ \
 		MOVE((a)->X,(a)->Y,(dx),(dy)) \
 		MOVE_BOX_LOWLEVEL(&((a)->BoundingBox),(dx),(dy));		\
+		MOVE((a)->Point1.X,(a)->Point1.Y,(dx),(dy))			\
+		MOVE((a)->Point2.X,(a)->Point2.Y,(dx),(dy))			\
 	}
 /* Rather than mode the line bounding box, we set it so the point bounding
  * boxes are updated too.
@@ -93,13 +94,13 @@
 /* ---------------------------------------------------------------------------
  * prototypes
  */
-void MovePolygonLowLevel (PolygonTypePtr, Coord, Coord);
-void MoveElementLowLevel (DataTypePtr, ElementTypePtr, Coord, Coord);
+void MovePolygonLowLevel (PolygonType *, Coord, Coord);
+void MoveElementLowLevel (DataType *, ElementType *, Coord, Coord);
 void *MoveObject (int, void *, void *, void *, Coord, Coord);
-void *MoveObjectToLayer (int, void *, void *, void *, LayerTypePtr, bool);
+void *MoveObjectToLayer (int, void *, void *, void *, LayerType *, bool);
 void *MoveObjectAndRubberband (int, void *, void *, void *,
 			       Coord, Coord);
-bool MoveSelectedObjectsToLayer (LayerTypePtr);
+bool MoveSelectedObjectsToLayer (LayerType *);
 
 /* index is 0..MAX_LAYER-1.  If old_index is -1, a new layer is
    inserted at that index.  If new_index is -1, the specified layer is
diff --git a/src/mtspace.c b/src/mtspace.c
index a4bb314..3eba55a 100644
--- a/src/mtspace.c
+++ b/src/mtspace.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -55,8 +53,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 /* mtspace data structures are built on r-trees. */
 
 /* ---------------------------------------------------------------------------
@@ -105,7 +101,7 @@ mtspace_create_box (const BoxType * box, Coord keepaway)
   assert (box_is_good (box));
   mtsb = (mtspacebox_t *)malloc (sizeof (*mtsb));
   /* the box was sent to us pre-bloated by the keepaway amount */
-  *((BoxTypePtr) & mtsb->box) = *box;
+  *((BoxType *) & mtsb->box) = *box;
   mtsb->keepaway = keepaway;
   assert (box_is_good (&mtsb->box));
   return mtsb;
@@ -351,7 +347,7 @@ qloop (struct query_closure *qc, rtree_t * tree, heap_or_vector res, bool is_vec
 #endif
   while (!(qc->desired ? heap_is_empty (qc->checking.h) : vector_is_empty (qc->checking.v)))
     {
-      cbox = qc->desired ? (BoxTypePtr)heap_remove_smallest (qc->checking.h) : (BoxTypePtr)vector_remove_last (qc->checking.v);
+      cbox = qc->desired ? (BoxType *)heap_remove_smallest (qc->checking.h) : (BoxType *)vector_remove_last (qc->checking.v);
       if (setjmp (qc->env) == 0)
 	{
 	  assert (box_is_good (cbox));
diff --git a/src/mtspace.h b/src/mtspace.h
index c169170..baf368f 100644
--- a/src/mtspace.h
+++ b/src/mtspace.h
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
diff --git a/src/mymem.c b/src/mymem.c
index 73b3ef7..b6b3c30 100644
--- a/src/mymem.c
+++ b/src/mymem.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -49,12 +47,10 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 /* ---------------------------------------------------------------------------
  * local prototypes
  */
-static void DSRealloc (DynamicStringTypePtr, size_t);
+static void DSRealloc (DynamicStringType *, size_t);
 
 
 /* This API is quite new, provide a version here */
@@ -70,17 +66,17 @@ g_list_free_full (GList *list, GDestroyNotify free_func)
 /* ---------------------------------------------------------------------------
  * get next slot for a rubberband connection, allocates memory if necessary
  */
-RubberbandTypePtr
+RubberbandType *
 GetRubberbandMemory (void)
 {
-  RubberbandTypePtr ptr = Crosshair.AttachedObject.Rubberband;
+  RubberbandType *ptr = Crosshair.AttachedObject.Rubberband;
 
   /* realloc new memory if necessary and clear it */
   if (Crosshair.AttachedObject.RubberbandN >=
       Crosshair.AttachedObject.RubberbandMax)
     {
       Crosshair.AttachedObject.RubberbandMax += STEP_RUBBERBAND;
-      ptr = (RubberbandTypePtr)realloc (ptr, Crosshair.AttachedObject.RubberbandMax *
+      ptr = (RubberbandType *)realloc (ptr, Crosshair.AttachedObject.RubberbandMax *
                           sizeof (RubberbandType));
       Crosshair.AttachedObject.Rubberband = ptr;
       memset (ptr + Crosshair.AttachedObject.RubberbandN, 0,
@@ -90,7 +86,7 @@ GetRubberbandMemory (void)
 }
 
 void **
-GetPointerMemory (PointerListTypePtr list)
+GetPointerMemory (PointerListType *list)
 {
   void **ptr = list->Ptr;
 
@@ -107,7 +103,7 @@ GetPointerMemory (PointerListTypePtr list)
 }
 
 void
-FreePointerListMemory (PointerListTypePtr list)
+FreePointerListMemory (PointerListType *list)
 {
   free (list->Ptr);
   memset (list, 0, sizeof (PointerListType));
@@ -116,16 +112,16 @@ FreePointerListMemory (PointerListTypePtr list)
 /* ---------------------------------------------------------------------------
  * get next slot for a box, allocates memory if necessary
  */
-BoxTypePtr
-GetBoxMemory (BoxListTypePtr Boxes)
+BoxType *
+GetBoxMemory (BoxListType *Boxes)
 {
-  BoxTypePtr box = Boxes->Box;
+  BoxType *box = Boxes->Box;
 
   /* realloc new memory if necessary and clear it */
   if (Boxes->BoxN >= Boxes->BoxMax)
     {
       Boxes->BoxMax = STEP_POINT + (2 * Boxes->BoxMax);
-      box = (BoxTypePtr)realloc (box, Boxes->BoxMax * sizeof (BoxType));
+      box = (BoxType *)realloc (box, Boxes->BoxMax * sizeof (BoxType));
       Boxes->Box = box;
       memset (box + Boxes->BoxN, 0,
 	      (Boxes->BoxMax - Boxes->BoxN) * sizeof (BoxType));
@@ -137,16 +133,16 @@ GetBoxMemory (BoxListTypePtr Boxes)
 /* ---------------------------------------------------------------------------
  * get next slot for a connection, allocates memory if necessary
  */
-ConnectionTypePtr
-GetConnectionMemory (NetTypePtr Net)
+ConnectionType *
+GetConnectionMemory (NetType *Net)
 {
-  ConnectionTypePtr con = Net->Connection;
+  ConnectionType *con = Net->Connection;
 
   /* realloc new memory if necessary and clear it */
   if (Net->ConnectionN >= Net->ConnectionMax)
     {
       Net->ConnectionMax += STEP_POINT;
-      con = (ConnectionTypePtr)realloc (con, Net->ConnectionMax * sizeof (ConnectionType));
+      con = (ConnectionType *)realloc (con, Net->ConnectionMax * sizeof (ConnectionType));
       Net->Connection = con;
       memset (con + Net->ConnectionN, 0,
 	      STEP_POINT * sizeof (ConnectionType));
@@ -157,16 +153,16 @@ GetConnectionMemory (NetTypePtr Net)
 /* ---------------------------------------------------------------------------
  * get next slot for a subnet, allocates memory if necessary
  */
-NetTypePtr
-GetNetMemory (NetListTypePtr Netlist)
+NetType *
+GetNetMemory (NetListType *Netlist)
 {
-  NetTypePtr net = Netlist->Net;
+  NetType *net = Netlist->Net;
 
   /* realloc new memory if necessary and clear it */
   if (Netlist->NetN >= Netlist->NetMax)
     {
       Netlist->NetMax += STEP_POINT;
-      net = (NetTypePtr)realloc (net, Netlist->NetMax * sizeof (NetType));
+      net = (NetType *)realloc (net, Netlist->NetMax * sizeof (NetType));
       Netlist->Net = net;
       memset (net + Netlist->NetN, 0, STEP_POINT * sizeof (NetType));
     }
@@ -176,16 +172,16 @@ GetNetMemory (NetListTypePtr Netlist)
 /* ---------------------------------------------------------------------------
  * get next slot for a net list, allocates memory if necessary
  */
-NetListTypePtr
-GetNetListMemory (NetListListTypePtr Netlistlist)
+NetListType *
+GetNetListMemory (NetListListType *Netlistlist)
 {
-  NetListTypePtr netlist = Netlistlist->NetList;
+  NetListType *netlist = Netlistlist->NetList;
 
   /* realloc new memory if necessary and clear it */
   if (Netlistlist->NetListN >= Netlistlist->NetListMax)
     {
       Netlistlist->NetListMax += STEP_POINT;
-      netlist = (NetListTypePtr)realloc (netlist,
+      netlist = (NetListType *)realloc (netlist,
                          Netlistlist->NetListMax * sizeof (NetListType));
       Netlistlist->NetList = netlist;
       memset (netlist + Netlistlist->NetListN, 0,
@@ -301,7 +297,7 @@ FreeLine (LineType *data)
 /* ---------------------------------------------------------------------------
  * get next slot for an arc, allocates memory if necessary
  */
-ArcTypePtr
+ArcType *
 GetArcMemory (LayerType *layer)
 {
   ArcType *new_obj;
@@ -322,7 +318,7 @@ FreeArc (ArcType *data)
 /* ---------------------------------------------------------------------------
  * get next slot for a text object, allocates memory if necessary
  */
-TextTypePtr
+TextType *
 GetTextMemory (LayerType *layer)
 {
   TextType *new_obj;
@@ -365,16 +361,16 @@ FreePolygon (PolygonType *data)
  * gets the next slot for a point in a polygon struct, allocates memory
  * if necessary
  */
-PointTypePtr
-GetPointMemoryInPolygon (PolygonTypePtr Polygon)
+PointType *
+GetPointMemoryInPolygon (PolygonType *Polygon)
 {
-  PointTypePtr points = Polygon->Points;
+  PointType *points = Polygon->Points;
 
   /* realloc new memory if necessary and clear it */
   if (Polygon->PointN >= Polygon->PointMax)
     {
       Polygon->PointMax += STEP_POLYGONPOINT;
-      points = (PointTypePtr)realloc (points, Polygon->PointMax * sizeof (PointType));
+      points = (PointType *)realloc (points, Polygon->PointMax * sizeof (PointType));
       Polygon->Points = points;
       memset (points + Polygon->PointN, 0,
 	      STEP_POLYGONPOINT * sizeof (PointType));
@@ -387,7 +383,7 @@ GetPointMemoryInPolygon (PolygonTypePtr Polygon)
  * if necessary
  */
 Cardinal *
-GetHoleIndexMemoryInPolygon (PolygonTypePtr Polygon)
+GetHoleIndexMemoryInPolygon (PolygonType *Polygon)
 {
   Cardinal *holeindex = Polygon->HoleIndex;
 
@@ -412,8 +408,12 @@ GetElementMemory (DataType *data)
   ElementType *new_obj;
 
   new_obj = g_slice_new0 (ElementType);
-  data->Element = g_list_append (data->Element, new_obj);
-  data->ElementN ++;
+
+  if (data != NULL)
+    {
+      data->Element = g_list_append (data->Element, new_obj);
+      data->ElementN ++;
+    }
 
   return new_obj;
 }
@@ -427,16 +427,16 @@ FreeElement (ElementType *data)
 /* ---------------------------------------------------------------------------
  * get next slot for a library menu, allocates memory if necessary
  */
-LibraryMenuTypePtr
-GetLibraryMenuMemory (LibraryTypePtr lib)
+LibraryMenuType *
+GetLibraryMenuMemory (LibraryType *lib)
 {
-  LibraryMenuTypePtr menu = lib->Menu;
+  LibraryMenuType *menu = lib->Menu;
 
   /* realloc new memory if necessary and clear it */
   if (lib->MenuN >= lib->MenuMax)
     {
       lib->MenuMax += STEP_LIBRARYMENU;
-      menu = (LibraryMenuTypePtr)realloc (menu, lib->MenuMax * sizeof (LibraryMenuType));
+      menu = (LibraryMenuType *)realloc (menu, lib->MenuMax * sizeof (LibraryMenuType));
       lib->Menu = menu;
       memset (menu + lib->MenuN, 0,
 	      STEP_LIBRARYMENU * sizeof (LibraryMenuType));
@@ -447,16 +447,16 @@ GetLibraryMenuMemory (LibraryTypePtr lib)
 /* ---------------------------------------------------------------------------
  * get next slot for a library entry, allocates memory if necessary
  */
-LibraryEntryTypePtr
-GetLibraryEntryMemory (LibraryMenuTypePtr Menu)
+LibraryEntryType *
+GetLibraryEntryMemory (LibraryMenuType *Menu)
 {
-  LibraryEntryTypePtr entry = Menu->Entry;
+  LibraryEntryType *entry = Menu->Entry;
 
   /* realloc new memory if necessary and clear it */
   if (Menu->EntryN >= Menu->EntryMax)
     {
       Menu->EntryMax += STEP_LIBRARYENTRY;
-      entry = (LibraryEntryTypePtr)realloc (entry, Menu->EntryMax * sizeof (LibraryEntryType));
+      entry = (LibraryEntryType *)realloc (entry, Menu->EntryMax * sizeof (LibraryEntryType));
       Menu->Entry = entry;
       memset (entry + Menu->EntryN, 0,
 	      STEP_LIBRARYENTRY * sizeof (LibraryEntryType));
@@ -467,10 +467,10 @@ GetLibraryEntryMemory (LibraryMenuTypePtr Menu)
 /* ---------------------------------------------------------------------------
  * get next slot for a DrillElement, allocates memory if necessary
  */
-ElementTypeHandle
-GetDrillElementMemory (DrillTypePtr Drill)
+ElementType **
+GetDrillElementMemory (DrillType *Drill)
 {
-  ElementTypePtr *element;
+  ElementType **element;
 
   element = Drill->Element;
 
@@ -478,11 +478,11 @@ GetDrillElementMemory (DrillTypePtr Drill)
   if (Drill->ElementN >= Drill->ElementMax)
     {
       Drill->ElementMax += STEP_ELEMENT;
-      element = (ElementTypePtr *)realloc (element,
-                         Drill->ElementMax * sizeof (ElementTypeHandle));
+      element = (ElementType **)realloc (element,
+                         Drill->ElementMax * sizeof (ElementType *));
       Drill->Element = element;
       memset (element + Drill->ElementN, 0,
-	      STEP_ELEMENT * sizeof (ElementTypeHandle));
+	      STEP_ELEMENT * sizeof (ElementType *));
     }
   return (element + Drill->ElementN++);
 }
@@ -490,10 +490,10 @@ GetDrillElementMemory (DrillTypePtr Drill)
 /* ---------------------------------------------------------------------------
  * get next slot for a DrillPoint, allocates memory if necessary
  */
-PinTypeHandle
-GetDrillPinMemory (DrillTypePtr Drill)
+PinType **
+GetDrillPinMemory (DrillType *Drill)
 {
-  PinTypePtr *pin;
+  PinType **pin;
 
   pin = Drill->Pin;
 
@@ -501,9 +501,9 @@ GetDrillPinMemory (DrillTypePtr Drill)
   if (Drill->PinN >= Drill->PinMax)
     {
       Drill->PinMax += STEP_POINT;
-      pin = (PinTypePtr *)realloc (pin, Drill->PinMax * sizeof (PinTypeHandle));
+      pin = (PinType **)realloc (pin, Drill->PinMax * sizeof (PinType *));
       Drill->Pin = pin;
-      memset (pin + Drill->PinN, 0, STEP_POINT * sizeof (PinTypeHandle));
+      memset (pin + Drill->PinN, 0, STEP_POINT * sizeof (PinType *));
     }
   return (pin + Drill->PinN++);
 }
@@ -511,16 +511,16 @@ GetDrillPinMemory (DrillTypePtr Drill)
 /* ---------------------------------------------------------------------------
  * get next slot for a Drill, allocates memory if necessary
  */
-DrillTypePtr
-GetDrillInfoDrillMemory (DrillInfoTypePtr DrillInfo)
+DrillType *
+GetDrillInfoDrillMemory (DrillInfoType *DrillInfo)
 {
-  DrillTypePtr drill = DrillInfo->Drill;
+  DrillType *drill = DrillInfo->Drill;
 
   /* realloc new memory if necessary and clear it */
   if (DrillInfo->DrillN >= DrillInfo->DrillMax)
     {
       DrillInfo->DrillMax += STEP_DRILL;
-      drill = (DrillTypePtr)realloc (drill, DrillInfo->DrillMax * sizeof (DrillType));
+      drill = (DrillType *)realloc (drill, DrillInfo->DrillMax * sizeof (DrillType));
       DrillInfo->Drill = drill;
       memset (drill + DrillInfo->DrillN, 0, STEP_DRILL * sizeof (DrillType));
     }
@@ -550,7 +550,7 @@ FreePolygonMemory (PolygonType *polygon)
  * frees memory used by a box list
  */
 void
-FreeBoxListMemory (BoxListTypePtr Boxlist)
+FreeBoxListMemory (BoxListType *Boxlist)
 {
   if (Boxlist)
     {
@@ -563,7 +563,7 @@ FreeBoxListMemory (BoxListTypePtr Boxlist)
  * frees memory used by a net 
  */
 void
-FreeNetListMemory (NetListTypePtr Netlist)
+FreeNetListMemory (NetListType *Netlist)
 {
   if (Netlist)
     {
@@ -581,7 +581,7 @@ FreeNetListMemory (NetListTypePtr Netlist)
  * frees memory used by a net list
  */
 void
-FreeNetListListMemory (NetListListTypePtr Netlistlist)
+FreeNetListListMemory (NetListListType *Netlistlist)
 {
   if (Netlistlist)
     {
@@ -599,7 +599,7 @@ FreeNetListListMemory (NetListListTypePtr Netlistlist)
  * frees memory used by a subnet 
  */
 void
-FreeNetMemory (NetTypePtr Net)
+FreeNetMemory (NetType *Net)
 {
   if (Net)
     {
@@ -611,7 +611,7 @@ FreeNetMemory (NetTypePtr Net)
  * frees memory used by an attribute list
  */
 static void
-FreeAttributeListMemory (AttributeListTypePtr list)
+FreeAttributeListMemory (AttributeListType *list)
 {
   int i;
 
@@ -681,6 +681,7 @@ FreePCBMemory (PCBType *pcb)
   for (i = 0; i <= MAX_FONTPOSITION; i++)
     free (pcb->Font.Symbol[i].Line);
   FreeLibraryMemory (&pcb->NetlistLib);
+  NetlistChanged (0);
   FreeAttributeListMemory (&pcb->Attributes);
   /* clear struct */
   memset (pcb, 0, sizeof (PCBType));
@@ -692,7 +693,7 @@ FreePCBMemory (PCBType *pcb)
 void
 FreeDataMemory (DataType *data)
 {
-  LayerTypePtr layer;
+  LayerType *layer;
   int i;
 
   if (data == NULL)
@@ -768,7 +769,7 @@ FreeDataMemory (DataType *data)
  * releases the memory that's allocated by the library
  */
 void
-FreeLibraryMemory (LibraryTypePtr lib)
+FreeLibraryMemory (LibraryType *lib)
 {
   MENU_LOOP (lib);
   {
@@ -792,7 +793,7 @@ FreeLibraryMemory (LibraryTypePtr lib)
  * reallocates memory for a dynamic length string if necessary
  */
 static void
-DSRealloc (DynamicStringTypePtr Ptr, size_t Length)
+DSRealloc (DynamicStringType *Ptr, size_t Length)
 {
   int input_null = (Ptr->Data == NULL);
   if (input_null || Length >= Ptr->MaxLength)
@@ -808,7 +809,7 @@ DSRealloc (DynamicStringTypePtr Ptr, size_t Length)
  * adds one character to a dynamic string
  */
 void
-DSAddCharacter (DynamicStringTypePtr Ptr, char Char)
+DSAddCharacter (DynamicStringType *Ptr, char Char)
 {
   size_t position = Ptr->Data ? strlen (Ptr->Data) : 0;
 
@@ -821,7 +822,7 @@ DSAddCharacter (DynamicStringTypePtr Ptr, char Char)
  * add a string to a dynamic string
  */
 void
-DSAddString (DynamicStringTypePtr Ptr, const char *S)
+DSAddString (DynamicStringType *Ptr, const char *S)
 {
   size_t position = Ptr->Data ? strlen (Ptr->Data) : 0;
 
@@ -836,7 +837,7 @@ DSAddString (DynamicStringTypePtr Ptr, const char *S)
  * clears a dynamic string
  */
 void
-DSClearString (DynamicStringTypePtr Ptr)
+DSClearString (DynamicStringType *Ptr)
 {
   if (Ptr->Data)
     Ptr->Data[0] = '\0';
diff --git a/src/mymem.h b/src/mymem.h
index a66e349..46061a3 100644
--- a/src/mymem.h
+++ b/src/mymem.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for memory routines
@@ -63,43 +62,43 @@ typedef struct
 {
   size_t MaxLength;
   char *Data;
-} DynamicStringType, *DynamicStringTypePtr;
+} DynamicStringType;
 
-RubberbandTypePtr GetRubberbandMemory (void);
-PinTypePtr GetPinMemory (ElementTypePtr);
-PadTypePtr GetPadMemory (ElementTypePtr);
-PinTypePtr GetViaMemory (DataTypePtr);
-LineTypePtr GetLineMemory (LayerTypePtr);
-ArcTypePtr GetArcMemory (LayerTypePtr);
-RatTypePtr GetRatMemory (DataTypePtr);
-TextTypePtr GetTextMemory (LayerTypePtr);
-PolygonTypePtr GetPolygonMemory (LayerTypePtr);
-PointTypePtr GetPointMemoryInPolygon (PolygonTypePtr);
-Cardinal *GetHoleIndexMemoryInPolygon (PolygonTypePtr);
-ElementTypePtr GetElementMemory (DataTypePtr);
-BoxTypePtr GetBoxMemory (BoxListTypePtr);
-ConnectionTypePtr GetConnectionMemory (NetTypePtr);
-NetTypePtr GetNetMemory (NetListTypePtr);
-NetListTypePtr GetNetListMemory (NetListListTypePtr);
-LibraryMenuTypePtr GetLibraryMenuMemory (LibraryTypePtr);
-LibraryEntryTypePtr GetLibraryEntryMemory (LibraryMenuTypePtr);
-ElementTypeHandle GetDrillElementMemory (DrillTypePtr);
-PinTypeHandle GetDrillPinMemory (DrillTypePtr);
-DrillTypePtr GetDrillInfoDrillMemory (DrillInfoTypePtr);
-void **GetPointerMemory (PointerListTypePtr);
-void FreePolygonMemory (PolygonTypePtr);
-void FreeElementMemory (ElementTypePtr);
-void FreePCBMemory (PCBTypePtr);
-void FreeBoxListMemory (BoxListTypePtr);
-void FreeNetListListMemory (NetListListTypePtr);
-void FreeNetListMemory (NetListTypePtr);
-void FreeNetMemory (NetTypePtr);
-void FreeDataMemory (DataTypePtr);
-void FreeLibraryMemory (LibraryTypePtr);
-void FreePointerListMemory (PointerListTypePtr);
-void DSAddCharacter (DynamicStringTypePtr, char);
-void DSAddString (DynamicStringTypePtr, const char *);
-void DSClearString (DynamicStringTypePtr);
+RubberbandType * GetRubberbandMemory (void);
+PinType * GetPinMemory (ElementType *);
+PadType * GetPadMemory (ElementType *);
+PinType * GetViaMemory (DataType *);
+LineType * GetLineMemory (LayerType *);
+ArcType * GetArcMemory (LayerType *);
+RatType * GetRatMemory (DataType *);
+TextType * GetTextMemory (LayerType *);
+PolygonType * GetPolygonMemory (LayerType *);
+PointType * GetPointMemoryInPolygon (PolygonType *);
+Cardinal *GetHoleIndexMemoryInPolygon (PolygonType *);
+ElementType * GetElementMemory (DataType *);
+BoxType * GetBoxMemory (BoxListType *);
+ConnectionType * GetConnectionMemory (NetType *);
+NetType * GetNetMemory (NetListType *);
+NetListType * GetNetListMemory (NetListListType *);
+LibraryMenuType * GetLibraryMenuMemory (LibraryType *);
+LibraryEntryType * GetLibraryEntryMemory (LibraryMenuType *);
+ElementType **GetDrillElementMemory (DrillType *);
+PinType ** GetDrillPinMemory (DrillType *);
+DrillType * GetDrillInfoDrillMemory (DrillInfoType *);
+void **GetPointerMemory (PointerListType *);
+void FreePolygonMemory (PolygonType *);
+void FreeElementMemory (ElementType *);
+void FreePCBMemory (PCBType *);
+void FreeBoxListMemory (BoxListType *);
+void FreeNetListListMemory (NetListListType *);
+void FreeNetListMemory (NetListType *);
+void FreeNetMemory (NetType *);
+void FreeDataMemory (DataType *);
+void FreeLibraryMemory (LibraryType *);
+void FreePointerListMemory (PointerListType *);
+void DSAddCharacter (DynamicStringType *, char);
+void DSAddString (DynamicStringType *, const char *);
+void DSClearString (DynamicStringType *);
 char *StripWhiteSpaceAndDup (const char *);
 
 #ifdef NEED_STRDUP
diff --git a/src/netlist.c b/src/netlist.c
index 06f0e77..4a17eec 100644
--- a/src/netlist.c
+++ b/src/netlist.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -71,8 +69,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 /*
   int    PCB->NetlistLib.MenuN
   char * PCB->NetlistLib.Menu[i].Name
@@ -103,7 +99,7 @@ NetlistChanged (int force_unfreeze)
     }
 }
 
-LibraryMenuTypePtr
+LibraryMenuType *
 netnode_to_netname (char *nodename)
 {
   int i, j;
@@ -122,7 +118,7 @@ netnode_to_netname (char *nodename)
   return 0;
 }
 
-LibraryMenuTypePtr
+LibraryMenuType *
 netname_to_netname (char *netname)
 {
   int i;
@@ -168,7 +164,7 @@ netlist_find (LibraryMenuType * net, LibraryEntryType * pin)
   int x, y;
   if (pin_name_to_xy (net->Entry, &x, &y))
     return;
-  LookupConnection (x, y, 1, 1, FOUNDFLAG);
+  LookupConnection (x, y, 1, 1, FOUNDFLAG, true);
 }
 
 static void
@@ -177,7 +173,7 @@ netlist_select (LibraryMenuType * net, LibraryEntryType * pin)
   int x, y;
   if (pin_name_to_xy (net->Entry, &x, &y))
     return;
-  LookupConnection (x, y, 1, 1, SELECTEDFLAG);
+  LookupConnection (x, y, 1, 1, SELECTEDFLAG, true);
 }
 
 static void
diff --git a/src/parse_l.c b/src/parse_l.c
index de9add6..dfa0a95 100644
--- a/src/parse_l.c
+++ b/src/parse_l.c
@@ -372,8 +372,8 @@ static void yy_fatal_error (yyconst char msg[]  );
 	*yy_cp = '\0'; \
 	(yy_c_buf_p) = yy_cp;
 
-#define YY_NUM_RULES 51
-#define YY_END_OF_BUFFER 52
+#define YY_NUM_RULES 52
+#define YY_END_OF_BUFFER 53
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -381,28 +381,30 @@ struct yy_trans_info
 	flex_int32_t yy_verify;
 	flex_int32_t yy_nxt;
 	};
-static yyconst flex_int16_t yy_accept[189] =
+static yyconst flex_int16_t yy_accept[192] =
     {   0,
-        0,    0,   52,   50,   47,   48,   49,   50,   46,   50,
-       50,   43,   43,   50,   50,   50,   50,   50,   50,   50,
-       50,   50,   50,   50,   50,   50,   50,   50,   50,   50,
-       50,   35,   50,   50,   47,    0,   45,    0,   46,    0,
-       43,   43,   42,    0,   43,    0,    0,    0,    0,    0,
+        0,    0,   53,   51,   48,   49,   50,   51,   47,   51,
+       51,   43,   44,   44,   51,   51,   51,   51,   51,   51,
+       51,   51,   51,   51,   51,   51,   51,   51,   51,   51,
+       51,   51,   35,   51,   51,   51,   48,    0,   46,    0,
+       47,    0,   44,   44,   43,   43,    0,   44,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,   40,   36,    0,   34,   32,   33,   41,   42,   44,
-       27,    0,    0,    0,    7,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,   29,    2,   11,   10,    0,   14,
-
-        0,    0,    0,    0,    0,   12,    0,   39,    0,    0,
-        0,    0,    0,    0,    0,    3,    0,   26,    0,   13,
-       22,    0,    0,    0,    0,    0,   16,    0,   38,   37,
-        0,    0,    0,    0,    0,    8,    0,    9,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    4,    0,    0,
-       23,    0,    0,    0,    0,   24,   21,    0,    0,   30,
-       19,    0,   28,    0,   25,    0,    0,    5,    0,    0,
-        0,    0,    6,    0,    0,   31,    0,    0,    0,   15,
-        0,   18,    0,    0,   20,   17,    1,    0
+        0,    0,    0,    0,   40,   36,    0,   34,   32,   41,
+       33,   42,   45,   27,    0,    0,    0,    7,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,   29,    2,   11,
+
+       10,    0,   14,    0,    0,    0,    0,    0,   12,    0,
+       39,    0,    0,    0,    0,    0,    0,    0,    3,    0,
+       26,    0,   13,   22,    0,    0,    0,    0,    0,   16,
+        0,   38,   37,    0,    0,    0,    0,    0,    8,    0,
+        9,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        4,    0,    0,   23,    0,    0,    0,    0,   24,   21,
+        0,    0,   30,   19,    0,   28,    0,   25,    0,    0,
+        5,    0,    0,    0,    0,    6,    0,    0,   31,    0,
+        0,    0,   15,    0,   18,    0,    0,   20,   17,    1,
+        0
+
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -446,132 +448,132 @@ static yyconst flex_int32_t yy_meta[50] =
         1,    1,    1,    1,    1,    1,    1,    1,    1
     } ;
 
-static yyconst flex_int16_t yy_base[193] =
+static yyconst flex_int16_t yy_base[196] =
     {   0,
-        0,    0,  224,  225,  221,  225,  225,   45,    0,    0,
-       41,   44,   45,   13,   16,  198,  182,   23,  176,  177,
-       32,  189,  184,   51,   35,   21,   38,  179,  175,  173,
-      173,   35,  172,  171,  208,   61,  225,  205,    0,  201,
-      198,   67,   71,    0,   74,  175,  159,  163,  159,  188,
-      168,  161,  170,   49,  159,  148,  155,  151,  148,  180,
-      160,  150,  151,  143,  157,  138,  146,  137,  151,  154,
-      145,  225,  225,  142,  225,  225,  143,  225,   84,    0,
-      225,  135,  137,  132,  225,  136,  142,  139,  141,  125,
-      138,  137,  136,  130,  147,  225,  225,  225,  117,  225,
-
-      119,  125,  133,  116,  117,  225,  121,  225,  120,  121,
-      124,  114,  122,  127,  108,  225,  109,  225,  107,  225,
-      225,  113,   67,  120,  115,  105,  225,  106,  225,  225,
-      115,  113,   99,  101,  108,  225,   95,  225,   94,   94,
-       95,   95,   90,   95,  104,   85,   85,  225,   84,   85,
-      225,   82,   94,   85,   90,  225,  104,   84,   76,  225,
-       78,   76,  225,   91,  225,   80,   81,  225,   84,   72,
-       78,   75,  225,   75,   64,  225,   73,   60,   58,  225,
-       66,  225,   64,   55,  225,  225,  225,  225,  102,  106,
-      110,   83
+        0,    0,  227,  228,  224,  228,  228,   45,    0,    0,
+       41,   43,   46,   47,   15,   18,  201,  185,   25,  179,
+      180,   34,  192,  187,   53,   37,   23,   41,  182,  178,
+      176,  176,   38,  175,  166,  173,  210,   63,  228,  207,
+        0,  203,  200,   70,   73,   75,    0,   78,  177,  161,
+      165,  161,  190,  170,  163,  172,   55,  161,  150,  157,
+      153,  150,  182,  162,  152,  153,  145,  159,  140,  148,
+      139,  153,  156,  147,  228,  228,  144,  228,  228,  228,
+      145,  228,    0,  228,  137,  139,  134,  228,  138,  144,
+      141,  143,  127,  140,  139,  138,  132,  149,  228,  228,
+
+      228,  119,  228,  121,  127,  135,  118,  119,  228,  123,
+      228,  122,  123,  126,  116,  124,  129,  110,  228,  111,
+      228,  109,  228,  228,  115,   64,  122,  117,  107,  228,
+      108,  228,  228,  117,  115,  101,  103,  110,  228,   97,
+      228,   96,   96,   97,   97,   92,   97,  106,   87,   87,
+      228,   86,   87,  228,   84,   96,   87,   92,  228,  106,
+       86,   78,  228,   81,   78,  228,   93,  228,   82,   83,
+      228,   86,   74,   80,   79,  228,   82,   73,  228,   80,
+       66,   62,  228,   70,  228,   67,   57,  228,  228,  228,
+      228,  101,  105,  109,   92
 
     } ;
 
-static yyconst flex_int16_t yy_def[193] =
+static yyconst flex_int16_t yy_def[196] =
     {   0,
-      188,    1,  188,  188,  188,  188,  188,  189,  190,  191,
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188,  188,  189,  188,  189,  190,  188,
-      188,  188,  188,  192,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  192,
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188,  188,  188,  188,    0,  188,  188,
-      188,  188
+      191,    1,  191,  191,  191,  191,  191,  192,  193,  194,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191,  192,  191,  192,
+      193,  191,  191,  191,  191,  191,  195,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      191,  191,  195,  191,  191,  191,  191,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+        0,  191,  191,  191,  191
 
     } ;
 
-static yyconst flex_int16_t yy_nxt[275] =
+static yyconst flex_int16_t yy_nxt[278] =
     {   0,
-        4,    5,    6,    7,    8,    9,   10,   11,    4,   12,
-       13,   14,    4,   15,   16,   17,   18,   19,   20,   21,
-       22,   23,   24,   25,   26,   27,   28,    4,    4,    4,
-       29,    4,    4,    4,    4,    4,   30,   31,    4,   32,
-       33,    4,    4,    4,    4,    4,   34,    4,    4,   37,
-       41,   42,   43,   43,   45,   45,   46,   48,   47,   52,
-       56,   53,   49,   64,   60,   37,   66,   65,   57,   67,
-       68,   74,   38,   69,   75,   43,   45,   45,  140,   61,
-       79,   79,   43,   45,   45,   89,   80,   62,   38,  170,
-       90,   44,   63,   79,   79,  187,  186,  171,  185,  184,
-
-      183,  141,   36,  182,  181,   36,   39,  180,   39,   39,
-       40,  179,   40,   40,  178,  177,  176,  175,  174,  173,
-      172,  169,  168,  167,  166,  165,  164,  163,  162,  161,
-      160,  159,  158,  157,  156,  155,  154,  153,  152,  151,
-      150,  149,  148,  147,  146,  145,  144,  143,  142,  139,
-      138,  137,  136,  135,  134,  133,  132,  131,  130,  129,
-      128,  127,  126,  125,  124,  123,  122,  121,  120,  119,
-      118,  117,  116,  115,  114,  113,  112,  111,  110,  109,
-      108,  107,  106,  105,  104,  103,  102,  101,  100,   99,
-       98,   97,   96,   95,   94,   93,   92,   91,   88,   87,
-
-       86,   85,   84,   83,   82,   81,   43,   78,   36,   35,
-       77,   76,   73,   72,   71,   70,   59,   58,   55,   54,
-       51,   50,   35,  188,    3,  188,  188,  188,  188,  188,
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188
+        4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
+       14,   15,    4,   16,   17,   18,   19,   20,   21,   22,
+       23,   24,   25,   26,   27,   28,   29,    4,    4,    4,
+       30,    4,    4,    4,    4,    4,   31,   32,    4,   33,
+       34,    4,   35,    4,    4,    4,   36,    4,    4,   39,
+       43,   44,   45,   45,   46,   46,   48,   48,   49,   51,
+       50,   55,   59,   56,   52,   67,   63,   39,   69,   68,
+       60,   70,   40,   71,   77,  143,   72,   78,   46,   48,
+       48,   64,   45,   45,   45,   45,   46,   48,   48,   65,
+       40,   92,  173,   47,   66,   83,   93,  190,  144,  189,
+
+      174,   38,  188,  187,   38,   41,  186,   41,   41,   42,
+      185,   42,   42,  184,  183,  182,  181,  180,  179,  178,
+      177,  176,  175,  172,  171,  170,  169,  168,  167,  166,
+      165,  164,  163,  162,  161,  160,  159,  158,  157,  156,
+      155,  154,  153,  152,  151,  150,  149,  148,  147,  146,
+      145,  142,  141,  140,  139,  138,  137,  136,  135,  134,
+      133,  132,  131,  130,  129,  128,  127,  126,  125,  124,
+      123,  122,  121,  120,  119,  118,  117,  116,  115,  114,
+      113,  112,  111,  110,  109,  108,  107,  106,  105,  104,
+      103,  102,  101,  100,   99,   98,   97,   96,   95,   94,
+
+       91,   90,   89,   88,   87,   86,   85,   84,   46,   82,
+       38,   37,   81,   80,   79,   76,   75,   74,   73,   62,
+       61,   58,   57,   54,   53,   37,  191,    3,  191,  191,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191
     } ;
 
-static yyconst flex_int16_t yy_chk[275] =
+static yyconst flex_int16_t yy_chk[278] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    8,
-       11,   11,   12,   13,   13,   13,   14,   15,   14,   18,
-       21,   18,   15,   25,   24,   36,   26,   25,   21,   26,
-       27,   32,    8,   27,   32,   42,   42,   42,  123,   24,
-       43,   43,   45,   45,   45,   54,  192,   24,   36,  161,
-       54,   12,   24,   79,   79,  184,  183,  161,  181,  179,
-
-      178,  123,  189,  177,  175,  189,  190,  174,  190,  190,
-      191,  172,  191,  191,  171,  170,  169,  167,  166,  164,
-      162,  159,  158,  157,  155,  154,  153,  152,  150,  149,
-      147,  146,  145,  144,  143,  142,  141,  140,  139,  137,
-      135,  134,  133,  132,  131,  128,  126,  125,  124,  122,
-      119,  117,  115,  114,  113,  112,  111,  110,  109,  107,
-      105,  104,  103,  102,  101,   99,   95,   94,   93,   92,
-       91,   90,   89,   88,   87,   86,   84,   83,   82,   77,
-       74,   71,   70,   69,   68,   67,   66,   65,   64,   63,
-       62,   61,   60,   59,   58,   57,   56,   55,   53,   52,
-
-       51,   50,   49,   48,   47,   46,   41,   40,   38,   35,
-       34,   33,   31,   30,   29,   28,   23,   22,   20,   19,
-       17,   16,    5,    3,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  188
+       11,   11,   12,   12,   13,   14,   14,   14,   15,   16,
+       15,   19,   22,   19,   16,   26,   25,   38,   27,   26,
+       22,   27,    8,   28,   33,  126,   28,   33,   44,   44,
+       44,   25,   45,   45,   46,   46,   48,   48,   48,   25,
+       38,   57,  164,   13,   25,  195,   57,  187,  126,  186,
+
+      164,  192,  184,  182,  192,  193,  181,  193,  193,  194,
+      180,  194,  194,  178,  177,  175,  174,  173,  172,  170,
+      169,  167,  165,  162,  161,  160,  158,  157,  156,  155,
+      153,  152,  150,  149,  148,  147,  146,  145,  144,  143,
+      142,  140,  138,  137,  136,  135,  134,  131,  129,  128,
+      127,  125,  122,  120,  118,  117,  116,  115,  114,  113,
+      112,  110,  108,  107,  106,  105,  104,  102,   98,   97,
+       96,   95,   94,   93,   92,   91,   90,   89,   87,   86,
+       85,   81,   77,   74,   73,   72,   71,   70,   69,   68,
+       67,   66,   65,   64,   63,   62,   61,   60,   59,   58,
+
+       56,   55,   54,   53,   52,   51,   50,   49,   43,   42,
+       40,   37,   36,   35,   34,   32,   31,   30,   29,   24,
+       23,   21,   20,   18,   17,    5,    3,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      191,  191,  191,  191,  191,  191,  191
     } ;
 
 /* Table of booleans, true if rule could match eol. */
-static yyconst flex_int32_t yy_rule_can_match_eol[52] =
+static yyconst flex_int32_t yy_rule_can_match_eol[53] =
     {   0,
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-    0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,     };
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,     };
 
 static yy_state_type yy_last_accepting_state;
 static char *yy_last_accepting_cpos;
@@ -588,8 +590,7 @@ int yy_flex_debug = 0;
 #define YY_RESTORE_YY_MORE_OFFSET
 char *yytext;
 #line 1 "parse_l.l"
-/* $Id$ */
-#line 4 "parse_l.l"
+#line 2 "parse_l.l"
 /*
  *                            COPYRIGHT
  *
@@ -637,9 +638,6 @@ char *yytext;
 # include <dmalloc.h> /* see http://dmalloc.com */
 #endif
 
-RCSID("$Id$");
-
-
 #include "global.h"
 #include "crosshair.h"
 #include "data.h"
@@ -663,10 +661,10 @@ RCSID("$Id$");
 #endif
 
 char			*yyfilename;	/* in this file */
-PCBTypePtr		yyPCB;			/* used by parser */
-DataTypePtr		yyData;
-ElementTypePtr		yyElement;
-FontTypePtr		yyFont;
+PCBType			*yyPCB;		/* used by parser */
+DataType		*yyData;
+ElementType		*yyElement;
+FontType		*yyFont;
 
 static int parse_number (void);
 
@@ -680,7 +678,7 @@ int	yyparse(void);
  */
 static	int		Parse(char *, char *, char *, char *);
 
-#line 684 "parse_l.c"
+#line 682 "parse_l.c"
 
 #define INITIAL 0
 
@@ -862,10 +860,10 @@ YY_DECL
 	register char *yy_cp, *yy_bp;
 	register int yy_act;
     
-#line 103 "parse_l.l"
+#line 98 "parse_l.l"
 
 
-#line 869 "parse_l.c"
+#line 867 "parse_l.c"
 
 	if ( !(yy_init) )
 		{
@@ -918,13 +916,13 @@ yy_match:
 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 				{
 				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 189 )
+				if ( yy_current_state >= 192 )
 					yy_c = yy_meta[(unsigned int) yy_c];
 				}
 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 			++yy_cp;
 			}
-		while ( yy_base[yy_current_state] != 225 );
+		while ( yy_base[yy_current_state] != 228 );
 
 yy_find_action:
 		yy_act = yy_accept[yy_current_state];
@@ -960,234 +958,239 @@ do_action:	/* This label is used only to access EOF actions. */
 
 case 1:
 YY_RULE_SETUP
-#line 105 "parse_l.l"
+#line 100 "parse_l.l"
 { return(T_FILEVERSION); }
 	YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 106 "parse_l.l"
+#line 101 "parse_l.l"
 { return(T_PCB); }
 	YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 107 "parse_l.l"
+#line 102 "parse_l.l"
 { return(T_GRID); }
 	YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 108 "parse_l.l"
+#line 103 "parse_l.l"
 { return(T_CURSOR); }
 	YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 109 "parse_l.l"
+#line 104 "parse_l.l"
 { return(T_THERMAL); }
 	YY_BREAK
 case 6:
 YY_RULE_SETUP
-#line 110 "parse_l.l"
+#line 105 "parse_l.l"
 { return(T_AREA); }
 	YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 111 "parse_l.l"
+#line 106 "parse_l.l"
 { return(T_DRC); }
 	YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 112 "parse_l.l"
+#line 107 "parse_l.l"
 { return(T_FLAGS); }
 	YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 113 "parse_l.l"
+#line 108 "parse_l.l"
 { return(T_LAYER); }
 	YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 114 "parse_l.l"
+#line 109 "parse_l.l"
 { return(T_PIN); }
 	YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 115 "parse_l.l"
+#line 110 "parse_l.l"
 { return(T_PAD); }
 	YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 116 "parse_l.l"
+#line 111 "parse_l.l"
 { return(T_VIA); }
 	YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 117 "parse_l.l"
+#line 112 "parse_l.l"
 { return(T_LINE); }
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 118 "parse_l.l"
+#line 113 "parse_l.l"
 { return(T_RAT); }
 	YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 119 "parse_l.l"
+#line 114 "parse_l.l"
 { return(T_RECTANGLE); }
 	YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 120 "parse_l.l"
+#line 115 "parse_l.l"
 { return(T_TEXT); }
 	YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 121 "parse_l.l"
+#line 116 "parse_l.l"
 { return(T_ELEMENTLINE); }
 	YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 122 "parse_l.l"
+#line 117 "parse_l.l"
 { return(T_ELEMENTARC); }
 	YY_BREAK
 case 19:
 YY_RULE_SETUP
-#line 123 "parse_l.l"
+#line 118 "parse_l.l"
 { return(T_ELEMENT); }
 	YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 124 "parse_l.l"
+#line 119 "parse_l.l"
 { return(T_SYMBOLLINE); }
 	YY_BREAK
 case 21:
 YY_RULE_SETUP
-#line 125 "parse_l.l"
+#line 120 "parse_l.l"
 { return(T_SYMBOL); }
 	YY_BREAK
 case 22:
 YY_RULE_SETUP
-#line 126 "parse_l.l"
+#line 121 "parse_l.l"
 { return(T_MARK); }
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 127 "parse_l.l"
+#line 122 "parse_l.l"
 { return(T_GROUPS); }
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 128 "parse_l.l"
+#line 123 "parse_l.l"
 { return(T_STYLES); }
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 129 "parse_l.l"
+#line 124 "parse_l.l"
 { return(T_POLYGON); }
 	YY_BREAK
 case 26:
 YY_RULE_SETUP
-#line 130 "parse_l.l"
+#line 125 "parse_l.l"
 { return(T_POLYGON_HOLE); }
 	YY_BREAK
 case 27:
 YY_RULE_SETUP
-#line 131 "parse_l.l"
+#line 126 "parse_l.l"
 { return(T_ARC); }
 	YY_BREAK
 case 28:
 YY_RULE_SETUP
-#line 132 "parse_l.l"
+#line 127 "parse_l.l"
 { return(T_NETLIST); }
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
-#line 133 "parse_l.l"
+#line 128 "parse_l.l"
 { return(T_NET); }
 	YY_BREAK
 case 30:
 YY_RULE_SETUP
-#line 134 "parse_l.l"
+#line 129 "parse_l.l"
 { return(T_CONN); }
 	YY_BREAK
 case 31:
 YY_RULE_SETUP
-#line 135 "parse_l.l"
+#line 130 "parse_l.l"
 { return(T_ATTRIBUTE); }
 	YY_BREAK
 case 32:
 YY_RULE_SETUP
-#line 137 "parse_l.l"
+#line 132 "parse_l.l"
 { return T_NM; }
 	YY_BREAK
 case 33:
 YY_RULE_SETUP
-#line 138 "parse_l.l"
+#line 133 "parse_l.l"
 { return T_UM; }
 	YY_BREAK
 case 34:
 YY_RULE_SETUP
-#line 139 "parse_l.l"
+#line 134 "parse_l.l"
 { return T_MM; }
 	YY_BREAK
 case 35:
 YY_RULE_SETUP
-#line 140 "parse_l.l"
+#line 135 "parse_l.l"
 { return T_M; }
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
-#line 141 "parse_l.l"
+#line 136 "parse_l.l"
 { return T_KM; }
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
-#line 142 "parse_l.l"
+#line 137 "parse_l.l"
 { return T_UMIL; }
 	YY_BREAK
 case 38:
 YY_RULE_SETUP
-#line 143 "parse_l.l"
+#line 138 "parse_l.l"
 { return T_CMIL; }
 	YY_BREAK
 case 39:
 YY_RULE_SETUP
-#line 144 "parse_l.l"
+#line 139 "parse_l.l"
 { return T_MIL; }
 	YY_BREAK
 case 40:
 YY_RULE_SETUP
-#line 145 "parse_l.l"
+#line 140 "parse_l.l"
 { return T_IN; }
 	YY_BREAK
 case 41:
 YY_RULE_SETUP
-#line 147 "parse_l.l"
+#line 141 "parse_l.l"
+{ return T_PX; }
+	YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 143 "parse_l.l"
 {
 						yylval.integer = (unsigned) *(yytext+1);
 						return(CHAR_CONST);
 					}
 	YY_BREAK
-case 42:
+case 43:
 YY_RULE_SETUP
-#line 151 "parse_l.l"
+#line 147 "parse_l.l"
 {	return parse_number(); }
 	YY_BREAK
-case 43:
+case 44:
 YY_RULE_SETUP
-#line 152 "parse_l.l"
+#line 148 "parse_l.l"
 {	yylval.integer = round (g_ascii_strtod (yytext, NULL)); return INTEGER; }
 	YY_BREAK
-case 44:
+case 45:
 YY_RULE_SETUP
-#line 154 "parse_l.l"
+#line 150 "parse_l.l"
 {	unsigned n;
 				sscanf((char *) yytext, "%x", &n);
 				yylval.integer = n;
 				return INTEGER;
 					}
 	YY_BREAK
-case 45:
+case 46:
 YY_RULE_SETUP
-#line 159 "parse_l.l"
+#line 155 "parse_l.l"
 {
 						char	*p1, *p2;
 
@@ -1221,42 +1224,42 @@ YY_RULE_SETUP
 						return(STRING);
 					}
 	YY_BREAK
-case 46:
+case 47:
 YY_RULE_SETUP
-#line 191 "parse_l.l"
+#line 187 "parse_l.l"
 {}
 	YY_BREAK
-case 47:
+case 48:
 YY_RULE_SETUP
-#line 192 "parse_l.l"
+#line 188 "parse_l.l"
 {}
 	YY_BREAK
-case 48:
-/* rule 48 can match eol */
+case 49:
+/* rule 49 can match eol */
 YY_RULE_SETUP
-#line 193 "parse_l.l"
+#line 189 "parse_l.l"
 {
 #ifndef FLEX_SCANNER
 						yylineno++;
 #endif
 					}
 	YY_BREAK
-case 49:
+case 50:
 YY_RULE_SETUP
-#line 198 "parse_l.l"
+#line 194 "parse_l.l"
 {}
 	YY_BREAK
-case 50:
+case 51:
 YY_RULE_SETUP
-#line 199 "parse_l.l"
+#line 195 "parse_l.l"
 { return(*yytext); }
 	YY_BREAK
-case 51:
+case 52:
 YY_RULE_SETUP
-#line 201 "parse_l.l"
+#line 197 "parse_l.l"
 ECHO;
 	YY_BREAK
-#line 1260 "parse_l.c"
+#line 1263 "parse_l.c"
 case YY_STATE_EOF(INITIAL):
 	yyterminate();
 
@@ -1548,7 +1551,7 @@ static int yy_get_next_buffer (void)
 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 			{
 			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 189 )
+			if ( yy_current_state >= 192 )
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1576,11 +1579,11 @@ static int yy_get_next_buffer (void)
 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 		{
 		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 189 )
+		if ( yy_current_state >= 192 )
 			yy_c = yy_meta[(unsigned int) yy_c];
 		}
 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 188);
+	yy_is_jam = (yy_current_state == 191);
 
 	return yy_is_jam ? 0 : yy_current_state;
 }
@@ -2266,7 +2269,7 @@ void yyfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 201 "parse_l.l"
+#line 197 "parse_l.l"
 
 
 
@@ -2368,7 +2371,8 @@ static int Parse(char *Executable, char *Path, char *Filename, char *Parameter)
 /* ---------------------------------------------------------------------------
  * initializes LEX and calls parser for a single element file
  */
-int ParseElementFile(DataTypePtr Ptr, char *Filename)
+int
+ParseElementFile (DataType *Ptr, char *Filename)
 {
 	yyPCB = NULL;
 	yyData = Ptr;
@@ -2380,7 +2384,8 @@ int ParseElementFile(DataTypePtr Ptr, char *Filename)
 /* ---------------------------------------------------------------------------
  * initializes LEX and calls parser for a single library entry
  */
-int ParseLibraryEntry(DataTypePtr Ptr, char *Template)
+int
+ParseLibraryEntry (DataType *Ptr, char *Template)
 {
 	yyPCB = NULL;
 	yyData = Ptr;
@@ -2393,7 +2398,8 @@ int ParseLibraryEntry(DataTypePtr Ptr, char *Template)
 /* ---------------------------------------------------------------------------
  * initializes LEX and calls parser for a complete board
  */
-int ParsePCB(PCBTypePtr Ptr, char *Filename)
+int
+ParsePCB (PCBType *Ptr, char *Filename)
 {
 	yyPCB = Ptr;
 	yyData = NULL;
@@ -2405,7 +2411,8 @@ int ParsePCB(PCBTypePtr Ptr, char *Filename)
 /* ---------------------------------------------------------------------------
  * initializes LEX and calls parser for a font
  */
-int ParseFont(FontTypePtr Ptr, char *Filename)
+int
+ParseFont (FontType *Ptr, char *Filename)
 {
 	int r = 0;
 	char *path, *p;
diff --git a/src/parse_l.h b/src/parse_l.h
index eb01528..d11b0c8 100644
--- a/src/parse_l.h
+++ b/src/parse_l.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* just defines common parser identifiers
@@ -33,9 +32,9 @@
 
 #include "global.h"
 
-int ParsePCB (PCBTypePtr, char *);
-int ParseElementFile (DataTypePtr, char *);
-int ParseLibraryEntry (DataTypePtr, char *);
-int ParseFont (FontTypePtr, char *);
+int ParsePCB (PCBType *, char *);
+int ParseElementFile (DataType *, char *);
+int ParseLibraryEntry (DataType *, char *);
+int ParseFont (FontType *, char *);
 
 #endif
diff --git a/src/parse_l.l b/src/parse_l.l
index 33a115d..4f64880 100644
--- a/src/parse_l.l
+++ b/src/parse_l.l
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 %{
 /*
  *                            COPYRIGHT
@@ -48,9 +46,6 @@
 # include <dmalloc.h> /* see http://dmalloc.com */
 #endif
 
-RCSID("$Id$");
-
-
 #include "global.h"
 #include "crosshair.h"
 #include "data.h"
@@ -74,10 +69,10 @@ RCSID("$Id$");
 #endif
 
 char			*yyfilename;	/* in this file */
-PCBTypePtr		yyPCB;			/* used by parser */
-DataTypePtr		yyData;
-ElementTypePtr		yyElement;
-FontTypePtr		yyFont;
+PCBType			*yyPCB;		/* used by parser */
+DataType		*yyData;
+ElementType		*yyElement;
+FontType		*yyFont;
 
 static int parse_number (void);
 
@@ -95,7 +90,7 @@ static	int		Parse(char *, char *, char *, char *);
 
 HEX				0x[0-9a-fA-F]+
 INTEGER                 [+-]?([1-9][0-9]*|0)
-FLOATING                {INTEGER}"."[0-9]*
+FLOATING                {INTEGER}?"."[0-9]*
 STRINGCHAR		([^"\n\r\\]|\\.)
 
 %option yylineno
@@ -143,6 +138,7 @@ umil	{ return T_UMIL; }
 cmil	{ return T_CMIL; }
 mil	{ return T_MIL; }
 in	{ return T_IN; }
+px  { return T_PX; }
 
 \'.\'				{
 						yylval.integer = (unsigned) *(yytext+1);
@@ -298,7 +294,8 @@ static int Parse(char *Executable, char *Path, char *Filename, char *Parameter)
 /* ---------------------------------------------------------------------------
  * initializes LEX and calls parser for a single element file
  */
-int ParseElementFile(DataTypePtr Ptr, char *Filename)
+int
+ParseElementFile (DataType *Ptr, char *Filename)
 {
 	yyPCB = NULL;
 	yyData = Ptr;
@@ -310,7 +307,8 @@ int ParseElementFile(DataTypePtr Ptr, char *Filename)
 /* ---------------------------------------------------------------------------
  * initializes LEX and calls parser for a single library entry
  */
-int ParseLibraryEntry(DataTypePtr Ptr, char *Template)
+int
+ParseLibraryEntry (DataType *Ptr, char *Template)
 {
 	yyPCB = NULL;
 	yyData = Ptr;
@@ -323,7 +321,8 @@ int ParseLibraryEntry(DataTypePtr Ptr, char *Template)
 /* ---------------------------------------------------------------------------
  * initializes LEX and calls parser for a complete board
  */
-int ParsePCB(PCBTypePtr Ptr, char *Filename)
+int
+ParsePCB (PCBType *Ptr, char *Filename)
 {
 	yyPCB = Ptr;
 	yyData = NULL;
@@ -335,7 +334,8 @@ int ParsePCB(PCBTypePtr Ptr, char *Filename)
 /* ---------------------------------------------------------------------------
  * initializes LEX and calls parser for a font
  */
-int ParseFont(FontTypePtr Ptr, char *Filename)
+int
+ParseFont (FontType *Ptr, char *Filename)
 {
 	int r = 0;
 	char *path, *p;
diff --git a/src/parse_y.c b/src/parse_y.c
index ae8d8fd..c25abbd 100644
--- a/src/parse_y.c
+++ b/src/parse_y.c
@@ -1,9 +1,8 @@
-/* A Bison parser, made by GNU Bison 2.4.3.  */
+/* A Bison parser, made by GNU Bison 2.5.  */
 
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* Bison implementation for Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2009, 2010 Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -45,7 +44,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.4.3"
+#define YYBISON_VERSION "2.5"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -66,8 +65,8 @@
 
 /* Copy the first part of user declarations.  */
 
-/* Line 189 of yacc.c  */
-#line 11 "parse_y.y"
+/* Line 268 of yacc.c  */
+#line 10 "parse_y.y"
 
 /*
  *                            COPYRIGHT
@@ -120,26 +119,24 @@
 # include <dmalloc.h> /* see http://dmalloc.com */
 #endif
 
-RCSID("$Id$");
-
-static	LayerTypePtr	Layer;
-static	PolygonTypePtr	Polygon;
-static	SymbolTypePtr	Symbol;
+static	LayerType	*Layer;
+static	PolygonType	*Polygon;
+static	SymbolType	*Symbol;
 static	int		pin_num;
-static	LibraryMenuTypePtr	Menu;
+static	LibraryMenuType	*Menu;
 static	bool			LayerFlag[MAX_LAYER + 2];
 
-extern	char			*yytext;		/* defined by LEX */
-extern	PCBTypePtr		yyPCB;
-extern	DataTypePtr		yyData;
-extern	ElementTypePtr	yyElement;
-extern	FontTypePtr		yyFont;
-extern	int				yylineno;		/* linenumber */
-extern	char			*yyfilename;	/* in this file */
+extern	char		*yytext;		/* defined by LEX */
+extern	PCBType		*yyPCB;
+extern	DataType	*yyData;
+extern	ElementType	*yyElement;
+extern	FontType	*yyFont;
+extern	int		yylineno;		/* linenumber */
+extern	char		*yyfilename;	/* in this file */
 
 static char *layer_group_string; 
 
-static AttributeListTypePtr attr_list; 
+static AttributeListType *attr_list; 
 
 int yyerror(const char *s);
 int yylex();
@@ -165,8 +162,8 @@ static Coord new_units (PLMeasure m);
 
 
 
-/* Line 189 of yacc.c  */
-#line 170 "parse_y.c"
+/* Line 268 of yacc.c  */
+#line 167 "parse_y.c"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
@@ -236,7 +233,8 @@ static Coord new_units (PLMeasure m);
      T_UM = 298,
      T_MM = 299,
      T_M = 300,
-     T_KM = 301
+     T_KM = 301,
+     T_PX = 302
    };
 #endif
 /* Tokens.  */
@@ -284,6 +282,7 @@ static Coord new_units (PLMeasure m);
 #define T_MM 299
 #define T_M 300
 #define T_KM 301
+#define T_PX 302
 
 
 
@@ -292,8 +291,8 @@ static Coord new_units (PLMeasure m);
 typedef union YYSTYPE
 {
 
-/* Line 214 of yacc.c  */
-#line 111 "parse_y.y"
+/* Line 293 of yacc.c  */
+#line 108 "parse_y.y"
 
 	int		integer;
 	double		number;
@@ -303,8 +302,8 @@ typedef union YYSTYPE
 
 
 
-/* Line 214 of yacc.c  */
-#line 308 "parse_y.c"
+/* Line 293 of yacc.c  */
+#line 307 "parse_y.c"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -315,8 +314,8 @@ typedef union YYSTYPE
 /* Copy the second part of user declarations.  */
 
 
-/* Line 264 of yacc.c  */
-#line 320 "parse_y.c"
+/* Line 343 of yacc.c  */
+#line 319 "parse_y.c"
 
 #ifdef short
 # undef short
@@ -419,11 +418,11 @@ YYID (yyi)
 #    define alloca _alloca
 #   else
 #    define YYSTACK_ALLOC alloca
-#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#     ifndef _STDLIB_H
-#      define _STDLIB_H 1
+#     ifndef EXIT_SUCCESS
+#      define EXIT_SUCCESS 0
 #     endif
 #    endif
 #   endif
@@ -446,24 +445,24 @@ YYID (yyi)
 #  ifndef YYSTACK_ALLOC_MAXIMUM
 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
 #  endif
-#  if (defined __cplusplus && ! defined _STDLIB_H \
+#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
        && ! ((defined YYMALLOC || defined malloc) \
 	     && (defined YYFREE || defined free)))
 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   ifndef _STDLIB_H
-#    define _STDLIB_H 1
+#   ifndef EXIT_SUCCESS
+#    define EXIT_SUCCESS 0
 #   endif
 #  endif
 #  ifndef YYMALLOC
 #   define YYMALLOC malloc
-#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+#   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
 #  ifndef YYFREE
 #   define YYFREE free
-#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+#   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 void free (void *); /* INFRINGES ON USER NAME SPACE */
 #   endif
@@ -492,23 +491,7 @@ union yyalloc
      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
       + YYSTACK_GAP_MAXIMUM)
 
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if defined __GNUC__ && 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count)		\
-      do					\
-	{					\
-	  YYSIZE_T yyi;				\
-	  for (yyi = 0; yyi < (Count); yyi++)	\
-	    (To)[yyi] = (From)[yyi];		\
-	}					\
-      while (YYID (0))
-#  endif
-# endif
+# define YYCOPY_NEEDED 1
 
 /* Relocate STACK from its old location to the new one.  The
    local variables YYSIZE and YYSTACKSIZE give the old and new number of
@@ -528,15 +511,35 @@ union yyalloc
 
 #endif
 
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)		\
+      do					\
+	{					\
+	  YYSIZE_T yyi;				\
+	  for (yyi = 0; yyi < (Count); yyi++)	\
+	    (To)[yyi] = (From)[yyi];		\
+	}					\
+      while (YYID (0))
+#  endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  10
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   584
+#define YYLAST   585
 
 /* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  51
+#define YYNTOKENS  52
 /* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  107
+#define YYNNTS  106
 /* YYNRULES -- Number of rules.  */
 #define YYNRULES  204
 /* YYNRULES -- Number of states.  */
@@ -544,7 +547,7 @@ union yyalloc
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   301
+#define YYMAXUTOK   302
 
 #define YYTRANSLATE(YYX)						\
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -556,12 +559,12 @@ static const yytype_uint8 yytranslate[] =
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-      49,    50,     2,     2,     2,     2,     2,     2,     2,     2,
+      50,    51,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,    47,     2,    48,     2,     2,     2,     2,     2,     2,
+       2,    48,     2,    49,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -582,7 +585,7 @@ static const yytype_uint8 yytranslate[] =
       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46
+      45,    46,    47
 };
 
 #if YYDEBUG
@@ -595,149 +598,149 @@ static const yytype_uint16 yyprhs[] =
       60,    67,    69,    71,    73,    80,    88,    96,   103,   110,
      111,   112,   117,   118,   123,   124,   126,   128,   130,   137,
      145,   155,   160,   165,   166,   171,   172,   177,   182,   183,
-     185,   186,   188,   191,   193,   194,   197,   199,   201,   202,
-     205,   207,   209,   211,   213,   215,   217,   229,   241,   252,
-     262,   271,   282,   293,   294,   305,   307,   308,   310,   313,
-     315,   317,   319,   321,   323,   325,   334,   336,   338,   340,
-     341,   344,   346,   357,   368,   378,   391,   404,   416,   425,
-     435,   445,   446,   456,   457,   460,   461,   467,   468,   471,
-     476,   481,   483,   485,   487,   489,   491,   492,   505,   506,
-     522,   523,   540,   541,   560,   561,   580,   582,   585,   587,
-     589,   591,   593,   595,   604,   613,   624,   635,   641,   647,
-     648,   651,   653,   656,   658,   660,   662,   664,   673,   682,
-     693,   704,   705,   708,   721,   734,   745,   755,   764,   778,
-     792,   804,   815,   817,   819,   821,   824,   828,   835,   842,
-     844,   846,   847,   850,   853,   862,   871,   873,   874,   881,
-     883,   884,   886,   889,   890,   900,   902,   903,   905,   908,
-     913,   919,   921,   922,   924,   926,   928,   931,   934,   937,
-     940,   943,   946,   949,   952
+     185,   186,   188,   191,   193,   194,   197,   199,   201,   203,
+     205,   207,   209,   211,   213,   215,   227,   239,   250,   260,
+     269,   280,   291,   292,   303,   305,   306,   308,   311,   313,
+     315,   317,   319,   321,   323,   332,   334,   336,   338,   339,
+     342,   344,   355,   366,   376,   389,   402,   414,   423,   433,
+     443,   444,   454,   455,   458,   459,   465,   466,   469,   474,
+     479,   481,   483,   485,   487,   489,   490,   503,   504,   520,
+     521,   538,   539,   558,   559,   578,   580,   583,   585,   587,
+     589,   591,   593,   602,   611,   622,   633,   639,   645,   646,
+     649,   651,   654,   656,   658,   660,   662,   671,   680,   691,
+     702,   703,   706,   719,   732,   743,   753,   762,   776,   790,
+     802,   813,   815,   817,   819,   822,   826,   833,   840,   842,
+     844,   845,   848,   851,   860,   869,   871,   872,   879,   881,
+     882,   884,   887,   888,   898,   900,   901,   903,   906,   911,
+     917,   919,   920,   922,   924,   926,   929,   932,   935,   938,
+     941,   944,   947,   950,   953
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
 static const yytype_int16 yyrhs[] =
 {
-      52,     0,    -1,    53,    -1,    56,    -1,    59,    -1,     1,
-      -1,    -1,    54,    61,    62,    63,    67,    68,    69,    70,
-      74,    75,    76,    58,    77,   145,    -1,    -1,    55,   111,
-      -1,    -1,    57,    77,    -1,    59,    -1,    -1,    -1,    60,
-     138,    -1,    -1,     7,    47,     4,    48,    -1,     8,    49,
-       6,    50,    -1,     8,    49,     6,   157,   157,    50,    -1,
-       8,    47,     6,   157,   157,    48,    -1,    64,    -1,    65,
-      -1,    66,    -1,    20,    49,   157,   157,   157,    50,    -1,
-      20,    49,   157,   157,   157,     4,    50,    -1,    20,    47,
-     157,   157,   157,     4,    48,    -1,    24,    49,   157,   157,
-     156,    50,    -1,    24,    47,   157,   157,   156,    48,    -1,
-      -1,    -1,    34,    47,   156,    48,    -1,    -1,    35,    47,
-     156,    48,    -1,    -1,    71,    -1,    72,    -1,    73,    -1,
-      36,    47,   157,   157,   157,    48,    -1,    36,    47,   157,
-     157,   157,   157,    48,    -1,    36,    47,   157,   157,   157,
-     157,   157,   157,    48,    -1,    21,    49,     4,    50,    -1,
-      21,    49,     6,    50,    -1,    -1,    27,    49,     6,    50,
-      -1,    -1,    28,    49,     6,    50,    -1,    28,    47,     6,
-      48,    -1,    -1,    78,    -1,    -1,    79,    -1,    78,    79,
-      -1,    82,    -1,    -1,    80,   154,    -1,    88,    -1,    89,
-      -1,    -1,    81,   111,    -1,     1,    -1,    83,    -1,    84,
-      -1,    85,    -1,    86,    -1,    87,    -1,    10,    47,   157,
-     157,   157,   157,   157,   157,     6,   137,    48,    -1,    10,
-      49,   157,   157,   157,   157,   157,   157,     6,     4,    50,
-      -1,    10,    49,   157,   157,   157,   157,   157,     6,     4,
-      50,    -1,    10,    49,   157,   157,   157,   157,     6,     4,
-      50,    -1,    10,    49,   157,   157,   157,     6,     4,    50,
-      -1,    11,    47,   157,   157,     4,   157,   157,     4,   137,
-      48,    -1,    11,    49,   157,   157,     4,   157,   157,     4,
-       4,    50,    -1,    -1,     9,    49,     4,     6,   155,    50,
-      49,    90,    91,    50,    -1,    92,    -1,    -1,    93,    -1,
-      92,    93,    -1,    95,    -1,    96,    -1,    97,    -1,    98,
-      -1,    99,    -1,   100,    -1,    14,    49,   157,   157,   157,
-     157,     4,    50,    -1,   103,    -1,   102,    -1,   101,    -1,
-      -1,    94,   154,    -1,   104,    -1,    12,    47,   157,   157,
-     157,   157,   157,   157,   137,    48,    -1,    12,    49,   157,
-     157,   157,   157,   157,   157,     4,    50,    -1,    12,    49,
-     157,   157,   157,   157,   157,   157,    50,    -1,    13,    47,
-     157,   157,   157,   157,   157,   157,   156,   156,   137,    48,
-      -1,    13,    49,   157,   157,   157,   157,   157,   157,   156,
-     156,     4,    50,    -1,    13,    49,   157,   157,   157,   157,
-     157,   157,   156,     4,    50,    -1,    15,    49,   157,   157,
-     156,     6,     4,    50,    -1,    15,    49,   157,   157,   156,
-     156,     6,     4,    50,    -1,    15,    47,   157,   157,   156,
-     156,     6,   137,    48,    -1,    -1,    29,    49,   137,    50,
-      49,   105,   109,   106,    50,    -1,    -1,   106,   107,    -1,
-      -1,    30,    49,   108,   109,    50,    -1,    -1,   110,   109,
-      -1,    49,   157,   157,    50,    -1,    47,   157,   157,    48,
-      -1,   112,    -1,   114,    -1,   116,    -1,   118,    -1,   120,
-      -1,    -1,    17,    49,     6,     6,   157,   157,     4,    50,
-      49,   113,   122,    50,    -1,    -1,    17,    49,     4,     6,
-       6,   157,   157,   157,   157,     4,    50,    49,   115,   122,
-      50,    -1,    -1,    17,    49,     4,     6,     6,     6,   157,
-     157,   157,   157,     4,    50,    49,   117,   122,    50,    -1,
-      -1,    17,    49,     4,     6,     6,     6,   157,   157,   157,
-     157,   156,   156,     4,    50,    49,   119,   125,    50,    -1,
-      -1,    17,    47,   137,     6,     6,     6,   157,   157,   157,
-     157,   156,   156,   137,    48,    49,   121,   125,    50,    -1,
-     123,    -1,   122,   123,    -1,   130,    -1,   131,    -1,   132,
-      -1,   135,    -1,   136,    -1,    16,    47,   157,   157,   157,
-     157,   157,    48,    -1,    16,    49,   157,   157,   157,   157,
-     157,    50,    -1,    25,    47,   157,   157,   157,   157,   156,
-     156,   157,    48,    -1,    25,    49,   157,   157,   157,   157,
-     156,   156,   157,    50,    -1,    26,    47,   157,   157,    48,
-      -1,    26,    49,   157,   157,    50,    -1,    -1,   124,   154,
-      -1,   126,    -1,   125,   126,    -1,   129,    -1,   128,    -1,
-     134,    -1,   133,    -1,    16,    47,   157,   157,   157,   157,
-     157,    48,    -1,    16,    49,   157,   157,   157,   157,   157,
-      50,    -1,    25,    47,   157,   157,   157,   157,   156,   156,
-     157,    48,    -1,    25,    49,   157,   157,   157,   157,   156,
-     156,   157,    50,    -1,    -1,   127,   154,    -1,    18,    47,
-     157,   157,   157,   157,   157,   157,     6,     6,   137,    48,
-      -1,    18,    49,   157,   157,   157,   157,   157,   157,     6,
-       6,     4,    50,    -1,    18,    49,   157,   157,   157,   157,
-       6,     6,     4,    50,    -1,    18,    49,   157,   157,   157,
-     157,     6,     4,    50,    -1,    18,    49,   157,   157,   157,
-       6,     4,    50,    -1,    19,    47,   157,   157,   157,   157,
-     157,   157,   157,     6,     6,   137,    48,    -1,    19,    49,
-     157,   157,   157,   157,   157,   157,   157,     6,     6,     4,
-      50,    -1,    19,    49,   157,   157,   157,   157,   157,     6,
-       6,     4,    50,    -1,    19,    49,   157,   157,   157,   157,
-     157,     6,     4,    50,    -1,     4,    -1,     6,    -1,   139,
-      -1,   138,   139,    -1,   140,   142,    50,    -1,    22,    47,
-     141,   157,    48,    49,    -1,    22,    49,   141,   157,    50,
-      49,    -1,     4,    -1,     5,    -1,    -1,   142,   143,    -1,
-     142,   144,    -1,    23,    49,   157,   157,   157,   157,   157,
-      50,    -1,    23,    47,   157,   157,   157,   157,   157,    48,
-      -1,   146,    -1,    -1,    31,    49,    50,    49,   147,    50,
-      -1,   148,    -1,    -1,   149,    -1,   148,   149,    -1,    -1,
-      32,    49,     6,     6,    50,    49,   150,   151,    50,    -1,
-     152,    -1,    -1,   153,    -1,   152,   153,    -1,    33,    49,
-       6,    50,    -1,    37,    49,     6,     6,    50,    -1,     6,
-      -1,    -1,     3,    -1,     4,    -1,   156,    -1,   156,    38,
-      -1,   156,    39,    -1,   156,    40,    -1,   156,    41,    -1,
-     156,    42,    -1,   156,    43,    -1,   156,    44,    -1,   156,
-      45,    -1,   156,    46,    -1
+      53,     0,    -1,    54,    -1,    57,    -1,    60,    -1,     1,
+      -1,    -1,    55,    62,    63,    64,    68,    69,    70,    71,
+      75,    76,    77,    59,    78,   145,    -1,    -1,    56,   111,
+      -1,    -1,    58,    78,    -1,    60,    -1,    -1,    -1,    61,
+     138,    -1,    -1,     7,    48,     4,    49,    -1,     8,    50,
+       6,    51,    -1,     8,    50,     6,   157,   157,    51,    -1,
+       8,    48,     6,   157,   157,    49,    -1,    65,    -1,    66,
+      -1,    67,    -1,    20,    50,   157,   157,   157,    51,    -1,
+      20,    50,   157,   157,   157,     4,    51,    -1,    20,    48,
+     157,   157,   157,     4,    49,    -1,    24,    50,   157,   157,
+     156,    51,    -1,    24,    48,   157,   157,   156,    49,    -1,
+      -1,    -1,    34,    48,   156,    49,    -1,    -1,    35,    48,
+     156,    49,    -1,    -1,    72,    -1,    73,    -1,    74,    -1,
+      36,    48,   157,   157,   157,    49,    -1,    36,    48,   157,
+     157,   157,   157,    49,    -1,    36,    48,   157,   157,   157,
+     157,   157,   157,    49,    -1,    21,    50,     4,    51,    -1,
+      21,    50,     6,    51,    -1,    -1,    27,    50,     6,    51,
+      -1,    -1,    28,    50,     6,    51,    -1,    28,    48,     6,
+      49,    -1,    -1,    79,    -1,    -1,    80,    -1,    79,    80,
+      -1,    82,    -1,    -1,    81,   154,    -1,    88,    -1,    89,
+      -1,   111,    -1,     1,    -1,    83,    -1,    84,    -1,    85,
+      -1,    86,    -1,    87,    -1,    10,    48,   157,   157,   157,
+     157,   157,   157,     6,   137,    49,    -1,    10,    50,   157,
+     157,   157,   157,   157,   157,     6,     4,    51,    -1,    10,
+      50,   157,   157,   157,   157,   157,     6,     4,    51,    -1,
+      10,    50,   157,   157,   157,   157,     6,     4,    51,    -1,
+      10,    50,   157,   157,   157,     6,     4,    51,    -1,    11,
+      48,   157,   157,     4,   157,   157,     4,   137,    49,    -1,
+      11,    50,   157,   157,     4,   157,   157,     4,     4,    51,
+      -1,    -1,     9,    50,     4,     6,   155,    51,    50,    90,
+      91,    51,    -1,    92,    -1,    -1,    93,    -1,    92,    93,
+      -1,    95,    -1,    96,    -1,    97,    -1,    98,    -1,    99,
+      -1,   100,    -1,    14,    50,   157,   157,   157,   157,     4,
+      51,    -1,   103,    -1,   102,    -1,   101,    -1,    -1,    94,
+     154,    -1,   104,    -1,    12,    48,   157,   157,   157,   157,
+     157,   157,   137,    49,    -1,    12,    50,   157,   157,   157,
+     157,   157,   157,     4,    51,    -1,    12,    50,   157,   157,
+     157,   157,   157,   157,    51,    -1,    13,    48,   157,   157,
+     157,   157,   157,   157,   156,   156,   137,    49,    -1,    13,
+      50,   157,   157,   157,   157,   157,   157,   156,   156,     4,
+      51,    -1,    13,    50,   157,   157,   157,   157,   157,   157,
+     156,     4,    51,    -1,    15,    50,   157,   157,   156,     6,
+       4,    51,    -1,    15,    50,   157,   157,   156,   156,     6,
+       4,    51,    -1,    15,    48,   157,   157,   156,   156,     6,
+     137,    49,    -1,    -1,    29,    50,   137,    51,    50,   105,
+     109,   106,    51,    -1,    -1,   106,   107,    -1,    -1,    30,
+      50,   108,   109,    51,    -1,    -1,   110,   109,    -1,    50,
+     157,   157,    51,    -1,    48,   157,   157,    49,    -1,   112,
+      -1,   114,    -1,   116,    -1,   118,    -1,   120,    -1,    -1,
+      17,    50,     6,     6,   157,   157,     4,    51,    50,   113,
+     122,    51,    -1,    -1,    17,    50,     4,     6,     6,   157,
+     157,   157,   157,     4,    51,    50,   115,   122,    51,    -1,
+      -1,    17,    50,     4,     6,     6,     6,   157,   157,   157,
+     157,     4,    51,    50,   117,   122,    51,    -1,    -1,    17,
+      50,     4,     6,     6,     6,   157,   157,   157,   157,   156,
+     156,     4,    51,    50,   119,   125,    51,    -1,    -1,    17,
+      48,   137,     6,     6,     6,   157,   157,   157,   157,   156,
+     156,   137,    49,    50,   121,   125,    51,    -1,   123,    -1,
+     122,   123,    -1,   130,    -1,   131,    -1,   132,    -1,   135,
+      -1,   136,    -1,    16,    48,   157,   157,   157,   157,   157,
+      49,    -1,    16,    50,   157,   157,   157,   157,   157,    51,
+      -1,    25,    48,   157,   157,   157,   157,   156,   156,   157,
+      49,    -1,    25,    50,   157,   157,   157,   157,   156,   156,
+     157,    51,    -1,    26,    48,   157,   157,    49,    -1,    26,
+      50,   157,   157,    51,    -1,    -1,   124,   154,    -1,   126,
+      -1,   125,   126,    -1,   129,    -1,   128,    -1,   134,    -1,
+     133,    -1,    16,    48,   157,   157,   157,   157,   157,    49,
+      -1,    16,    50,   157,   157,   157,   157,   157,    51,    -1,
+      25,    48,   157,   157,   157,   157,   156,   156,   157,    49,
+      -1,    25,    50,   157,   157,   157,   157,   156,   156,   157,
+      51,    -1,    -1,   127,   154,    -1,    18,    48,   157,   157,
+     157,   157,   157,   157,     6,     6,   137,    49,    -1,    18,
+      50,   157,   157,   157,   157,   157,   157,     6,     6,     4,
+      51,    -1,    18,    50,   157,   157,   157,   157,     6,     6,
+       4,    51,    -1,    18,    50,   157,   157,   157,   157,     6,
+       4,    51,    -1,    18,    50,   157,   157,   157,     6,     4,
+      51,    -1,    19,    48,   157,   157,   157,   157,   157,   157,
+     157,     6,     6,   137,    49,    -1,    19,    50,   157,   157,
+     157,   157,   157,   157,   157,     6,     6,     4,    51,    -1,
+      19,    50,   157,   157,   157,   157,   157,     6,     6,     4,
+      51,    -1,    19,    50,   157,   157,   157,   157,   157,     6,
+       4,    51,    -1,     4,    -1,     6,    -1,   139,    -1,   138,
+     139,    -1,   140,   142,    51,    -1,    22,    48,   141,   157,
+      49,    50,    -1,    22,    50,   141,   157,    51,    50,    -1,
+       4,    -1,     5,    -1,    -1,   142,   143,    -1,   142,   144,
+      -1,    23,    50,   157,   157,   157,   157,   157,    51,    -1,
+      23,    48,   157,   157,   157,   157,   157,    49,    -1,   146,
+      -1,    -1,    31,    50,    51,    50,   147,    51,    -1,   148,
+      -1,    -1,   149,    -1,   148,   149,    -1,    -1,    32,    50,
+       6,     6,    51,    50,   150,   151,    51,    -1,   152,    -1,
+      -1,   153,    -1,   152,   153,    -1,    33,    50,     6,    51,
+      -1,    37,    50,     6,     6,    51,    -1,     6,    -1,    -1,
+       3,    -1,     4,    -1,   156,    -1,   156,    38,    -1,   156,
+      39,    -1,   156,    40,    -1,   156,    41,    -1,   156,    42,
+      -1,   156,    47,    -1,   156,    43,    -1,   156,    44,    -1,
+     156,    45,    -1,   156,    46,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   137,   137,   138,   139,   140,   164,   164,   219,   219,
-     230,   230,   249,   250,   255,   255,   295,   297,   327,   333,
-     339,   368,   369,   370,   373,   381,   394,   426,   432,   438,
-     454,   456,   481,   483,   514,   516,   517,   518,   522,   532,
-     543,   570,   574,   578,   606,   610,   654,   662,   670,   674,
-     675,   679,   680,   684,   685,   685,   686,   687,   689,   689,
-     696,   700,   701,   702,   703,   704,   740,   750,   761,   771,
-     781,   817,   822,   854,   853,   877,   878,   882,   883,   887,
-     888,   889,   890,   891,   892,   894,   899,   900,   901,   902,
-     902,   903,   933,   942,   951,   999,  1008,  1017,  1054,  1064,
-    1082,  1132,  1131,  1170,  1172,  1177,  1176,  1183,  1185,  1190,
-    1194,  1254,  1255,  1256,  1257,  1258,  1266,  1265,  1284,  1283,
-    1302,  1301,  1322,  1320,  1344,  1342,  1423,  1424,  1428,  1429,
-    1430,  1431,  1432,  1434,  1439,  1444,  1449,  1454,  1459,  1464,
-    1464,  1468,  1469,  1473,  1474,  1475,  1476,  1478,  1484,  1491,
-    1496,  1501,  1501,  1542,  1554,  1566,  1577,  1593,  1647,  1661,
-    1674,  1685,  1696,  1697,  1701,  1702,  1724,  1726,  1742,  1761,
-    1762,  1765,  1767,  1768,  1789,  1796,  1812,  1813,  1817,  1822,
-    1823,  1827,  1828,  1851,  1850,  1860,  1861,  1865,  1866,  1885,
-    1915,  1923,  1924,  1928,  1929,  1934,  1935,  1936,  1937,  1938,
-    1939,  1940,  1941,  1942,  1943
+       0,   134,   134,   135,   136,   137,   161,   161,   216,   216,
+     227,   227,   246,   247,   252,   252,   292,   294,   324,   330,
+     336,   365,   366,   367,   370,   378,   391,   427,   432,   437,
+     453,   455,   480,   482,   513,   515,   516,   517,   521,   531,
+     542,   569,   573,   577,   605,   609,   653,   661,   669,   673,
+     674,   678,   679,   683,   684,   684,   685,   686,   687,   688,
+     692,   693,   694,   695,   696,   732,   742,   753,   763,   773,
+     809,   814,   846,   845,   871,   872,   876,   877,   881,   882,
+     883,   884,   885,   886,   888,   893,   894,   895,   896,   896,
+     897,   927,   936,   945,   993,  1002,  1011,  1048,  1058,  1076,
+    1126,  1125,  1165,  1167,  1172,  1171,  1178,  1180,  1185,  1189,
+    1249,  1250,  1251,  1252,  1253,  1261,  1260,  1279,  1278,  1297,
+    1296,  1317,  1315,  1339,  1337,  1418,  1419,  1423,  1424,  1425,
+    1426,  1427,  1429,  1434,  1439,  1444,  1449,  1454,  1459,  1459,
+    1463,  1464,  1468,  1469,  1470,  1471,  1473,  1479,  1486,  1491,
+    1496,  1496,  1537,  1549,  1561,  1572,  1588,  1642,  1656,  1669,
+    1680,  1691,  1692,  1696,  1697,  1719,  1721,  1737,  1756,  1757,
+    1760,  1762,  1763,  1784,  1791,  1807,  1808,  1812,  1817,  1818,
+    1822,  1823,  1846,  1845,  1855,  1856,  1860,  1861,  1880,  1910,
+    1918,  1919,  1923,  1924,  1929,  1930,  1931,  1932,  1933,  1934,
+    1935,  1936,  1937,  1938,  1939
 };
 #endif
 
@@ -753,28 +756,28 @@ static const char *const yytname[] =
   "T_CURSOR", "T_ELEMENTARC", "T_MARK", "T_GROUPS", "T_STYLES",
   "T_POLYGON", "T_POLYGON_HOLE", "T_NETLIST", "T_NET", "T_CONN", "T_AREA",
   "T_THERMAL", "T_DRC", "T_ATTRIBUTE", "T_UMIL", "T_CMIL", "T_MIL", "T_IN",
-  "T_NM", "T_UM", "T_MM", "T_M", "T_KM", "'['", "']'", "'('", "')'",
-  "$accept", "parse", "parsepcb", "$@1", "$@2", "parsedata", "$@3",
+  "T_NM", "T_UM", "T_MM", "T_M", "T_KM", "T_PX", "'['", "']'", "'('",
+  "')'", "$accept", "parse", "parsepcb", "$@1", "$@2", "parsedata", "$@3",
   "pcbfont", "parsefont", "$@4", "pcbfileversion", "pcbname", "pcbgrid",
   "pcbgridold", "pcbgridnew", "pcbhigrid", "pcbcursor", "polyarea",
   "pcbthermal", "pcbdrc", "pcbdrc1", "pcbdrc2", "pcbdrc3", "pcbflags",
   "pcbgroups", "pcbstyles", "pcbdata", "pcbdefinitions", "pcbdefinition",
-  "$@5", "$@6", "via", "via_hi_format", "via_2.0_format", "via_1.7_format",
-  "via_newformat", "via_oldformat", "rats", "layer", "$@7", "layerdata",
-  "layerdefinitions", "layerdefinition", "$@8", "line_hi_format",
+  "$@5", "via", "via_hi_format", "via_2.0_format", "via_1.7_format",
+  "via_newformat", "via_oldformat", "rats", "layer", "$@6", "layerdata",
+  "layerdefinitions", "layerdefinition", "$@7", "line_hi_format",
   "line_1.7_format", "line_oldformat", "arc_hi_format", "arc_1.7_format",
   "arc_oldformat", "text_oldformat", "text_newformat", "text_hi_format",
-  "polygon_format", "$@9", "polygonholes", "polygonhole", "$@10",
-  "polygonpoints", "polygonpoint", "element", "element_oldformat", "$@11",
-  "element_1.3.4_format", "$@12", "element_newformat", "$@13",
-  "element_1.7_format", "$@14", "element_hi_format", "$@15",
-  "elementdefinitions", "elementdefinition", "$@16", "relementdefs",
-  "relementdef", "$@17", "pin_hi_format", "pin_1.7_format",
+  "polygon_format", "$@8", "polygonholes", "polygonhole", "$@9",
+  "polygonpoints", "polygonpoint", "element", "element_oldformat", "$@10",
+  "element_1.3.4_format", "$@11", "element_newformat", "$@12",
+  "element_1.7_format", "$@13", "element_hi_format", "$@14",
+  "elementdefinitions", "elementdefinition", "$@15", "relementdefs",
+  "relementdef", "$@16", "pin_hi_format", "pin_1.7_format",
   "pin_1.6.3_format", "pin_newformat", "pin_oldformat", "pad_hi_format",
   "pad_1.7_format", "pad_newformat", "pad", "flags", "symbols", "symbol",
   "symbolhead", "symbolid", "symboldata", "symboldefinition",
   "hiressymbol", "pcbnetlist", "pcbnetdef", "nets", "netdefs", "net",
-  "$@18", "connections", "conndefs", "conn", "attribute", "opt_string",
+  "$@17", "connections", "conndefs", "conn", "attribute", "opt_string",
   "number", "measure", 0
 };
 #endif
@@ -788,34 +791,34 @@ static const yytype_uint16 yytoknum[] =
      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-     295,   296,   297,   298,   299,   300,   301,    91,    93,    40,
-      41
+     295,   296,   297,   298,   299,   300,   301,   302,    91,    93,
+      40,    41
 };
 # endif
 
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const yytype_uint8 yyr1[] =
 {
-       0,    51,    52,    52,    52,    52,    54,    53,    55,    53,
-      57,    56,    58,    58,    60,    59,    61,    61,    62,    62,
-      62,    63,    63,    63,    64,    65,    66,    67,    67,    67,
-      68,    68,    69,    69,    70,    70,    70,    70,    71,    72,
-      73,    74,    74,    74,    75,    75,    76,    76,    76,    77,
-      77,    78,    78,    79,    80,    79,    79,    79,    81,    79,
-      79,    82,    82,    82,    82,    82,    83,    84,    85,    86,
-      87,    88,    88,    90,    89,    91,    91,    92,    92,    93,
-      93,    93,    93,    93,    93,    93,    93,    93,    93,    94,
-      93,    93,    95,    96,    97,    98,    99,   100,   101,   102,
-     103,   105,   104,   106,   106,   108,   107,   109,   109,   110,
-     110,   111,   111,   111,   111,   111,   113,   112,   115,   114,
-     117,   116,   119,   118,   121,   120,   122,   122,   123,   123,
-     123,   123,   123,   123,   123,   123,   123,   123,   123,   124,
-     123,   125,   125,   126,   126,   126,   126,   126,   126,   126,
-     126,   127,   126,   128,   129,   130,   131,   132,   133,   134,
-     135,   136,   137,   137,   138,   138,   139,   140,   140,   141,
-     141,   142,   142,   142,   143,   144,   145,   145,   146,   147,
-     147,   148,   148,   150,   149,   151,   151,   152,   152,   153,
-     154,   155,   155,   156,   156,   157,   157,   157,   157,   157,
+       0,    52,    53,    53,    53,    53,    55,    54,    56,    54,
+      58,    57,    59,    59,    61,    60,    62,    62,    63,    63,
+      63,    64,    64,    64,    65,    66,    67,    68,    68,    68,
+      69,    69,    70,    70,    71,    71,    71,    71,    72,    73,
+      74,    75,    75,    75,    76,    76,    77,    77,    77,    78,
+      78,    79,    79,    80,    81,    80,    80,    80,    80,    80,
+      82,    82,    82,    82,    82,    83,    84,    85,    86,    87,
+      88,    88,    90,    89,    91,    91,    92,    92,    93,    93,
+      93,    93,    93,    93,    93,    93,    93,    93,    94,    93,
+      93,    95,    96,    97,    98,    99,   100,   101,   102,   103,
+     105,   104,   106,   106,   108,   107,   109,   109,   110,   110,
+     111,   111,   111,   111,   111,   113,   112,   115,   114,   117,
+     116,   119,   118,   121,   120,   122,   122,   123,   123,   123,
+     123,   123,   123,   123,   123,   123,   123,   123,   124,   123,
+     125,   125,   126,   126,   126,   126,   126,   126,   126,   126,
+     127,   126,   128,   129,   130,   131,   132,   133,   134,   135,
+     136,   137,   137,   138,   138,   139,   140,   140,   141,   141,
+     142,   142,   142,   143,   144,   145,   145,   146,   147,   147,
+     148,   148,   150,   149,   151,   151,   152,   152,   153,   154,
+     155,   155,   156,   156,   157,   157,   157,   157,   157,   157,
      157,   157,   157,   157,   157
 };
 
@@ -827,391 +830,396 @@ static const yytype_uint8 yyr2[] =
        6,     1,     1,     1,     6,     7,     7,     6,     6,     0,
        0,     4,     0,     4,     0,     1,     1,     1,     6,     7,
        9,     4,     4,     0,     4,     0,     4,     4,     0,     1,
-       0,     1,     2,     1,     0,     2,     1,     1,     0,     2,
-       1,     1,     1,     1,     1,     1,    11,    11,    10,     9,
-       8,    10,    10,     0,    10,     1,     0,     1,     2,     1,
-       1,     1,     1,     1,     1,     8,     1,     1,     1,     0,
-       2,     1,    10,    10,     9,    12,    12,    11,     8,     9,
-       9,     0,     9,     0,     2,     0,     5,     0,     2,     4,
-       4,     1,     1,     1,     1,     1,     0,    12,     0,    15,
-       0,    16,     0,    18,     0,    18,     1,     2,     1,     1,
-       1,     1,     1,     8,     8,    10,    10,     5,     5,     0,
-       2,     1,     2,     1,     1,     1,     1,     8,     8,    10,
-      10,     0,     2,    12,    12,    10,     9,     8,    13,    13,
-      11,    10,     1,     1,     1,     2,     3,     6,     6,     1,
-       1,     0,     2,     2,     8,     8,     1,     0,     6,     1,
-       0,     1,     2,     0,     9,     1,     0,     1,     2,     4,
-       5,     1,     0,     1,     1,     1,     2,     2,     2,     2,
+       0,     1,     2,     1,     0,     2,     1,     1,     1,     1,
+       1,     1,     1,     1,     1,    11,    11,    10,     9,     8,
+      10,    10,     0,    10,     1,     0,     1,     2,     1,     1,
+       1,     1,     1,     1,     8,     1,     1,     1,     0,     2,
+       1,    10,    10,     9,    12,    12,    11,     8,     9,     9,
+       0,     9,     0,     2,     0,     5,     0,     2,     4,     4,
+       1,     1,     1,     1,     1,     0,    12,     0,    15,     0,
+      16,     0,    18,     0,    18,     1,     2,     1,     1,     1,
+       1,     1,     8,     8,    10,    10,     5,     5,     0,     2,
+       1,     2,     1,     1,     1,     1,     8,     8,    10,    10,
+       0,     2,    12,    12,    10,     9,     8,    13,    13,    11,
+      10,     1,     1,     1,     2,     3,     6,     6,     1,     1,
+       0,     2,     2,     8,     8,     1,     0,     6,     1,     0,
+       1,     2,     0,     9,     1,     0,     1,     2,     4,     5,
+       1,     0,     1,     1,     1,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2
 };
 
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
-   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
+/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
+   Performed when YYTABLE doesn't specify something else to do.  Zero
    means the default is an error.  */
 static const yytype_uint8 yydefact[] =
 {
        0,     5,     0,     2,    16,     0,     3,     0,     4,     0,
-       1,     0,     0,     0,     9,   111,   112,   113,   114,   115,
-      60,     0,     0,     0,    11,     0,    51,     0,     0,    53,
-      61,    62,    63,    64,    65,    56,    57,     0,    15,   164,
-     171,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    52,     0,    55,    59,     0,     0,   165,     0,     0,
-       0,     0,     0,    29,    21,    22,    23,   162,   163,     0,
-       0,     0,     0,   193,   194,   195,     0,     0,     0,     0,
-       0,   169,   170,     0,     0,     0,   166,   172,   173,    17,
-       0,     0,     0,     0,     0,    30,     0,     0,     0,   192,
-     196,   197,   198,   199,   200,   201,   202,   203,   204,     0,
+       1,     0,     0,     0,     9,   110,   111,   112,   113,   114,
+      59,     0,     0,     0,    11,     0,    51,     0,    53,    60,
+      61,    62,    63,    64,    56,    57,    58,     0,    15,   163,
+     170,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,    52,     0,    55,     0,     0,   164,     0,     0,     0,
+       0,     0,    29,    21,    22,    23,   161,   162,     0,     0,
+       0,     0,   192,   193,   194,     0,     0,     0,     0,     0,
+     168,   169,     0,     0,     0,   165,   171,   172,    17,     0,
+       0,     0,     0,     0,    30,     0,     0,     0,   191,   195,
+     196,   197,   198,   199,   201,   202,   203,   204,   200,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,    18,
        0,     0,     0,     0,     0,     0,    32,     0,     0,     0,
-     191,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     190,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,    34,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     190,   167,   168,     0,     0,    20,    19,     0,     0,     0,
+     189,   166,   167,     0,     0,    20,    19,     0,     0,     0,
        0,     0,     0,     0,    43,    35,    36,    37,     0,     0,
-       0,     0,    73,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,    72,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,    24,     0,     0,    31,     0,     0,     0,
-      45,     0,     0,     0,     0,    76,     0,    70,     0,     0,
+      45,     0,     0,     0,     0,    75,     0,    69,     0,     0,
        0,     0,     0,     0,     0,    26,    25,    28,    27,    33,
-       0,     0,     0,    48,     0,     0,     0,   116,     0,     0,
-       0,     0,     0,     0,    75,    77,     0,    79,    80,    81,
-      82,    83,    84,    88,    87,    86,    91,     0,    69,     0,
+       0,     0,     0,    48,     0,     0,     0,   115,     0,     0,
+       0,     0,     0,     0,    74,    76,     0,    78,    79,    80,
+      81,    82,    83,    87,    86,    85,    90,     0,    68,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      13,     0,     0,     0,   139,     0,     0,     0,     0,     0,
-       0,     0,     0,    74,    78,    90,     0,    68,     0,    71,
-      72,   175,   174,     0,    41,    42,     0,     0,     0,     0,
-      12,     0,   194,     0,     0,     0,     0,     0,     0,     0,
-     139,   126,     0,   128,   129,   130,   131,   132,     0,     0,
-       0,     0,     0,     0,     0,     0,    66,    67,    38,     0,
-      44,     0,     0,   177,     0,     0,     0,   118,     0,     0,
-       0,     0,     0,     0,     0,     0,   117,   127,   140,     0,
+      13,     0,     0,     0,   138,     0,     0,     0,     0,     0,
+       0,     0,     0,    73,    77,    89,     0,    67,     0,    70,
+      71,   174,   173,     0,    41,    42,     0,     0,     0,     0,
+      12,     0,   193,     0,     0,     0,     0,     0,     0,     0,
+     138,   125,     0,   127,   128,   129,   130,   131,     0,     0,
+       0,     0,     0,     0,     0,     0,    65,    66,    38,     0,
+      44,     0,     0,   176,     0,     0,     0,   117,     0,     0,
+       0,     0,     0,     0,     0,     0,   116,   126,   139,     0,
        0,     0,     0,     0,     0,     0,     0,    39,     0,    47,
-      46,     0,     7,   176,     0,   120,     0,   139,     0,     0,
+      46,     0,     7,   175,     0,   119,     0,   138,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   101,     0,     0,     0,   139,     0,   139,
+       0,     0,     0,   100,     0,     0,     0,   138,     0,   138,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   107,    40,     0,   124,
-     139,   122,   119,     0,     0,     0,     0,     0,     0,   137,
-     138,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   103,   107,   180,   151,   121,   151,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    85,     0,
-      98,     0,     0,     0,     0,   108,     0,     0,   179,   181,
-       0,     0,     0,     0,   151,   141,     0,   144,   143,   146,
-     145,   151,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    94,     0,     0,   100,    99,     0,     0,     0,   102,
-     104,     0,   178,   182,     0,     0,     0,     0,     0,     0,
-       0,     0,   125,   142,   152,   123,   133,   134,   157,     0,
-       0,     0,     0,     0,    92,    93,     0,   194,     0,   110,
-     109,   105,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   156,     0,     0,     0,     0,     0,     0,    97,     0,
-     107,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     155,   161,     0,   135,   136,    95,    96,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   160,   106,   183,
-       0,     0,     0,     0,     0,     0,     0,     0,   186,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   185,
-     187,   147,   148,     0,     0,     0,     0,     0,     0,     0,
-     184,   188,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   149,   150,   189,     0,     0,     0,     0,
-     153,   154,     0,     0,   158,   159
+       0,     0,     0,     0,     0,     0,   106,    40,     0,   123,
+     138,   121,   118,     0,     0,     0,     0,     0,     0,   136,
+     137,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   102,   106,   179,   150,   120,   150,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,    84,     0,
+      97,     0,     0,     0,     0,   107,     0,     0,   178,   180,
+       0,     0,     0,     0,   150,   140,     0,   143,   142,   145,
+     144,   150,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,    93,     0,     0,    99,    98,     0,     0,     0,   101,
+     103,     0,   177,   181,     0,     0,     0,     0,     0,     0,
+       0,     0,   124,   141,   151,   122,   132,   133,   156,     0,
+       0,     0,     0,     0,    91,    92,     0,   193,     0,   109,
+     108,   104,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   155,     0,     0,     0,     0,     0,     0,    96,     0,
+     106,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     154,   160,     0,   134,   135,    94,    95,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   159,   105,   182,
+       0,     0,     0,     0,     0,     0,     0,     0,   185,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   184,
+     186,   146,   147,     0,     0,     0,     0,     0,     0,     0,
+     183,   187,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   148,   149,   188,     0,     0,     0,     0,
+     152,   153,     0,     0,   157,   158
 };
 
 /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int16 yydefgoto[] =
 {
       -1,     2,     3,     4,     5,     6,     7,   289,     8,     9,
-      12,    43,    63,    64,    65,    66,    95,   126,   149,   174,
+      12,    43,    62,    63,    64,    65,    94,   126,   149,   174,
      175,   176,   177,   200,   223,   260,    24,    25,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    35,    36,   205,
-     233,   234,   235,   236,   237,   238,   239,   240,   241,   242,
-     243,   244,   245,   246,   396,   444,   480,   530,   421,   422,
-      14,    15,   264,    16,   357,    17,   377,    18,   426,    19,
-     424,   300,   301,   302,   454,   455,   456,   457,   458,   303,
-     304,   305,   459,   460,   306,   307,    69,    38,    39,    40,
-      83,    58,    87,    88,   352,   353,   447,   448,   449,   568,
-     578,   579,   580,    53,   131,    75,    76
+      28,    29,    30,    31,    32,    33,    34,    35,   205,   233,
+     234,   235,   236,   237,   238,   239,   240,   241,   242,   243,
+     244,   245,   246,   396,   444,   480,   530,   421,   422,    36,
+      15,   264,    16,   357,    17,   377,    18,   426,    19,   424,
+     300,   301,   302,   454,   455,   456,   457,   458,   303,   304,
+     305,   459,   460,   306,   307,    68,    38,    39,    40,    82,
+      57,    86,    87,   352,   353,   447,   448,   449,   568,   578,
+     579,   580,    53,   131,    74,    75
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -445
+#define YYPACT_NINF -417
 static const yytype_int16 yypact[] =
 {
-      15,  -445,    27,  -445,    32,    61,  -445,   189,  -445,    67,
-    -445,    46,    86,    30,  -445,  -445,  -445,  -445,  -445,  -445,
-    -445,    52,   120,   136,  -445,   147,  -445,    75,    61,  -445,
-    -445,  -445,  -445,  -445,  -445,  -445,  -445,   144,    67,  -445,
-    -445,   109,   184,   114,    47,    84,   124,    44,    44,    44,
-      44,  -445,    80,  -445,  -445,    29,    29,  -445,    -4,    92,
-     139,   143,   228,   135,  -445,  -445,  -445,  -445,  -445,   157,
-     164,   169,   173,  -445,  -445,   211,    44,    44,    44,    44,
-     180,  -445,  -445,    44,    44,   241,  -445,  -445,  -445,  -445,
-      44,     4,    44,    44,   255,   153,   186,   195,    44,   196,
-    -445,  -445,  -445,  -445,  -445,  -445,  -445,  -445,  -445,    44,
-      44,   191,   204,   206,   168,   174,    44,    44,    44,  -445,
-      44,    44,    44,    44,    44,   192,   210,   236,   102,    44,
-    -445,   208,    44,   115,    44,    44,   209,   224,   225,    44,
-      44,   230,   229,    44,    44,    44,    44,    44,   242,   260,
-      44,    44,    44,   334,   281,    44,   349,   133,    44,    44,
-    -445,  -445,  -445,    44,    44,  -445,  -445,   357,    -1,    44,
-      44,   291,    44,   315,   356,  -445,  -445,  -445,    44,    44,
-      44,   328,  -445,    44,   331,   383,   140,   384,   393,    44,
-      44,   351,   350,  -445,   354,   353,  -445,   358,    44,   355,
-     378,    44,    44,    44,   359,   294,   401,  -445,   360,   405,
-     406,    47,   407,    44,    44,  -445,  -445,  -445,  -445,  -445,
-      44,   299,   364,   386,    44,    44,   411,  -445,   279,   280,
-     367,   297,   368,   369,   294,  -445,    75,  -445,  -445,  -445,
-    -445,  -445,  -445,  -445,  -445,  -445,  -445,    47,  -445,   372,
-     414,   375,   374,   379,   380,    44,   381,   382,   422,   298,
-     412,    44,    60,   385,    41,    44,    44,    44,    44,    44,
-      44,    44,    47,  -445,  -445,  -445,   396,  -445,   395,  -445,
-    -445,  -445,  -445,     8,  -445,  -445,   397,   423,   427,   151,
-    -445,    44,   398,    44,   400,   301,   402,   403,   302,   305,
-     155,  -445,    75,  -445,  -445,  -445,  -445,  -445,    44,    44,
-      44,    44,    44,    44,    44,   408,  -445,  -445,  -445,    10,
-    -445,   409,   410,   415,    47,   404,   446,  -445,    44,    44,
-      44,    44,    44,    44,    44,    44,  -445,  -445,  -445,    44,
-      44,    44,    44,    44,    44,    44,   413,  -445,    44,  -445,
-    -445,   424,  -445,  -445,   416,  -445,   425,    41,    44,    44,
-      44,    44,    44,    44,    44,    44,    44,    44,    44,    44,
-      44,    44,   207,  -445,   426,   428,   430,    41,   431,   178,
-      44,    44,    44,    44,    44,    44,   429,   432,    44,    44,
-      44,    44,   452,   453,   457,   470,   320,  -445,   434,  -445,
-     222,  -445,  -445,    44,    44,   226,    44,    44,    44,  -445,
-    -445,    44,    44,    44,    44,   442,    47,   443,   459,    44,
-      44,  -445,   320,   449,   108,  -445,   108,    44,    44,   490,
-     489,    44,    44,    44,    47,     5,    44,    44,  -445,   448,
-    -445,   447,    44,    44,   -12,  -445,   450,   460,   449,  -445,
-     321,   326,   327,   335,   218,  -445,    75,  -445,  -445,  -445,
-    -445,   251,   461,   468,   471,   387,   492,    44,    44,   463,
-     472,  -445,    44,    79,  -445,  -445,   479,   480,   451,  -445,
-    -445,   525,  -445,  -445,    44,    44,    44,    44,    44,    44,
-      44,    44,  -445,  -445,  -445,  -445,  -445,  -445,  -445,   482,
-     529,   392,    44,    44,  -445,  -445,    47,   484,   531,  -445,
-    -445,  -445,   530,    44,    44,    44,    44,    44,    44,    44,
-      44,  -445,   491,   493,   538,   496,   495,   498,  -445,   497,
-     320,   499,    44,    44,    44,    44,    44,    44,    44,    44,
-    -445,  -445,   500,  -445,  -445,  -445,  -445,   501,   503,    44,
-      44,    44,    44,    44,    44,    44,    44,  -445,  -445,  -445,
-      44,    44,    44,    44,    44,    44,    44,    44,   515,   505,
-     504,    44,    44,    44,    44,    44,    44,   506,   507,   515,
-    -445,  -445,  -445,   550,   552,    44,    44,    44,    44,   553,
-    -445,  -445,   554,   555,   556,   557,   516,   517,   518,    47,
-     561,   560,   563,  -445,  -445,  -445,   522,   521,    47,   568,
-    -445,  -445,   526,   523,  -445,  -445
+      15,  -417,    21,  -417,    26,    19,  -417,   189,  -417,    45,
+    -417,    30,    81,   -31,  -417,  -417,  -417,  -417,  -417,  -417,
+    -417,    51,    40,   119,  -417,   147,  -417,   103,  -417,  -417,
+    -417,  -417,  -417,  -417,  -417,  -417,  -417,   135,    45,  -417,
+    -417,   141,   160,   129,    54,    73,   159,    79,    79,    79,
+      79,  -417,   120,  -417,    89,    89,  -417,   -13,   126,   173,
+     180,   163,   192,  -417,  -417,  -417,  -417,  -417,   191,   195,
+     198,   199,  -417,  -417,   306,    79,    79,    79,    79,   206,
+    -417,  -417,    79,    79,   181,  -417,  -417,  -417,  -417,    79,
+       4,    79,    79,   182,   153,   227,   233,    79,   236,  -417,
+    -417,  -417,  -417,  -417,  -417,  -417,  -417,  -417,  -417,    79,
+      79,   241,   245,   252,   175,   208,    79,    79,    79,  -417,
+      79,    79,    79,    79,    79,   248,   274,   283,    60,    79,
+    -417,   272,    79,   102,    79,    79,   280,   288,   289,    79,
+      79,   281,   303,    79,    79,    79,    79,    79,   313,   326,
+      79,    79,    79,   364,   324,    79,   373,   115,    79,    79,
+    -417,  -417,  -417,    79,    79,  -417,  -417,   374,    -1,    79,
+      79,   332,    79,   339,   367,  -417,  -417,  -417,    79,    79,
+      79,   340,  -417,    79,   342,   392,   133,   393,   394,    79,
+      79,   350,   349,  -417,   354,   353,  -417,   356,    79,   357,
+     379,    79,    79,    79,   358,   238,   403,  -417,   359,   407,
+     406,    54,   409,    79,    79,  -417,  -417,  -417,  -417,  -417,
+      79,   250,   365,   386,    79,    79,   412,  -417,   207,   220,
+     368,   224,   372,   366,   238,  -417,   103,  -417,  -417,  -417,
+    -417,  -417,  -417,  -417,  -417,  -417,  -417,    54,  -417,   376,
+     415,   375,   377,   380,   381,    79,   382,   383,   417,   228,
+     408,    79,   109,   384,   155,    79,    79,    79,    79,    79,
+      79,    79,    54,  -417,  -417,  -417,   395,  -417,   396,  -417,
+    -417,  -417,  -417,     8,  -417,  -417,   397,   425,   439,   151,
+    -417,    79,   398,    79,   400,   229,   401,   402,   240,   253,
+     108,  -417,   103,  -417,  -417,  -417,  -417,  -417,    79,    79,
+      79,    79,    79,    79,    79,   405,  -417,  -417,  -417,    10,
+    -417,   404,   410,   426,    54,   413,   442,  -417,    79,    79,
+      79,    79,    79,    79,    79,    79,  -417,  -417,  -417,    79,
+      79,    79,    79,    79,    79,    79,   414,  -417,    79,  -417,
+    -417,   423,  -417,  -417,   411,  -417,   424,   155,    79,    79,
+      79,    79,    79,    79,    79,    79,    79,    79,    79,    79,
+      79,    79,   140,  -417,   427,   428,   430,   155,   431,   177,
+      79,    79,    79,    79,    79,    79,   429,   432,    79,    79,
+      79,    79,   454,   453,   458,   468,   254,  -417,   443,  -417,
+     222,  -417,  -417,    79,    79,   188,    79,    79,    79,  -417,
+    -417,    79,    79,    79,    79,   441,    54,   444,   473,    79,
+      79,  -417,   254,   450,    29,  -417,    29,    79,    79,   490,
+     491,    79,    79,    79,    54,     5,    79,    79,  -417,   447,
+    -417,   448,    79,    79,   -12,  -417,   459,   449,   450,  -417,
+     257,   258,   278,   279,   218,  -417,   103,  -417,  -417,  -417,
+    -417,   351,   461,   460,   467,   369,   492,    79,    79,   472,
+     471,  -417,    79,   125,  -417,  -417,   478,   479,   481,  -417,
+    -417,   526,  -417,  -417,    79,    79,    79,    79,    79,    79,
+      79,    79,  -417,  -417,  -417,  -417,  -417,  -417,  -417,   482,
+     530,   378,    79,    79,  -417,  -417,    54,   484,   532,  -417,
+    -417,  -417,   535,    79,    79,    79,    79,    79,    79,    79,
+      79,  -417,   493,   494,   538,   497,   496,   499,  -417,   498,
+     254,   500,    79,    79,    79,    79,    79,    79,    79,    79,
+    -417,  -417,   501,  -417,  -417,  -417,  -417,   502,   504,    79,
+      79,    79,    79,    79,    79,    79,    79,  -417,  -417,  -417,
+      79,    79,    79,    79,    79,    79,    79,    79,   510,   506,
+     505,    79,    79,    79,    79,    79,    79,   507,   508,   510,
+    -417,  -417,  -417,   544,   552,    79,    79,    79,    79,   554,
+    -417,  -417,   555,   556,   557,   558,   516,   515,   517,    54,
+     563,   564,   565,  -417,  -417,  -417,   520,   521,    54,   569,
+    -417,  -417,   525,   524,  -417,  -417
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-    -445,  -445,  -445,  -445,  -445,  -445,  -445,  -445,   316,  -445,
-    -445,  -445,  -445,  -445,  -445,  -445,  -445,  -445,  -445,  -445,
-    -445,  -445,  -445,  -445,  -445,  -445,   286,  -445,   558,  -445,
-    -445,  -445,  -445,  -445,  -445,  -445,  -445,  -445,  -445,  -445,
-    -445,  -445,   343,  -445,  -445,  -445,  -445,  -445,  -445,  -445,
-    -445,  -445,  -445,  -445,  -445,  -445,  -445,  -445,  -416,  -445,
-     551,  -445,  -445,  -445,  -445,  -445,  -445,  -445,  -445,  -445,
-    -445,  -336,  -280,  -445,   152,  -444,  -445,  -445,  -445,  -445,
-    -445,  -445,  -445,  -445,  -445,  -445,  -207,  -445,   542,  -445,
-     528,  -445,  -445,  -445,  -445,  -445,  -445,  -445,   134,  -445,
-    -445,  -445,     2,  -231,  -445,   -47,   -48
+    -417,  -417,  -417,  -417,  -417,  -417,  -417,  -417,   316,  -417,
+    -417,  -417,  -417,  -417,  -417,  -417,  -417,  -417,  -417,  -417,
+    -417,  -417,  -417,  -417,  -417,  -417,   290,  -417,   553,  -417,
+    -417,  -417,  -417,  -417,  -417,  -417,  -417,  -417,  -417,  -417,
+    -417,   343,  -417,  -417,  -417,  -417,  -417,  -417,  -417,  -417,
+    -417,  -417,  -417,  -417,  -417,  -417,  -417,  -416,  -417,   575,
+    -417,  -417,  -417,  -417,  -417,  -417,  -417,  -417,  -417,  -417,
+    -326,  -280,  -417,   156,  -408,  -417,  -417,  -417,  -417,  -417,
+    -417,  -417,  -417,  -417,  -417,  -207,  -417,   543,  -417,   528,
+    -417,  -417,  -417,  -417,  -417,  -417,  -417,   136,  -417,  -417,
+    -417,     6,  -231,  -417,   -47,   -48
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
    positive, shift that token.  If negative, reduce the rule which
-   number is the opposite.  If zero, do what YYDEFACT says.
-   If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -90
+   number is the opposite.  If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF -89
 static const yytype_int16 yytable[] =
 {
-      77,    78,    79,   192,   251,   275,   445,    73,    74,   470,
-     493,    73,    74,    73,    74,   -10,     1,   493,   478,    85,
-     337,   379,    -6,    -6,   -10,   -10,   -10,    10,   109,   110,
-     111,   112,    -8,    81,    82,   114,   115,   -14,   479,    11,
-     276,   400,   118,   120,   121,   122,    86,    73,    74,   193,
-     129,    67,   -10,    68,   119,   471,   318,   295,   347,   296,
-     297,   132,   133,    73,   292,   315,   298,   299,   139,   140,
-     141,   338,   142,   143,   144,   145,   146,    44,    13,    45,
-     152,   153,    73,   507,   155,   157,   158,   159,    70,    37,
-      71,   163,   164,    41,    42,   167,   168,   169,   170,   337,
-     171,    46,   178,   179,   180,    73,    74,   183,   151,   186,
-     187,   188,    52,    59,   547,   189,   190,   354,    73,    74,
-     337,   156,   194,   195,   450,   197,   451,   452,    72,    80,
-     201,   202,   203,   453,    62,   206,    73,    74,   210,   185,
-      89,   213,   214,    73,    74,    90,   209,   -49,    20,    91,
-     220,   -50,    20,   224,   225,   226,    21,    22,    23,    94,
-      21,    22,    23,    96,   -58,   253,   254,    47,   -58,    48,
-      97,   295,   255,   296,   297,    98,   261,   262,   -49,    99,
-     298,   299,   -50,    49,   -54,    50,   113,   125,   -54,   -50,
-      20,    55,   127,    56,   295,   134,   296,   297,    21,    22,
-      23,   128,   130,   298,   299,   336,   -58,   283,   135,   439,
-      73,    74,   136,   394,   291,   293,   137,   308,   309,   310,
-     311,   312,   313,   314,   138,   494,   -54,   469,   402,    73,
-      74,    60,   429,    61,   450,   319,   451,   452,   295,   147,
-     296,   297,   150,   453,   324,   148,   326,   298,   299,   100,
-     101,   102,   103,   104,   105,   106,   107,   108,   154,   160,
-     339,   340,   341,   342,   343,   344,   345,   450,   492,   451,
-     452,   348,   425,   161,   162,    92,   453,    93,   165,   166,
-     358,   359,   360,   361,   362,   363,   364,   365,   116,   172,
-     117,   366,   367,   368,   369,   370,   173,   371,   372,   527,
-     374,   495,   123,   256,   124,   257,   228,   229,   230,   231,
+      76,    77,    78,   192,   251,   275,   445,    72,    73,   470,
+      84,    72,    73,    72,    73,   -10,     1,    44,   478,    45,
+     337,    10,    -6,    -6,   -10,   -10,   -10,   109,   110,   111,
+     112,   379,    -8,    11,   114,   115,    13,   -14,    85,   479,
+     276,   118,   120,   121,   122,   450,   493,   451,   452,   129,
+     193,   400,   -10,   493,   453,   119,   471,   318,    66,   347,
+      67,   132,   133,    72,    73,   315,   151,    37,   139,   140,
+     141,   338,   142,   143,   144,   145,   146,    69,    41,    70,
+     152,   153,    72,    73,   155,   157,   158,   159,    47,    42,
+      48,   163,   164,    80,    81,   167,   168,   169,   170,   337,
+     171,    46,   178,   179,   180,    72,    73,   183,   156,   186,
+     187,   188,    72,   292,   547,   189,   190,   354,    72,    73,
+     337,   185,   194,   195,   295,   197,   296,   297,    72,   507,
+     201,   202,   203,   298,   299,   206,    72,    73,   210,   209,
+      52,   213,   214,    72,    73,    58,   394,   -49,    20,    61,
+     220,   -50,    20,   224,   225,   226,    21,    22,    23,   336,
+      21,    22,    23,    71,    13,   253,   254,    49,    13,    50,
+      79,   295,   255,   296,   297,    88,   261,   262,   -49,    89,
+     298,   299,   -50,    54,   -54,    55,    90,   125,   -54,   -50,
+      20,    72,    73,   295,   429,   296,   297,    95,    21,    22,
+      23,    96,   298,   299,    97,    98,    13,   283,    59,   439,
+      60,    91,   113,    92,   291,   293,    93,   308,   309,   310,
+     311,   312,   313,   314,   137,   494,   -54,   469,   402,   116,
+     123,   117,   124,   127,   450,   319,   451,   452,   295,   128,
+     296,   297,   130,   453,   324,   134,   326,   298,   299,   135,
+     228,   229,   230,   231,   256,   265,   257,   266,   136,   138,
+     339,   340,   341,   342,   343,   344,   345,   232,   267,   492,
+     268,   348,   270,   425,   271,   -88,   287,   328,   288,   329,
+     358,   359,   360,   361,   362,   363,   364,   365,   332,   150,
+     333,   366,   367,   368,   369,   370,   147,   371,   372,   527,
+     374,   334,   419,   335,   420,   484,   486,   485,   487,   148,
      380,   381,   382,   383,   384,   385,   386,   387,   388,   389,
-     390,   391,   392,   232,   393,   395,   265,   267,   266,   268,
-     182,   -89,   403,   404,   405,   406,   407,   408,   181,   196,
-     411,   412,   413,   414,   270,   287,   271,   288,   328,   332,
-     329,   333,   334,   184,   335,   427,   428,   430,   431,   432,
-     433,   191,   198,   434,   435,   436,   437,   419,   484,   420,
-     485,   442,   443,   486,   488,   487,   489,   199,   204,   462,
-     463,   207,   490,   466,   491,   467,   468,   208,   211,   472,
-     473,   499,   606,   500,   476,   477,   523,   212,   524,   215,
-     216,   612,   217,   218,   221,   222,   219,   247,   227,   249,
-     248,   252,   250,   258,   259,   263,   269,   272,   278,   273,
-     502,   503,   277,   279,   280,   506,   508,   281,   286,   321,
-     282,   284,   285,   322,   -14,   294,   513,   514,   515,   516,
-     517,   518,   519,   520,   316,   317,   351,   320,   325,   327,
-     356,   330,   331,   355,   525,   526,   415,   349,   346,   416,
-     350,   417,   373,   441,   376,   532,   533,   534,   535,   536,
-     537,   538,   539,   375,   397,   378,   418,   409,   398,   399,
-     401,   446,   410,   423,   549,   550,   551,   552,   553,   554,
-     555,   556,   438,   440,   464,   465,   474,   475,   501,   481,
-     511,   560,   561,   562,   563,   564,   565,   566,   567,   496,
-     482,   504,   569,   570,   571,   572,   573,   574,   497,   575,
-     576,   498,   505,   583,   584,   585,   586,   509,   587,   588,
-     510,   512,   521,   522,   528,   529,   531,   594,   595,   596,
-     597,   540,   542,   541,   543,   544,   545,   546,   577,   548,
-     557,   558,   559,   581,   582,   589,   592,   590,   593,   598,
-     599,   600,   601,   602,   603,   607,   608,   604,   605,   609,
-     610,   611,   613,   615,   614,   323,   290,   274,   461,    54,
-      57,   591,   483,    51,    84
+     390,   391,   392,   154,   393,   395,   488,   490,   489,   491,
+     165,   160,   403,   404,   405,   406,   407,   408,   161,   162,
+     411,   412,   413,   414,    99,   100,   101,   102,   103,   104,
+     105,   106,   107,   108,   166,   427,   428,   430,   431,   432,
+     433,   172,   173,   434,   435,   436,   437,   450,   181,   451,
+     452,   442,   443,   499,   182,   500,   453,   184,   191,   462,
+     463,   196,   523,   466,   524,   467,   468,   198,   199,   472,
+     473,   204,   606,   207,   476,   477,   208,   211,   212,   215,
+     216,   612,   495,   217,   218,   219,   222,   221,   227,   247,
+     248,   249,   250,   252,   259,   258,   263,   273,   269,   278,
+     502,   503,   272,   286,   279,   506,   508,   277,   280,   281,
+     -14,   321,   282,   284,   285,   294,   513,   514,   515,   516,
+     517,   518,   519,   520,   316,   322,   356,   317,   320,   325,
+     327,   330,   331,   349,   525,   526,   346,   351,   415,   416,
+     376,   350,   417,   355,   373,   532,   533,   534,   535,   536,
+     537,   538,   539,   375,   418,   378,   397,   441,   409,   398,
+     399,   401,   446,   410,   549,   550,   551,   552,   553,   554,
+     555,   556,   438,   423,   464,   440,   474,   465,   501,   475,
+     482,   560,   561,   562,   563,   564,   565,   566,   567,   481,
+     496,   497,   569,   570,   571,   572,   573,   574,   498,   575,
+     576,   504,   505,   583,   584,   585,   586,   509,   587,   588,
+     510,   511,   512,   521,   522,   528,   529,   594,   595,   596,
+     597,   531,   542,   577,   540,   541,   543,   544,   545,   546,
+     592,   548,   557,   558,   559,   581,   582,   589,   593,   590,
+     598,   599,   600,   601,   602,   603,   604,   607,   605,   610,
+     608,   609,   611,   613,   614,   615,   290,   274,    51,   323,
+      14,    56,   461,    83,   483,   591
 };
 
+#define yypact_value_is_default(yystate) \
+  ((yystate) == (-417))
+
+#define yytable_value_is_error(yytable_value) \
+  YYID (0)
+
 static const yytype_uint16 yycheck[] =
 {
       48,    49,    50,     4,   211,   236,   422,     3,     4,     4,
-     454,     3,     4,     3,     4,     0,     1,   461,    30,    23,
-     300,   357,     7,     8,     9,    10,    11,     0,    76,    77,
-      78,    79,    17,     4,     5,    83,    84,    22,    50,     7,
-     247,   377,    90,    91,    92,    93,    50,     3,     4,    50,
-      98,     4,    37,     6,    50,    50,    48,    16,    48,    18,
-      19,   109,   110,     3,     4,   272,    25,    26,   116,   117,
-     118,   302,   120,   121,   122,   123,   124,    47,    17,    49,
-     128,   129,     3,     4,   132,   133,   134,   135,     4,    22,
-       6,   139,   140,    47,     8,   143,   144,   145,   146,   379,
-     147,    49,   150,   151,   152,     3,     4,   155,     6,   157,
-     158,   159,    37,     4,   530,   163,   164,   324,     3,     4,
-     400,     6,   169,   170,    16,   172,    18,    19,     4,    49,
-     178,   179,   180,    25,    20,   183,     3,     4,   186,     6,
-      48,   189,   190,     3,     4,     6,     6,     0,     1,     6,
-     198,     0,     1,   201,   202,   203,     9,    10,    11,    24,
-       9,    10,    11,     6,    17,   213,   214,    47,    17,    49,
-       6,    16,   220,    18,    19,     6,   224,   225,    31,     6,
-      25,    26,    31,    47,    37,    49,     6,    34,    37,     0,
-       1,    47,     6,    49,    16,     4,    18,    19,     9,    10,
-      11,     6,     6,    25,    26,    50,    17,   255,     4,   416,
-       3,     4,     6,     6,   261,   262,    48,   265,   266,   267,
-     268,   269,   270,   271,    50,   456,    37,   434,    50,     3,
-       4,    47,     6,    49,    16,   283,    18,    19,    16,    47,
-      18,    19,     6,    25,   291,    35,   293,    25,    26,    38,
-      39,    40,    41,    42,    43,    44,    45,    46,    50,    50,
-     308,   309,   310,   311,   312,   313,   314,    16,    50,    18,
-      19,   319,    50,    49,    49,    47,    25,    49,    48,    50,
-     328,   329,   330,   331,   332,   333,   334,   335,    47,    47,
-      49,   339,   340,   341,   342,   343,    36,   344,   345,   506,
-     348,    50,    47,     4,    49,     6,    12,    13,    14,    15,
+      23,     3,     4,     3,     4,     0,     1,    48,    30,    50,
+     300,     0,     7,     8,     9,    10,    11,    75,    76,    77,
+      78,   357,    17,     7,    82,    83,    17,    22,    51,    51,
+     247,    89,    90,    91,    92,    16,   454,    18,    19,    97,
+      51,   377,    37,   461,    25,    51,    51,    49,     4,    49,
+       6,   109,   110,     3,     4,   272,     6,    22,   116,   117,
+     118,   302,   120,   121,   122,   123,   124,     4,    48,     6,
+     128,   129,     3,     4,   132,   133,   134,   135,    48,     8,
+      50,   139,   140,     4,     5,   143,   144,   145,   146,   379,
+     147,    50,   150,   151,   152,     3,     4,   155,     6,   157,
+     158,   159,     3,     4,   530,   163,   164,   324,     3,     4,
+     400,     6,   169,   170,    16,   172,    18,    19,     3,     4,
+     178,   179,   180,    25,    26,   183,     3,     4,   186,     6,
+      37,   189,   190,     3,     4,     4,     6,     0,     1,    20,
+     198,     0,     1,   201,   202,   203,     9,    10,    11,    51,
+       9,    10,    11,     4,    17,   213,   214,    48,    17,    50,
+      50,    16,   220,    18,    19,    49,   224,   225,    31,     6,
+      25,    26,    31,    48,    37,    50,     6,    34,    37,     0,
+       1,     3,     4,    16,     6,    18,    19,     6,     9,    10,
+      11,     6,    25,    26,     6,     6,    17,   255,    48,   416,
+      50,    48,     6,    50,   261,   262,    24,   265,   266,   267,
+     268,   269,   270,   271,    49,   456,    37,   434,    51,    48,
+      48,    50,    50,     6,    16,   283,    18,    19,    16,     6,
+      18,    19,     6,    25,   291,     4,   293,    25,    26,     4,
+      12,    13,    14,    15,     4,    48,     6,    50,     6,    51,
+     308,   309,   310,   311,   312,   313,   314,    29,    48,    51,
+      50,   319,    48,    51,    50,    37,    48,    48,    50,    50,
+     328,   329,   330,   331,   332,   333,   334,   335,    48,     6,
+      50,   339,   340,   341,   342,   343,    48,   344,   345,   506,
+     348,    48,    48,    50,    50,    48,    48,    50,    50,    35,
      358,   359,   360,   361,   362,   363,   364,   365,   366,   367,
-     368,   369,   370,    29,   371,   372,    47,    47,    49,    49,
-      49,    37,   380,   381,   382,   383,   384,   385,     4,    48,
-     388,   389,   390,   391,    47,    47,    49,    49,    47,    47,
-      49,    49,    47,     4,    49,   403,   404,   405,   406,   407,
-     408,     4,    47,   411,   412,   413,   414,    47,    47,    49,
-      49,   419,   420,    47,    47,    49,    49,    21,    50,   427,
-     428,    50,    47,   431,    49,   432,   433,     4,     4,   436,
-     437,     4,   599,     6,   442,   443,     4,     4,     6,    48,
-      50,   608,    48,    50,    49,    27,    48,     6,    49,     4,
-      50,     4,     6,    49,    28,     4,    49,    49,     4,    50,
-     467,   468,    50,    48,    50,   472,   473,    48,     6,     6,
-      50,    50,    50,     6,    22,    50,   484,   485,   486,   487,
-     488,   489,   490,   491,    48,    50,    31,    50,    50,    49,
-       4,    49,    49,    49,   502,   503,     4,    48,    50,     6,
-      50,     4,    49,     4,    48,   513,   514,   515,   516,   517,
-     518,   519,   520,    49,    48,    50,     6,    48,    50,    49,
-      49,    32,    50,    49,   532,   533,   534,   535,   536,   537,
-     538,   539,    50,    50,     4,     6,    48,    50,     6,    49,
-      49,   549,   550,   551,   552,   553,   554,   555,   556,    48,
-      50,    48,   560,   561,   562,   563,   564,   565,    50,   566,
-     567,    50,    50,   571,   572,   573,   574,    48,   575,   576,
-      50,     6,    50,     4,    50,     4,     6,   585,   586,   587,
-     588,    50,     4,    50,    48,    50,    48,    50,    33,    50,
-      50,    50,    49,    48,    50,    49,     6,    50,     6,     6,
-       6,     6,     6,     6,    48,     4,     6,    50,    50,     6,
-      48,    50,     4,    50,    48,   289,   260,   234,   426,    28,
-      38,   579,   448,    25,    56
+     368,   369,   370,    51,   371,   372,    48,    48,    50,    50,
+      49,    51,   380,   381,   382,   383,   384,   385,    50,    50,
+     388,   389,   390,   391,    38,    39,    40,    41,    42,    43,
+      44,    45,    46,    47,    51,   403,   404,   405,   406,   407,
+     408,    48,    36,   411,   412,   413,   414,    16,     4,    18,
+      19,   419,   420,     4,    50,     6,    25,     4,     4,   427,
+     428,    49,     4,   431,     6,   432,   433,    48,    21,   436,
+     437,    51,   599,    51,   442,   443,     4,     4,     4,    49,
+      51,   608,    51,    49,    51,    49,    27,    50,    50,     6,
+      51,     4,     6,     4,    28,    50,     4,    51,    50,     4,
+     467,   468,    50,     6,    49,   472,   473,    51,    51,    49,
+      22,     6,    51,    51,    51,    51,   484,   485,   486,   487,
+     488,   489,   490,   491,    49,     6,     4,    51,    51,    51,
+      50,    50,    50,    49,   502,   503,    51,    31,     4,     6,
+      49,    51,     4,    50,    50,   513,   514,   515,   516,   517,
+     518,   519,   520,    50,     6,    51,    49,     4,    49,    51,
+      50,    50,    32,    51,   532,   533,   534,   535,   536,   537,
+     538,   539,    51,    50,     4,    51,    49,     6,     6,    51,
+      51,   549,   550,   551,   552,   553,   554,   555,   556,    50,
+      49,    51,   560,   561,   562,   563,   564,   565,    51,   566,
+     567,    49,    51,   571,   572,   573,   574,    49,   575,   576,
+      51,    50,     6,    51,     4,    51,     4,   585,   586,   587,
+     588,     6,     4,    33,    51,    51,    49,    51,    49,    51,
+       6,    51,    51,    51,    50,    49,    51,    50,     6,    51,
+       6,     6,     6,     6,     6,    49,    51,     4,    51,    49,
+       6,     6,    51,     4,    49,    51,   260,   234,    25,   289,
+       5,    38,   426,    55,   448,   579
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    symbol of state STATE-NUM.  */
 static const yytype_uint8 yystos[] =
 {
-       0,     1,    52,    53,    54,    55,    56,    57,    59,    60,
-       0,     7,    61,    17,   111,   112,   114,   116,   118,   120,
-       1,     9,    10,    11,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    22,   138,   139,
-     140,    47,     8,    62,    47,    49,    49,    47,    49,    47,
-      49,    79,    37,   154,   111,    47,    49,   139,   142,     4,
-      47,    49,    20,    63,    64,    65,    66,     4,     6,   137,
-       4,     6,     4,     3,     4,   156,   157,   157,   157,   157,
-      49,     4,     5,   141,   141,    23,    50,   143,   144,    48,
-       6,     6,    47,    49,    24,    67,     6,     6,     6,     6,
-      38,    39,    40,    41,    42,    43,    44,    45,    46,   157,
-     157,   157,   157,     6,   157,   157,    47,    49,   157,    50,
-     157,   157,   157,    47,    49,    34,    68,     6,     6,   157,
-       6,   155,   157,   157,     4,     4,     6,    48,    50,   157,
-     157,   157,   157,   157,   157,   157,   157,    47,    35,    69,
-       6,     6,   157,   157,    50,   157,     6,   157,   157,   157,
-      50,    49,    49,   157,   157,    48,    50,   157,   157,   157,
-     157,   156,    47,    36,    70,    71,    72,    73,   157,   157,
-     157,     4,    49,   157,     4,     6,   157,   157,   157,   157,
-     157,     4,     4,    50,   156,   156,    48,   156,    47,    21,
-      74,   157,   157,   157,    50,    90,   157,    50,     4,     6,
-     157,     4,     4,   157,   157,    48,    50,    48,    50,    48,
-     157,    49,    27,    75,   157,   157,   157,    49,    12,    13,
+       0,     1,    53,    54,    55,    56,    57,    58,    60,    61,
+       0,     7,    62,    17,   111,   112,   114,   116,   118,   120,
+       1,     9,    10,    11,    78,    79,    80,    81,    82,    83,
+      84,    85,    86,    87,    88,    89,   111,    22,   138,   139,
+     140,    48,     8,    63,    48,    50,    50,    48,    50,    48,
+      50,    80,    37,   154,    48,    50,   139,   142,     4,    48,
+      50,    20,    64,    65,    66,    67,     4,     6,   137,     4,
+       6,     4,     3,     4,   156,   157,   157,   157,   157,    50,
+       4,     5,   141,   141,    23,    51,   143,   144,    49,     6,
+       6,    48,    50,    24,    68,     6,     6,     6,     6,    38,
+      39,    40,    41,    42,    43,    44,    45,    46,    47,   157,
+     157,   157,   157,     6,   157,   157,    48,    50,   157,    51,
+     157,   157,   157,    48,    50,    34,    69,     6,     6,   157,
+       6,   155,   157,   157,     4,     4,     6,    49,    51,   157,
+     157,   157,   157,   157,   157,   157,   157,    48,    35,    70,
+       6,     6,   157,   157,    51,   157,     6,   157,   157,   157,
+      51,    50,    50,   157,   157,    49,    51,   157,   157,   157,
+     157,   156,    48,    36,    71,    72,    73,    74,   157,   157,
+     157,     4,    50,   157,     4,     6,   157,   157,   157,   157,
+     157,     4,     4,    51,   156,   156,    49,   156,    48,    21,
+      75,   157,   157,   157,    51,    90,   157,    51,     4,     6,
+     157,     4,     4,   157,   157,    49,    51,    49,    51,    49,
+     157,    50,    27,    76,   157,   157,   157,    50,    12,    13,
       14,    15,    29,    91,    92,    93,    94,    95,    96,    97,
-      98,    99,   100,   101,   102,   103,   104,     6,    50,     4,
-       6,   137,     4,   157,   157,   157,     4,     6,    49,    28,
-      76,   157,   157,     4,   113,    47,    49,    47,    49,    49,
-      47,    49,    49,    50,    93,   154,   137,    50,     4,    48,
-      50,    48,    50,   157,    50,    50,     6,    47,    49,    58,
-      59,   156,     4,   156,    50,    16,    18,    19,    25,    26,
+      98,    99,   100,   101,   102,   103,   104,     6,    51,     4,
+       6,   137,     4,   157,   157,   157,     4,     6,    50,    28,
+      77,   157,   157,     4,   113,    48,    50,    48,    50,    50,
+      48,    50,    50,    51,    93,   154,   137,    51,     4,    49,
+      51,    49,    51,   157,    51,    51,     6,    48,    50,    59,
+      60,   156,     4,   156,    51,    16,    18,    19,    25,    26,
      122,   123,   124,   130,   131,   132,   135,   136,   157,   157,
-     157,   157,   157,   157,   157,   137,    48,    50,    48,   157,
-      50,     6,     6,    77,   156,    50,   156,    49,    47,    49,
-      49,    49,    47,    49,    47,    49,    50,   123,   154,   157,
-     157,   157,   157,   157,   157,   157,    50,    48,   157,    48,
-      50,    31,   145,   146,   137,    49,     4,   115,   157,   157,
+     157,   157,   157,   157,   157,   137,    49,    51,    49,   157,
+      51,     6,     6,    78,   156,    51,   156,    50,    48,    50,
+      50,    50,    48,    50,    48,    50,    51,   123,   154,   157,
+     157,   157,   157,   157,   157,   157,    51,    49,   157,    49,
+      51,    31,   145,   146,   137,    50,     4,   115,   157,   157,
      157,   157,   157,   157,   157,   157,   157,   157,   157,   157,
-     157,   156,   156,    49,   157,    49,    48,   117,    50,   122,
+     157,   156,   156,    50,   157,    50,    49,   117,    51,   122,
      157,   157,   157,   157,   157,   157,   157,   157,   157,   157,
-     157,   157,   157,   156,     6,   156,   105,    48,    50,    49,
-     122,    49,    50,   157,   157,   157,   157,   157,   157,    48,
-      50,   157,   157,   157,   157,     4,     6,     4,     6,    47,
-      49,   109,   110,    49,   121,    50,   119,   157,   157,     6,
-     157,   157,   157,   157,   157,   157,   157,   157,    50,   137,
-      50,     4,   157,   157,   106,   109,    32,   147,   148,   149,
+     157,   157,   157,   156,     6,   156,   105,    49,    51,    50,
+     122,    50,    51,   157,   157,   157,   157,   157,   157,    49,
+      51,   157,   157,   157,   157,     4,     6,     4,     6,    48,
+      50,   109,   110,    50,   121,    51,   119,   157,   157,     6,
+     157,   157,   157,   157,   157,   157,   157,   157,    51,   137,
+      51,     4,   157,   157,   106,   109,    32,   147,   148,   149,
       16,    18,    19,    25,   125,   126,   127,   128,   129,   133,
      134,   125,   157,   157,     4,     6,   157,   156,   156,   137,
-       4,    50,   156,   156,    48,    50,   157,   157,    30,    50,
-     107,    49,    50,   149,    47,    49,    47,    49,    47,    49,
-      47,    49,    50,   126,   154,    50,    48,    50,    50,     4,
-       6,     6,   156,   156,    48,    50,   156,     4,   156,    48,
-      50,    49,     6,   157,   157,   157,   157,   157,   157,   157,
-     157,    50,     4,     4,     6,   157,   157,   137,    50,     4,
+       4,    51,   156,   156,    49,    51,   157,   157,    30,    51,
+     107,    50,    51,   149,    48,    50,    48,    50,    48,    50,
+      48,    50,    51,   126,   154,    51,    49,    51,    51,     4,
+       6,     6,   156,   156,    49,    51,   156,     4,   156,    49,
+      51,    50,     6,   157,   157,   157,   157,   157,   157,   157,
+     157,    51,     4,     4,     6,   157,   157,   137,    51,     4,
      108,     6,   157,   157,   157,   157,   157,   157,   157,   157,
-      50,    50,     4,    48,    50,    48,    50,   109,    50,   157,
-     157,   157,   157,   157,   157,   157,   157,    50,    50,    49,
+      51,    51,     4,    49,    51,    49,    51,   109,    51,   157,
+     157,   157,   157,   157,   157,   157,   157,    51,    51,    50,
      157,   157,   157,   157,   157,   157,   157,   157,   150,   157,
      157,   157,   157,   157,   157,   156,   156,    33,   151,   152,
-     153,    48,    50,   157,   157,   157,   157,   156,   156,    49,
-      50,   153,     6,     6,   157,   157,   157,   157,     6,     6,
-       6,     6,     6,    48,    50,    50,   137,     4,     6,     6,
-      48,    50,   137,     4,    48,    50
+     153,    49,    51,   157,   157,   157,   157,   156,   156,    50,
+      51,   153,     6,     6,   157,   157,   157,   157,     6,     6,
+       6,     6,     6,    49,    51,    51,   137,     4,     6,     6,
+      49,    51,   137,     4,    49,    51
 };
 
 #define yyerrok		(yyerrstatus = 0)
@@ -1247,7 +1255,6 @@ do								\
     {								\
       yychar = (Token);						\
       yylval = (Value);						\
-      yytoken = YYTRANSLATE (yychar);				\
       YYPOPSTACK (1);						\
       goto yybackup;						\
     }								\
@@ -1289,19 +1296,10 @@ while (YYID (0))
 #endif
 
 
-/* YY_LOCATION_PRINT -- Print the location on the stream.
-   This macro was not mandated originally: define only if we know
-   we won't break user code: when these are the locations we know.  */
+/* This macro is provided for backward compatibility. */
 
 #ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
-#  define YY_LOCATION_PRINT(File, Loc)			\
-     fprintf (File, "%d.%d-%d.%d",			\
-	      (Loc).first_line, (Loc).first_column,	\
-	      (Loc).last_line,  (Loc).last_column)
-# else
-#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
 #endif
 
 
@@ -1493,7 +1491,6 @@ int yydebug;
 # define YYMAXDEPTH 10000
 #endif
 
-

 
 #if YYERROR_VERBOSE
 
@@ -1596,115 +1593,142 @@ yytnamerr (char *yyres, const char *yystr)
 }
 # endif
 
-/* Copy into YYRESULT an error message about the unexpected token
-   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
-   including the terminating null byte.  If YYRESULT is null, do not
-   copy anything; just return the number of bytes that would be
-   copied.  As a special case, return 0 if an ordinary "syntax error"
-   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
-   size calculation.  */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
-{
-  int yyn = yypact[yystate];
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+   about the unexpected token YYTOKEN for the state stack whose top is
+   YYSSP.
 
-  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
-    return 0;
-  else
-    {
-      int yytype = YYTRANSLATE (yychar);
-      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
-      YYSIZE_T yysize = yysize0;
-      YYSIZE_T yysize1;
-      int yysize_overflow = 0;
-      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
-      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
-      int yyx;
-
-# if 0
-      /* This is so xgettext sees the translatable formats that are
-	 constructed on the fly.  */
-      YY_("syntax error, unexpected %s");
-      YY_("syntax error, unexpected %s, expecting %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
-      char *yyfmt;
-      char const *yyf;
-      static char const yyunexpected[] = "syntax error, unexpected %s";
-      static char const yyexpecting[] = ", expecting %s";
-      static char const yyor[] = " or %s";
-      char yyformat[sizeof yyunexpected
-		    + sizeof yyexpecting - 1
-		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
-		       * (sizeof yyor - 1))];
-      char const *yyprefix = yyexpecting;
-
-      /* Start YYX at -YYN if negative to avoid negative indexes in
-	 YYCHECK.  */
-      int yyxbegin = yyn < 0 ? -yyn : 0;
-
-      /* Stay within bounds of both yycheck and yytname.  */
-      int yychecklim = YYLAST - yyn + 1;
-      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
-      int yycount = 1;
-
-      yyarg[0] = yytname[yytype];
-      yyfmt = yystpcpy (yyformat, yyunexpected);
-
-      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
-	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-	  {
-	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
-	      {
-		yycount = 1;
-		yysize = yysize0;
-		yyformat[sizeof yyunexpected - 1] = '\0';
-		break;
-	      }
-	    yyarg[yycount++] = yytname[yyx];
-	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
-	    yysize_overflow |= (yysize1 < yysize);
-	    yysize = yysize1;
-	    yyfmt = yystpcpy (yyfmt, yyprefix);
-	    yyprefix = yyor;
-	  }
+   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
+   not large enough to hold the message.  In that case, also set
+   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
+   required number of bytes is too large to store.  */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+                yytype_int16 *yyssp, int yytoken)
+{
+  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
+  YYSIZE_T yysize = yysize0;
+  YYSIZE_T yysize1;
+  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+  /* Internationalized format string. */
+  const char *yyformat = 0;
+  /* Arguments of yyformat. */
+  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+  /* Number of reported tokens (one for the "unexpected", one per
+     "expected"). */
+  int yycount = 0;
+
+  /* There are many possibilities here to consider:
+     - Assume YYFAIL is not used.  It's too flawed to consider.  See
+       <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
+       for details.  YYERROR is fine as it does not invoke this
+       function.
+     - If this state is a consistent state with a default action, then
+       the only way this function was invoked is if the default action
+       is an error action.  In that case, don't check for expected
+       tokens because there are none.
+     - The only way there can be no lookahead present (in yychar) is if
+       this state is a consistent state with a default action.  Thus,
+       detecting the absence of a lookahead is sufficient to determine
+       that there is no unexpected or expected token to report.  In that
+       case, just report a simple "syntax error".
+     - Don't assume there isn't a lookahead just because this state is a
+       consistent state with a default action.  There might have been a
+       previous inconsistent state, consistent state with a non-default
+       action, or user semantic action that manipulated yychar.
+     - Of course, the expected token list depends on states to have
+       correct lookahead information, and it depends on the parser not
+       to perform extra reductions after fetching a lookahead from the
+       scanner and before detecting a syntax error.  Thus, state merging
+       (from LALR or IELR) and default reductions corrupt the expected
+       token list.  However, the list is correct for canonical LR with
+       one exception: it will still contain any token that will not be
+       accepted due to an error action in a later state.
+  */
+  if (yytoken != YYEMPTY)
+    {
+      int yyn = yypact[*yyssp];
+      yyarg[yycount++] = yytname[yytoken];
+      if (!yypact_value_is_default (yyn))
+        {
+          /* Start YYX at -YYN if negative to avoid negative indexes in
+             YYCHECK.  In other words, skip the first -YYN actions for
+             this state because they are default actions.  */
+          int yyxbegin = yyn < 0 ? -yyn : 0;
+          /* Stay within bounds of both yycheck and yytname.  */
+          int yychecklim = YYLAST - yyn + 1;
+          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+          int yyx;
+
+          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+                && !yytable_value_is_error (yytable[yyx + yyn]))
+              {
+                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+                  {
+                    yycount = 1;
+                    yysize = yysize0;
+                    break;
+                  }
+                yyarg[yycount++] = yytname[yyx];
+                yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+                if (! (yysize <= yysize1
+                       && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+                  return 2;
+                yysize = yysize1;
+              }
+        }
+    }
 
-      yyf = YY_(yyformat);
-      yysize1 = yysize + yystrlen (yyf);
-      yysize_overflow |= (yysize1 < yysize);
-      yysize = yysize1;
+  switch (yycount)
+    {
+# define YYCASE_(N, S)                      \
+      case N:                               \
+        yyformat = S;                       \
+      break
+      YYCASE_(0, YY_("syntax error"));
+      YYCASE_(1, YY_("syntax error, unexpected %s"));
+      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+    }
 
-      if (yysize_overflow)
-	return YYSIZE_MAXIMUM;
+  yysize1 = yysize + yystrlen (yyformat);
+  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+    return 2;
+  yysize = yysize1;
 
-      if (yyresult)
-	{
-	  /* Avoid sprintf, as that infringes on the user's name space.
-	     Don't have undefined behavior even if the translation
-	     produced a string with the wrong number of "%s"s.  */
-	  char *yyp = yyresult;
-	  int yyi = 0;
-	  while ((*yyp = *yyf) != '\0')
-	    {
-	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
-		{
-		  yyp += yytnamerr (yyp, yyarg[yyi++]);
-		  yyf += 2;
-		}
-	      else
-		{
-		  yyp++;
-		  yyf++;
-		}
-	    }
-	}
-      return yysize;
+  if (*yymsg_alloc < yysize)
+    {
+      *yymsg_alloc = 2 * yysize;
+      if (! (yysize <= *yymsg_alloc
+             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+      return 1;
     }
+
+  /* Avoid sprintf, as that infringes on the user's name space.
+     Don't have undefined behavior even if the translation
+     produced a string with the wrong number of "%s"s.  */
+  {
+    char *yyp = *yymsg;
+    int yyi = 0;
+    while ((*yyp = *yyformat) != '\0')
+      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+        {
+          yyp += yytnamerr (yyp, yyarg[yyi++]);
+          yyformat += 2;
+        }
+      else
+        {
+          yyp++;
+          yyformat++;
+        }
+  }
+  return 0;
 }
 #endif /* YYERROR_VERBOSE */
-

 
 /*-----------------------------------------------.
 | Release the memory associated to this symbol.  |
@@ -1737,6 +1761,7 @@ yydestruct (yymsg, yytype, yyvaluep)
     }
 }
 
+
 /* Prevent warnings from -Wmissing-prototypes.  */
 #ifdef YYPARSE_PARAM
 #if defined __STDC__ || defined __cplusplus
@@ -1763,10 +1788,9 @@ YYSTYPE yylval;
 int yynerrs;
 
 
-
-/*-------------------------.
-| yyparse or yypush_parse.  |
-`-------------------------*/
+/*----------.
+| yyparse.  |
+`----------*/
 
 #ifdef YYPARSE_PARAM
 #if (defined __STDC__ || defined __C99__FUNC__ \
@@ -1790,8 +1814,6 @@ yyparse ()
 #endif
 #endif
 {
-
-
     int yystate;
     /* Number of tokens to shift before error messages enabled.  */
     int yyerrstatus;
@@ -1946,7 +1968,7 @@ yybackup:
 
   /* First try to decide what to do without reference to lookahead token.  */
   yyn = yypact[yystate];
-  if (yyn == YYPACT_NINF)
+  if (yypact_value_is_default (yyn))
     goto yydefault;
 
   /* Not known => get a lookahead token if don't already have one.  */
@@ -1977,8 +1999,8 @@ yybackup:
   yyn = yytable[yyn];
   if (yyn <= 0)
     {
-      if (yyn == 0 || yyn == YYTABLE_NINF)
-	goto yyerrlab;
+      if (yytable_value_is_error (yyn))
+        goto yyerrlab;
       yyn = -yyn;
       goto yyreduce;
     }
@@ -2033,15 +2055,15 @@ yyreduce:
     {
         case 5:
 
-/* Line 1464 of yacc.c  */
-#line 140 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 137 "parse_y.y"
     { YYABORT; }
     break;
 
   case 6:
 
-/* Line 1464 of yacc.c  */
-#line 164 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 161 "parse_y.y"
     {
 					/* reset flags for 'used layers';
 					 * init font and data pointers
@@ -2050,7 +2072,7 @@ yyreduce:
 
 				if (!yyPCB)
 				{
-					Message("illegal fileformat\n");
+					Message(_("illegal fileformat\n"));
 					YYABORT;
 				}
 				for (i = 0; i < MAX_LAYER + 2; i++)
@@ -2065,17 +2087,17 @@ yyreduce:
 
   case 7:
 
-/* Line 1464 of yacc.c  */
-#line 196 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 193 "parse_y.y"
     {
-			  PCBTypePtr pcb_save = PCB;
+			  PCBType *pcb_save = PCB;
 
 			  if (layer_group_string == NULL)
 			    layer_group_string = Settings.Groups;
 			  CreateNewPCBPost (yyPCB, 0);
 			  if (ParseGroupString(layer_group_string, &yyPCB->LayerGroups, yyData->LayerN))
 			    {
-			      Message("illegal layer-group string\n");
+			      Message(_("illegal layer-group string\n"));
 			      YYABORT;
 			    }
 			/* initialize the polygon clipping now since
@@ -2093,16 +2115,16 @@ yyreduce:
 
   case 8:
 
-/* Line 1464 of yacc.c  */
-#line 219 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 216 "parse_y.y"
     { PreLoadElementPCB ();
 		    layer_group_string = NULL; }
     break;
 
   case 9:
 
-/* Line 1464 of yacc.c  */
-#line 222 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 219 "parse_y.y"
     { LayerFlag[0] = true;
 		    LayerFlag[1] = true;
 		    yyData->LayerN = 2;
@@ -2112,8 +2134,8 @@ yyreduce:
 
   case 10:
 
-/* Line 1464 of yacc.c  */
-#line 230 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 227 "parse_y.y"
     {
 					/* reset flags for 'used layers';
 					 * init font and data pointers
@@ -2122,7 +2144,7 @@ yyreduce:
 
 				if (!yyData || !yyFont)
 				{
-					Message("illegal fileformat\n");
+					Message(_("illegal fileformat\n"));
 					YYABORT;
 				}
 				for (i = 0; i < MAX_LAYER + 2; i++)
@@ -2133,15 +2155,15 @@ yyreduce:
 
   case 14:
 
-/* Line 1464 of yacc.c  */
-#line 255 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 252 "parse_y.y"
     {
 					/* mark all symbols invalid */
 				int	i;
 
 				if (!yyFont)
 				{
-					Message("illegal fileformat\n");
+					Message(_("illegal fileformat\n"));
 					YYABORT;
 				}
 				yyFont->Valid = false;
@@ -2153,8 +2175,8 @@ yyreduce:
 
   case 15:
 
-/* Line 1464 of yacc.c  */
-#line 270 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 267 "parse_y.y"
     {
 				yyFont->Valid = true;
 		  		SetFontInfo(yyFont);
@@ -2163,8 +2185,8 @@ yyreduce:
 
   case 17:
 
-/* Line 1464 of yacc.c  */
-#line 298 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 295 "parse_y.y"
     {
   if (check_file_version ((yyvsp[(3) - (4)].integer)) != 0)
     {
@@ -2175,8 +2197,8 @@ yyreduce:
 
   case 18:
 
-/* Line 1464 of yacc.c  */
-#line 328 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 325 "parse_y.y"
     {
 				yyPCB->Name = (yyvsp[(3) - (4)].string);
 				yyPCB->MaxWidth = MAX_COORD;
@@ -2186,8 +2208,8 @@ yyreduce:
 
   case 19:
 
-/* Line 1464 of yacc.c  */
-#line 334 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 331 "parse_y.y"
     {
 				yyPCB->Name = (yyvsp[(3) - (6)].string);
 				yyPCB->MaxWidth = OU ((yyvsp[(4) - (6)].measure));
@@ -2197,8 +2219,8 @@ yyreduce:
 
   case 20:
 
-/* Line 1464 of yacc.c  */
-#line 340 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 337 "parse_y.y"
     {
 				yyPCB->Name = (yyvsp[(3) - (6)].string);
 				yyPCB->MaxWidth = NU ((yyvsp[(4) - (6)].measure));
@@ -2208,8 +2230,8 @@ yyreduce:
 
   case 24:
 
-/* Line 1464 of yacc.c  */
-#line 374 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 371 "parse_y.y"
     {
 				yyPCB->Grid = OU ((yyvsp[(3) - (6)].measure));
 				yyPCB->GridOffsetX = OU ((yyvsp[(4) - (6)].measure));
@@ -2219,8 +2241,8 @@ yyreduce:
 
   case 25:
 
-/* Line 1464 of yacc.c  */
-#line 382 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 379 "parse_y.y"
     {
 				yyPCB->Grid = OU ((yyvsp[(3) - (7)].measure));
 				yyPCB->GridOffsetX = OU ((yyvsp[(4) - (7)].measure));
@@ -2234,8 +2256,8 @@ yyreduce:
 
   case 26:
 
-/* Line 1464 of yacc.c  */
-#line 395 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 392 "parse_y.y"
     {
 				yyPCB->Grid = NU ((yyvsp[(3) - (7)].measure));
 				yyPCB->GridOffsetX = NU ((yyvsp[(4) - (7)].measure));
@@ -2249,30 +2271,28 @@ yyreduce:
 
   case 27:
 
-/* Line 1464 of yacc.c  */
-#line 427 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 428 "parse_y.y"
     {
 				yyPCB->CursorX = OU ((yyvsp[(3) - (6)].measure));
 				yyPCB->CursorY = OU ((yyvsp[(4) - (6)].measure));
-				yyPCB->Zoom = (yyvsp[(5) - (6)].number)*2;
 			}
     break;
 
   case 28:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 433 "parse_y.y"
     {
 				yyPCB->CursorX = NU ((yyvsp[(3) - (6)].measure));
 				yyPCB->CursorY = NU ((yyvsp[(4) - (6)].measure));
-				yyPCB->Zoom = (yyvsp[(5) - (6)].number);
 			}
     break;
 
   case 31:
 
-/* Line 1464 of yacc.c  */
-#line 457 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 456 "parse_y.y"
     {
 				/* Read in cmil^2 for now; in future this should be a noop. */
 				yyPCB->IsleArea = MIL_TO_COORD (MIL_TO_COORD ((yyvsp[(3) - (4)].number)) / 100.0) / 100.0;
@@ -2281,8 +2301,8 @@ yyreduce:
 
   case 33:
 
-/* Line 1464 of yacc.c  */
-#line 484 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 483 "parse_y.y"
     {
 				yyPCB->ThermScale = (yyvsp[(3) - (4)].number);
 			}
@@ -2290,8 +2310,8 @@ yyreduce:
 
   case 38:
 
-/* Line 1464 of yacc.c  */
-#line 523 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 522 "parse_y.y"
     {
 				yyPCB->Bloat = NU ((yyvsp[(3) - (6)].measure));
 				yyPCB->Shrink = NU ((yyvsp[(4) - (6)].measure));
@@ -2302,8 +2322,8 @@ yyreduce:
 
   case 39:
 
-/* Line 1464 of yacc.c  */
-#line 533 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 532 "parse_y.y"
     {
 				yyPCB->Bloat = NU ((yyvsp[(3) - (7)].measure));
 				yyPCB->Shrink = NU ((yyvsp[(4) - (7)].measure));
@@ -2315,8 +2335,8 @@ yyreduce:
 
   case 40:
 
-/* Line 1464 of yacc.c  */
-#line 544 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 543 "parse_y.y"
     {
 				yyPCB->Bloat = NU ((yyvsp[(3) - (9)].measure));
 				yyPCB->Shrink = NU ((yyvsp[(4) - (9)].measure));
@@ -2329,8 +2349,8 @@ yyreduce:
 
   case 41:
 
-/* Line 1464 of yacc.c  */
-#line 571 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 570 "parse_y.y"
     {
 				yyPCB->Flags = MakeFlags ((yyvsp[(3) - (4)].integer) & PCB_FLAGS);
 			}
@@ -2338,8 +2358,8 @@ yyreduce:
 
   case 42:
 
-/* Line 1464 of yacc.c  */
-#line 575 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 574 "parse_y.y"
     {
 			  yyPCB->Flags = string_to_pcbflags ((yyvsp[(3) - (4)].string), yyerror);
 			}
@@ -2347,8 +2367,8 @@ yyreduce:
 
   case 44:
 
-/* Line 1464 of yacc.c  */
-#line 607 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 606 "parse_y.y"
     {
 			  layer_group_string = (yyvsp[(3) - (4)].string);
 			}
@@ -2356,12 +2376,12 @@ yyreduce:
 
   case 46:
 
-/* Line 1464 of yacc.c  */
-#line 655 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 654 "parse_y.y"
     {
 				if (ParseRouteString((yyvsp[(3) - (4)].string), &yyPCB->RouteStyle[0], "mil"))
 				{
-					Message("illegal route-style string\n");
+					Message(_("illegal route-style string\n"));
 					YYABORT;
 				}
 			}
@@ -2369,12 +2389,12 @@ yyreduce:
 
   case 47:
 
-/* Line 1464 of yacc.c  */
-#line 663 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 662 "parse_y.y"
     {
 				if (ParseRouteString((yyvsp[(3) - (4)].string), &yyPCB->RouteStyle[0], "cmil"))
 				{
-					Message("illegal route-style string\n");
+					Message(_("illegal route-style string\n"));
 					YYABORT;
 				}
 			}
@@ -2382,34 +2402,22 @@ yyreduce:
 
   case 54:
 
-/* Line 1464 of yacc.c  */
-#line 685 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 684 "parse_y.y"
     { attr_list = & yyPCB->Attributes; }
     break;
 
-  case 58:
+  case 59:
 
-/* Line 1464 of yacc.c  */
-#line 689 "parse_y.y"
-    {
-					/* clear pointer to force memory allocation by 
-					 * the appropriate subroutine
-					 */
-				yyElement = NULL;
-			}
-    break;
-
-  case 60:
-
-/* Line 1464 of yacc.c  */
-#line 696 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 688 "parse_y.y"
     { YYABORT; }
     break;
 
-  case 66:
+  case 65:
 
-/* Line 1464 of yacc.c  */
-#line 741 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 733 "parse_y.y"
     {
 				CreateNewVia(yyData, NU ((yyvsp[(3) - (11)].measure)), NU ((yyvsp[(4) - (11)].measure)), NU ((yyvsp[(5) - (11)].measure)), NU ((yyvsp[(6) - (11)].measure)), NU ((yyvsp[(7) - (11)].measure)),
 				                     NU ((yyvsp[(8) - (11)].measure)), (yyvsp[(9) - (11)].string), (yyvsp[(10) - (11)].flagtype));
@@ -2417,10 +2425,10 @@ yyreduce:
 			}
     break;
 
-  case 67:
+  case 66:
 
-/* Line 1464 of yacc.c  */
-#line 751 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 743 "parse_y.y"
     {
 				CreateNewVia(yyData, OU ((yyvsp[(3) - (11)].measure)), OU ((yyvsp[(4) - (11)].measure)), OU ((yyvsp[(5) - (11)].measure)), OU ((yyvsp[(6) - (11)].measure)), OU ((yyvsp[(7) - (11)].measure)), OU ((yyvsp[(8) - (11)].measure)), (yyvsp[(9) - (11)].string),
 					OldFlags((yyvsp[(10) - (11)].integer)));
@@ -2428,10 +2436,10 @@ yyreduce:
 			}
     break;
 
-  case 68:
+  case 67:
 
-/* Line 1464 of yacc.c  */
-#line 762 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 754 "parse_y.y"
     {
 				CreateNewVia(yyData, OU ((yyvsp[(3) - (10)].measure)), OU ((yyvsp[(4) - (10)].measure)), OU ((yyvsp[(5) - (10)].measure)), OU ((yyvsp[(6) - (10)].measure)),
 					     OU ((yyvsp[(5) - (10)].measure)) + OU((yyvsp[(6) - (10)].measure)), OU ((yyvsp[(7) - (10)].measure)), (yyvsp[(8) - (10)].string), OldFlags((yyvsp[(9) - (10)].integer)));
@@ -2439,10 +2447,10 @@ yyreduce:
 			}
     break;
 
-  case 69:
+  case 68:
 
-/* Line 1464 of yacc.c  */
-#line 772 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 764 "parse_y.y"
     {
 				CreateNewVia(yyData, OU ((yyvsp[(3) - (9)].measure)), OU ((yyvsp[(4) - (9)].measure)), OU ((yyvsp[(5) - (9)].measure)), 2*GROUNDPLANEFRAME,
 					OU((yyvsp[(5) - (9)].measure)) + 2*MASKFRAME,  OU ((yyvsp[(6) - (9)].measure)), (yyvsp[(7) - (9)].string), OldFlags((yyvsp[(8) - (9)].integer)));
@@ -2450,10 +2458,10 @@ yyreduce:
 			}
     break;
 
-  case 70:
+  case 69:
 
-/* Line 1464 of yacc.c  */
-#line 782 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 774 "parse_y.y"
     {
 				Coord	hole = (OU((yyvsp[(5) - (8)].measure)) * DEFAULT_DRILLINGHOLE);
 
@@ -2468,30 +2476,30 @@ yyreduce:
 			}
     break;
 
-  case 71:
+  case 70:
 
-/* Line 1464 of yacc.c  */
-#line 818 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 810 "parse_y.y"
     {
 				CreateNewRat(yyData, NU ((yyvsp[(3) - (10)].measure)), NU ((yyvsp[(4) - (10)].measure)), NU ((yyvsp[(6) - (10)].measure)), NU ((yyvsp[(7) - (10)].measure)), (yyvsp[(5) - (10)].integer), (yyvsp[(8) - (10)].integer),
 					Settings.RatThickness, (yyvsp[(9) - (10)].flagtype));
 			}
     break;
 
-  case 72:
+  case 71:
 
-/* Line 1464 of yacc.c  */
-#line 823 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 815 "parse_y.y"
     {
 				CreateNewRat(yyData, OU ((yyvsp[(3) - (10)].measure)), OU ((yyvsp[(4) - (10)].measure)), OU ((yyvsp[(6) - (10)].measure)), OU ((yyvsp[(7) - (10)].measure)), (yyvsp[(5) - (10)].integer), (yyvsp[(8) - (10)].integer),
 					Settings.RatThickness, OldFlags((yyvsp[(9) - (10)].integer)));
 			}
     break;
 
-  case 73:
+  case 72:
 
-/* Line 1464 of yacc.c  */
-#line 854 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 846 "parse_y.y"
     {
 				if ((yyvsp[(3) - (7)].integer) <= 0 || (yyvsp[(3) - (7)].integer) > MAX_LAYER + 2)
 				{
@@ -2507,53 +2515,55 @@ yyreduce:
 
 					/* memory for name is already allocated */
 				Layer->Name = (yyvsp[(4) - (7)].string);
+                         	if (Layer->Name == NULL)
+                                   Layer->Name = strdup("");
 				LayerFlag[(yyvsp[(3) - (7)].integer)-1] = true;
 				if (yyData->LayerN + 2 < (yyvsp[(3) - (7)].integer))
 				  yyData->LayerN = (yyvsp[(3) - (7)].integer) - 2;
 			}
     break;
 
-  case 85:
+  case 84:
 
-/* Line 1464 of yacc.c  */
-#line 895 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 889 "parse_y.y"
     {
 				CreateNewPolygonFromRectangle(Layer,
 					OU ((yyvsp[(3) - (8)].measure)), OU ((yyvsp[(4) - (8)].measure)), OU ((yyvsp[(3) - (8)].measure)) + OU ((yyvsp[(5) - (8)].measure)), OU ((yyvsp[(4) - (8)].measure)) + OU ((yyvsp[(6) - (8)].measure)), OldFlags((yyvsp[(7) - (8)].integer)));
 			}
     break;
 
-  case 89:
+  case 88:
 
-/* Line 1464 of yacc.c  */
-#line 902 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 896 "parse_y.y"
     { attr_list = & Layer->Attributes; }
     break;
 
-  case 92:
+  case 91:
 
-/* Line 1464 of yacc.c  */
-#line 934 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 928 "parse_y.y"
     {
 				CreateNewLineOnLayer(Layer, NU ((yyvsp[(3) - (10)].measure)), NU ((yyvsp[(4) - (10)].measure)), NU ((yyvsp[(5) - (10)].measure)), NU ((yyvsp[(6) - (10)].measure)),
 				                            NU ((yyvsp[(7) - (10)].measure)), NU ((yyvsp[(8) - (10)].measure)), (yyvsp[(9) - (10)].flagtype));
 			}
     break;
 
-  case 93:
+  case 92:
 
-/* Line 1464 of yacc.c  */
-#line 943 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 937 "parse_y.y"
     {
 				CreateNewLineOnLayer(Layer, OU ((yyvsp[(3) - (10)].measure)), OU ((yyvsp[(4) - (10)].measure)), OU ((yyvsp[(5) - (10)].measure)), OU ((yyvsp[(6) - (10)].measure)),
 						     OU ((yyvsp[(7) - (10)].measure)), OU ((yyvsp[(8) - (10)].measure)), OldFlags((yyvsp[(9) - (10)].integer)));
 			}
     break;
 
-  case 94:
+  case 93:
 
-/* Line 1464 of yacc.c  */
-#line 952 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 946 "parse_y.y"
     {
 				/* eliminate old-style rat-lines */
 			if ((IV ((yyvsp[(8) - (9)].measure)) & RATFLAG) == 0)
@@ -2562,40 +2572,40 @@ yyreduce:
 			}
     break;
 
-  case 95:
+  case 94:
 
-/* Line 1464 of yacc.c  */
-#line 1000 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 994 "parse_y.y"
     {
 			  CreateNewArcOnLayer(Layer, NU ((yyvsp[(3) - (12)].measure)), NU ((yyvsp[(4) - (12)].measure)), NU ((yyvsp[(5) - (12)].measure)), NU ((yyvsp[(6) - (12)].measure)), (yyvsp[(9) - (12)].number), (yyvsp[(10) - (12)].number),
 			                             NU ((yyvsp[(7) - (12)].measure)), NU ((yyvsp[(8) - (12)].measure)), (yyvsp[(11) - (12)].flagtype));
 			}
     break;
 
-  case 96:
+  case 95:
 
-/* Line 1464 of yacc.c  */
-#line 1009 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1003 "parse_y.y"
     {
 				CreateNewArcOnLayer(Layer, OU ((yyvsp[(3) - (12)].measure)), OU ((yyvsp[(4) - (12)].measure)), OU ((yyvsp[(5) - (12)].measure)), OU ((yyvsp[(6) - (12)].measure)), (yyvsp[(9) - (12)].number), (yyvsp[(10) - (12)].number),
 						    OU ((yyvsp[(7) - (12)].measure)), OU ((yyvsp[(8) - (12)].measure)), OldFlags((yyvsp[(11) - (12)].integer)));
 			}
     break;
 
-  case 97:
+  case 96:
 
-/* Line 1464 of yacc.c  */
-#line 1018 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1012 "parse_y.y"
     {
 				CreateNewArcOnLayer(Layer, OU ((yyvsp[(3) - (11)].measure)), OU ((yyvsp[(4) - (11)].measure)), OU ((yyvsp[(5) - (11)].measure)), OU ((yyvsp[(5) - (11)].measure)), IV ((yyvsp[(8) - (11)].measure)), (yyvsp[(9) - (11)].number),
 					OU ((yyvsp[(7) - (11)].measure)), 200*GROUNDPLANEFRAME, OldFlags((yyvsp[(10) - (11)].integer)));
 			}
     break;
 
-  case 98:
+  case 97:
 
-/* Line 1464 of yacc.c  */
-#line 1055 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1049 "parse_y.y"
     {
 					/* use a default scale of 100% */
 				CreateNewText(Layer,yyFont,OU ((yyvsp[(3) - (8)].measure)), OU ((yyvsp[(4) - (8)].measure)), (yyvsp[(5) - (8)].number), 100, (yyvsp[(6) - (8)].string), OldFlags((yyvsp[(7) - (8)].integer)));
@@ -2603,14 +2613,14 @@ yyreduce:
 			}
     break;
 
-  case 99:
+  case 98:
 
-/* Line 1464 of yacc.c  */
-#line 1065 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1059 "parse_y.y"
     {
 				if ((yyvsp[(8) - (9)].integer) & ONSILKFLAG)
 				{
-					LayerTypePtr lay = &yyData->Layer[yyData->LayerN +
+					LayerType *lay = &yyData->Layer[yyData->LayerN +
 						(((yyvsp[(8) - (9)].integer) & ONSOLDERFLAG) ? SOLDER_LAYER : COMPONENT_LAYER)];
 
 					CreateNewText(lay ,yyFont, OU ((yyvsp[(3) - (9)].measure)), OU ((yyvsp[(4) - (9)].measure)), (yyvsp[(5) - (9)].number), (yyvsp[(6) - (9)].number), (yyvsp[(7) - (9)].string),
@@ -2623,10 +2633,10 @@ yyreduce:
 			}
     break;
 
-  case 100:
+  case 99:
 
-/* Line 1464 of yacc.c  */
-#line 1083 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1077 "parse_y.y"
     {
 				/* FIXME: shouldn't know about .f */
 				/* I don't think this matters because anything with hi_format
@@ -2637,7 +2647,7 @@ yyreduce:
 				 */
 				if ((yyvsp[(8) - (9)].flagtype).f & ONSILKFLAG)
 				{
-					LayerTypePtr lay = &yyData->Layer[yyData->LayerN +
+					LayerType *lay = &yyData->Layer[yyData->LayerN +
 						(((yyvsp[(8) - (9)].flagtype).f & ONSOLDERFLAG) ? SOLDER_LAYER : COMPONENT_LAYER)];
 
 					CreateNewText(lay, yyFont, NU ((yyvsp[(3) - (9)].measure)), NU ((yyvsp[(4) - (9)].measure)), (yyvsp[(5) - (9)].number), (yyvsp[(6) - (9)].number), (yyvsp[(7) - (9)].string), (yyvsp[(8) - (9)].flagtype));
@@ -2648,19 +2658,19 @@ yyreduce:
 			}
     break;
 
-  case 101:
+  case 100:
 
-/* Line 1464 of yacc.c  */
-#line 1132 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1126 "parse_y.y"
     {
 				Polygon = CreateNewPolygon(Layer, (yyvsp[(3) - (5)].flagtype));
 			}
     break;
 
-  case 102:
+  case 101:
 
-/* Line 1464 of yacc.c  */
-#line 1137 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1131 "parse_y.y"
     {
 				Cardinal contour, contour_start, contour_end;
 				bool bad_contour_found = false;
@@ -2678,9 +2688,10 @@ yyreduce:
 
 				if (bad_contour_found)
 				  {
-				    Message("WARNING parsing file '%s'\n"
+				    Message(_("WARNING parsing file '%s'\n"
 					    "    line:        %i\n"
-					    "    description: 'ignored polygon (< 3 points in a contour)'\n",
+					    "    description: 'ignored polygon "
+					    "(< 3 points in a contour)'\n"),
 					    yyfilename, yylineno);
 				    DestroyObject(yyData, POLYGON_TYPE, Layer, Polygon, Polygon);
 				  }
@@ -2694,39 +2705,39 @@ yyreduce:
 			}
     break;
 
-  case 105:
+  case 104:
 
-/* Line 1464 of yacc.c  */
-#line 1177 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1172 "parse_y.y"
     {
 				CreateNewHoleInPolygon (Polygon);
 			}
     break;
 
-  case 109:
+  case 108:
 
-/* Line 1464 of yacc.c  */
-#line 1191 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1186 "parse_y.y"
     {
 				CreateNewPointInPolygon(Polygon, OU ((yyvsp[(2) - (4)].measure)), OU ((yyvsp[(3) - (4)].measure)));
 			}
     break;
 
-  case 110:
+  case 109:
 
-/* Line 1464 of yacc.c  */
-#line 1195 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1190 "parse_y.y"
     {
 				CreateNewPointInPolygon(Polygon, NU ((yyvsp[(2) - (4)].measure)), NU ((yyvsp[(3) - (4)].measure)));
 			}
     break;
 
-  case 116:
+  case 115:
 
-/* Line 1464 of yacc.c  */
-#line 1266 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1261 "parse_y.y"
     {
-				yyElement = CreateNewElement(yyData, yyElement, yyFont, NoFlags(),
+				yyElement = CreateNewElement(yyData, yyFont, NoFlags(),
 					(yyvsp[(3) - (9)].string), (yyvsp[(4) - (9)].string), NULL, OU ((yyvsp[(5) - (9)].measure)), OU ((yyvsp[(6) - (9)].measure)), (yyvsp[(7) - (9)].integer), 100, NoFlags(), false);
 				free ((yyvsp[(3) - (9)].string));
 				free ((yyvsp[(4) - (9)].string));
@@ -2734,21 +2745,21 @@ yyreduce:
 			}
     break;
 
-  case 117:
+  case 116:
 
-/* Line 1464 of yacc.c  */
-#line 1274 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1269 "parse_y.y"
     {
 				SetElementBoundingBox(yyData, yyElement, yyFont);
 			}
     break;
 
-  case 118:
+  case 117:
 
-/* Line 1464 of yacc.c  */
-#line 1284 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1279 "parse_y.y"
     {
-				yyElement = CreateNewElement(yyData, yyElement, yyFont, OldFlags((yyvsp[(3) - (12)].integer)),
+				yyElement = CreateNewElement(yyData, yyFont, OldFlags((yyvsp[(3) - (12)].integer)),
 					(yyvsp[(4) - (12)].string), (yyvsp[(5) - (12)].string), NULL, OU ((yyvsp[(6) - (12)].measure)), OU ((yyvsp[(7) - (12)].measure)), IV ((yyvsp[(8) - (12)].measure)), IV ((yyvsp[(9) - (12)].measure)), OldFlags((yyvsp[(10) - (12)].integer)), false);
 				free ((yyvsp[(4) - (12)].string));
 				free ((yyvsp[(5) - (12)].string));
@@ -2756,21 +2767,21 @@ yyreduce:
 			}
     break;
 
-  case 119:
+  case 118:
 
-/* Line 1464 of yacc.c  */
-#line 1292 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1287 "parse_y.y"
     {
 				SetElementBoundingBox(yyData, yyElement, yyFont);
 			}
     break;
 
-  case 120:
+  case 119:
 
-/* Line 1464 of yacc.c  */
-#line 1302 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1297 "parse_y.y"
     {
-				yyElement = CreateNewElement(yyData, yyElement, yyFont, OldFlags((yyvsp[(3) - (13)].integer)),
+				yyElement = CreateNewElement(yyData, yyFont, OldFlags((yyvsp[(3) - (13)].integer)),
 					(yyvsp[(4) - (13)].string), (yyvsp[(5) - (13)].string), (yyvsp[(6) - (13)].string), OU ((yyvsp[(7) - (13)].measure)), OU ((yyvsp[(8) - (13)].measure)), IV ((yyvsp[(9) - (13)].measure)), IV ((yyvsp[(10) - (13)].measure)), OldFlags((yyvsp[(11) - (13)].integer)), false);
 				free ((yyvsp[(4) - (13)].string));
 				free ((yyvsp[(5) - (13)].string));
@@ -2779,21 +2790,21 @@ yyreduce:
 			}
     break;
 
-  case 121:
+  case 120:
 
-/* Line 1464 of yacc.c  */
-#line 1311 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1306 "parse_y.y"
     {
 				SetElementBoundingBox(yyData, yyElement, yyFont);
 			}
     break;
 
-  case 122:
+  case 121:
 
-/* Line 1464 of yacc.c  */
-#line 1322 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1317 "parse_y.y"
     {
-				yyElement = CreateNewElement(yyData, yyElement, yyFont, OldFlags((yyvsp[(3) - (15)].integer)),
+				yyElement = CreateNewElement(yyData, yyFont, OldFlags((yyvsp[(3) - (15)].integer)),
 					(yyvsp[(4) - (15)].string), (yyvsp[(5) - (15)].string), (yyvsp[(6) - (15)].string), OU ((yyvsp[(7) - (15)].measure)) + OU ((yyvsp[(9) - (15)].measure)), OU ((yyvsp[(8) - (15)].measure)) + OU ((yyvsp[(10) - (15)].measure)),
 					(yyvsp[(11) - (15)].number), (yyvsp[(12) - (15)].number), OldFlags((yyvsp[(13) - (15)].integer)), false);
 				yyElement->MarkX = OU ((yyvsp[(7) - (15)].measure));
@@ -2804,21 +2815,21 @@ yyreduce:
 			}
     break;
 
-  case 123:
+  case 122:
 
-/* Line 1464 of yacc.c  */
-#line 1333 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1328 "parse_y.y"
     {
 				SetElementBoundingBox(yyData, yyElement, yyFont);
 			}
     break;
 
-  case 124:
+  case 123:
 
-/* Line 1464 of yacc.c  */
-#line 1344 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1339 "parse_y.y"
     {
-				yyElement = CreateNewElement(yyData, yyElement, yyFont, (yyvsp[(3) - (15)].flagtype),
+				yyElement = CreateNewElement(yyData, yyFont, (yyvsp[(3) - (15)].flagtype),
 					(yyvsp[(4) - (15)].string), (yyvsp[(5) - (15)].string), (yyvsp[(6) - (15)].string), NU ((yyvsp[(7) - (15)].measure)) + NU ((yyvsp[(9) - (15)].measure)), NU ((yyvsp[(8) - (15)].measure)) + NU ((yyvsp[(10) - (15)].measure)),
 					(yyvsp[(11) - (15)].number), (yyvsp[(12) - (15)].number), (yyvsp[(13) - (15)].flagtype), false);
 				yyElement->MarkX = NU ((yyvsp[(7) - (15)].measure));
@@ -2829,82 +2840,82 @@ yyreduce:
 			}
     break;
 
-  case 125:
+  case 124:
 
-/* Line 1464 of yacc.c  */
-#line 1355 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1350 "parse_y.y"
     {
 				SetElementBoundingBox(yyData, yyElement, yyFont);
 			}
     break;
 
-  case 133:
+  case 132:
 
-/* Line 1464 of yacc.c  */
-#line 1435 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1430 "parse_y.y"
     {
 				CreateNewLineInElement(yyElement, NU ((yyvsp[(3) - (8)].measure)), NU ((yyvsp[(4) - (8)].measure)), NU ((yyvsp[(5) - (8)].measure)), NU ((yyvsp[(6) - (8)].measure)), NU ((yyvsp[(7) - (8)].measure)));
 			}
     break;
 
-  case 134:
+  case 133:
 
-/* Line 1464 of yacc.c  */
-#line 1440 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1435 "parse_y.y"
     {
 				CreateNewLineInElement(yyElement, OU ((yyvsp[(3) - (8)].measure)), OU ((yyvsp[(4) - (8)].measure)), OU ((yyvsp[(5) - (8)].measure)), OU ((yyvsp[(6) - (8)].measure)), OU ((yyvsp[(7) - (8)].measure)));
 			}
     break;
 
-  case 135:
+  case 134:
 
-/* Line 1464 of yacc.c  */
-#line 1445 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1440 "parse_y.y"
     {
 				CreateNewArcInElement(yyElement, NU ((yyvsp[(3) - (10)].measure)), NU ((yyvsp[(4) - (10)].measure)), NU ((yyvsp[(5) - (10)].measure)), NU ((yyvsp[(6) - (10)].measure)), (yyvsp[(7) - (10)].number), (yyvsp[(8) - (10)].number), NU ((yyvsp[(9) - (10)].measure)));
 			}
     break;
 
-  case 136:
+  case 135:
 
-/* Line 1464 of yacc.c  */
-#line 1450 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1445 "parse_y.y"
     {
 				CreateNewArcInElement(yyElement, OU ((yyvsp[(3) - (10)].measure)), OU ((yyvsp[(4) - (10)].measure)), OU ((yyvsp[(5) - (10)].measure)), OU ((yyvsp[(6) - (10)].measure)), (yyvsp[(7) - (10)].number), (yyvsp[(8) - (10)].number), OU ((yyvsp[(9) - (10)].measure)));
 			}
     break;
 
-  case 137:
+  case 136:
 
-/* Line 1464 of yacc.c  */
-#line 1455 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1450 "parse_y.y"
     {
 				yyElement->MarkX = NU ((yyvsp[(3) - (5)].measure));
 				yyElement->MarkY = NU ((yyvsp[(4) - (5)].measure));
 			}
     break;
 
-  case 138:
+  case 137:
 
-/* Line 1464 of yacc.c  */
-#line 1460 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1455 "parse_y.y"
     {
 				yyElement->MarkX = OU ((yyvsp[(3) - (5)].measure));
 				yyElement->MarkY = OU ((yyvsp[(4) - (5)].measure));
 			}
     break;
 
-  case 139:
+  case 138:
 
-/* Line 1464 of yacc.c  */
-#line 1464 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1459 "parse_y.y"
     { attr_list = & yyElement->Attributes; }
     break;
 
-  case 147:
+  case 146:
 
-/* Line 1464 of yacc.c  */
-#line 1479 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1474 "parse_y.y"
     {
 				CreateNewLineInElement(yyElement, NU ((yyvsp[(3) - (8)].measure)) + yyElement->MarkX,
 					NU ((yyvsp[(4) - (8)].measure)) + yyElement->MarkY, NU ((yyvsp[(5) - (8)].measure)) + yyElement->MarkX,
@@ -2912,10 +2923,10 @@ yyreduce:
 			}
     break;
 
-  case 148:
+  case 147:
 
-/* Line 1464 of yacc.c  */
-#line 1485 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1480 "parse_y.y"
     {
 				CreateNewLineInElement(yyElement, OU ((yyvsp[(3) - (8)].measure)) + yyElement->MarkX,
 					OU ((yyvsp[(4) - (8)].measure)) + yyElement->MarkY, OU ((yyvsp[(5) - (8)].measure)) + yyElement->MarkX,
@@ -2923,37 +2934,37 @@ yyreduce:
 			}
     break;
 
-  case 149:
+  case 148:
 
-/* Line 1464 of yacc.c  */
-#line 1492 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1487 "parse_y.y"
     {
 				CreateNewArcInElement(yyElement, NU ((yyvsp[(3) - (10)].measure)) + yyElement->MarkX,
 					NU ((yyvsp[(4) - (10)].measure)) + yyElement->MarkY, NU ((yyvsp[(5) - (10)].measure)), NU ((yyvsp[(6) - (10)].measure)), (yyvsp[(7) - (10)].number), (yyvsp[(8) - (10)].number), NU ((yyvsp[(9) - (10)].measure)));
 			}
     break;
 
-  case 150:
+  case 149:
 
-/* Line 1464 of yacc.c  */
-#line 1497 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1492 "parse_y.y"
     {
 				CreateNewArcInElement(yyElement, OU ((yyvsp[(3) - (10)].measure)) + yyElement->MarkX,
 					OU ((yyvsp[(4) - (10)].measure)) + yyElement->MarkY, OU ((yyvsp[(5) - (10)].measure)), OU ((yyvsp[(6) - (10)].measure)), (yyvsp[(7) - (10)].number), (yyvsp[(8) - (10)].number), OU ((yyvsp[(9) - (10)].measure)));
 			}
     break;
 
-  case 151:
+  case 150:
 
-/* Line 1464 of yacc.c  */
-#line 1501 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1496 "parse_y.y"
     { attr_list = & yyElement->Attributes; }
     break;
 
-  case 153:
+  case 152:
 
-/* Line 1464 of yacc.c  */
-#line 1543 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1538 "parse_y.y"
     {
 				CreateNewPin(yyElement, NU ((yyvsp[(3) - (12)].measure)) + yyElement->MarkX,
 					NU ((yyvsp[(4) - (12)].measure)) + yyElement->MarkY, NU ((yyvsp[(5) - (12)].measure)), NU ((yyvsp[(6) - (12)].measure)), NU ((yyvsp[(7) - (12)].measure)), NU ((yyvsp[(8) - (12)].measure)), (yyvsp[(9) - (12)].string),
@@ -2963,10 +2974,10 @@ yyreduce:
 			}
     break;
 
-  case 154:
+  case 153:
 
-/* Line 1464 of yacc.c  */
-#line 1555 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1550 "parse_y.y"
     {
 				CreateNewPin(yyElement, OU ((yyvsp[(3) - (12)].measure)) + yyElement->MarkX,
 					OU ((yyvsp[(4) - (12)].measure)) + yyElement->MarkY, OU ((yyvsp[(5) - (12)].measure)), OU ((yyvsp[(6) - (12)].measure)), OU ((yyvsp[(7) - (12)].measure)), OU ((yyvsp[(8) - (12)].measure)), (yyvsp[(9) - (12)].string),
@@ -2976,10 +2987,10 @@ yyreduce:
 			}
     break;
 
-  case 155:
+  case 154:
 
-/* Line 1464 of yacc.c  */
-#line 1567 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1562 "parse_y.y"
     {
 				CreateNewPin(yyElement, OU ((yyvsp[(3) - (10)].measure)), OU ((yyvsp[(4) - (10)].measure)), OU ((yyvsp[(5) - (10)].measure)), 2*GROUNDPLANEFRAME,
 					OU ((yyvsp[(5) - (10)].measure)) + 2*MASKFRAME, OU ((yyvsp[(6) - (10)].measure)), (yyvsp[(7) - (10)].string), (yyvsp[(8) - (10)].string), OldFlags((yyvsp[(9) - (10)].integer)));
@@ -2988,10 +2999,10 @@ yyreduce:
 			}
     break;
 
-  case 156:
+  case 155:
 
-/* Line 1464 of yacc.c  */
-#line 1578 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1573 "parse_y.y"
     {
 				char	p_number[8];
 
@@ -3003,10 +3014,10 @@ yyreduce:
 			}
     break;
 
-  case 157:
+  case 156:
 
-/* Line 1464 of yacc.c  */
-#line 1594 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1589 "parse_y.y"
     {
 				Coord	hole = OU ((yyvsp[(5) - (8)].measure)) * DEFAULT_DRILLINGHOLE;
 				char	p_number[8];
@@ -3023,10 +3034,10 @@ yyreduce:
 			}
     break;
 
-  case 158:
+  case 157:
 
-/* Line 1464 of yacc.c  */
-#line 1648 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1643 "parse_y.y"
     {
 				CreateNewPad(yyElement, NU ((yyvsp[(3) - (13)].measure)) + yyElement->MarkX,
 					NU ((yyvsp[(4) - (13)].measure)) + yyElement->MarkY,
@@ -3038,10 +3049,10 @@ yyreduce:
 			}
     break;
 
-  case 159:
+  case 158:
 
-/* Line 1464 of yacc.c  */
-#line 1662 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1657 "parse_y.y"
     {
 				CreateNewPad(yyElement,OU ((yyvsp[(3) - (13)].measure)) + yyElement->MarkX,
 					OU ((yyvsp[(4) - (13)].measure)) + yyElement->MarkY, OU ((yyvsp[(5) - (13)].measure)) + yyElement->MarkX,
@@ -3052,10 +3063,10 @@ yyreduce:
 			}
     break;
 
-  case 160:
+  case 159:
 
-/* Line 1464 of yacc.c  */
-#line 1675 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1670 "parse_y.y"
     {
 				CreateNewPad(yyElement,OU ((yyvsp[(3) - (11)].measure)),OU ((yyvsp[(4) - (11)].measure)),OU ((yyvsp[(5) - (11)].measure)),OU ((yyvsp[(6) - (11)].measure)),OU ((yyvsp[(7) - (11)].measure)), 2*GROUNDPLANEFRAME,
 					OU ((yyvsp[(7) - (11)].measure)) + 2*MASKFRAME, (yyvsp[(8) - (11)].string), (yyvsp[(9) - (11)].string), OldFlags((yyvsp[(10) - (11)].integer)));
@@ -3064,10 +3075,10 @@ yyreduce:
 			}
     break;
 
-  case 161:
+  case 160:
 
-/* Line 1464 of yacc.c  */
-#line 1686 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1681 "parse_y.y"
     {
 				char		p_number[8];
 
@@ -3078,24 +3089,24 @@ yyreduce:
 			}
     break;
 
-  case 162:
+  case 161:
 
-/* Line 1464 of yacc.c  */
-#line 1696 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1691 "parse_y.y"
     { (yyval.flagtype) = OldFlags((yyvsp[(1) - (1)].integer)); }
     break;
 
-  case 163:
+  case 162:
 
-/* Line 1464 of yacc.c  */
-#line 1697 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1692 "parse_y.y"
     { (yyval.flagtype) = string_to_flags ((yyvsp[(1) - (1)].string), yyerror); }
     break;
 
-  case 167:
+  case 166:
 
-/* Line 1464 of yacc.c  */
-#line 1727 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1722 "parse_y.y"
     {
 				if ((yyvsp[(3) - (6)].integer) <= 0 || (yyvsp[(3) - (6)].integer) > MAX_FONTPOSITION)
 				{
@@ -3113,10 +3124,10 @@ yyreduce:
 			}
     break;
 
-  case 168:
+  case 167:
 
-/* Line 1464 of yacc.c  */
-#line 1743 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1738 "parse_y.y"
     {
 				if ((yyvsp[(3) - (6)].integer) <= 0 || (yyvsp[(3) - (6)].integer) > MAX_FONTPOSITION)
 				{
@@ -3134,28 +3145,28 @@ yyreduce:
 			}
     break;
 
-  case 174:
+  case 173:
 
-/* Line 1464 of yacc.c  */
-#line 1790 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1785 "parse_y.y"
     {
 				CreateNewLineInSymbol(Symbol, OU ((yyvsp[(3) - (8)].measure)), OU ((yyvsp[(4) - (8)].measure)), OU ((yyvsp[(5) - (8)].measure)), OU ((yyvsp[(6) - (8)].measure)), OU ((yyvsp[(7) - (8)].measure)));
 			}
     break;
 
-  case 175:
+  case 174:
 
-/* Line 1464 of yacc.c  */
-#line 1797 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1792 "parse_y.y"
     {
 				CreateNewLineInSymbol(Symbol, NU ((yyvsp[(3) - (8)].measure)), NU ((yyvsp[(4) - (8)].measure)), NU ((yyvsp[(5) - (8)].measure)), NU ((yyvsp[(6) - (8)].measure)), NU ((yyvsp[(7) - (8)].measure)));
 			}
     break;
 
-  case 183:
+  case 182:
 
-/* Line 1464 of yacc.c  */
-#line 1851 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1846 "parse_y.y"
     {
 				Menu = CreateNewNet(&yyPCB->NetlistLib, (yyvsp[(3) - (6)].string), (yyvsp[(4) - (6)].string));
 				free ((yyvsp[(3) - (6)].string));
@@ -3163,20 +3174,20 @@ yyreduce:
 			}
     break;
 
-  case 189:
+  case 188:
 
-/* Line 1464 of yacc.c  */
-#line 1886 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1881 "parse_y.y"
     {
 				CreateNewConnection(Menu, (yyvsp[(3) - (4)].string));
 				free ((yyvsp[(3) - (4)].string));
 			}
     break;
 
-  case 190:
+  case 189:
 
-/* Line 1464 of yacc.c  */
-#line 1916 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1911 "parse_y.y"
     {
 			  CreateNewAttribute (attr_list, (yyvsp[(3) - (5)].string), (yyvsp[(4) - (5)].string) ? (yyvsp[(4) - (5)].string) : (char *)"");
 				free ((yyvsp[(3) - (5)].string));
@@ -3184,110 +3195,128 @@ yyreduce:
 			}
     break;
 
-  case 191:
+  case 190:
 
-/* Line 1464 of yacc.c  */
-#line 1923 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1918 "parse_y.y"
     { (yyval.string) = (yyvsp[(1) - (1)].string); }
     break;
 
-  case 192:
+  case 191:
 
-/* Line 1464 of yacc.c  */
-#line 1924 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1919 "parse_y.y"
     { (yyval.string) = 0; }
     break;
 
-  case 193:
+  case 192:
 
-/* Line 1464 of yacc.c  */
-#line 1928 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1923 "parse_y.y"
     { (yyval.number) = (yyvsp[(1) - (1)].number); }
     break;
 
+  case 193:
+
+/* Line 1806 of yacc.c  */
+#line 1924 "parse_y.y"
+    { (yyval.number) = (yyvsp[(1) - (1)].integer); }
+    break;
+
   case 194:
 
-/* Line 1464 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 1929 "parse_y.y"
-    { (yyval.number) = (yyvsp[(1) - (1)].integer); }
+    { do_measure(&(yyval.measure), (yyvsp[(1) - (1)].number), MIL_TO_COORD ((yyvsp[(1) - (1)].number)) / 100.0, 0); }
     break;
 
   case 195:
 
-/* Line 1464 of yacc.c  */
-#line 1934 "parse_y.y"
-    { do_measure(&(yyval.measure), (yyvsp[(1) - (1)].number), MIL_TO_COORD ((yyvsp[(1) - (1)].number)) / 100.0, 0); }
+/* Line 1806 of yacc.c  */
+#line 1930 "parse_y.y"
+    { M ((yyval.measure), (yyvsp[(1) - (2)].number), MIL_TO_COORD ((yyvsp[(1) - (2)].number)) / 100000.0); }
     break;
 
   case 196:
 
-/* Line 1464 of yacc.c  */
-#line 1935 "parse_y.y"
-    { M ((yyval.measure), (yyvsp[(1) - (2)].number), MIL_TO_COORD ((yyvsp[(1) - (2)].number)) / 100000.0); }
+/* Line 1806 of yacc.c  */
+#line 1931 "parse_y.y"
+    { M ((yyval.measure), (yyvsp[(1) - (2)].number), MIL_TO_COORD ((yyvsp[(1) - (2)].number)) / 100.0); }
     break;
 
   case 197:
 
-/* Line 1464 of yacc.c  */
-#line 1936 "parse_y.y"
-    { M ((yyval.measure), (yyvsp[(1) - (2)].number), MIL_TO_COORD ((yyvsp[(1) - (2)].number)) / 100.0); }
+/* Line 1806 of yacc.c  */
+#line 1932 "parse_y.y"
+    { M ((yyval.measure), (yyvsp[(1) - (2)].number), MIL_TO_COORD ((yyvsp[(1) - (2)].number))); }
     break;
 
   case 198:
 
-/* Line 1464 of yacc.c  */
-#line 1937 "parse_y.y"
-    { M ((yyval.measure), (yyvsp[(1) - (2)].number), MIL_TO_COORD ((yyvsp[(1) - (2)].number))); }
+/* Line 1806 of yacc.c  */
+#line 1933 "parse_y.y"
+    { M ((yyval.measure), (yyvsp[(1) - (2)].number), INCH_TO_COORD ((yyvsp[(1) - (2)].number))); }
     break;
 
   case 199:
 
-/* Line 1464 of yacc.c  */
-#line 1938 "parse_y.y"
-    { M ((yyval.measure), (yyvsp[(1) - (2)].number), INCH_TO_COORD ((yyvsp[(1) - (2)].number))); }
+/* Line 1806 of yacc.c  */
+#line 1934 "parse_y.y"
+    { M ((yyval.measure), (yyvsp[(1) - (2)].number), MM_TO_COORD ((yyvsp[(1) - (2)].number)) / 1000000.0); }
     break;
 
   case 200:
 
-/* Line 1464 of yacc.c  */
-#line 1939 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1935 "parse_y.y"
     { M ((yyval.measure), (yyvsp[(1) - (2)].number), MM_TO_COORD ((yyvsp[(1) - (2)].number)) / 1000000.0); }
     break;
 
   case 201:
 
-/* Line 1464 of yacc.c  */
-#line 1940 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1936 "parse_y.y"
     { M ((yyval.measure), (yyvsp[(1) - (2)].number), MM_TO_COORD ((yyvsp[(1) - (2)].number)) / 1000.0); }
     break;
 
   case 202:
 
-/* Line 1464 of yacc.c  */
-#line 1941 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1937 "parse_y.y"
     { M ((yyval.measure), (yyvsp[(1) - (2)].number), MM_TO_COORD ((yyvsp[(1) - (2)].number))); }
     break;
 
   case 203:
 
-/* Line 1464 of yacc.c  */
-#line 1942 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1938 "parse_y.y"
     { M ((yyval.measure), (yyvsp[(1) - (2)].number), MM_TO_COORD ((yyvsp[(1) - (2)].number)) * 1000.0); }
     break;
 
   case 204:
 
-/* Line 1464 of yacc.c  */
-#line 1943 "parse_y.y"
+/* Line 1806 of yacc.c  */
+#line 1939 "parse_y.y"
     { M ((yyval.measure), (yyvsp[(1) - (2)].number), MM_TO_COORD ((yyvsp[(1) - (2)].number)) * 1000000.0); }
     break;
 
 
 
-/* Line 1464 of yacc.c  */
-#line 3289 "parse_y.c"
+/* Line 1806 of yacc.c  */
+#line 3307 "parse_y.c"
       default: break;
     }
+  /* User semantic actions sometimes alter yychar, and that requires
+     that yytoken be updated with the new translation.  We take the
+     approach of translating immediately before every use of yytoken.
+     One alternative is translating here after every semantic action,
+     but that translation would be missed if the semantic action invokes
+     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
+     incorrect destructor might then be invoked immediately.  In the
+     case of YYERROR or YYBACKUP, subsequent parser actions might lead
+     to an incorrect destructor call or verbose syntax error message
+     before the lookahead is translated.  */
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
 
   YYPOPSTACK (yylen);
@@ -3315,6 +3344,10 @@ yyreduce:
 | yyerrlab -- here on detecting error |
 `------------------------------------*/
 yyerrlab:
+  /* Make sure we have latest lookahead translation.  See comments at
+     user semantic actions for why this is necessary.  */
+  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
   /* If not already recovering from an error, report this error.  */
   if (!yyerrstatus)
     {
@@ -3322,37 +3355,36 @@ yyerrlab:
 #if ! YYERROR_VERBOSE
       yyerror (YY_("syntax error"));
 #else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+                                        yyssp, yytoken)
       {
-	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
-	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
-	  {
-	    YYSIZE_T yyalloc = 2 * yysize;
-	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
-	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
-	    if (yymsg != yymsgbuf)
-	      YYSTACK_FREE (yymsg);
-	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
-	    if (yymsg)
-	      yymsg_alloc = yyalloc;
-	    else
-	      {
-		yymsg = yymsgbuf;
-		yymsg_alloc = sizeof yymsgbuf;
-	      }
-	  }
-
-	if (0 < yysize && yysize <= yymsg_alloc)
-	  {
-	    (void) yysyntax_error (yymsg, yystate, yychar);
-	    yyerror (yymsg);
-	  }
-	else
-	  {
-	    yyerror (YY_("syntax error"));
-	    if (yysize != 0)
-	      goto yyexhaustedlab;
-	  }
+        char const *yymsgp = YY_("syntax error");
+        int yysyntax_error_status;
+        yysyntax_error_status = YYSYNTAX_ERROR;
+        if (yysyntax_error_status == 0)
+          yymsgp = yymsg;
+        else if (yysyntax_error_status == 1)
+          {
+            if (yymsg != yymsgbuf)
+              YYSTACK_FREE (yymsg);
+            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+            if (!yymsg)
+              {
+                yymsg = yymsgbuf;
+                yymsg_alloc = sizeof yymsgbuf;
+                yysyntax_error_status = 2;
+              }
+            else
+              {
+                yysyntax_error_status = YYSYNTAX_ERROR;
+                yymsgp = yymsg;
+              }
+          }
+        yyerror (yymsgp);
+        if (yysyntax_error_status == 2)
+          goto yyexhaustedlab;
       }
+# undef YYSYNTAX_ERROR
 #endif
     }
 
@@ -3411,7 +3443,7 @@ yyerrlab1:
   for (;;)
     {
       yyn = yypact[yystate];
-      if (yyn != YYPACT_NINF)
+      if (!yypact_value_is_default (yyn))
 	{
 	  yyn += YYTERROR;
 	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
@@ -3470,8 +3502,13 @@ yyexhaustedlab:
 
 yyreturn:
   if (yychar != YYEMPTY)
-     yydestruct ("Cleanup: discarding lookahead",
-		 yytoken, &yylval);
+    {
+      /* Make sure we have latest lookahead translation.  See comments at
+         user semantic actions for why this is necessary.  */
+      yytoken = YYTRANSLATE (yychar);
+      yydestruct ("Cleanup: discarding lookahead",
+                  yytoken, &yylval);
+    }
   /* Do not reclaim the symbols of the rule which action triggered
      this YYABORT or YYACCEPT.  */
   YYPOPSTACK (yylen);
@@ -3496,8 +3533,8 @@ yyreturn:
 
 
 
-/* Line 1684 of yacc.c  */
-#line 1946 "parse_y.y"
+/* Line 2067 of yacc.c  */
+#line 1942 "parse_y.y"
 
 
 /* ---------------------------------------------------------------------------
@@ -3505,9 +3542,9 @@ yyreturn:
  */
 int yyerror(const char * s)
 {
-	Message("ERROR parsing file '%s'\n"
+	Message(_("ERROR parsing file '%s'\n"
 		"    line:        %i\n"
-		"    description: '%s'\n",
+		"    description: '%s'\n"),
 		yyfilename, yylineno, s);
 	return(0);
 }
@@ -3521,12 +3558,12 @@ static int
 check_file_version (int ver)
 {
   if ( ver > PCB_FILE_VERSION ) {
-    Message ("ERROR:  The file you are attempting to load is in a format\n"
+    Message (_("ERROR:  The file you are attempting to load is in a format\n"
 	     "which is too new for this version of pcb.  To load this file\n"
 	     "you need a version of pcb which is >= %d.  If you are\n"
 	     "using a version built from git source, the source date\n"
 	     "must be >= %d.  This copy of pcb can only read files\n"
-	     "up to file version %d.\n", ver, ver, PCB_FILE_VERSION);
+	     "up to file version %d.\n"), ver, ver, PCB_FILE_VERSION);
     return 1;
   }
   
diff --git a/src/parse_y.h b/src/parse_y.h
index 7ad0f0a..cd12c92 100644
--- a/src/parse_y.h
+++ b/src/parse_y.h
@@ -1,9 +1,8 @@
-/* A Bison parser, made by GNU Bison 2.4.3.  */
+/* A Bison parser, made by GNU Bison 2.5.  */
 
-/* Skeleton interface for Bison's Yacc-like parsers in C
+/* Bison interface for Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2009, 2010 Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -81,7 +80,8 @@
      T_UM = 298,
      T_MM = 299,
      T_M = 300,
-     T_KM = 301
+     T_KM = 301,
+     T_PX = 302
    };
 #endif
 /* Tokens.  */
@@ -129,6 +129,7 @@
 #define T_MM 299
 #define T_M 300
 #define T_KM 301
+#define T_PX 302
 
 
 
@@ -137,8 +138,8 @@
 typedef union YYSTYPE
 {
 
-/* Line 1685 of yacc.c  */
-#line 111 "parse_y.y"
+/* Line 2068 of yacc.c  */
+#line 108 "parse_y.y"
 
 	int		integer;
 	double		number;
@@ -148,8 +149,8 @@ typedef union YYSTYPE
 
 
 
-/* Line 1685 of yacc.c  */
-#line 153 "parse_y.h"
+/* Line 2068 of yacc.c  */
+#line 154 "parse_y.h"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
diff --git a/src/parse_y.y b/src/parse_y.y
index 8cf1888..6cd4c7b 100644
--- a/src/parse_y.y
+++ b/src/parse_y.y
@@ -1,4 +1,3 @@
-/* $Id$ */
 /*
  * ************************** README *******************
  *
@@ -60,26 +59,24 @@
 # include <dmalloc.h> /* see http://dmalloc.com */
 #endif
 
-RCSID("$Id$");
-
-static	LayerTypePtr	Layer;
-static	PolygonTypePtr	Polygon;
-static	SymbolTypePtr	Symbol;
+static	LayerType	*Layer;
+static	PolygonType	*Polygon;
+static	SymbolType	*Symbol;
 static	int		pin_num;
-static	LibraryMenuTypePtr	Menu;
+static	LibraryMenuType	*Menu;
 static	bool			LayerFlag[MAX_LAYER + 2];
 
-extern	char			*yytext;		/* defined by LEX */
-extern	PCBTypePtr		yyPCB;
-extern	DataTypePtr		yyData;
-extern	ElementTypePtr	yyElement;
-extern	FontTypePtr		yyFont;
-extern	int				yylineno;		/* linenumber */
-extern	char			*yyfilename;	/* in this file */
+extern	char		*yytext;		/* defined by LEX */
+extern	PCBType		*yyPCB;
+extern	DataType	*yyData;
+extern	ElementType	*yyElement;
+extern	FontType	*yyFont;
+extern	int		yylineno;		/* linenumber */
+extern	char		*yyfilename;	/* in this file */
 
 static char *layer_group_string; 
 
-static AttributeListTypePtr attr_list; 
+static AttributeListType *attr_list; 
 
 int yyerror(const char *s);
 int yylex();
@@ -124,7 +121,7 @@ static Coord new_units (PLMeasure m);
 %token	T_ELEMENT T_PIN T_PAD T_GRID T_FLAGS T_SYMBOL T_SYMBOLLINE T_CURSOR
 %token	T_ELEMENTARC T_MARK T_GROUPS T_STYLES T_POLYGON T_POLYGON_HOLE T_NETLIST T_NET T_CONN
 %token	T_AREA T_THERMAL T_DRC T_ATTRIBUTE
-%token	T_UMIL T_CMIL T_MIL T_IN T_NM T_UM T_MM T_M T_KM
+%token	T_UMIL T_CMIL T_MIL T_IN T_NM T_UM T_MM T_M T_KM T_PX
 %type	<integer>	symbolid
 %type	<string>	opt_string
 %type	<flagtype>	flags
@@ -169,7 +166,7 @@ parsepcb
 
 				if (!yyPCB)
 				{
-					Message("illegal fileformat\n");
+					Message(_("illegal fileformat\n"));
 					YYABORT;
 				}
 				for (i = 0; i < MAX_LAYER + 2; i++)
@@ -194,14 +191,14 @@ parsepcb
 		  pcbdata
 		  pcbnetlist
 			{
-			  PCBTypePtr pcb_save = PCB;
+			  PCBType *pcb_save = PCB;
 
 			  if (layer_group_string == NULL)
 			    layer_group_string = Settings.Groups;
 			  CreateNewPCBPost (yyPCB, 0);
 			  if (ParseGroupString(layer_group_string, &yyPCB->LayerGroups, yyData->LayerN))
 			    {
-			      Message("illegal layer-group string\n");
+			      Message(_("illegal layer-group string\n"));
 			      YYABORT;
 			    }
 			/* initialize the polygon clipping now since
@@ -235,7 +232,7 @@ parsedata
 
 				if (!yyData || !yyFont)
 				{
-					Message("illegal fileformat\n");
+					Message(_("illegal fileformat\n"));
 					YYABORT;
 				}
 				for (i = 0; i < MAX_LAYER + 2; i++)
@@ -258,7 +255,7 @@ parsefont
 
 				if (!yyFont)
 				{
-					Message("illegal fileformat\n");
+					Message(_("illegal fileformat\n"));
 					YYABORT;
 				}
 				yyFont->Valid = false;
@@ -413,11 +410,15 @@ Cursor (X Y Zoom)
 @table @var
 @item X Y
 Location of the cursor when the board was saved.
+As of November 2012 the cursor position is not written to file anymore.
+Older versions of pcb ignore the absence of this line in the pcb file.
 @item Zoom
 The current zoom factor.  Note that a zoom factor of "0" means 1 mil
 per screen pixel, N means @math{2^N} mils per screen pixel, etc.  The
 first variant accepts floating point numbers.  The special value
 "1000" means "zoom to fit"
+
+This field is ignored by PCB.
 @end table
 
 %end-doc */
@@ -427,13 +428,11 @@ pcbcursor
 			{
 				yyPCB->CursorX = OU ($3);
 				yyPCB->CursorY = OU ($4);
-				yyPCB->Zoom = $5*2;
 			}
 		| T_CURSOR '[' measure measure number ']'
 			{
 				yyPCB->CursorX = NU ($3);
 				yyPCB->CursorY = NU ($4);
-				yyPCB->Zoom = $5;
 			}
 		|
 		;
@@ -655,7 +654,7 @@ pcbstyles
 			{
 				if (ParseRouteString($3, &yyPCB->RouteStyle[0], "mil"))
 				{
-					Message("illegal route-style string\n");
+					Message(_("illegal route-style string\n"));
 					YYABORT;
 				}
 			}
@@ -663,7 +662,7 @@ pcbstyles
 			{
 				if (ParseRouteString($3, &yyPCB->RouteStyle[0], "cmil"))
 				{
-					Message("illegal route-style string\n");
+					Message(_("illegal route-style string\n"));
 					YYABORT;
 				}
 			}
@@ -685,14 +684,7 @@ pcbdefinition
 		| { attr_list = & yyPCB->Attributes; } attribute
 		| rats
 		| layer
-		|
-			{
-					/* clear pointer to force memory allocation by 
-					 * the appropriate subroutine
-					 */
-				yyElement = NULL;
-			}
-		  element
+		| element
 		| error { YYABORT; }
 		;
 
@@ -866,6 +858,8 @@ layer
 
 					/* memory for name is already allocated */
 				Layer->Name = $4;
+                         	if (Layer->Name == NULL)
+                                   Layer->Name = strdup("");
 				LayerFlag[$3-1] = true;
 				if (yyData->LayerN + 2 < $3)
 				  yyData->LayerN = $3 - 2;
@@ -1065,7 +1059,7 @@ text_newformat
 			{
 				if ($8 & ONSILKFLAG)
 				{
-					LayerTypePtr lay = &yyData->Layer[yyData->LayerN +
+					LayerType *lay = &yyData->Layer[yyData->LayerN +
 						(($8 & ONSOLDERFLAG) ? SOLDER_LAYER : COMPONENT_LAYER)];
 
 					CreateNewText(lay ,yyFont, OU ($3), OU ($4), $5, $6, $7,
@@ -1090,7 +1084,7 @@ text_hi_format
 				 */
 				if ($8.f & ONSILKFLAG)
 				{
-					LayerTypePtr lay = &yyData->Layer[yyData->LayerN +
+					LayerType *lay = &yyData->Layer[yyData->LayerN +
 						(($8.f & ONSOLDERFLAG) ? SOLDER_LAYER : COMPONENT_LAYER)];
 
 					CreateNewText(lay, yyFont, NU ($3), NU ($4), $5, $6, $7, $8);
@@ -1151,9 +1145,10 @@ polygon_format
 
 				if (bad_contour_found)
 				  {
-				    Message("WARNING parsing file '%s'\n"
+				    Message(_("WARNING parsing file '%s'\n"
 					    "    line:        %i\n"
-					    "    description: 'ignored polygon (< 3 points in a contour)'\n",
+					    "    description: 'ignored polygon "
+					    "(< 3 points in a contour)'\n"),
 					    yyfilename, yylineno);
 				    DestroyObject(yyData, POLYGON_TYPE, Layer, Polygon, Polygon);
 				  }
@@ -1264,7 +1259,7 @@ element_oldformat
 			 */
 		: T_ELEMENT '(' STRING STRING measure measure INTEGER ')' '('
 			{
-				yyElement = CreateNewElement(yyData, yyElement, yyFont, NoFlags(),
+				yyElement = CreateNewElement(yyData, yyFont, NoFlags(),
 					$3, $4, NULL, OU ($5), OU ($6), $7, 100, NoFlags(), false);
 				free ($3);
 				free ($4);
@@ -1282,7 +1277,7 @@ element_1.3.4_format
 			 */
 		: T_ELEMENT '(' INTEGER STRING STRING measure measure measure measure INTEGER ')' '('
 			{
-				yyElement = CreateNewElement(yyData, yyElement, yyFont, OldFlags($3),
+				yyElement = CreateNewElement(yyData, yyFont, OldFlags($3),
 					$4, $5, NULL, OU ($6), OU ($7), IV ($8), IV ($9), OldFlags($10), false);
 				free ($4);
 				free ($5);
@@ -1300,7 +1295,7 @@ element_newformat
 			 */
 		: T_ELEMENT '(' INTEGER STRING STRING STRING measure measure measure measure INTEGER ')' '('
 			{
-				yyElement = CreateNewElement(yyData, yyElement, yyFont, OldFlags($3),
+				yyElement = CreateNewElement(yyData, yyFont, OldFlags($3),
 					$4, $5, $6, OU ($7), OU ($8), IV ($9), IV ($10), OldFlags($11), false);
 				free ($4);
 				free ($5);
@@ -1320,7 +1315,7 @@ element_1.7_format
 		: T_ELEMENT '(' INTEGER STRING STRING STRING measure measure
 			measure measure number number INTEGER ')' '('
 			{
-				yyElement = CreateNewElement(yyData, yyElement, yyFont, OldFlags($3),
+				yyElement = CreateNewElement(yyData, yyFont, OldFlags($3),
 					$4, $5, $6, OU ($7) + OU ($9), OU ($8) + OU ($10),
 					$11, $12, OldFlags($13), false);
 				yyElement->MarkX = OU ($7);
@@ -1342,7 +1337,7 @@ element_hi_format
 		: T_ELEMENT '[' flags STRING STRING STRING measure measure
 			measure measure number number flags ']' '('
 			{
-				yyElement = CreateNewElement(yyData, yyElement, yyFont, $3,
+				yyElement = CreateNewElement(yyData, yyFont, $3,
 					$4, $5, $6, NU ($7) + NU ($9), NU ($8) + NU ($10),
 					$11, $12, $13, false);
 				yyElement->MarkX = NU ($7);
@@ -1771,8 +1766,8 @@ symboldata
 /* %start-doc pcbfile SymbolLine
 
 @syntax
-SymbolLine [X1 Y1 X2 Y1 Thickness]
-SymbolLine (X1 Y1 X2 Y1 Thickness)
+SymbolLine [X1 Y1 X2 Y2 Thickness]
+SymbolLine (X1 Y1 X2 Y2 Thickness)
 @end syntax
 
 @table @var
@@ -1937,6 +1932,7 @@ measure
 		| number T_MIL	{ M ($$, $1, MIL_TO_COORD ($1)); }
 		| number T_IN	{ M ($$, $1, INCH_TO_COORD ($1)); }
 		| number T_NM	{ M ($$, $1, MM_TO_COORD ($1) / 1000000.0); }
+		| number T_PX	{ M ($$, $1, MM_TO_COORD ($1) / 1000000.0); }
 		| number T_UM	{ M ($$, $1, MM_TO_COORD ($1) / 1000.0); }
 		| number T_MM	{ M ($$, $1, MM_TO_COORD ($1)); }
 		| number T_M	{ M ($$, $1, MM_TO_COORD ($1) * 1000.0); }
@@ -1950,9 +1946,9 @@ measure
  */
 int yyerror(const char * s)
 {
-	Message("ERROR parsing file '%s'\n"
+	Message(_("ERROR parsing file '%s'\n"
 		"    line:        %i\n"
-		"    description: '%s'\n",
+		"    description: '%s'\n"),
 		yyfilename, yylineno, s);
 	return(0);
 }
@@ -1966,12 +1962,12 @@ static int
 check_file_version (int ver)
 {
   if ( ver > PCB_FILE_VERSION ) {
-    Message ("ERROR:  The file you are attempting to load is in a format\n"
+    Message (_("ERROR:  The file you are attempting to load is in a format\n"
 	     "which is too new for this version of pcb.  To load this file\n"
 	     "you need a version of pcb which is >= %d.  If you are\n"
 	     "using a version built from git source, the source date\n"
 	     "must be >= %d.  This copy of pcb can only read files\n"
-	     "up to file version %d.\n", ver, ver, PCB_FILE_VERSION);
+	     "up to file version %d.\n"), ver, ver, PCB_FILE_VERSION);
     return 1;
   }
   
diff --git a/src/pcb-menu.res.h b/src/pcb-menu.res.h
new file mode 100644
index 0000000..8508ddf
--- /dev/null
+++ b/src/pcb-menu.res.h
@@ -0,0 +1,998 @@
+# 32 "pcb-menu.res"
+char *s = N_("About...");
+# 33 "pcb-menu.res"
+char *s = N_("Save layout");
+# 33 "pcb-menu.res"
+char *s = N_("Ctrl-S");
+# 33 "pcb-menu.res"
+char *s = N_("Ctrl<Key>s");
+# 34 "pcb-menu.res"
+char *s = N_("Save layout as...");
+# 34 "pcb-menu.res"
+char *s = N_("Shift Ctrl-S");
+# 34 "pcb-menu.res"
+char *s = N_("Shift Ctrl<Key>s");
+# 35 "pcb-menu.res"
+char *s = N_("Revert");
+# 36 "pcb-menu.res"
+char *s = N_("Import Schematics");
+# 37 "pcb-menu.res"
+char *s = N_("Load layout");
+# 38 "pcb-menu.res"
+char *s = N_("Load element data to paste-buffer");
+# 39 "pcb-menu.res"
+char *s = N_("Load layout data to paste-buffer");
+# 40 "pcb-menu.res"
+char *s = N_("Load netlist file");
+# 41 "pcb-menu.res"
+char *s = N_("Load vendor resource file");
+# 42 "pcb-menu.res"
+char *s = N_("Print layout...");
+# 43 "pcb-menu.res"
+char *s = N_("Export layout...");
+# 44 "pcb-menu.res"
+char *s = N_("Calibrate Printer...");
+# 46 "pcb-menu.res"
+char *s = N_("Save connection data of...");
+# 47 "pcb-menu.res"
+char *s = N_(" a single element");
+# 48 "pcb-menu.res"
+char *s = N_(" all elements");
+# 49 "pcb-menu.res"
+char *s = N_(" unused pins");
+# 51 "pcb-menu.res"
+char *s = N_("Start new layout");
+# 51 "pcb-menu.res"
+char *s = N_("Ctrl-N");
+# 51 "pcb-menu.res"
+char *s = N_("Ctrl<Key>n");
+# 53 "pcb-menu.res"
+char *s = N_("Quit Program");
+# 53 "pcb-menu.res"
+char *s = N_("Ctrl-Q");
+# 53 "pcb-menu.res"
+char *s = N_("Ctrl<Key>q");
+# 56 "pcb-menu.res"
+char *s = N_("Flip up/down");
+# 56 "pcb-menu.res"
+char *s = N_("Tab");
+# 56 "pcb-menu.res"
+char *s = N_("<Key>Tab");
+# 57 "pcb-menu.res"
+char *s = N_("Flip left/right");
+# 57 "pcb-menu.res"
+char *s = N_("Shift-Tab");
+# 57 "pcb-menu.res"
+char *s = N_("Shift<Key>Tab");
+# 58 "pcb-menu.res"
+char *s = N_("Spin 180�");
+# 58 "pcb-menu.res"
+char *s = N_("Ctrl-Tab");
+# 58 "pcb-menu.res"
+char *s = N_("Ctrl<Key>Tab");
+# 59 "pcb-menu.res"
+char *s = N_("Swap Sides");
+# 59 "pcb-menu.res"
+char *s = N_("Ctrl-Shift-Tab");
+# 59 "pcb-menu.res"
+char *s = N_("Ctrl Shift<Key>Tab");
+# 60 "pcb-menu.res"
+char *s = N_("Center cursor");
+# 60 "pcb-menu.res"
+char *s = N_("C");
+# 60 "pcb-menu.res"
+char *s = N_("<Key>c");
+# 61 "pcb-menu.res"
+char *s = N_("Show soldermask");
+# 63 "pcb-menu.res"
+char *s = N_("Displayed element-name...");
+# 64 "pcb-menu.res"
+char *s = N_("Description");
+# 65 "pcb-menu.res"
+char *s = N_("Reference Designator");
+# 66 "pcb-menu.res"
+char *s = N_("Value");
+# 67 "pcb-menu.res"
+char *s = N_("Lock Names");
+# 68 "pcb-menu.res"
+char *s = N_("Only Names");
+# 69 "pcb-menu.res"
+char *s = N_("Hide Names");
+# 208 "pcb-menu.res"
+char *s = N_("Pinout shows number");
+# 72 "pcb-menu.res"
+char *s = N_("Open pinout menu");
+# 440 "pcb-menu.res"
+char *s = N_("Shift-D");
+# 440 "pcb-menu.res"
+char *s = N_("Shift<Key>d");
+# 75 "pcb-menu.res"
+char *s = N_("Zoom In 2X");
+# 78 "pcb-menu.res"
+/* xgettext:no-c-format */
+char *s = N_("Zoom In 20%");
+# 79 "pcb-menu.res"
+char *s = N_("Z");
+# 79 "pcb-menu.res"
+char *s = N_("<Key>z");
+# 79 "pcb-menu.res"
+/* xgettext:no-c-format */
+char *s = N_("Zoom Out 20%");
+# 80 "pcb-menu.res"
+char *s = N_("Shift-Z");
+# 80 "pcb-menu.res"
+char *s = N_("Shift<Key>z");
+# 81 "pcb-menu.res"
+char *s = N_("Zoom Out 2X");
+# 82 "pcb-menu.res"
+char *s = N_("Zoom Max");
+# 82 "pcb-menu.res"
+char *s = N_("V");
+# 82 "pcb-menu.res"
+char *s = N_("<Key>v");
+# 83 "pcb-menu.res"
+char *s = N_("Zoom Toggle");
+# 83 "pcb-menu.res"
+char *s = N_("`");
+# 83 "pcb-menu.res"
+char *s = N_("<Key>`");
+# 85 "pcb-menu.res"
+char *s = N_("Zoom to 0.1mil/px");
+# 86 "pcb-menu.res"
+char *s = N_("Zoom to 0.01mm/px");
+# 87 "pcb-menu.res"
+char *s = N_("Zoom to 1mil/px");
+# 88 "pcb-menu.res"
+char *s = N_("Zoom to 0.05mm/px");
+# 89 "pcb-menu.res"
+char *s = N_("Zoom to 2.5mil/px");
+# 90 "pcb-menu.res"
+char *s = N_("Zoom to 0.1mm/px");
+# 91 "pcb-menu.res"
+char *s = N_("Zoom to 10mil/px");
+# 94 "pcb-menu.res"
+char *s = N_("mil");
+# 95 "pcb-menu.res"
+char *s = N_("mm");
+# 96 "pcb-menu.res"
+char *s = N_("Display grid");
+# 97 "pcb-menu.res"
+char *s = N_("Realign grid");
+# 98 "pcb-menu.res"
+char *s = N_("No Grid");
+# 100 "pcb-menu.res"
+char *s = N_("0.1 mil");
+# 101 "pcb-menu.res"
+char *s = N_("1 mil");
+# 102 "pcb-menu.res"
+char *s = N_("5 mil");
+# 103 "pcb-menu.res"
+char *s = N_("10 mil");
+# 104 "pcb-menu.res"
+char *s = N_("25 mil");
+# 105 "pcb-menu.res"
+char *s = N_("50 mil");
+# 106 "pcb-menu.res"
+char *s = N_("100 mil");
+# 108 "pcb-menu.res"
+char *s = N_("0.01 mm");
+# 109 "pcb-menu.res"
+char *s = N_("0.05 mm");
+# 110 "pcb-menu.res"
+char *s = N_("0.1 mm");
+# 111 "pcb-menu.res"
+char *s = N_("0.25 mm");
+# 112 "pcb-menu.res"
+char *s = N_("0.5 mm");
+# 113 "pcb-menu.res"
+char *s = N_("1 mm");
+# 115 "pcb-menu.res"
+char *s = N_("Grid -");
+# 115 "pcb-menu.res"
+char *s = N_("Shift-G");
+# 115 "pcb-menu.res"
+char *s = N_("Shift<Key>g");
+# 116 "pcb-menu.res"
+char *s = N_("Grid +");
+# 116 "pcb-menu.res"
+char *s = N_("G");
+# 116 "pcb-menu.res"
+char *s = N_("<Key>g");
+# 119 "pcb-menu.res"
+char *s = N_("Shown Layers");
+# 122 "pcb-menu.res"
+char *s = N_("Edit Layer Groups");
+# 124 "pcb-menu.res"
+char *s = N_("Current Layer");
+# 127 "pcb-menu.res"
+char *s = N_("Delete current layer");
+# 128 "pcb-menu.res"
+char *s = N_("Add new layer");
+# 129 "pcb-menu.res"
+char *s = N_("Move current layer up");
+# 130 "pcb-menu.res"
+char *s = N_("Move current layer down");
+# 134 "pcb-menu.res"
+char *s = N_("Undo last operation");
+# 134 "pcb-menu.res"
+char *s = N_("U");
+# 134 "pcb-menu.res"
+char *s = N_("<Key>u");
+# 135 "pcb-menu.res"
+char *s = N_("Redo last undone operation");
+# 135 "pcb-menu.res"
+char *s = N_("Shift-R");
+# 135 "pcb-menu.res"
+char *s = N_("Shift<Key>r");
+# 136 "pcb-menu.res"
+char *s = N_("Clear undo-buffer");
+# 136 "pcb-menu.res"
+char *s = N_("Shift-Ctrl-U");
+# 136 "pcb-menu.res"
+char *s = N_("Shift Ctrl<Key>u");
+# 275 "pcb-menu.res"
+char *s = N_("Cut selection to buffer");
+# 140 "pcb-menu.res"
+char *s = N_("Ctrl-X");
+# 140 "pcb-menu.res"
+char *s = N_("Ctrl<Key>x");
+# 273 "pcb-menu.res"
+char *s = N_("Copy selection to buffer");
+# 143 "pcb-menu.res"
+char *s = N_("Ctrl-C");
+# 143 "pcb-menu.res"
+char *s = N_("Ctrl<Key>c");
+# 277 "pcb-menu.res"
+char *s = N_("Paste buffer to layout");
+# 144 "pcb-menu.res"
+char *s = N_("Ctrl-V");
+# 144 "pcb-menu.res"
+char *s = N_("Ctrl<Key>v");
+# 146 "pcb-menu.res"
+char *s = N_("Unselect all");
+# 146 "pcb-menu.res"
+char *s = N_("Shift-Alt-A");
+# 146 "pcb-menu.res"
+char *s = N_("Shift Alt<Key>a");
+# 147 "pcb-menu.res"
+char *s = N_("Select all visible");
+# 147 "pcb-menu.res"
+char *s = N_("Alt-A");
+# 147 "pcb-menu.res"
+char *s = N_("Alt<Key>a");
+# 149 "pcb-menu.res"
+char *s = N_("Edit Names...");
+# 150 "pcb-menu.res"
+char *s = N_(" Change text on layout");
+# 150 "pcb-menu.res"
+char *s = N_("N");
+# 150 "pcb-menu.res"
+char *s = N_("<Key>n");
+# 151 "pcb-menu.res"
+char *s = N_(" Edit name of layout");
+# 152 "pcb-menu.res"
+char *s = N_(" Edit name of active layer");
+# 153 "pcb-menu.res"
+char *s = N_("Edit Attributes...");
+# 154 "pcb-menu.res"
+char *s = N_(" Layout");
+# 155 "pcb-menu.res"
+char *s = N_(" CurrentLayer");
+# 156 "pcb-menu.res"
+char *s = N_(" Element");
+# 158 "pcb-menu.res"
+char *s = N_("Board Sizes");
+# 159 "pcb-menu.res"
+char *s = N_("Route Styles");
+# 162 "pcb-menu.res"
+char *s = N_("Edit...");
+# 166 "pcb-menu.res"
+char *s = N_("None");
+# 167 "pcb-menu.res"
+char *s = N_("Via");
+# 167 "pcb-menu.res"
+char *s = N_("F1");
+# 167 "pcb-menu.res"
+char *s = N_("<Key>F1");
+# 168 "pcb-menu.res"
+char *s = N_("Line");
+# 168 "pcb-menu.res"
+char *s = N_("F2");
+# 168 "pcb-menu.res"
+char *s = N_("<Key>F2");
+# 169 "pcb-menu.res"
+char *s = N_("Arc");
+# 169 "pcb-menu.res"
+char *s = N_("F3");
+# 169 "pcb-menu.res"
+char *s = N_("<Key>F3");
+# 170 "pcb-menu.res"
+char *s = N_("Text");
+# 170 "pcb-menu.res"
+char *s = N_("F4");
+# 170 "pcb-menu.res"
+char *s = N_("<Key>F4");
+# 171 "pcb-menu.res"
+char *s = N_("Rectangle");
+# 171 "pcb-menu.res"
+char *s = N_("F5");
+# 171 "pcb-menu.res"
+char *s = N_("<Key>F5");
+# 172 "pcb-menu.res"
+char *s = N_("Polygon");
+# 172 "pcb-menu.res"
+char *s = N_("F6");
+# 172 "pcb-menu.res"
+char *s = N_("<Key>F6");
+# 173 "pcb-menu.res"
+char *s = N_("Polygon Hole");
+# 174 "pcb-menu.res"
+char *s = N_("Buffer");
+# 174 "pcb-menu.res"
+char *s = N_("F7");
+# 174 "pcb-menu.res"
+char *s = N_("<Key>F7");
+# 342 "pcb-menu.res"
+char *s = N_("Remove");
+# 175 "pcb-menu.res"
+char *s = N_("F8");
+# 175 "pcb-menu.res"
+char *s = N_("<Key>F8");
+# 176 "pcb-menu.res"
+char *s = N_("Rotate");
+# 176 "pcb-menu.res"
+char *s = N_("F9");
+# 176 "pcb-menu.res"
+char *s = N_("<Key>F9");
+# 177 "pcb-menu.res"
+char *s = N_("Thermal");
+# 177 "pcb-menu.res"
+char *s = N_("F10");
+# 177 "pcb-menu.res"
+char *s = N_("<Key>F10");
+# 420 "pcb-menu.res"
+char *s = N_("Arrow");
+# 178 "pcb-menu.res"
+char *s = N_("F11");
+# 178 "pcb-menu.res"
+char *s = N_("<Key>F11");
+# 179 "pcb-menu.res"
+char *s = N_("Insert Point");
+# 179 "pcb-menu.res"
+char *s = N_("Insert");
+# 179 "pcb-menu.res"
+char *s = N_("<Key>Insert");
+# 180 "pcb-menu.res"
+char *s = N_("Move");
+# 181 "pcb-menu.res"
+char *s = N_("Copy");
+# 182 "pcb-menu.res"
+char *s = N_("Lock");
+# 182 "pcb-menu.res"
+char *s = N_("F12");
+# 182 "pcb-menu.res"
+char *s = N_("<Key>F12");
+# 183 "pcb-menu.res"
+char *s = N_("Cancel");
+# 183 "pcb-menu.res"
+char *s = N_("Esc");
+# 183 "pcb-menu.res"
+char *s = N_("<Key>Escape");
+# 185 "pcb-menu.res"
+char *s = N_("Command");
+# 185 "pcb-menu.res"
+char *s = N_(":");
+# 185 "pcb-menu.res"
+char *s = N_("<Key>:");
+# 188 "pcb-menu.res"
+char *s = N_("Layer groups");
+# 189 "pcb-menu.res"
+char *s = N_("Edit layer groupings");
+# 191 "pcb-menu.res"
+char *s = N_("'All-direction' lines");
+# 191 "pcb-menu.res"
+char *s = N_(".");
+# 191 "pcb-menu.res"
+char *s = N_("<Key>.");
+# 192 "pcb-menu.res"
+char *s = N_("Auto swap line start angle");
+# 193 "pcb-menu.res"
+char *s = N_("Orthogonal moves");
+# 194 "pcb-menu.res"
+char *s = N_("Crosshair snaps to pins and pads");
+# 195 "pcb-menu.res"
+char *s = N_("Crosshair shows DRC clearance");
+# 196 "pcb-menu.res"
+char *s = N_("Auto enforce DRC clearance");
+# 198 "pcb-menu.res"
+char *s = N_("Rubber band mode");
+# 199 "pcb-menu.res"
+char *s = N_("Require unique element names");
+# 200 "pcb-menu.res"
+char *s = N_("Auto-zero delta measurements");
+# 201 "pcb-menu.res"
+char *s = N_("New lines, arcs clear polygons");
+# 202 "pcb-menu.res"
+char *s = N_("New polygons are full ones");
+# 203 "pcb-menu.res"
+char *s = N_("Show autorouter trials");
+# 204 "pcb-menu.res"
+char *s = N_("Thin draw");
+# 204 "pcb-menu.res"
+char *s = N_("|");
+# 204 "pcb-menu.res"
+char *s = N_("<Key>|");
+# 205 "pcb-menu.res"
+char *s = N_("Thin draw poly");
+# 205 "pcb-menu.res"
+char *s = N_("Ctrl-Shift-P");
+# 205 "pcb-menu.res"
+char *s = N_("Ctrl Shift<Key>p");
+# 206 "pcb-menu.res"
+char *s = N_("Check polygons");
+# 209 "pcb-menu.res"
+char *s = N_("Pins/Via show Name/Number");
+# 209 "pcb-menu.res"
+char *s = N_("D");
+# 209 "pcb-menu.res"
+char *s = N_("<Key>d");
+# 210 "pcb-menu.res"
+char *s = N_("Enable vendor drill mapping");
+# 211 "pcb-menu.res"
+char *s = N_("Import Settings");
+# 212 "pcb-menu.res"
+char *s = N_("New elements added at...");
+# 213 "pcb-menu.res"
+char *s = N_(" Center");
+# 214 "pcb-menu.res"
+char *s = N_(" Mark");
+# 215 "pcb-menu.res"
+char *s = N_(" Crosshair");
+# 217 "pcb-menu.res"
+char *s = N_("Set Dispersion");
+# 222 "pcb-menu.res"
+char *s = N_("Select all visible objects");
+# 223 "pcb-menu.res"
+char *s = N_("Select all found objects");
+# 224 "pcb-menu.res"
+char *s = N_("Select all connected objects");
+# 226 "pcb-menu.res"
+char *s = N_("Unselect all objects");
+# 227 "pcb-menu.res"
+char *s = N_("unselect all found objects");
+# 228 "pcb-menu.res"
+char *s = N_("unselect all connected objects");
+# 230 "pcb-menu.res"
+char *s = N_("Select by name");
+# 231 "pcb-menu.res"
+char *s = N_("All objects");
+# 268 "pcb-menu.res"
+char *s = N_("Elements");
+# 233 "pcb-menu.res"
+char *s = N_("Pads");
+# 269 "pcb-menu.res"
+char *s = N_("Pins");
+# 235 "pcb-menu.res"
+char *s = N_("Text Objects");
+# 236 "pcb-menu.res"
+char *s = N_("Vias");
+# 238 "pcb-menu.res"
+char *s = N_("Auto-place selected elements");
+# 238 "pcb-menu.res"
+char *s = N_("Ctrl-P");
+# 238 "pcb-menu.res"
+char *s = N_("Ctrl<Key>p");
+# 239 "pcb-menu.res"
+char *s = N_("Disperse all elements");
+# 240 "pcb-menu.res"
+char *s = N_("Move selected elements to other side");
+# 240 "pcb-menu.res"
+char *s = N_("Shift-B");
+# 240 "pcb-menu.res"
+char *s = N_("Shift<Key>b");
+# 241 "pcb-menu.res"
+char *s = N_("Move selected to current layer");
+# 241 "pcb-menu.res"
+char *s = N_("Shift-M");
+# 241 "pcb-menu.res"
+char *s = N_("Shift<Key>m");
+# 242 "pcb-menu.res"
+char *s = N_("Delete selected objects");
+# 242 "pcb-menu.res"
+char *s = N_("Delete");
+# 242 "pcb-menu.res"
+char *s = N_("<Key>Delete");
+# 243 "pcb-menu.res"
+char *s = N_("Convert selection to element");
+# 245 "pcb-menu.res"
+char *s = N_("Optimize selected rats");
+# 311 "pcb-menu.res"
+char *s = N_("Auto-route selected rats");
+# 246 "pcb-menu.res"
+char *s = N_("Alt-R");
+# 246 "pcb-menu.res"
+char *s = N_("Alt<Key>r");
+# 247 "pcb-menu.res"
+char *s = N_("Rip up selected auto-routed tracks");
+# 249 "pcb-menu.res"
+char *s = N_("Change size of selected objects");
+# 250 "pcb-menu.res"
+char *s = N_("Lines -10 mil");
+# 251 "pcb-menu.res"
+char *s = N_("Lines +10 mil");
+# 252 "pcb-menu.res"
+char *s = N_("Pads -10 mil");
+# 253 "pcb-menu.res"
+char *s = N_("Pads +10 mil");
+# 264 "pcb-menu.res"
+char *s = N_("Pins -10 mil");
+# 265 "pcb-menu.res"
+char *s = N_("Pins +10 mil");
+# 256 "pcb-menu.res"
+char *s = N_("Texts -10 mil");
+# 257 "pcb-menu.res"
+char *s = N_("Texts +10 mil");
+# 262 "pcb-menu.res"
+char *s = N_("Vias -10 mil");
+# 263 "pcb-menu.res"
+char *s = N_("Vias +10 mil");
+# 261 "pcb-menu.res"
+char *s = N_("Change drilling hole of selected objects");
+# 267 "pcb-menu.res"
+char *s = N_("Change square-flag of selected objects");
+# 279 "pcb-menu.res"
+char *s = N_("Rotate buffer 90 deg CCW");
+# 280 "pcb-menu.res"
+char *s = N_("Shift-F7");
+# 280 "pcb-menu.res"
+char *s = N_("Shift<Key>F7");
+# 281 "pcb-menu.res"
+char *s = N_("Rotate buffer 90 deg CW");
+# 282 "pcb-menu.res"
+char *s = N_("Arbitrarily Rotate Buffer");
+# 283 "pcb-menu.res"
+char *s = N_("Mirror buffer (up/down)");
+# 284 "pcb-menu.res"
+char *s = N_("Mirror buffer (left/right)");
+# 287 "pcb-menu.res"
+char *s = N_("Clear buffer");
+# 288 "pcb-menu.res"
+char *s = N_("Convert buffer to element");
+# 289 "pcb-menu.res"
+char *s = N_("Break buffer elements to pieces");
+# 290 "pcb-menu.res"
+char *s = N_("Save buffer elements to file");
+# 292 "pcb-menu.res"
+char *s = N_("Select current buffer");
+# 293 "pcb-menu.res"
+char *s = N_("#1");
+# 293 "pcb-menu.res"
+char *s = N_("Shift-1");
+# 293 "pcb-menu.res"
+char *s = N_("Shift<Key>1");
+# 294 "pcb-menu.res"
+char *s = N_("#2");
+# 294 "pcb-menu.res"
+char *s = N_("Shift-2");
+# 294 "pcb-menu.res"
+char *s = N_("Shift<Key>2");
+# 295 "pcb-menu.res"
+char *s = N_("#3");
+# 295 "pcb-menu.res"
+char *s = N_("Shift-3");
+# 295 "pcb-menu.res"
+char *s = N_("Shift<Key>3");
+# 296 "pcb-menu.res"
+char *s = N_("#4");
+# 296 "pcb-menu.res"
+char *s = N_("Shift-4");
+# 296 "pcb-menu.res"
+char *s = N_("Shift<Key>4");
+# 297 "pcb-menu.res"
+char *s = N_("#5");
+# 297 "pcb-menu.res"
+char *s = N_("Shift-5");
+# 297 "pcb-menu.res"
+char *s = N_("Shift<Key>5");
+# 301 "pcb-menu.res"
+char *s = N_("Lookup connection to object");
+# 301 "pcb-menu.res"
+char *s = N_("Ctrl-F");
+# 301 "pcb-menu.res"
+char *s = N_("Ctrl<Key>f");
+# 302 "pcb-menu.res"
+char *s = N_("Reset scanned pads/pins/vias");
+# 303 "pcb-menu.res"
+char *s = N_("Reset scanned lines/polygons");
+# 304 "pcb-menu.res"
+char *s = N_("Reset all connections");
+# 304 "pcb-menu.res"
+char *s = N_("Shift-F");
+# 304 "pcb-menu.res"
+char *s = N_("Shift<Key>f");
+# 306 "pcb-menu.res"
+char *s = N_("Optimize rats-nest");
+# 307 "pcb-menu.res"
+char *s = N_("O");
+# 307 "pcb-menu.res"
+char *s = N_("<Key>o");
+# 308 "pcb-menu.res"
+char *s = N_("Erase rats-nest");
+# 308 "pcb-menu.res"
+char *s = N_("E");
+# 308 "pcb-menu.res"
+char *s = N_("<Key>e");
+# 309 "pcb-menu.res"
+char *s = N_("Erase selected rats");
+# 309 "pcb-menu.res"
+char *s = N_("Shift-E");
+# 309 "pcb-menu.res"
+char *s = N_("Shift<Key>e");
+# 312 "pcb-menu.res"
+char *s = N_("Auto-route all rats");
+# 313 "pcb-menu.res"
+char *s = N_("Rip up all auto-routed tracks");
+# 315 "pcb-menu.res"
+char *s = N_("Auto-Optimize");
+# 315 "pcb-menu.res"
+char *s = N_("Shift-=");
+# 315 "pcb-menu.res"
+char *s = N_("Shift<Key>=");
+# 316 "pcb-menu.res"
+char *s = N_("Debumpify");
+# 317 "pcb-menu.res"
+char *s = N_("Unjaggy");
+# 318 "pcb-menu.res"
+char *s = N_("Vianudge");
+# 319 "pcb-menu.res"
+char *s = N_("Viatrim");
+# 320 "pcb-menu.res"
+char *s = N_("Orthopull");
+# 321 "pcb-menu.res"
+char *s = N_("SimpleOpts");
+# 321 "pcb-menu.res"
+char *s = N_("=");
+# 321 "pcb-menu.res"
+char *s = N_("<Key>=");
+# 322 "pcb-menu.res"
+char *s = N_("Miter");
+# 323 "pcb-menu.res"
+char *s = N_("Puller");
+# 323 "pcb-menu.res"
+char *s = N_("Y");
+# 323 "pcb-menu.res"
+char *s = N_("<Key>y");
+# 324 "pcb-menu.res"
+char *s = N_("Global Puller");
+# 325 "pcb-menu.res"
+char *s = N_("Selected");
+# 326 "pcb-menu.res"
+char *s = N_("Found");
+# 327 "pcb-menu.res"
+char *s = N_("All");
+# 329 "pcb-menu.res"
+char *s = N_("Only autorouted nets");
+# 331 "pcb-menu.res"
+char *s = N_("Design Rule Checker");
+# 333 "pcb-menu.res"
+char *s = N_("Apply vendor drill mapping");
+# 337 "pcb-menu.res"
+char *s = N_("Generate object report");
+# 337 "pcb-menu.res"
+char *s = N_("Ctrl-R");
+# 337 "pcb-menu.res"
+char *s = N_("Ctrl<Key>r");
+# 338 "pcb-menu.res"
+char *s = N_("Generate drill summary");
+# 339 "pcb-menu.res"
+char *s = N_("Report found pins/pads");
+# 340 "pcb-menu.res"
+char *s = N_("Report net length");
+# 340 "pcb-menu.res"
+char *s = N_("R");
+# 340 "pcb-menu.res"
+char *s = N_("<Key>r");
+# 341 "pcb-menu.res"
+char *s = N_("Key Bindings");
+# 342 "pcb-menu.res"
+char *s = N_("Backspace");
+# 342 "pcb-menu.res"
+char *s = N_("<Key>BackSpace");
+# 362 "pcb-menu.res"
+char *s = N_("Remove Connected");
+# 345 "pcb-menu.res"
+char *s = N_("Shift-Backspace");
+# 345 "pcb-menu.res"
+char *s = N_("Shift<Key>BackSpace");
+# 362 "pcb-menu.res"
+char *s = N_("Shift-Delete");
+# 362 "pcb-menu.res"
+char *s = N_("Shift<Key>Delete");
+# 379 "pcb-menu.res"
+char *s = N_("Set Same");
+# 379 "pcb-menu.res"
+char *s = N_("A");
+# 379 "pcb-menu.res"
+char *s = N_("<Key>a");
+# 380 "pcb-menu.res"
+char *s = N_("Flip Object");
+# 380 "pcb-menu.res"
+char *s = N_("B");
+# 380 "pcb-menu.res"
+char *s = N_("<Key>b");
+# 381 "pcb-menu.res"
+char *s = N_("Find Connections");
+# 381 "pcb-menu.res"
+char *s = N_("F");
+# 381 "pcb-menu.res"
+char *s = N_("<Key>f");
+# 382 "pcb-menu.res"
+char *s = N_("ToggleHideName Object");
+# 382 "pcb-menu.res"
+char *s = N_("H");
+# 382 "pcb-menu.res"
+char *s = N_("<Key>h");
+# 383 "pcb-menu.res"
+char *s = N_("ToggleHideName SelectedElement");
+# 383 "pcb-menu.res"
+char *s = N_("Shift-H");
+# 383 "pcb-menu.res"
+char *s = N_("Shift<Key>h");
+# 384 "pcb-menu.res"
+char *s = N_("ChangeHole Object");
+# 384 "pcb-menu.res"
+char *s = N_("Ctrl-H");
+# 384 "pcb-menu.res"
+char *s = N_("Ctrl<Key>h");
+# 385 "pcb-menu.res"
+char *s = N_("ChangeJoin Object");
+# 385 "pcb-menu.res"
+char *s = N_("J");
+# 385 "pcb-menu.res"
+char *s = N_("<Key>j");
+# 386 "pcb-menu.res"
+char *s = N_("ChangeJoin SelectedObject");
+# 386 "pcb-menu.res"
+char *s = N_("Shift-J");
+# 386 "pcb-menu.res"
+char *s = N_("Shift<Key>j");
+# 387 "pcb-menu.res"
+char *s = N_("Clear Object +");
+# 387 "pcb-menu.res"
+char *s = N_("K");
+# 387 "pcb-menu.res"
+char *s = N_("<Key>k");
+# 388 "pcb-menu.res"
+char *s = N_("Clear Object -");
+# 388 "pcb-menu.res"
+char *s = N_("Shift-K");
+# 388 "pcb-menu.res"
+char *s = N_("Shift<Key>k");
+# 389 "pcb-menu.res"
+char *s = N_("Clear Selected +");
+# 389 "pcb-menu.res"
+char *s = N_("Ctrl-K");
+# 389 "pcb-menu.res"
+char *s = N_("Ctrl<Key>k");
+# 390 "pcb-menu.res"
+char *s = N_("Clear Selected -");
+# 390 "pcb-menu.res"
+char *s = N_("Shift-Ctrl-K");
+# 390 "pcb-menu.res"
+char *s = N_("Shift Ctrl<Key>k");
+# 391 "pcb-menu.res"
+char *s = N_("Line Tool size +");
+# 391 "pcb-menu.res"
+char *s = N_("L");
+# 391 "pcb-menu.res"
+char *s = N_("<Key>l");
+# 392 "pcb-menu.res"
+char *s = N_("Line Tool size -");
+# 392 "pcb-menu.res"
+char *s = N_("Shift-L");
+# 392 "pcb-menu.res"
+char *s = N_("Shift<Key>l");
+# 393 "pcb-menu.res"
+char *s = N_("Move Object to current layer");
+# 393 "pcb-menu.res"
+char *s = N_("M");
+# 393 "pcb-menu.res"
+char *s = N_("<Key>m");
+# 394 "pcb-menu.res"
+char *s = N_("MarkCrosshair");
+# 394 "pcb-menu.res"
+char *s = N_("Ctrl-M");
+# 394 "pcb-menu.res"
+char *s = N_("Ctrl<Key>m");
+# 395 "pcb-menu.res"
+char *s = N_("Select shortest rat");
+# 395 "pcb-menu.res"
+char *s = N_("Shift-N");
+# 395 "pcb-menu.res"
+char *s = N_("Shift<Key>n");
+# 396 "pcb-menu.res"
+char *s = N_("AddRats to selected pins");
+# 396 "pcb-menu.res"
+char *s = N_("Shift-O");
+# 396 "pcb-menu.res"
+char *s = N_("Shift<Key>o");
+# 402 "pcb-menu.res"
+char *s = N_("ChangeOctagon Object");
+# 402 "pcb-menu.res"
+char *s = N_("Ctrl-O");
+# 402 "pcb-menu.res"
+char *s = N_("Ctrl<Key>o");
+# 403 "pcb-menu.res"
+char *s = N_("Polygon PreviousPoint");
+# 403 "pcb-menu.res"
+char *s = N_("P");
+# 403 "pcb-menu.res"
+char *s = N_("<Key>p");
+# 404 "pcb-menu.res"
+char *s = N_("Polygon Close");
+# 404 "pcb-menu.res"
+char *s = N_("Shift-P");
+# 404 "pcb-menu.res"
+char *s = N_("Shift<Key>p");
+# 405 "pcb-menu.res"
+char *s = N_("ChangeSquare Object");
+# 405 "pcb-menu.res"
+char *s = N_("Q");
+# 405 "pcb-menu.res"
+char *s = N_("<Key>q");
+# 406 "pcb-menu.res"
+char *s = N_("ChangeSize +");
+# 406 "pcb-menu.res"
+char *s = N_("S");
+# 406 "pcb-menu.res"
+char *s = N_("<Key>s");
+# 407 "pcb-menu.res"
+char *s = N_("ChangeSize -");
+# 407 "pcb-menu.res"
+char *s = N_("Shift-S");
+# 407 "pcb-menu.res"
+char *s = N_("Shift<Key>s");
+# 408 "pcb-menu.res"
+char *s = N_("ChangeDrill +5 mil");
+# 408 "pcb-menu.res"
+char *s = N_("Alt-S");
+# 408 "pcb-menu.res"
+char *s = N_("Alt<Key>s");
+# 409 "pcb-menu.res"
+char *s = N_("ChangeDrill -5 mil");
+# 409 "pcb-menu.res"
+char *s = N_("Alt-Shift-S");
+# 409 "pcb-menu.res"
+char *s = N_("Alt Shift<Key>s");
+# 410 "pcb-menu.res"
+char *s = N_("Text Tool scale +10 mil");
+# 410 "pcb-menu.res"
+char *s = N_("T");
+# 410 "pcb-menu.res"
+char *s = N_("<Key>t");
+# 411 "pcb-menu.res"
+char *s = N_("Text Tool scale -10 mil");
+# 411 "pcb-menu.res"
+char *s = N_("Shift-T");
+# 411 "pcb-menu.res"
+char *s = N_("Shift<Key>t");
+# 412 "pcb-menu.res"
+char *s = N_("Via Tool size +5 mil");
+# 412 "pcb-menu.res"
+char *s = N_("Shift-V");
+# 412 "pcb-menu.res"
+char *s = N_("Shift<Key>v");
+# 413 "pcb-menu.res"
+char *s = N_("Via Tool size -5 mil");
+# 413 "pcb-menu.res"
+char *s = N_("Shift-Ctrl-V");
+# 413 "pcb-menu.res"
+char *s = N_("Shift Ctrl<Key>v");
+# 414 "pcb-menu.res"
+char *s = N_("Via Tool drill +5 mil");
+# 414 "pcb-menu.res"
+char *s = N_("Alt-V");
+# 414 "pcb-menu.res"
+char *s = N_("Alt<Key>v");
+# 415 "pcb-menu.res"
+char *s = N_("Via Tool drill -5 mil");
+# 415 "pcb-menu.res"
+char *s = N_("Alt-Shift-V");
+# 415 "pcb-menu.res"
+char *s = N_("Alt Shift<Key>v");
+# 416 "pcb-menu.res"
+char *s = N_("AddRats Selected");
+# 416 "pcb-menu.res"
+char *s = N_("Shift-W");
+# 416 "pcb-menu.res"
+char *s = N_("Shift<Key>w");
+# 417 "pcb-menu.res"
+char *s = N_("Add All Rats");
+# 417 "pcb-menu.res"
+char *s = N_("W");
+# 417 "pcb-menu.res"
+char *s = N_("<Key>w");
+# 418 "pcb-menu.res"
+char *s = N_("Undo");
+# 418 "pcb-menu.res"
+char *s = N_("Alt-Z");
+# 418 "pcb-menu.res"
+char *s = N_("Alt<Key>z");
+# 419 "pcb-menu.res"
+char *s = N_("Cycle Clip");
+# 419 "pcb-menu.res"
+char *s = N_("/");
+# 419 "pcb-menu.res"
+char *s = N_("<Key>/");
+# 420 "pcb-menu.res"
+char *s = N_("Space");
+# 420 "pcb-menu.res"
+char *s = N_("<Key>space");
+# 421 "pcb-menu.res"
+char *s = N_("Temp Arrow ON");
+# 421 "pcb-menu.res"
+char *s = N_("[");
+# 421 "pcb-menu.res"
+char *s = N_("<Key>[");
+# 422 "pcb-menu.res"
+char *s = N_("Temp Arrow OFF");
+# 422 "pcb-menu.res"
+char *s = N_("]");
+# 422 "pcb-menu.res"
+char *s = N_("<Key>]");
+# 424 "pcb-menu.res"
+char *s = N_("Step Up");
+# 428 "pcb-menu.res"
+char *s = N_("Up");
+# 424 "pcb-menu.res"
+char *s = N_("<Key>Up");
+# 425 "pcb-menu.res"
+char *s = N_("Step Down");
+# 429 "pcb-menu.res"
+char *s = N_("Down");
+# 425 "pcb-menu.res"
+char *s = N_("<Key>Down");
+# 426 "pcb-menu.res"
+char *s = N_("Step Left");
+# 430 "pcb-menu.res"
+char *s = N_("Left");
+# 426 "pcb-menu.res"
+char *s = N_("<Key>Left");
+# 427 "pcb-menu.res"
+char *s = N_("Step Right");
+# 431 "pcb-menu.res"
+char *s = N_("Right");
+# 427 "pcb-menu.res"
+char *s = N_("<Key>Right");
+# 428 "pcb-menu.res"
+char *s = N_("Step +Up");
+# 428 "pcb-menu.res"
+char *s = N_("Shift<Key>Up");
+# 429 "pcb-menu.res"
+char *s = N_("Step +Down");
+# 429 "pcb-menu.res"
+char *s = N_("Shift<Key>Down");
+# 430 "pcb-menu.res"
+char *s = N_("Step +Left");
+# 430 "pcb-menu.res"
+char *s = N_("Shift<Key>Left");
+# 431 "pcb-menu.res"
+char *s = N_("Step +Right");
+# 431 "pcb-menu.res"
+char *s = N_("Shift<Key>Right");
+# 432 "pcb-menu.res"
+char *s = N_("Click");
+# 432 "pcb-menu.res"
+char *s = N_("Enter");
+# 432 "pcb-menu.res"
+char *s = N_("<Key>Enter");
+# 436 "pcb-menu.res"
+char *s = N_("Board Layout");
+# 437 "pcb-menu.res"
+char *s = N_("Library");
+# 438 "pcb-menu.res"
+char *s = N_("Message Log");
+# 439 "pcb-menu.res"
+char *s = N_("Netlist");
+# 440 "pcb-menu.res"
+char *s = N_("Pinout");
diff --git a/src/pcb-menu.res.in b/src/pcb-menu.res.in
index 7e6e8bd..e37bd7c 100644
--- a/src/pcb-menu.res.in
+++ b/src/pcb-menu.res.in
@@ -111,10 +111,8 @@ MainMenu =
     {"0.5 mm"  checked=gridsize,0.50mm SetUnits(mm) SetValue(Grid,0.5mm)}
     {"1 mm"    checked=gridsize,1mm SetUnits(mm) SetValue(Grid,1mm)}
     -
-    {"Grid -5mil" SetValue(Grid,-5,mil) a={"Shift-G" "Shift<Key>g"}}
-    {"Grid +5mil" SetValue(Grid,+5,mil) a={"G" "<Key>g"}}
-    {"Grid -0.05mm" SetValue(Grid,-0.05,mm) a={"Shift-Ctrl-G" "Shift Ctrl<Key>g"}}
-    {"Grid +0.05mm" SetValue(Grid,+0.05,mm) a={"Ctrl-G" "Ctrl<Key>g"}}
+    {"Grid -" SetValue(Grid,-) a={"Shift-G" "Shift<Key>g"}}
+    {"Grid +" SetValue(Grid,+) a={"G" "<Key>g"}}
    }
    -
    {"Shown Layers"
@@ -221,9 +219,11 @@ MainMenu =
 
   {Select
    {"Select all visible objects" Select(All)}
+   {"Select all found objects" Select(Found)}
    {"Select all connected objects" Select(Connection)}
    -
    {"Unselect all objects" Unselect(All)}
+   {"unselect all found objects" Unselect(Found)}
    {"unselect all connected objects" Unselect(Connection)}
    -
    {"Select by name" foreground=grey50 sensitive=false}
@@ -383,12 +383,12 @@ MainMenu =
     {"ChangeHole Object" a={"Ctrl-H" "Ctrl<Key>h"} ChangeHole(Object)}
     {"ChangeJoin Object" a={"J" "<Key>j"} ChangeJoin(Object)}
     {"ChangeJoin SelectedObject" a={"Shift-J" "Shift<Key>j"} ChangeJoin(SelectedObjects)}
-    {"Clear Object +2 mil" a={"K" "<Key>k"} ChangeClearSize(Object,+2,mil)}
-    {"Clear Object -2 mil" a={"Shift-K" "Shift<Key>k"} ChangeClearSize(Object,-2,mil)}
-    {"Clear Selected +2 mil" a={"Ctrl-K" "Ctrl<Key>k"} ChangeClearSize(SelectedObjects,+2,mil)}
-    {"Clear Selected -2 mil" a={"Shift-Ctrl-K" "Shift Ctrl<Key>k"} ChangeClearSize(SelectedObjects,-2,mil)}
-    {"Line Tool size +5 mil" a={"L" "<Key>l"} SetValue(LineSize,+5,mil)}
-    {"Line Tool size -5 mil" a={"Shift-L" "Shift<Key>l"} SetValue(LineSize,-5,mil)}
+    {"Clear Object +" a={"K" "<Key>k"} ChangeClearSize(Object,+)}
+    {"Clear Object -" a={"Shift-K" "Shift<Key>k"} ChangeClearSize(Object,-)}
+    {"Clear Selected +" a={"Ctrl-K" "Ctrl<Key>k"} ChangeClearSize(SelectedObjects,+)}
+    {"Clear Selected -" a={"Shift-Ctrl-K" "Shift Ctrl<Key>k"} ChangeClearSize(SelectedObjects,-)}
+    {"Line Tool size +" a={"L" "<Key>l"} SetValue(LineSize,+)}
+    {"Line Tool size -" a={"Shift-L" "Shift<Key>l"} SetValue(LineSize,-)}
     {"Move Object to current layer" a={"M" "<Key>m"} MoveToCurrentLayer(Object)}
     {"MarkCrosshair" a={"Ctrl-M" "Ctrl<Key>m"} MarkCrosshair()}
     {"Select shortest rat" a={"Shift-N" "Shift<Key>n"} AddRats(Close)}
@@ -402,8 +402,8 @@ MainMenu =
     {"Polygon PreviousPoint" a={"P" "<Key>p"} Polygon(PreviousPoint)}
     {"Polygon Close" a={"Shift-P" "Shift<Key>p"} Polygon(Close)}
     {"ChangeSquare Object" a={"Q" "<Key>q"} ChangeSquare(Object)}
-    {"ChangeSize +5 mil" a={"S" "<Key>s"} ChangeSize(Object,+5,mil)}
-    {"ChangeSize -5 mil" a={"Shift-S" "Shift<Key>s"} ChangeSize(Object,-5,mil)}
+    {"ChangeSize +" a={"S" "<Key>s"} ChangeSize(Object,+)}
+    {"ChangeSize -" a={"Shift-S" "Shift<Key>s"} ChangeSize(Object,-)}
     {"ChangeDrill +5 mil" a={"Alt-S" "Alt<Key>s"} ChangeDrillSize(Object,+5,mil)}
     {"ChangeDrill -5 mil" a={"Alt-Shift-S" "Alt Shift<Key>s"} ChangeDrillSize(Object,-5,mil)}
     {"Text Tool scale +10 mil" a={"T" "<Key>t"} SetValue(TextScale,+10,mil)}
diff --git a/src/pcb-printf.c b/src/pcb-printf.c
index 88c98ee..e53df64 100644
--- a/src/pcb-printf.c
+++ b/src/pcb-printf.c
@@ -49,7 +49,8 @@
 
 /* These should be kept in order of smallest scale_factor
  * to largest -- the code uses this ordering when finding
- * the best scale to use for a group of measures */
+ * the best scale to use for a group of measures. */
+ 
 static Unit Units[] = {
   { 0, "km", NULL, 'k', 0.000001, METRIC, ALLOW_KM, 5,
              0.00005, 0.0005, 0.0025, 0.05, 0.25,
@@ -69,6 +70,13 @@ static Unit Units[] = {
   { 0, "nm", NULL, 'n', 1000000,  METRIC, ALLOW_NM, 0,
              5, 50, 2500, 5000, 25000,
              { "" } },
+/* Hack: Pixels get parsed like nanometers. If the value of the 
+ * resulting integer is sufficiently small, the code interprets 
+ * it a screen pixels. This affects rat thickness. */            
+  { 0, "px", NULL, 'n', 1000000,  METRIC, ALLOW_NM, 0,
+             5, 50, 2500, 5000, 25000,
+             { "" } },
+
 
   { 0, "in",   NULL, 'i', 0.001, IMPERIAL, ALLOW_IN,   5,
                0.1, 1.0, 5.0, 25, 100,
@@ -76,6 +84,9 @@ static Unit Units[] = {
   { 0, "mil",  NULL, 'l', 1,     IMPERIAL, ALLOW_MIL,  2,
                0.1, 1.0, 10, 100, 1000,
                { "" } },
+  { 0, "dmil", NULL, 't', 10,   IMPERIAL, ALLOW_DMIL, 0,
+               1, 10, 100, 1000, 10000,
+               { "" } },
   { 0, "cmil", NULL, 'c', 100,   IMPERIAL, ALLOW_CMIL, 0,
                1, 10, 100, 1000, 10000,
                { "pcb" } }
@@ -97,55 +108,26 @@ void initialize_units()
     }
 }
 
-/* This list -must- contain all printable units from the above list */
-/* For now I have just copy/pasted the same values for all metric
- * units and the same values for all imperial ones */
-static Increments increments[] = {
-  /* TABLE FORMAT   |  default  |  min  |  max
-   *          grid  |           |       |
-   *          size  |           |       |
-   *          line  |           |       |
-   *         clear  |           |       |
-   */
-  { "km", MM_TO_COORD3 (0.1,  0.01,  1.0),
-          MM_TO_COORD3 (0.2,  0.01,  0.5),
-          MM_TO_COORD3 (0.1,  0.005, 0.5),
-          MM_TO_COORD3 (0.05, 0.005, 0.5) },
-  { "m",  MM_TO_COORD3 (0.1,  0.01,  1.0),
-          MM_TO_COORD3 (0.2,  0.01,  0.5),
-          MM_TO_COORD3 (0.1,  0.005, 0.5),
-          MM_TO_COORD3 (0.05, 0.005, 0.5) },
-  { "cm", MM_TO_COORD3 (0.1,  0.01,  1.0),
-          MM_TO_COORD3 (0.2,  0.01,  0.5),
-          MM_TO_COORD3 (0.1,  0.005, 0.5),
-          MM_TO_COORD3 (0.05, 0.005, 0.5) },
-  { "mm", MM_TO_COORD3 (0.1,  0.01,  1.0),
-          MM_TO_COORD3 (0.2,  0.01,  0.5),
-          MM_TO_COORD3 (0.1,  0.005, 0.5),
-          MM_TO_COORD3 (0.05, 0.005, 0.5) },
-  { "um", MM_TO_COORD3 (0.1,  0.01,  1.0),
-          MM_TO_COORD3 (0.2,  0.01,  0.5),
-          MM_TO_COORD3 (0.1,  0.005, 0.5),
-          MM_TO_COORD3 (0.05, 0.005, 0.5) },
-  { "nm", MM_TO_COORD3 (0.1,  0.01,  1.0),
-          MM_TO_COORD3 (0.2,  0.01,  0.5),
-          MM_TO_COORD3 (0.1,  0.005, 0.5),
-          MM_TO_COORD3 (0.05, 0.005, 0.5) },
-
-  { "cmil", MIL_TO_COORD3 (5,  1,   25),
-            MIL_TO_COORD3 (10, 1,   10),
-            MIL_TO_COORD3 (5,  0.5, 10),
-            MIL_TO_COORD3 (2,  0.5, 10) },
-  { "mil",  MIL_TO_COORD3 (5,  1,   25),
-            MIL_TO_COORD3 (10, 1,   10),
-            MIL_TO_COORD3 (5,  0.5, 10),
-            MIL_TO_COORD3 (2,  0.5, 10) },
-  { "in",   MIL_TO_COORD3 (5,  1,   25),
-            MIL_TO_COORD3 (10, 1,   10),
-            MIL_TO_COORD3 (5,  0.5, 10),
-            MIL_TO_COORD3 (2,  0.5, 10) },
+/* TABLE FORMAT   |  default  |  min  |  max
+ *          grid  |           |       |
+ *          size  |           |       |
+ *          line  |           |       |
+ *         clear  |           |       |
+ */
+static Increments increments_metric = {
+  "mm",
+  MM_TO_COORD3 (0.1,  0.01,  1.0),
+  MM_TO_COORD3 (0.2,  0.01,  0.5),
+  MM_TO_COORD3 (0.1,  0.005, 0.5),
+  MM_TO_COORD3 (0.05, 0.005, 0.5)
+};
+static Increments increments_imperial = {
+  "mil",
+  MIL_TO_COORD3 (5,  1,   25),
+  MIL_TO_COORD3 (10, 1,   10),
+  MIL_TO_COORD3 (5,  0.5, 10),
+  MIL_TO_COORD3 (2,  0.5, 10)
 };
-#define N_INCREMENTS (sizeof increments / sizeof increments[0])
 
 /* \brief Obtain a unit object from its suffix
  * \par Function Description
@@ -182,10 +164,10 @@ const Unit *get_unit_struct (const char *const_suffix)
     }
 
   /* Do lookup */
-  if (*suffix)
+  if (*suffix && s_len > 0)
     for (i = 0; i < N_UNITS; ++i)
-      if (strcmp (suffix, Units[i].suffix) == 0 ||
-          strcmp (suffix, Units[i].alias[0]) == 0)
+      if (strncmp (suffix, Units[i].suffix, s_len) == 0 ||
+          strncmp (suffix, Units[i].alias[0], s_len) == 0)
         {
           g_free (m_suffix);
           return &Units[i];
@@ -194,6 +176,18 @@ const Unit *get_unit_struct (const char *const_suffix)
   return NULL;
 }
 
+void copy_nonzero_increments (Increments *dst, const Increments *src)
+{
+  if (src->grid >= dst->grid_min && src->grid <= dst->grid_max)
+    dst->grid = src->grid;
+  if (src->line >= dst->line_min && src->line <= dst->line_max)
+    dst->line = src->line;
+  if (src->size >= dst->size_min && src->size <= dst->size_max)
+    dst->size = src->size;
+  if (src->clear >= dst->clear_min && src->clear <= dst->clear_max)
+    dst->clear = src->clear;
+}
+
 /* ACCESSORS */
 /* \brief Returns the master unit list. This may not be modified. */
 const Unit *get_unit_list (void)
@@ -206,22 +200,22 @@ int get_n_units (void)
 	return N_UNITS;
 }
 
-/* \brief Obtain an increment object from its suffix
+/* \brief Obtain the increment values for a given family of units
  * \par Function Description
- * Looks up a given suffix in the main increments array. Internationalized
- * unit suffixes are not supported, nor are pluralized units.
  *
- * \param [in] suffix   The suffix to look up
+ * \param [in] family   One of METRIC or IMPERIAL.
  *
- * \return A const pointer to the Increments struct, or NULL if none was found
+ * \return A pointer to the appropriate increments structure.
  */
-Increments *get_increments_struct (const char *suffix)
+Increments *get_increments_struct (enum e_family family)
 {
-  int i;
-  /* Do lookup */
-  for (i = 0; i < N_INCREMENTS; ++i)
-    if (strcmp (suffix, increments[i].suffix) == 0)
-      return &increments[i];
+  switch (family)
+    {
+    case METRIC:
+      return &increments_metric;
+    case IMPERIAL:
+      return &increments_imperial;
+    }
   return NULL;
 }
 
@@ -367,11 +361,11 @@ static gchar *CoordsToString(Coord coord[], int n_coords, const char *printf_spe
   for (i = 0; i < n_coords; ++i)
     value[i] = value[i] * Units[n].scale_factor;
 
-  /* Create sprintf specifier, using default_prec no preciscion is given */
+  /* Create sprintf specifier, using default_prec no precision is given */
   i = 0;
   while (printf_spec[i] == '%' || isdigit(printf_spec[i]) ||
          printf_spec[i] == '-' || printf_spec[i] == '+' ||
-         printf_spec[i] == '#' || printf_spec[i] == '0')
+         printf_spec[i] == '#')
     ++i;
   if (printf_spec[i] == '.')
     printf_buff = g_strdup_printf (", %sf", printf_spec);
@@ -382,7 +376,7 @@ static gchar *CoordsToString(Coord coord[], int n_coords, const char *printf_spe
    *  (+ 2 skips the ", " for first value) */
   if (n_coords > 1)
     g_string_append_c (buff, '(');
-  if (suffix_type == FILE_MODE)
+  if (suffix_type == FILE_MODE || suffix_type == FILE_MODE_NO_SUFFIX)
     {
       g_ascii_formatd (filemode_buff, sizeof filemode_buff, printf_buff + 2, value[0]);
       g_string_append_printf (buff, "%s", filemode_buff);
@@ -391,7 +385,7 @@ static gchar *CoordsToString(Coord coord[], int n_coords, const char *printf_spe
     g_string_append_printf (buff, printf_buff + 2, value[0]);
   for (i = 1; i < n_coords; ++i)
     {
-      if (suffix_type == FILE_MODE)
+      if (suffix_type == FILE_MODE || suffix_type == FILE_MODE_NO_SUFFIX)
         {
           g_ascii_formatd (filemode_buff, sizeof filemode_buff, printf_buff, value[i]);
           g_string_append_printf (buff, "%s", filemode_buff);
@@ -407,6 +401,7 @@ static gchar *CoordsToString(Coord coord[], int n_coords, const char *printf_spe
       switch (suffix_type)
         {
         case NO_SUFFIX:
+        case FILE_MODE_NO_SUFFIX:
           break;
         case SUFFIX:
           g_string_append_printf (buff, " %s", suffix);
@@ -479,7 +474,12 @@ gchar *pcb_vprintf(const char *fmt, va_list args)
             }
           if(*fmt == '$')
             {
-              suffix = SUFFIX;
+              suffix = (suffix == NO_SUFFIX) ? SUFFIX : FILE_MODE;
+              fmt++;
+            }
+          if(*fmt == '`')
+            {
+              suffix = (suffix == SUFFIX) ? FILE_MODE : FILE_MODE_NO_SUFFIX;
               fmt++;
             }
           /* Tack full specifier onto specifier */
@@ -549,11 +549,7 @@ gchar *pcb_vprintf(const char *fmt, va_list args)
                 case 'S': unit_str = CoordsToString(value, 1, spec->str, mask & ALLOW_ALL, suffix); break;
                 case 'M': unit_str = CoordsToString(value, 1, spec->str, mask & ALLOW_METRIC, suffix); break;
                 case 'L': unit_str = CoordsToString(value, 1, spec->str, mask & ALLOW_IMPERIAL, suffix); break;
-#if 0
                 case 'r': unit_str = CoordsToString(value, 1, spec->str, ALLOW_READABLE, FILE_MODE); break;
-#else
-                case 'r': unit_str = CoordsToString(value, 1, spec->str, ALLOW_READABLE, NO_SUFFIX); break;
-#endif
                 /* All these fallthroughs are deliberate */
                 case '9': value[count++] = va_arg(args, Coord);
                 case '8': value[count++] = va_arg(args, Coord);
diff --git a/src/pcb-printf.h b/src/pcb-printf.h
index 453b6ef..9f4f735 100644
--- a/src/pcb-printf.h
+++ b/src/pcb-printf.h
@@ -34,9 +34,16 @@
  *  it.
  *
  * The new specifiers are:
+ *   %mk    output a measure in km
+ *   %mf    output a measure in meters
+ *   %me    output a measure in cm
  *   %mm    output a measure in mm
+ *   %mu    output a measure in um
+ *   %mn    output a measure in nm
  *   %mM    output a measure in scaled (mm/um) metric
  *   %ml    output a measure in mil
+ *   %mc    output a measure in cmil
+ *   %mt    output a measure in 1/10 of mils (for Excellon drill files)
  *   %mL    output a measure in scaled (mil/in) imperial
  *   %ms    output a measure in most natural mm/mil units
  *   %mS    output a measure in most natural scaled units
@@ -59,6 +66,8 @@
  *     #    prevents all scaling for %mS/D/1/.../9 (this should
  *          ONLY be used for debug code since its output exposes
  *          pcb's base units).
+ *     `    always use '.' as decimal separator (note that %mr uses
+ *          this by default).
  *
  * KNOWN ISSUES:
  *   No support for %zu size_t printf spec
@@ -77,26 +86,32 @@ enum e_allow {
   ALLOW_KM = 32,
 
   ALLOW_CMIL = 1024,
-  ALLOW_MIL  = 2048,
-  ALLOW_IN   = 4096,
+  ALLOW_DMIL = 2048,
+  ALLOW_MIL  = 4096,
+  ALLOW_IN   = 8192,
 
   ALLOW_METRIC   = ALLOW_NM | ALLOW_UM | ALLOW_MM |
                    ALLOW_CM | ALLOW_M  | ALLOW_KM,
-  ALLOW_IMPERIAL = ALLOW_CMIL | ALLOW_MIL | ALLOW_IN,
+  ALLOW_IMPERIAL = ALLOW_CMIL | ALLOW_DMIL | ALLOW_MIL | ALLOW_IN,
   /* This is all units allowed in parse_l.l */
 #if 0
   ALLOW_READABLE = ALLOW_NM | ALLOW_UM | ALLOW_MM |
                    ALLOW_M  | ALLOW_KM | ALLOW_CMIL |
                    ALLOW_MIL | ALLOW_IN,
 #else
-  ALLOW_READABLE = ALLOW_CMIL,
+  ALLOW_READABLE = ALLOW_MIL | ALLOW_MM,
 #endif
 
-  ALLOW_ALL = ~0
+  ALLOW_ALL = ~ALLOW_DMIL
 };
 
 enum e_family { METRIC, IMPERIAL };
-enum e_suffix { NO_SUFFIX, SUFFIX, FILE_MODE };
+enum e_suffix {
+  NO_SUFFIX,			/* no suffix  */
+  SUFFIX,			/* suffix, prefixed with ' ' */
+  FILE_MODE_NO_SUFFIX,		/* no suffix, force '.' as decimal */
+  FILE_MODE			/* suffix, force '.' as decimal */
+};
 
 struct unit {
   int index;			/* Index into Unit[] list */
@@ -144,7 +159,8 @@ const Unit *get_unit_list (void);
 int get_n_units (void);
 double coord_to_unit (const Unit *, Coord);
 Coord  unit_to_coord (const Unit *, double);
-Increments *get_increments_struct (const char *suffix);
+Increments *get_increments_struct (enum e_family family);
+void copy_nonzero_increments (Increments *dst, const Increments *src);
 
 int pcb_fprintf(FILE *f, const char *fmt, ...);
 int pcb_sprintf(char *string, const char *fmt, ...);
diff --git a/src/pcbtest.sh.in b/src/pcbtest.sh.in
index e1e97b2..8b5ec41 100755
--- a/src/pcbtest.sh.in
+++ b/src/pcbtest.sh.in
@@ -22,9 +22,6 @@
 #   Contact addresses for paper mail and Email:
 #   Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
 #   Thomas.Nau at rz.uni-ulm.de
-# 
-#   RCS: $Id$
-#
 #
 #
 # starts a test installation of pcb
@@ -37,7 +34,7 @@
 # Use  --g-fatal-warnings with the gtk HID to cause gtk-WARNING's to
 # abort.
 
-TEST_PATHS="--lib-path @TOP_BUILDDIR@/lib --lib-newlib @TOPSRCDIR@/newlib:@TOP_BUILDDIR@/lib/pcblib-newlib --element-path @TOP_BUILDDIR@/lib --font-path @TOPSRCDIR@/src"
+TEST_PATHS="--lib-path @TOP_BUILDDIR@/lib --lib-newlib @TOPSRCDIR@/newlib:@TOPSRCDIR@/lib/pcblib-newlib --element-path @TOP_BUILDDIR@/lib --font-path @TOPSRCDIR@/src"
 TEST_CMDS="--lib-command-dir @TOP_BUILDDIR@/lib"
 
 # note:  To do command line exporting, pcb requires the "-x <export_hid>" command to appear first.  For example
diff --git a/src/polygon.c b/src/polygon.c
index 14f239d..5f17fd0 100644
--- a/src/polygon.c
+++ b/src/polygon.c
@@ -122,7 +122,7 @@ polygon_init (void)
 }
 
 Cardinal
-polygon_point_idx (PolygonTypePtr polygon, PointTypePtr point)
+polygon_point_idx (PolygonType *polygon, PointType *point)
 {
   assert (point >= polygon->Points);
   assert (point <= polygon->Points + polygon->PointN);
@@ -131,7 +131,7 @@ polygon_point_idx (PolygonTypePtr polygon, PointTypePtr point)
 
 /* Find contour number: 0 for outer, 1 for first hole etc.. */
 Cardinal
-polygon_point_contour (PolygonTypePtr polygon, Cardinal point)
+polygon_point_contour (PolygonType *polygon, Cardinal point)
 {
   Cardinal i;
   Cardinal contour = 0;
@@ -143,7 +143,7 @@ polygon_point_contour (PolygonTypePtr polygon, Cardinal point)
 }
 
 Cardinal
-next_contour_point (PolygonTypePtr polygon, Cardinal point)
+next_contour_point (PolygonType *polygon, Cardinal point)
 {
   Cardinal contour;
   Cardinal this_contour_start;
@@ -165,7 +165,7 @@ next_contour_point (PolygonTypePtr polygon, Cardinal point)
 }
 
 Cardinal
-prev_contour_point (PolygonTypePtr polygon, Cardinal point)
+prev_contour_point (PolygonType *polygon, Cardinal point)
 {
   Cardinal contour;
   Cardinal prev_contour_end;
@@ -794,7 +794,7 @@ SubtractPin (DataType * d, PinType * pin, LayerType * l, PolygonType * p)
   i = GetLayerNumber (d, l);
   if (TEST_THERM (i, pin))
     {
-      np = ThermPoly ((PCBTypePtr) (d->pcb), pin, i);
+      np = ThermPoly ((PCBType *) (d->pcb), pin, i);
       if (!np)
         return 0;
     }
@@ -880,7 +880,7 @@ struct cpInfo
 };
 
 static void
-subtract_accumulated (struct cpInfo *info, PolygonTypePtr polygon)
+subtract_accumulated (struct cpInfo *info, PolygonType *polygon)
 {
   if (info->accumulate == NULL)
     return;
@@ -892,9 +892,9 @@ subtract_accumulated (struct cpInfo *info, PolygonTypePtr polygon)
 static int
 pin_sub_callback (const BoxType * b, void *cl)
 {
-  PinTypePtr pin = (PinTypePtr) b;
+  PinType *pin = (PinType *) b;
   struct cpInfo *info = (struct cpInfo *) cl;
-  PolygonTypePtr polygon;
+  PolygonType *polygon;
   POLYAREA *np;
   POLYAREA *merged;
   Cardinal i;
@@ -909,7 +909,7 @@ pin_sub_callback (const BoxType * b, void *cl)
   i = GetLayerNumber (info->data, info->layer);
   if (TEST_THERM (i, pin))
     {
-      np = ThermPoly ((PCBTypePtr) (info->data->pcb), pin, i);
+      np = ThermPoly ((PCBType *) (info->data->pcb), pin, i);
       if (!np)
         return 1;
     }
@@ -934,9 +934,9 @@ pin_sub_callback (const BoxType * b, void *cl)
 static int
 arc_sub_callback (const BoxType * b, void *cl)
 {
-  ArcTypePtr arc = (ArcTypePtr) b;
+  ArcType *arc = (ArcType *) b;
   struct cpInfo *info = (struct cpInfo *) cl;
-  PolygonTypePtr polygon;
+  PolygonType *polygon;
 
   /* don't subtract the object that was put back! */
   if (b == info->other)
@@ -952,9 +952,9 @@ arc_sub_callback (const BoxType * b, void *cl)
 static int
 pad_sub_callback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   struct cpInfo *info = (struct cpInfo *) cl;
-  PolygonTypePtr polygon;
+  PolygonType *polygon;
 
   /* don't subtract the object that was put back! */
   if (b == info->other)
@@ -974,9 +974,9 @@ pad_sub_callback (const BoxType * b, void *cl)
 static int
 line_sub_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct cpInfo *info = (struct cpInfo *) cl;
-  PolygonTypePtr polygon;
+  PolygonType *polygon;
   POLYAREA *np;
   POLYAREA *merged;
 
@@ -1003,9 +1003,9 @@ line_sub_callback (const BoxType * b, void *cl)
 static int
 text_sub_callback (const BoxType * b, void *cl)
 {
-  TextTypePtr text = (TextTypePtr) b;
+  TextType *text = (TextType *) b;
   struct cpInfo *info = (struct cpInfo *) cl;
-  PolygonTypePtr polygon;
+  PolygonType *polygon;
 
   /* don't subtract the object that was put back! */
   if (b == info->other)
@@ -1019,7 +1019,7 @@ text_sub_callback (const BoxType * b, void *cl)
 }
 
 static int
-Group (DataTypePtr Data, Cardinal layer)
+Group (DataType *Data, Cardinal layer)
 {
   Cardinal i, j;
   for (i = 0; i < max_group; i++)
@@ -1030,7 +1030,7 @@ Group (DataTypePtr Data, Cardinal layer)
 }
 
 static int
-clearPoly (DataTypePtr Data, LayerTypePtr Layer, PolygonType * polygon,
+clearPoly (DataType *Data, LayerType *Layer, PolygonType * polygon,
            const BoxType * here, Coord expand)
 {
   int r = 0;
@@ -1209,7 +1209,7 @@ UnsubtractPad (PadType * pad, LayerType * l, PolygonType * p)
 static bool inhibit = false;
 
 int
-InitClip (DataTypePtr Data, LayerTypePtr layer, PolygonType * p)
+InitClip (DataType *Data, LayerType *layer, PolygonType * p)
 {
   if (inhibit)
     return 0;
@@ -1233,9 +1233,9 @@ InitClip (DataTypePtr Data, LayerTypePtr layer, PolygonType * p)
  * returns true if any points are removed
  */
 bool
-RemoveExcessPolygonPoints (LayerTypePtr Layer, PolygonTypePtr Polygon)
+RemoveExcessPolygonPoints (LayerType *Layer, PolygonType *Polygon)
 {
-  PointTypePtr p;
+  PointType *p;
   Cardinal n, prev, next;
   LineType line;
   bool changed = false;
@@ -1267,10 +1267,10 @@ RemoveExcessPolygonPoints (LayerTypePtr Layer, PolygonTypePtr Polygon)
  * coordinates
  */
 Cardinal
-GetLowestDistancePolygonPoint (PolygonTypePtr Polygon, Coord X, Coord Y)
+GetLowestDistancePolygonPoint (PolygonType *Polygon, Coord X, Coord Y)
 {
   double mindistance = (double) MAX_COORD * MAX_COORD;
-  PointTypePtr ptr1, ptr2;
+  PointType *ptr1, *ptr2;
   Cardinal n, result = 0;
 
   /* we calculate the distance to each segment and choose the
@@ -1338,7 +1338,7 @@ GoToPreviousPoint (void)
       /* back-up one point */
     default:
       {
-        PointTypePtr points = Crosshair.AttachedPolygon.Points;
+        PointType *points = Crosshair.AttachedPolygon.Points;
         Cardinal n = Crosshair.AttachedPolygon.PointN - 2;
 
         Crosshair.AttachedPolygon.PointN--;
@@ -1392,7 +1392,7 @@ ClosePolygon (void)
 void
 CopyAttachedPolygonToLayer (void)
 {
-  PolygonTypePtr polygon;
+  PolygonType *polygon;
   int saveID;
 
   /* move data to layer and clear attached struct */
@@ -1455,15 +1455,16 @@ struct plow_info
 {
   int type;
   void *ptr1, *ptr2;
-  LayerTypePtr layer;
-  DataTypePtr data;
-  int (*callback) (DataTypePtr, LayerTypePtr, PolygonTypePtr, int, void *,
-                   void *);
+  LayerType *layer;
+  DataType *data;
+  int (*callback) (DataType *, LayerType *, PolygonType *, int, void *,
+                   void *, void *);
+  void *userdata;
 };
 
 static int
-subtract_plow (DataTypePtr Data, LayerTypePtr Layer, PolygonTypePtr Polygon,
-               int type, void *ptr1, void *ptr2)
+subtract_plow (DataType *Data, LayerType *Layer, PolygonType *Polygon,
+               int type, void *ptr1, void *ptr2, void *userdata)
 {
   if (!Polygon->Clipped)
     return 0;
@@ -1471,23 +1472,23 @@ subtract_plow (DataTypePtr Data, LayerTypePtr Layer, PolygonTypePtr Polygon,
     {
     case PIN_TYPE:
     case VIA_TYPE:
-      SubtractPin (Data, (PinTypePtr) ptr2, Layer, Polygon);
+      SubtractPin (Data, (PinType *) ptr2, Layer, Polygon);
       Polygon->NoHolesValid = 0;
       return 1;
     case LINE_TYPE:
-      SubtractLine ((LineTypePtr) ptr2, Polygon);
+      SubtractLine ((LineType *) ptr2, Polygon);
       Polygon->NoHolesValid = 0;
       return 1;
     case ARC_TYPE:
-      SubtractArc ((ArcTypePtr) ptr2, Polygon);
+      SubtractArc ((ArcType *) ptr2, Polygon);
       Polygon->NoHolesValid = 0;
       return 1;
     case PAD_TYPE:
-      SubtractPad ((PadTypePtr) ptr2, Polygon);
+      SubtractPad ((PadType *) ptr2, Polygon);
       Polygon->NoHolesValid = 0;
       return 1;
     case TEXT_TYPE:
-      SubtractText ((TextTypePtr) ptr2, Polygon);
+      SubtractText ((TextType *) ptr2, Polygon);
       Polygon->NoHolesValid = 0;
       return 1;
     }
@@ -1495,26 +1496,26 @@ subtract_plow (DataTypePtr Data, LayerTypePtr Layer, PolygonTypePtr Polygon,
 }
 
 static int
-add_plow (DataTypePtr Data, LayerTypePtr Layer, PolygonTypePtr Polygon,
-          int type, void *ptr1, void *ptr2)
+add_plow (DataType *Data, LayerType *Layer, PolygonType *Polygon,
+          int type, void *ptr1, void *ptr2, void *userdata)
 {
   switch (type)
     {
     case PIN_TYPE:
     case VIA_TYPE:
-      UnsubtractPin ((PinTypePtr) ptr2, Layer, Polygon);
+      UnsubtractPin ((PinType *) ptr2, Layer, Polygon);
       return 1;
     case LINE_TYPE:
-      UnsubtractLine ((LineTypePtr) ptr2, Layer, Polygon);
+      UnsubtractLine ((LineType *) ptr2, Layer, Polygon);
       return 1;
     case ARC_TYPE:
-      UnsubtractArc ((ArcTypePtr) ptr2, Layer, Polygon);
+      UnsubtractArc ((ArcType *) ptr2, Layer, Polygon);
       return 1;
     case PAD_TYPE:
-      UnsubtractPad ((PadTypePtr) ptr2, Layer, Polygon);
+      UnsubtractPad ((PadType *) ptr2, Layer, Polygon);
       return 1;
     case TEXT_TYPE:
-      UnsubtractText ((TextTypePtr) ptr2, Layer, Polygon);
+      UnsubtractText ((TextType *) ptr2, Layer, Polygon);
       return 1;
     }
   return 0;
@@ -1524,21 +1525,22 @@ static int
 plow_callback (const BoxType * b, void *cl)
 {
   struct plow_info *plow = (struct plow_info *) cl;
-  PolygonTypePtr polygon = (PolygonTypePtr) b;
+  PolygonType *polygon = (PolygonType *) b;
 
   if (TEST_FLAG (CLEARPOLYFLAG, polygon))
     return plow->callback (plow->data, plow->layer, polygon, plow->type,
-                           plow->ptr1, plow->ptr2);
+                           plow->ptr1, plow->ptr2, plow->userdata);
   return 0;
 }
 
 int
 PlowsPolygon (DataType * Data, int type, void *ptr1, void *ptr2,
-              int (*call_back) (DataTypePtr data, LayerTypePtr lay,
-                                PolygonTypePtr poly, int type, void *ptr1,
-                                void *ptr2))
+              int (*call_back) (DataType *data, LayerType *lay,
+                                PolygonType *poly, int type, void *ptr1,
+                                void *ptr2, void *userdata),
+              void *userdata)
 {
-  BoxType sb = ((PinTypePtr) ptr2)->BoundingBox;
+  BoxType sb = ((PinType *) ptr2)->BoundingBox;
   int r = 0;
   struct plow_info info;
 
@@ -1547,6 +1549,7 @@ PlowsPolygon (DataType * Data, int type, void *ptr1, void *ptr2,
   info.ptr2 = ptr2;
   info.data = Data;
   info.callback = call_back;
+  info.userdata = userdata;
   switch (type)
     {
     case PIN_TYPE:
@@ -1564,7 +1567,7 @@ PlowsPolygon (DataType * Data, int type, void *ptr1, void *ptr2,
       else
         {
           GROUP_LOOP (Data, GetLayerGroupNumberByNumber (GetLayerNumber (Data,
-                                                                         ((LayerTypePtr) ptr1))));
+                                                                         ((LayerType *) ptr1))));
           {
             info.layer = layer;
             r +=
@@ -1577,13 +1580,13 @@ PlowsPolygon (DataType * Data, int type, void *ptr1, void *ptr2,
     case ARC_TYPE:
     case TEXT_TYPE:
       /* the cast works equally well for lines and arcs */
-      if (!TEST_FLAG (CLEARLINEFLAG, (LineTypePtr) ptr2))
+      if (!TEST_FLAG (CLEARLINEFLAG, (LineType *) ptr2))
         return 0;
       /* silk doesn't plow */
-      if (GetLayerNumber (Data, (LayerTypePtr)ptr1) >= max_copper_layer)
+      if (GetLayerNumber (Data, (LayerType *)ptr1) >= max_copper_layer)
         return 0;
       GROUP_LOOP (Data, GetLayerGroupNumberByNumber (GetLayerNumber (Data,
-                                                                     ((LayerTypePtr) ptr1))));
+                                                                     ((LayerType *) ptr1))));
       {
         info.layer = layer;
         r += r_search (layer->polygon_tree, &sb, NULL, plow_callback, &info);
@@ -1609,12 +1612,12 @@ PlowsPolygon (DataType * Data, int type, void *ptr1, void *ptr2,
       {
         PIN_LOOP ((ElementType *) ptr1);
         {
-          PlowsPolygon (Data, PIN_TYPE, ptr1, pin, call_back);
+          PlowsPolygon (Data, PIN_TYPE, ptr1, pin, call_back, userdata);
         }
         END_LOOP;
         PAD_LOOP ((ElementType *) ptr1);
         {
-          PlowsPolygon (Data, PAD_TYPE, ptr1, pad, call_back);
+          PlowsPolygon (Data, PAD_TYPE, ptr1, pad, call_back, userdata);
         }
         END_LOOP;
       }
@@ -1626,23 +1629,29 @@ PlowsPolygon (DataType * Data, int type, void *ptr1, void *ptr2,
 void
 RestoreToPolygon (DataType * Data, int type, void *ptr1, void *ptr2)
 {
+  if (!Data->polyClip)
+    return;
+
   if (type == POLYGON_TYPE)
-    InitClip (PCB->Data, (LayerTypePtr) ptr1, (PolygonTypePtr) ptr2);
+    InitClip (PCB->Data, (LayerType *) ptr1, (PolygonType *) ptr2);
   else
-    PlowsPolygon (Data, type, ptr1, ptr2, add_plow);
+    PlowsPolygon (Data, type, ptr1, ptr2, add_plow, NULL);
 }
 
 void
 ClearFromPolygon (DataType * Data, int type, void *ptr1, void *ptr2)
 {
+  if (!Data->polyClip)
+    return;
+
   if (type == POLYGON_TYPE)
-    InitClip (PCB->Data, (LayerTypePtr) ptr1, (PolygonTypePtr) ptr2);
+    InitClip (PCB->Data, (LayerType *) ptr1, (PolygonType *) ptr2);
   else
-    PlowsPolygon (Data, type, ptr1, ptr2, subtract_plow);
+    PlowsPolygon (Data, type, ptr1, ptr2, subtract_plow, NULL);
 }
 
 bool
-isects (POLYAREA * a, PolygonTypePtr p, bool fr)
+isects (POLYAREA * a, PolygonType *p, bool fr)
 {
   POLYAREA *x;
   bool ans;
@@ -1656,7 +1665,7 @@ isects (POLYAREA * a, PolygonTypePtr p, bool fr)
 
 
 bool
-IsPointInPolygon (Coord X, Coord Y, Coord r, PolygonTypePtr p)
+IsPointInPolygon (Coord X, Coord Y, Coord r, PolygonType *p)
 {
   POLYAREA *c;
   Vector v;
@@ -1673,7 +1682,7 @@ IsPointInPolygon (Coord X, Coord Y, Coord r, PolygonTypePtr p)
 
 
 bool
-IsPointInPolygonIgnoreHoles (Coord X, Coord Y, PolygonTypePtr p)
+IsPointInPolygonIgnoreHoles (Coord X, Coord Y, PolygonType *p)
 {
   Vector v;
   v[0] = X;
@@ -1682,7 +1691,7 @@ IsPointInPolygonIgnoreHoles (Coord X, Coord Y, PolygonTypePtr p)
 }
 
 bool
-IsRectangleInPolygon (Coord X1, Coord Y1, Coord X2, Coord Y2, PolygonTypePtr p)
+IsRectangleInPolygon (Coord X1, Coord Y1, Coord X2, Coord Y2, PolygonType *p)
 {
   POLYAREA *s;
   if (!
@@ -1747,7 +1756,7 @@ r_NoHolesPolygonDicer (POLYAREA * pa,
 }
 
 void
-NoHolesPolygonDicer (PolygonTypePtr p, const BoxType * clip,
+NoHolesPolygonDicer (PolygonType *p, const BoxType * clip,
                      void (*emit) (PLINE *, void *), void *user_data)
 {
   POLYAREA *main_contour, *cur, *next;
@@ -1779,7 +1788,7 @@ NoHolesPolygonDicer (PolygonTypePtr p, const BoxType * clip,
 
 /* make a polygon split into multiple parts into multiple polygons */
 bool
-MorphPolygon (LayerTypePtr layer, PolygonTypePtr poly)
+MorphPolygon (LayerType *layer, PolygonType *poly)
 {
   POLYAREA *p, *start;
   bool many = false;
@@ -1808,7 +1817,7 @@ MorphPolygon (LayerTypePtr layer, PolygonTypePtr poly)
   do
     {
       VNODE *v;
-      PolygonTypePtr newone;
+      PolygonType *newone;
 
       if (p->contours->area > PCB->IsleArea)
         {
diff --git a/src/polygon.h b/src/polygon.h
index bdbef46..64d9a36 100644
--- a/src/polygon.h
+++ b/src/polygon.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for polygon editing routines
@@ -50,13 +49,13 @@
 /* Prototypes */
 
 void polygon_init (void);
-Cardinal polygon_point_idx (PolygonTypePtr polygon, PointTypePtr point);
-Cardinal polygon_point_contour (PolygonTypePtr polygon, Cardinal point);
-Cardinal prev_contour_point (PolygonTypePtr polygon, Cardinal point);
-Cardinal next_contour_point (PolygonTypePtr polygon, Cardinal point);
-Cardinal GetLowestDistancePolygonPoint (PolygonTypePtr,
+Cardinal polygon_point_idx (PolygonType * polygon, PointType * point);
+Cardinal polygon_point_contour (PolygonType * polygon, Cardinal point);
+Cardinal prev_contour_point (PolygonType * polygon, Cardinal point);
+Cardinal next_contour_point (PolygonType * polygon, Cardinal point);
+Cardinal GetLowestDistancePolygonPoint (PolygonType *,
 					Coord, Coord);
-bool RemoveExcessPolygonPoints (LayerTypePtr, PolygonTypePtr);
+bool RemoveExcessPolygonPoints (LayerType *, PolygonType *);
 void GoToPreviousPoint (void);
 void ClosePolygon (void);
 void CopyAttachedPolygonToLayer (void);
@@ -64,7 +63,8 @@ int PolygonHoles (PolygonType *ptr, const BoxType *range,
 		  int (*callback) (PLINE *, void *user_data),
                   void *user_data);
 int PlowsPolygon (DataType *, int, void *, void *,
-		  int (*callback) (DataTypePtr, LayerTypePtr, PolygonTypePtr, int, void *, void *));
+                  int (*callback) (DataType *, LayerType *, PolygonType *, int, void *, void *, void *),
+                  void *userdata);
 void ComputeNoHoles (PolygonType *poly);
 POLYAREA * ContourToPoly (PLINE *);
 POLYAREA * PolygonToPoly (PolygonType *);
@@ -80,11 +80,11 @@ int InitClip(DataType *d, LayerType *l, PolygonType *p);
 void RestoreToPolygon(DataType *, int, void *, void *);
 void ClearFromPolygon(DataType *, int, void *, void *);
 
-bool IsPointInPolygon (Coord, Coord, Coord, PolygonTypePtr);
-bool IsPointInPolygonIgnoreHoles (Coord, Coord, PolygonTypePtr);
-bool IsRectangleInPolygon (Coord, Coord, Coord, Coord, PolygonTypePtr);
-bool isects (POLYAREA *, PolygonTypePtr, bool);
-bool MorphPolygon (LayerTypePtr, PolygonTypePtr);
+bool IsPointInPolygon (Coord, Coord, Coord, PolygonType *);
+bool IsPointInPolygonIgnoreHoles (Coord, Coord, PolygonType *);
+bool IsRectangleInPolygon (Coord, Coord, Coord, Coord, PolygonType *);
+bool isects (POLYAREA *, PolygonType *, bool);
+bool MorphPolygon (LayerType *, PolygonType *);
 void NoHolesPolygonDicer (PolygonType *p, const BoxType *clip,
                           void (*emit) (PLINE *, void *), void *user_data);
 void PolyToPolygonsOnLayer (DataType *, LayerType *, POLYAREA *, FlagType);
diff --git a/src/polygon1.c b/src/polygon1.c
index 9da353e..667e26d 100644
--- a/src/polygon1.c
+++ b/src/polygon1.c
@@ -1182,7 +1182,7 @@ InsCntr (jmp_buf * e, PLINE * c, POLYAREA ** dst)
     }
   newp->contours = c;
   newp->contour_tree = r_create_tree (NULL, 0, 0);
-  r_insert_entry (newp->contour_tree, (BoxTypePtr) c, 0);
+  r_insert_entry (newp->contour_tree, (BoxType *) c, 0);
   c->next = NULL;
 }				/* InsCntr */
 
@@ -1434,7 +1434,7 @@ InsertHoles (jmp_buf * e, POLYAREA * dest, PLINE ** src)
 	  /* link at front of hole list */
 	  curh->next = container->next;
 	  container->next = curh;
-	  r_insert_entry (pa_info->pa->contour_tree, (BoxTypePtr) curh, 0);
+	  r_insert_entry (pa_info->pa->contour_tree, (BoxType *) curh, 0);
 
 	}
     }
@@ -2771,7 +2771,7 @@ poly_Copy1 (POLYAREA * dst, const POLYAREA * src)
     {
       if (!poly_CopyContour (last, cur))
 	return FALSE;
-      r_insert_entry (dst->contour_tree, (BoxTypePtr) * last, 0);
+      r_insert_entry (dst->contour_tree, (BoxType *) * last, 0);
       last = &(*last)->next;
     }
   return TRUE;
@@ -2831,7 +2831,7 @@ poly_InclContour (POLYAREA * p, PLINE * c)
       p->contours->next = c;
       c->next = tmp;
     }
-  r_insert_entry (p->contour_tree, (BoxTypePtr) c, 0);
+  r_insert_entry (p->contour_tree, (BoxType *) c, 0);
   return TRUE;
 }
 
diff --git a/src/print.c b/src/print.c
index 4c01721..69328e7 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -40,6 +38,7 @@
 #endif
 
 #include "global.h"
+#include "hid_draw.h"
 
 #include <time.h>
 #ifdef HAVE_UNISTD_H
@@ -66,8 +65,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 /* ---------------------------------------------------------------------------
  * prints a FAB drawing.
  */
@@ -80,14 +77,14 @@ RCSID ("$Id$");
 static void
 fab_line (hidGC gc, int x1, int y1, int x2, int y2)
 {
-  gui->draw_line (gc, x1, y1, x2, y2);
+  gui->graphics->draw_line (gc, x1, y1, x2, y2);
 }
 
 static void
 fab_circle (hidGC gc, int x, int y, int r)
 {
-  gui->draw_arc (gc, x, y, r, r, 0, 180);
-  gui->draw_arc (gc, x, y, r, r, 180, 180);
+  gui->graphics->draw_arc (gc, x, y, r, r, 0, 180);
+  gui->graphics->draw_arc (gc, x, y, r, r, 180, 180);
 }
 
 /* align is 0=left, 1=center, 2=right, add 8 for underline */
@@ -98,7 +95,7 @@ text_at (hidGC gc, int x, int y, int align, char *fmt, ...)
   int w = 0, i;
   TextType t;
   va_list a;
-  FontTypePtr font = &PCB->Font;
+  FontType *font = &PCB->Font;
   va_start (a, fmt);
   vsprintf (tmp, fmt, a);
   va_end (a);
@@ -115,7 +112,7 @@ text_at (hidGC gc, int x, int y, int align, char *fmt, ...)
   t.X -= w * (align & 3) / 2;
   if (t.X < 0)
     t.X = 0;
-  DrawTextLowLevel (&t, 0);
+  gui->graphics->draw_pcb_text (gc, &t, 0);
   if (align & 8)
     fab_line (gc, t.X,
               t.Y + SCALE_TEXT (font->MaxHeight, t.Scale) + MIL_TO_COORD(10),
@@ -194,12 +191,12 @@ drill_sym (hidGC gc, int idx, int x, int y)
 }
 
 static int
-count_drill_lines (DrillInfoTypePtr AllDrills)
+count_drill_lines (DrillInfoType *AllDrills)
 {
   int n, ds = 0;
   for (n = AllDrills->DrillN - 1; n >= 0; n--)
     {
-      DrillTypePtr drill = &(AllDrills->Drill[n]);
+      DrillType *drill = &(AllDrills->Drill[n]);
       if (drill->PinCount + drill->ViaCount > drill->UnplatedCount)
 	ds++;
       if (drill->UnplatedCount)
@@ -212,7 +209,7 @@ count_drill_lines (DrillInfoTypePtr AllDrills)
 int
 PrintFab_overhang (void)
 {
-  DrillInfoTypePtr AllDrills = GetDrillInfo (PCB->Data);
+  DrillInfoType *AllDrills = GetDrillInfo (PCB->Data);
   int ds = count_drill_lines (AllDrills);
   if (ds < 4)
     ds = 4;
@@ -222,7 +219,7 @@ PrintFab_overhang (void)
 void
 PrintFab (hidGC gc)
 {
-  DrillInfoTypePtr AllDrills;
+  DrillInfoType *AllDrills;
   int i, n, yoff, total_drills = 0, ds = 0;
   time_t currenttime;
   char utcTime[64];
@@ -243,17 +240,17 @@ PrintFab (hidGC gc)
       yoff -= (4 - ds) * TEXT_LINE;
     }
 
-  gui->set_line_width (gc, FAB_LINE_W);
+  gui->graphics->set_line_width (gc, FAB_LINE_W);
 
   for (n = AllDrills->DrillN - 1; n >= 0; n--)
     {
       int plated_sym = -1, unplated_sym = -1;
-      DrillTypePtr drill = &(AllDrills->Drill[n]);
+      DrillType *drill = &(AllDrills->Drill[n]);
       if (drill->PinCount + drill->ViaCount > drill->UnplatedCount)
 	plated_sym = --ds;
       if (drill->UnplatedCount)
 	unplated_sym = --ds;
-      gui->set_color (gc, PCB->PinColor);
+      gui->graphics->set_color (gc, PCB->PinColor);
       for (i = 0; i < drill->PinN; i++)
 	drill_sym (gc, TEST_FLAG (HOLEFLAG, drill->Pin[i]) ?
 		   unplated_sym : plated_sym, drill->Pin[i]->X,
@@ -274,7 +271,7 @@ PrintFab (hidGC gc)
 	  text_at (gc, MIL_TO_COORD(1400), yoff, MIL_TO_COORD(2), "NO");
 	  text_at (gc, MIL_TO_COORD(980), yoff, MIL_TO_COORD(2), "%d", drill->UnplatedCount);
 	}
-      gui->set_color (gc, PCB->ElementColor);
+      gui->graphics->set_color (gc, PCB->ElementColor);
       text_at (gc, MIL_TO_COORD(450), yoff, MIL_TO_COORD(2), "%0.3f",
 	       COORD_TO_INCH(drill->DrillSize) + 0.0004);
       if (plated_sym != -1 && unplated_sym != -1)
@@ -285,7 +282,7 @@ PrintFab (hidGC gc)
       total_drills += drill->ViaCount;
     }
 
-  gui->set_color (gc, PCB->ElementColor);
+  gui->graphics->set_color (gc, PCB->ElementColor);
   text_at (gc, 0, yoff, MIL_TO_COORD(9), "Symbol");
   text_at (gc, MIL_TO_COORD(410), yoff, MIL_TO_COORD(9), "Diam. (Inch)");
   text_at (gc, MIL_TO_COORD(950), yoff, MIL_TO_COORD(9), "Count");
@@ -315,15 +312,15 @@ PrintFab (hidGC gc)
     }
   if (i == max_copper_layer)
     {
-      gui->set_line_width (gc,  MIL_TO_COORD(10));
-      gui->draw_line (gc, 0, 0, PCB->MaxWidth, 0);
-      gui->draw_line (gc, 0, 0, 0, PCB->MaxHeight);
-      gui->draw_line (gc, PCB->MaxWidth, 0, PCB->MaxWidth,
+      gui->graphics->set_line_width (gc,  MIL_TO_COORD(10));
+      gui->graphics->draw_line (gc, 0, 0, PCB->MaxWidth, 0);
+      gui->graphics->draw_line (gc, 0, 0, 0, PCB->MaxHeight);
+      gui->graphics->draw_line (gc, PCB->MaxWidth, 0, PCB->MaxWidth,
 		      PCB->MaxHeight);
-      gui->draw_line (gc, 0, PCB->MaxHeight, PCB->MaxWidth,
+      gui->graphics->draw_line (gc, 0, PCB->MaxHeight, PCB->MaxWidth,
 		      PCB->MaxHeight);
       /*FPrintOutline (); */
-      gui->set_line_width (gc, FAB_LINE_W);
+      gui->graphics->set_line_width (gc, FAB_LINE_W);
       text_at (gc, MIL_TO_COORD(2000), yoff, 0,
 	       "Maximum Dimensions: %f mils wide, %f mils high",
 	       COORD_TO_MIL(PCB->MaxWidth), COORD_TO_MIL(PCB->MaxHeight));
@@ -334,26 +331,26 @@ PrintFab (hidGC gc)
     }
   else
     {
-      LayerTypePtr layer = LAYER_PTR (i);
-      gui->set_line_width (gc, MIL_TO_COORD(10));
+      LayerType *layer = LAYER_PTR (i);
+      gui->graphics->set_line_width (gc, MIL_TO_COORD(10));
       LINE_LOOP (layer);
       {
-	gui->draw_line (gc, line->Point1.X, line->Point1.Y,
+	gui->graphics->draw_line (gc, line->Point1.X, line->Point1.Y,
 			line->Point2.X, line->Point2.Y);
       }
       END_LOOP;
       ARC_LOOP (layer);
       {
-	gui->draw_arc (gc, arc->X, arc->Y, arc->Width,
+	gui->graphics->draw_arc (gc, arc->X, arc->Y, arc->Width,
 		       arc->Height, arc->StartAngle, arc->Delta);
       }
       END_LOOP;
       TEXT_LOOP (layer);
       {
-	DrawTextLowLevel (text, 0);
+	gui->graphics->draw_pcb_text (gc, text, 0);
       }
       END_LOOP;
-      gui->set_line_width (gc, FAB_LINE_W);
+      gui->graphics->set_line_width (gc, FAB_LINE_W);
       text_at (gc, PCB->MaxWidth / 2, PCB->MaxHeight + MIL_TO_COORD(20), 1,
 	       "Board outline is the centerline of this path");
     }
diff --git a/src/print.h b/src/print.h
index 2215aea..85943f3 100644
--- a/src/print.h
+++ b/src/print.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for printing routines
diff --git a/src/puller.c b/src/puller.c
index 959ac54..7c9f0f9 100644
--- a/src/puller.c
+++ b/src/puller.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -73,8 +71,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 #define abort1() fprintf(stderr, "abort at line %d\n", __LINE__), abort()
 
 #define TRACE0 0
@@ -88,8 +84,8 @@ static jmp_buf abort_buf;
 #define sqr(x) (1.0*(x)*(x))
 
 static int multi, line_exact, arc_exact;
-static LineTypePtr the_line;
-static ArcTypePtr the_arc;
+static LineType *the_line;
+static ArcType *the_arc;
 static double arc_dist;
 
 /* We canonicalize the arc and line such that the point to be moved is
@@ -108,7 +104,7 @@ within (int x1, int y1, int x2, int y2, int r)
 }
 
 static int
-arc_endpoint_is (ArcTypePtr a, int angle, int x, int y)
+arc_endpoint_is (ArcType *a, int angle, int x, int y)
 {
   int ax = a->X, ay = a->Y;
 
@@ -309,8 +305,8 @@ dist_lsp (int x1, int y1, int x2, int y2, int px, int py)
 static int
 line_callback (const BoxType * b, void *cl)
 {
-  /* LayerTypePtr layer = (LayerTypePtr)cl; */
-  LineTypePtr l = (LineTypePtr) b;
+  /* LayerType *layer = (LayerType *)cl; */
+  LineType *l = (LineType *) b;
   double d1, d2, t;
 #if TRACE1
   pcb_printf ("line %#mD .. %#mD\n",
@@ -339,8 +335,8 @@ line_callback (const BoxType * b, void *cl)
 static int
 arc_callback (const BoxType * b, void *cl)
 {
-  /* LayerTypePtr layer = (LayerTypePtr) cl; */
-  ArcTypePtr a = (ArcTypePtr) b;
+  /* LayerType *layer = (LayerType *) cl; */
+  ArcType *a = (ArcType *) b;
 
 #if TRACE1
   pcb_printf ("arc a %#mD r %#mS sa %ld d %ld\n", a->X, a->Y, a->Width,
@@ -638,7 +634,7 @@ static int current_is_component, current_is_solder;
 #if TRACE1
 static void trace_paths ();
 #endif
-static void mark_line_for_deletion (LineTypePtr);
+static void mark_line_for_deletion (LineType *);
 
 #define LINE2EXTRA(l)    ((Extra *)g_hash_table_lookup (lines, l))
 #define ARC2EXTRA(a)     ((Extra *)g_hash_table_lookup (arcs, a))
@@ -690,7 +686,7 @@ clear_found ()
 #endif
 
 static void
-fix_arc_extra (ArcTypePtr a, Extra *e)
+fix_arc_extra (ArcType *a, Extra *e)
 {
 #if TRACE1
   printf("new arc angles %ld %ld\n", a->StartAngle, a->Delta);
@@ -716,7 +712,7 @@ typedef struct {
 static int
 find_pair_line_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
 #if TRACE1
   Extra *e = LINE2EXTRA (line);
 #endif
@@ -756,7 +752,7 @@ find_pair_line_callback (const BoxType * b, void *cl)
 static int
 find_pair_arc_callback (const BoxType * b, void *cl)
 {
-  ArcTypePtr arc = (ArcTypePtr) b;
+  ArcType *arc = (ArcType *) b;
   Extra *e = ARC2EXTRA (arc);
   FindPairCallbackStruct *fpcs = (FindPairCallbackStruct *) cl;
 
@@ -806,7 +802,7 @@ find_pairs_1 (void *me, Extra **e, int x, int y)
 }
 
 static int
-check_point_in_pin (PinTypePtr pin, int x, int y, End *e)
+check_point_in_pin (PinType *pin, int x, int y, End *e)
 {
   int inside_p;
   int t = (pin->Thickness+1)/2;
@@ -830,8 +826,8 @@ check_point_in_pin (PinTypePtr pin, int x, int y, End *e)
 static int
 find_pair_pinline_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
-  PinTypePtr pin = (PinTypePtr) cl;
+  LineType *line = (LineType *) b;
+  PinType *pin = (PinType *) cl;
   Extra *e = LINE2EXTRA (line);
   int hits;
 
@@ -868,8 +864,8 @@ find_pair_pinline_callback (const BoxType * b, void *cl)
 static int
 find_pair_pinarc_callback (const BoxType * b, void *cl)
 {
-  ArcTypePtr arc = (ArcTypePtr) b;
-  PinTypePtr pin = (PinTypePtr) cl;
+  ArcType *arc = (ArcType *) b;
+  PinType *pin = (PinType *) cl;
   Extra *e = ARC2EXTRA (arc);
   int hits;
 
@@ -879,7 +875,7 @@ find_pair_pinarc_callback (const BoxType * b, void *cl)
 }
 
 static int
-check_point_in_pad (PadTypePtr pad, int x, int y, End *e)
+check_point_in_pad (PadType *pad, int x, int y, End *e)
 {
   int inside_p;
   int t;
@@ -936,8 +932,8 @@ check_point_in_pad (PadTypePtr pad, int x, int y, End *e)
 static int
 find_pair_padline_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
-  PadTypePtr pad = (PadTypePtr) cl;
+  LineType *line = (LineType *) b;
+  PadType *pad = (PadType *) cl;
   Extra *e = LINE2EXTRA (line);
   int hits;
   double t;
@@ -1007,8 +1003,8 @@ find_pair_padline_callback (const BoxType * b, void *cl)
 static int
 find_pair_padarc_callback (const BoxType * b, void *cl)
 {
-  ArcTypePtr arc = (ArcTypePtr) b;
-  PadTypePtr pad = (PadTypePtr) cl;
+  ArcType *arc = (ArcType *) b;
+  PadType *pad = (PadType *) cl;
   Extra *e = ARC2EXTRA (arc);
   int hits;
 
@@ -1258,7 +1254,7 @@ print_extra (Extra *e, Extra *prev)
 	 
   if (EXTRA_IS_LINE (e))
     {
-      LineTypePtr line = EXTRA2LINE (e);
+      LineType *line = EXTRA2LINE (e);
       pcb_printf(" %p L %#mD-%#mD", line, line->Point1.X, line->Point1.Y, line->Point2.X, line->Point2.Y);
       printf("  %s %p %s %p\n",
 	     e->start.is_pad ? "pad" : "pin", e->start.pin,
@@ -1266,7 +1262,7 @@ print_extra (Extra *e, Extra *prev)
     }
   else if (EXTRA_IS_ARC (e))
     {
-      ArcTypePtr arc = EXTRA2ARC (e);
+      ArcType *arc = EXTRA2ARC (e);
       pcb_printf(" %p A %#mD-%#mD", arc, e->start.x, e->start.y, e->end.x, e->end.y);
       pcb_printf(" at %#mD ang %ld,%ld\n", arc->X, arc->Y, arc->StartAngle, arc->Delta);
     }
@@ -1327,7 +1323,7 @@ trace_paths ()
 #endif
 
 static void
-reverse_line (LineTypePtr line)
+reverse_line (LineType *line)
 {
   Extra *e = LINE2EXTRA (line);
   int x, y;
@@ -1355,7 +1351,7 @@ reverse_line (LineTypePtr line)
 }
 
 static void
-reverse_arc (ArcTypePtr arc)
+reverse_arc (ArcType *arc)
 {
   Extra *e = ARC2EXTRA (arc);
   End etmp;
@@ -1374,7 +1370,7 @@ reverse_arc (ArcTypePtr arc)
 }
 
 static void
-expand_box (BoxTypePtr b, int x, int y, int t)
+expand_box (BoxType *b, int x, int y, int t)
 {
   b->X1 = MIN (b->X1, x-t);
   b->X2 = MAX (b->X2, x+t);
@@ -1387,10 +1383,10 @@ expand_box (BoxTypePtr b, int x, int y, int t)
    working on. */
 
 /* what we're working with */
-static ArcTypePtr start_arc;
-static LineTypePtr start_line;
-static LineTypePtr end_line;
-static ArcTypePtr end_arc;
+static ArcType *start_arc;
+static LineType *start_line;
+static LineType *end_line;
+static ArcType *end_arc;
 static Extra *start_extra, *end_extra;
 static Extra *sarc_extra, *earc_extra;
 static void *start_pinpad, *end_pinpad;
@@ -1681,7 +1677,7 @@ gp_point_2 (int x, int y, int t, End *e, int esa, int eda, const char *func)
 static int
 gp_line_cb (const BoxType *b, void *cb)
 {
-  const LineTypePtr l = (LineTypePtr) b;
+  const LineType *l = (LineType *) b;
   Extra *e = LINE2EXTRA(l);
   if (l == start_line || l == end_line)
     return 0;
@@ -1703,7 +1699,7 @@ gp_line_cb (const BoxType *b, void *cb)
 static int
 gp_arc_cb (const BoxType *b, void *cb)
 {
-  const ArcTypePtr a = (ArcTypePtr) b;
+  const ArcType *a = (ArcType *) b;
   Extra *e = ARC2EXTRA(a);
   if (a == start_arc || a == end_arc)
     return 0;
@@ -1730,7 +1726,7 @@ gp_arc_cb (const BoxType *b, void *cb)
 static int
 gp_text_cb (const BoxType *b, void *cb)
 {
-  const TextTypePtr t = (TextTypePtr) b;
+  const TextType *t = (TextType *) b;
   /* FIXME: drop in the actual text-line endpoints later. */
   gp_point (t->BoundingBox.X1, t->BoundingBox.Y1, 0, 0);
   gp_point (t->BoundingBox.X1, t->BoundingBox.Y2, 0, 0);
@@ -1743,7 +1739,7 @@ static int
 gp_poly_cb (const BoxType *b, void *cb)
 {
   int i;
-  const PolygonTypePtr p = (PolygonTypePtr) b;
+  const PolygonType *p = (PolygonType *) b;
   for (i=0; i<p->PointN; i++)
     gp_point (p->Points[i].X, p->Points[i].Y, 0, 0);
   return 0;
@@ -1752,7 +1748,7 @@ gp_poly_cb (const BoxType *b, void *cb)
 static int
 gp_pin_cb (const BoxType *b, void *cb)
 {
-  const PinTypePtr p = (PinTypePtr) b;
+  const PinType *p = (PinType *) b;
   int t2 = (p->Thickness+1)/2;
 
   if (p == start_pinpad || p == end_pinpad)
@@ -1777,7 +1773,7 @@ gp_pin_cb (const BoxType *b, void *cb)
 static int
 gp_pad_cb (const BoxType *b, void *cb)
 {
-  const PadTypePtr p = (PadTypePtr) b;
+  const PadType *p = (PadType *) b;
   int t2 = (p->Thickness+1)/2;
 
   if (p == start_pinpad || p == end_pinpad)
@@ -1827,14 +1823,14 @@ gp_pad_cb (const BoxType *b, void *cb)
   return 0;
 }
 
-static LineTypePtr
-create_line (LineTypePtr sample, int x1, int y1, int x2, int y2)
+static LineType *
+create_line (LineType *sample, int x1, int y1, int x2, int y2)
 {
 #if TRACE1
   Extra *e;
   pcb_printf("create_line from %#mD to %#mD\n", x1, y1, x2, y2);
 #endif
-  LineTypePtr line = CreateNewLineOnLayer (CURRENT, x1, y1, x2, y2,
+  LineType *line = CreateNewLineOnLayer (CURRENT, x1, y1, x2, y2,
 					   sample->Thickness, sample->Clearance, sample->Flags);
   AddObjectToCreateUndoList (LINE_TYPE, CURRENT, line, line);
 
@@ -1848,11 +1844,11 @@ create_line (LineTypePtr sample, int x1, int y1, int x2, int y2)
   return line;
 }
 
-static ArcTypePtr
-create_arc (LineTypePtr sample, int x, int y, int r, int sa, int da)
+static ArcType *
+create_arc (LineType *sample, int x, int y, int r, int sa, int da)
 {
   Extra *e;
-  ArcTypePtr arc;
+  ArcType *arc;
 
   if (r % 100 == 1)
     r--;
@@ -1942,7 +1938,7 @@ unlink_extras (Extra *e)
 }
 
 static void
-mark_line_for_deletion (LineTypePtr l)
+mark_line_for_deletion (LineType *l)
 {
   Extra *e = LINE2EXTRA(l);
   if (e->deleted)
@@ -1972,7 +1968,7 @@ mark_line_for_deletion (LineTypePtr l)
 }
 
 static void
-mark_arc_for_deletion (ArcTypePtr a)
+mark_arc_for_deletion (ArcType *a)
 {
   Extra *e = ARC2EXTRA(a);
   e->deleted = 1;
@@ -1997,14 +1993,14 @@ mark_arc_for_deletion (ArcTypePtr a)
 */
 
 static void
-maybe_pull_1 (LineTypePtr line)
+maybe_pull_1 (LineType *line)
 {
   BoxType box;
   /* Line half-thicknesses, including line space */
   int ex, ey;
-  LineTypePtr new_line;
+  LineType *new_line;
   Extra *new_lextra;
-  ArcTypePtr new_arc;
+  ArcType *new_arc;
   Extra *new_aextra;
   double abs_angle;
 
@@ -2467,7 +2463,7 @@ maybe_pull_1 (LineTypePtr line)
 
 /* Given a line with a end_next, attempt to pull both ends.  */
 static void
-maybe_pull (LineTypePtr line, Extra *e)
+maybe_pull (LineType *line, Extra *e)
 {
 #if TRACE0
   printf("maybe_pull: ");
diff --git a/src/rats.c b/src/rats.c
index d2aa8bb..fb1d41f 100644
--- a/src/rats.c
+++ b/src/rats.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -61,9 +59,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
-
 #define TRIEDFIRST 0x1
 #define BESTFOUND 0x2
 
@@ -72,10 +67,10 @@ RCSID ("$Id$");
  */
 static bool FindPad (char *, char *, ConnectionType *, bool);
 static bool ParseConnection (char *, char *, char *);
-static bool DrawShortestRats (NetListTypePtr, void (*)(register ConnectionTypePtr, register ConnectionTypePtr, register RouteStyleTypePtr));
-static bool GatherSubnets (NetListTypePtr, bool, bool);
-static bool CheckShorts (LibraryMenuTypePtr);
-static void TransferNet (NetListTypePtr, NetTypePtr, NetTypePtr);
+static bool DrawShortestRats (NetListType *, void (*)(register ConnectionType *, register ConnectionType *, register RouteStyleType *));
+static bool GatherSubnets (NetListType *, bool, bool);
+static bool CheckShorts (LibraryMenuType *);
+static void TransferNet (NetListType *, NetType *, NetType *);
 
 /* ---------------------------------------------------------------------------
  * some local identifiers
@@ -122,7 +117,7 @@ ParseConnection (char *InString, char *ElementName, char *PinNum)
 static bool
 FindPad (char *ElementName, char *PinNum, ConnectionType * conn, bool Same)
 {
-  ElementTypePtr element;
+  ElementType *element;
   GList *i;
 
   if ((element = SearchElementByName (PCB->Data, ElementName)) == NULL)
@@ -217,13 +212,13 @@ SeekPad (LibraryEntryType * entry, ConnectionType * conn, bool Same)
  * Read the library-netlist build a true Netlist structure
  */
 
-NetListTypePtr
-ProcNetlist (LibraryTypePtr net_menu)
+NetListType *
+ProcNetlist (LibraryType *net_menu)
 {
-  ConnectionTypePtr connection;
+  ConnectionType *connection;
   ConnectionType LastPoint;
-  NetTypePtr net;
-  static NetListTypePtr Wantlist = NULL;
+  NetType *net;
+  static NetListType *Wantlist = NULL;
 
   if (!net_menu->MenuN)
     return (NULL);
@@ -235,7 +230,7 @@ ProcNetlist (LibraryTypePtr net_menu)
   SLayer = GetLayerGroupNumberByNumber (solder_silk_layer);
   CLayer = GetLayerGroupNumberByNumber (component_silk_layer);
 
-  Wantlist = (NetListTypePtr)calloc (1, sizeof (NetListType));
+  Wantlist = (NetListType *)calloc (1, sizeof (NetListType));
   if (Wantlist)
     {
       ALLPIN_LOOP (PCB->Data);
@@ -276,13 +271,13 @@ ProcNetlist (LibraryTypePtr net_menu)
 	{
 	  if (SeekPad (entry, &LastPoint, false))
 	    {
-	      if (TEST_FLAG (DRCFLAG, (PinTypePtr) LastPoint.ptr2))
+	      if (TEST_FLAG (DRCFLAG, (PinType *) LastPoint.ptr2))
 		Message (_
 			 ("Error! Element %s pin %s appears multiple times in the netlist file.\n"),
-			 NAMEONPCB_NAME ((ElementTypePtr) LastPoint.ptr1),
+			 NAMEONPCB_NAME ((ElementType *) LastPoint.ptr1),
 			 (LastPoint.type ==
-			  PIN_TYPE) ? ((PinTypePtr) LastPoint.ptr2)->
-			 Number : ((PadTypePtr) LastPoint.ptr2)->Number);
+			  PIN_TYPE) ? ((PinType *) LastPoint.ptr2)->
+			 Number : ((PadType *) LastPoint.ptr2)->Number);
 	      else
 		{
 		  connection = GetConnectionMemory (net);
@@ -290,11 +285,11 @@ ProcNetlist (LibraryTypePtr net_menu)
 		  /* indicate expect net */
 		  connection->menu = menu;
 		  /* mark as visited */
-		  SET_FLAG (DRCFLAG, (PinTypePtr) LastPoint.ptr2);
+		  SET_FLAG (DRCFLAG, (PinType *) LastPoint.ptr2);
 		  if (LastPoint.type == PIN_TYPE)
-		    ((PinTypePtr) LastPoint.ptr2)->Spare = (void *) menu;
+		    ((PinType *) LastPoint.ptr2)->Spare = (void *) menu;
 		  else
-		    ((PadTypePtr) LastPoint.ptr2)->Spare = (void *) menu;
+		    ((PadType *) LastPoint.ptr2)->Spare = (void *) menu;
 		}
 	    }
 	  else
@@ -307,11 +302,11 @@ ProcNetlist (LibraryTypePtr net_menu)
 	      /* indicate expect net */
 	      connection->menu = menu;
 	      /* mark as visited */
-	      SET_FLAG (DRCFLAG, (PinTypePtr) LastPoint.ptr2);
+	      SET_FLAG (DRCFLAG, (PinType *) LastPoint.ptr2);
 	      if (LastPoint.type == PIN_TYPE)
-		((PinTypePtr) LastPoint.ptr2)->Spare = (void *) menu;
+		((PinType *) LastPoint.ptr2)->Spare = (void *) menu;
 	      else
-		((PadTypePtr) LastPoint.ptr2)->Spare = (void *) menu;
+		((PadType *) LastPoint.ptr2)->Spare = (void *) menu;
 	    }
 	}
 	END_LOOP;
@@ -337,9 +332,9 @@ ProcNetlist (LibraryTypePtr net_menu)
  * and then remove the first net from its netlist
  */
 static void
-TransferNet (NetListTypePtr Netl, NetTypePtr SourceNet, NetTypePtr DestNet)
+TransferNet (NetListType *Netl, NetType *SourceNet, NetType *DestNet)
 {
-  ConnectionTypePtr conn;
+  ConnectionType *conn;
 
   /* It would be worth checking if SourceNet is NULL here to avoid a segfault. Seb James. */
   CONNECTION_LOOP (SourceNet);
@@ -358,10 +353,10 @@ TransferNet (NetListTypePtr Netl, NetTypePtr SourceNet, NetTypePtr DestNet)
 }
 
 static bool
-CheckShorts (LibraryMenuTypePtr theNet)
+CheckShorts (LibraryMenuType *theNet)
 {
   bool newone, warn = false;
-  PointerListTypePtr generic = (PointerListTypePtr)calloc (1, sizeof (PointerListType));
+  PointerListType *generic = (PointerListType *)calloc (1, sizeof (PointerListType));
   /* the first connection was starting point so
    * the menu is always non-null
    */
@@ -398,7 +393,7 @@ CheckShorts (LibraryMenuTypePtr theNet)
 	    *menu = pin->Spare;
 	    Message (_("Warning! Net \"%s\" is shorted to net \"%s\"\n"),
 		     &theNet->Name[2],
-		     &((LibraryMenuTypePtr) (pin->Spare))->Name[2]);
+		     &((LibraryMenuType *) (pin->Spare))->Name[2]);
 	    SET_FLAG (WARNFLAG, pin);
 	  }
       }
@@ -434,7 +429,7 @@ CheckShorts (LibraryMenuTypePtr theNet)
 	    *menu = pad->Spare;
 	    Message (_("Warning! Net \"%s\" is shorted to net \"%s\"\n"),
 		     &theNet->Name[2],
-		     &((LibraryMenuTypePtr) (pad->Spare))->Name[2]);
+		     &((LibraryMenuType *) (pad->Spare))->Name[2]);
 	    SET_FLAG (WARNFLAG, pad);
 	  }
       }
@@ -453,30 +448,30 @@ CheckShorts (LibraryMenuTypePtr theNet)
  * afterwards there can be many fewer nets with multiple connections each
  */
 static bool
-GatherSubnets (NetListTypePtr Netl, bool NoWarn, bool AndRats)
+GatherSubnets (NetListType *Netl, bool NoWarn, bool AndRats)
 {
-  NetTypePtr a, b;
-  ConnectionTypePtr conn;
+  NetType *a, *b;
+  ConnectionType *conn;
   Cardinal m, n;
   bool Warned = false;
 
   for (m = 0; Netl->NetN > 0 && m < Netl->NetN; m++)
     {
       a = &Netl->Net[m];
-      ResetConnections (false);
+      ClearFlagOnAllObjects (false, DRCFLAG);
       RatFindHook (a->Connection[0].type, a->Connection[0].ptr1,
-		   a->Connection[0].ptr2, a->Connection[0].ptr2, false,
-		   AndRats);
+                   a->Connection[0].ptr2, a->Connection[0].ptr2,
+                   false, DRCFLAG, AndRats);
       /* now anybody connected to the first point has DRCFLAG set */
       /* so move those to this subnet */
-      CLEAR_FLAG (DRCFLAG, (PinTypePtr) a->Connection[0].ptr2);
+      CLEAR_FLAG (DRCFLAG, (PinType *) a->Connection[0].ptr2);
       for (n = m + 1; n < Netl->NetN; n++)
 	{
 	  b = &Netl->Net[n];
 	  /* There can be only one connection in net b */
-	  if (TEST_FLAG (DRCFLAG, (PinTypePtr) b->Connection[0].ptr2))
+	  if (TEST_FLAG (DRCFLAG, (PinType *) b->Connection[0].ptr2))
 	    {
-	      CLEAR_FLAG (DRCFLAG, (PinTypePtr) b->Connection[0].ptr2);
+	      CLEAR_FLAG (DRCFLAG, (PinType *) b->Connection[0].ptr2);
 	      TransferNet (Netl, b, a);
 	      /* back up since new subnet is now at old index */
 	      n--;
@@ -487,9 +482,7 @@ GatherSubnets (NetListTypePtr Netl, bool NoWarn, bool AndRats)
       /* don't add non-manhattan lines, the auto-router can't route to them */
       ALLLINE_LOOP (PCB->Data);
       {
-	if (TEST_FLAG (DRCFLAG, line)
-	    && ((line->Point1.X == line->Point2.X)
-		|| (line->Point1.Y == line->Point2.Y)))
+	if (TEST_FLAG (DRCFLAG, line))
 	  {
 	    conn = GetConnectionMemory (a);
 	    conn->X = line->Point1.X;
@@ -544,7 +537,7 @@ GatherSubnets (NetListTypePtr Netl, bool NoWarn, bool AndRats)
       if (!NoWarn)
 	Warned |= CheckShorts (a->Connection[0].menu);
     }
-  ResetConnections (false);
+  ClearFlagOnAllObjects (false, DRCFLAG);
   return (Warned);
 }
 
@@ -559,16 +552,16 @@ GatherSubnets (NetListTypePtr Netl, bool NoWarn, bool AndRats)
  */
 
 static bool
-DrawShortestRats (NetListTypePtr Netl, void (*funcp) (register ConnectionTypePtr, register ConnectionTypePtr, register RouteStyleTypePtr))
+DrawShortestRats (NetListType *Netl, void (*funcp) (register ConnectionType *, register ConnectionType *, register RouteStyleType *))
 {
-  RatTypePtr line;
+  RatType *line;
   register float distance, temp;
-  register ConnectionTypePtr conn1, conn2, firstpoint, secondpoint;
-  PolygonTypePtr polygon;
+  register ConnectionType *conn1, *conn2, *firstpoint, *secondpoint;
+  PolygonType *polygon;
   bool changed = false;
   bool havepoints;
   Cardinal n, m, j;
-  NetTypePtr next, subnet, theSubnet = NULL;
+  NetType *next, *subnet, *theSubnet = NULL;
 
   /* This is just a sanity check, to make sure we're passed
    * *something*.
@@ -640,7 +633,7 @@ DrawShortestRats (NetListTypePtr Netl, void (*funcp) (register ConnectionTypePtr
 		   * via in the Net to make that connection.
 		   */
 		  if (conn1->type == POLYGON_TYPE &&
-		      (polygon = (PolygonTypePtr)conn1->ptr2) &&
+		      (polygon = (PolygonType *)conn1->ptr2) &&
 		      !(distance == 0 &&
 		        firstpoint && firstpoint->type == VIA_TYPE) &&
 		      IsPointInPolygonIgnoreHoles (conn2->X, conn2->Y, polygon))
@@ -652,7 +645,7 @@ DrawShortestRats (NetListTypePtr Netl, void (*funcp) (register ConnectionTypePtr
 		      havepoints = true;
 		    }
 		  else if (conn2->type == POLYGON_TYPE &&
-		      (polygon = (PolygonTypePtr)conn2->ptr2) &&
+		      (polygon = (PolygonType *)conn2->ptr2) &&
 		      !(distance == 0 &&
 		        firstpoint && firstpoint->type == VIA_TYPE) &&
 		      IsPointInPolygonIgnoreHoles (conn1->X, conn1->Y, polygon))
@@ -728,11 +721,11 @@ DrawShortestRats (NetListTypePtr Netl, void (*funcp) (register ConnectionTypePtr
  *  if SelectedOnly is true, it will only draw rats to selected pins and pads
  */
 bool
-AddAllRats (bool SelectedOnly, void (*funcp) (register ConnectionTypePtr, register ConnectionTypePtr, register RouteStyleTypePtr))
+AddAllRats (bool SelectedOnly, void (*funcp) (register ConnectionType *, register ConnectionType *, register RouteStyleType *))
 {
-  NetListTypePtr Nets, Wantlist;
-  NetTypePtr lonesome;
-  ConnectionTypePtr onepin;
+  NetListType *Nets, *Wantlist;
+  NetType *lonesome;
+  ConnectionType *onepin;
   bool changed, Warned = false;
 
   /* the netlist library has the text form
@@ -749,8 +742,7 @@ AddAllRats (bool SelectedOnly, void (*funcp) (register ConnectionTypePtr, regist
   changed = false;
   /* initialize finding engine */
   InitConnectionLookup ();
-  SaveFindFlag (DRCFLAG);
-  Nets = (NetListTypePtr)calloc (1, sizeof (NetListType));
+  Nets = (NetListType *)calloc (1, sizeof (NetListType));
   /* now we build another netlist (Nets) for each
    * net in Wantlist that shows how it actually looks now,
    * then fill in any missing connections with rat lines.
@@ -768,7 +760,7 @@ AddAllRats (bool SelectedOnly, void (*funcp) (register ConnectionTypePtr, regist
     CONNECTION_LOOP (net);
     {
       if (!SelectedOnly
-	  || TEST_FLAG (SELECTEDFLAG, (PinTypePtr) connection->ptr2))
+	  || TEST_FLAG (SELECTEDFLAG, (PinType *) connection->ptr2))
 	{
 	  lonesome = GetNetMemory (Nets);
 	  onepin = GetConnectionMemory (lonesome);
@@ -785,7 +777,6 @@ AddAllRats (bool SelectedOnly, void (*funcp) (register ConnectionTypePtr, regist
   FreeNetListMemory (Nets);
   free (Nets);
   FreeConnectionLookupMemory ();
-  RestoreFindFlag ();
   if (funcp)
     return (true);
 
@@ -825,9 +816,9 @@ NetListListType
 CollectSubnets (bool SelectedOnly)
 {
   NetListListType result = { 0, 0, NULL };
-  NetListTypePtr Nets, Wantlist;
-  NetTypePtr lonesome;
-  ConnectionTypePtr onepin;
+  NetListType *Nets, *Wantlist;
+  NetType *lonesome;
+  ConnectionType *onepin;
 
   /* the netlist library has the text form
    * ProcNetlist fills in the Netlist
@@ -842,7 +833,6 @@ CollectSubnets (bool SelectedOnly)
     }
   /* initialize finding engine */
   InitConnectionLookup ();
-  SaveFindFlag (DRCFLAG);
   /* now we build another netlist (Nets) for each
    * net in Wantlist that shows how it actually looks now,
    * then fill in any missing connections with rat lines.
@@ -861,7 +851,7 @@ CollectSubnets (bool SelectedOnly)
     CONNECTION_LOOP (net);
     {
       if (!SelectedOnly
-	  || TEST_FLAG (SELECTEDFLAG, (PinTypePtr) connection->ptr2))
+	  || TEST_FLAG (SELECTEDFLAG, (PinType *) connection->ptr2))
 	{
 	  lonesome = GetNetMemory (Nets);
 	  onepin = GetConnectionMemory (lonesome);
@@ -875,7 +865,6 @@ CollectSubnets (bool SelectedOnly)
   }
   END_LOOP;
   FreeConnectionLookupMemory ();
-  RestoreFindFlag ();
   return result;
 }
 
@@ -902,7 +891,7 @@ rat_used (char *name)
   /* These next two functions moved from the original netlist.c as part of the
      |  gui code separation for the Gtk port.
    */
-RatTypePtr
+RatType *
 AddNet (void)
 {
   static int ratDrawn = 0;
@@ -911,8 +900,8 @@ AddNet (void)
   char ratname[20];
   int found;
   void *ptr1, *ptr2, *ptr3;
-  LibraryMenuTypePtr menu;
-  LibraryEntryTypePtr entry;
+  LibraryMenuType *menu;
+  LibraryEntryType *entry;
 
   if (Crosshair.AttachedLine.Point1.X == Crosshair.AttachedLine.Point2.X
       && Crosshair.AttachedLine.Point1.Y == Crosshair.AttachedLine.Point2.Y)
@@ -926,15 +915,15 @@ AddNet (void)
       Message (_("No pad/pin under rat line\n"));
       return (NULL);
     }
-  if (NAMEONPCB_NAME ((ElementTypePtr) ptr1) == NULL
-      || *NAMEONPCB_NAME ((ElementTypePtr) ptr1) == 0)
+  if (NAMEONPCB_NAME ((ElementType *) ptr1) == NULL
+      || *NAMEONPCB_NAME ((ElementType *) ptr1) == 0)
     {
       Message (_("You must name the starting element first\n"));
       return (NULL);
     }
 
   /* will work for pins to since the FLAG is common */
-  group1 = (TEST_FLAG (ONSOLDERFLAG, (PadTypePtr) ptr2) ?
+  group1 = (TEST_FLAG (ONSOLDERFLAG, (PadType *) ptr2) ?
 	    GetLayerGroupNumberByNumber (solder_silk_layer) :
 	    GetLayerGroupNumberByNumber (component_silk_layer));
   strcpy (name1, ConnectionName (found, ptr1, ptr2));
@@ -946,13 +935,13 @@ AddNet (void)
       Message (_("No pad/pin under rat line\n"));
       return (NULL);
     }
-  if (NAMEONPCB_NAME ((ElementTypePtr) ptr1) == NULL
-      || *NAMEONPCB_NAME ((ElementTypePtr) ptr1) == 0)
+  if (NAMEONPCB_NAME ((ElementType *) ptr1) == NULL
+      || *NAMEONPCB_NAME ((ElementType *) ptr1) == 0)
     {
       Message (_("You must name the ending element first\n"));
       return (NULL);
     }
-  group2 = (TEST_FLAG (ONSOLDERFLAG, (PadTypePtr) ptr2) ?
+  group2 = (TEST_FLAG (ONSOLDERFLAG, (PadType *) ptr2) ?
 	    GetLayerGroupNumberByNumber (solder_silk_layer) :
 	    GetLayerGroupNumberByNumber (component_silk_layer));
   name2 = ConnectionName (found, ptr1, ptr2);
@@ -1020,15 +1009,15 @@ ConnectionName (int type, void *ptr1, void *ptr2)
   switch (type)
     {
     case PIN_TYPE:
-      num = ((PinTypePtr) ptr2)->Number;
+      num = ((PinType *) ptr2)->Number;
       break;
     case PAD_TYPE:
-      num = ((PadTypePtr) ptr2)->Number;
+      num = ((PadType *) ptr2)->Number;
       break;
     default:
       return (NULL);
     }
-  strcpy (name, UNKNOWN (NAMEONPCB_NAME ((ElementTypePtr) ptr1)));
+  strcpy (name, UNKNOWN (NAMEONPCB_NAME ((ElementType *) ptr1)));
   strcat (name, "-");
   strcat (name, UNKNOWN (num));
   return (name);
diff --git a/src/rats.h b/src/rats.h
index 9479fe0..dc7479b 100644
--- a/src/rats.h
+++ b/src/rats.h
@@ -24,7 +24,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for rats routines
@@ -36,16 +35,16 @@
 #include "global.h"
 
 /* This one is actually in netlist.h, but it's used by rats.c */
-LibraryMenuTypePtr netnode_to_netname (char *nodename);
-LibraryMenuTypePtr netname_to_netname (char *netname);
+LibraryMenuType * netnode_to_netname (char *nodename);
+LibraryMenuType * netname_to_netname (char *netname);
 
-RatTypePtr AddNet (void);
+RatType * AddNet (void);
 char *ConnectionName (int, void *, void *);
 
-bool AddAllRats (bool, void (*)(register ConnectionTypePtr, register ConnectionTypePtr, register RouteStyleTypePtr));
-bool SeekPad (LibraryEntryTypePtr, ConnectionTypePtr, bool);
+bool AddAllRats (bool, void (*)(register ConnectionType *, register ConnectionType *, register RouteStyleType *));
+bool SeekPad (LibraryEntryType *, ConnectionType *, bool);
 
-NetListTypePtr ProcNetlist (LibraryTypePtr);
+NetListType * ProcNetlist (LibraryType *);
 NetListListType CollectSubnets (bool);
 
 #endif
diff --git a/src/remove.c b/src/remove.c
index 4554597..39af48f 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -58,25 +56,22 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
-
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static void *DestroyVia (PinTypePtr);
-static void *DestroyRat (RatTypePtr);
-static void *DestroyLine (LayerTypePtr, LineTypePtr);
-static void *DestroyArc (LayerTypePtr, ArcTypePtr);
-static void *DestroyText (LayerTypePtr, TextTypePtr);
-static void *DestroyPolygon (LayerTypePtr, PolygonTypePtr);
-static void *DestroyElement (ElementTypePtr);
-static void *RemoveVia (PinTypePtr);
-static void *RemoveRat (RatTypePtr);
-static void *DestroyPolygonPoint (LayerTypePtr, PolygonTypePtr, PointTypePtr);
-static void *RemovePolygonContour (LayerTypePtr, PolygonTypePtr, Cardinal);
-static void *RemovePolygonPoint (LayerTypePtr, PolygonTypePtr, PointTypePtr);
-static void *RemoveLinePoint (LayerTypePtr, LineTypePtr, PointTypePtr);
+static void *DestroyVia (PinType *);
+static void *DestroyRat (RatType *);
+static void *DestroyLine (LayerType *, LineType *);
+static void *DestroyArc (LayerType *, ArcType *);
+static void *DestroyText (LayerType *, TextType *);
+static void *DestroyPolygon (LayerType *, PolygonType *);
+static void *DestroyElement (ElementType *);
+static void *RemoveVia (PinType *);
+static void *RemoveRat (RatType *);
+static void *DestroyPolygonPoint (LayerType *, PolygonType *, PointType *);
+static void *RemovePolygonContour (LayerType *, PolygonType *, Cardinal);
+static void *RemovePolygonPoint (LayerType *, PolygonType *, PointType *);
+static void *RemoveLinePoint (LayerType *, LineType *, PointType *);
 
 /* ---------------------------------------------------------------------------
  * some local types
@@ -109,14 +104,14 @@ static ObjectFunctionType DestroyFunctions = {
   DestroyArc,
   DestroyRat
 };
-static DataTypePtr DestroyTarget;
+static DataType *DestroyTarget;
 static bool Bulk = false;
 
 /* ---------------------------------------------------------------------------
  * remove PCB
  */
 void
-RemovePCB (PCBTypePtr Ptr)
+RemovePCB (PCBType *Ptr)
 {
   ClearUndoList (true);
   FreePCBMemory (Ptr);
@@ -127,9 +122,9 @@ RemovePCB (PCBTypePtr Ptr)
  * destroys a via
  */
 static void *
-DestroyVia (PinTypePtr Via)
+DestroyVia (PinType *Via)
 {
-  r_delete_entry (DestroyTarget->via_tree, (BoxTypePtr) Via);
+  r_delete_entry (DestroyTarget->via_tree, (BoxType *) Via);
   free (Via->Name);
 
   DestroyTarget->Via = g_list_remove (DestroyTarget->Via, Via);
@@ -144,9 +139,9 @@ DestroyVia (PinTypePtr Via)
  * destroys a line from a layer 
  */
 static void *
-DestroyLine (LayerTypePtr Layer, LineTypePtr Line)
+DestroyLine (LayerType *Layer, LineType *Line)
 {
-  r_delete_entry (Layer->line_tree, (BoxTypePtr) Line);
+  r_delete_entry (Layer->line_tree, (BoxType *) Line);
   free (Line->Number);
 
   Layer->Line = g_list_remove (Layer->Line, Line);
@@ -161,9 +156,9 @@ DestroyLine (LayerTypePtr Layer, LineTypePtr Line)
  * destroys an arc from a layer 
  */
 static void *
-DestroyArc (LayerTypePtr Layer, ArcTypePtr Arc)
+DestroyArc (LayerType *Layer, ArcType *Arc)
 {
-  r_delete_entry (Layer->arc_tree, (BoxTypePtr) Arc);
+  r_delete_entry (Layer->arc_tree, (BoxType *) Arc);
 
   Layer->Arc = g_list_remove (Layer->Arc, Arc);
   Layer->ArcN --;
@@ -177,9 +172,9 @@ DestroyArc (LayerTypePtr Layer, ArcTypePtr Arc)
  * destroys a polygon from a layer
  */
 static void *
-DestroyPolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
+DestroyPolygon (LayerType *Layer, PolygonType *Polygon)
 {
-  r_delete_entry (Layer->polygon_tree, (BoxTypePtr) Polygon);
+  r_delete_entry (Layer->polygon_tree, (BoxType *) Polygon);
   FreePolygonMemory (Polygon);
 
   Layer->Polygon = g_list_remove (Layer->Polygon, Polygon);
@@ -194,8 +189,8 @@ DestroyPolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
  * removes a polygon-point from a polygon and destroys the data
  */
 static void *
-DestroyPolygonPoint (LayerTypePtr Layer,
-		     PolygonTypePtr Polygon, PointTypePtr Point)
+DestroyPolygonPoint (LayerType *Layer,
+		     PolygonType *Polygon, PointType *Point)
 {
   Cardinal point_idx;
   Cardinal i;
@@ -234,10 +229,10 @@ DestroyPolygonPoint (LayerTypePtr Layer,
  * destroys a text from a layer
  */
 static void *
-DestroyText (LayerTypePtr Layer, TextTypePtr Text)
+DestroyText (LayerType *Layer, TextType *Text)
 {
   free (Text->TextString);
-  r_delete_entry (Layer->text_tree, (BoxTypePtr) Text);
+  r_delete_entry (Layer->text_tree, (BoxType *) Text);
 
   Layer->Text = g_list_remove (Layer->Text, Text);
   Layer->TextN --;
@@ -251,7 +246,7 @@ DestroyText (LayerTypePtr Layer, TextTypePtr Text)
  * destroys a element
  */
 static void *
-DestroyElement (ElementTypePtr Element)
+DestroyElement (ElementType *Element)
 {
   if (DestroyTarget->element_tree)
     r_delete_entry (DestroyTarget->element_tree, (BoxType *) Element);
@@ -291,7 +286,7 @@ DestroyElement (ElementTypePtr Element)
  * destroys a rat
  */
 static void *
-DestroyRat (RatTypePtr Rat)
+DestroyRat (RatType *Rat)
 {
   if (DestroyTarget->rat_tree)
     r_delete_entry (DestroyTarget->rat_tree, &Rat->BoundingBox);
@@ -309,7 +304,7 @@ DestroyRat (RatTypePtr Rat)
  * removes a via
  */
 static void *
-RemoveVia (PinTypePtr Via)
+RemoveVia (PinType *Via)
 {
   /* erase from screen and memory */
   if (PCB->ViaOn)
@@ -326,7 +321,7 @@ RemoveVia (PinTypePtr Via)
  * removes a rat
  */
 static void *
-RemoveRat (RatTypePtr Rat)
+RemoveRat (RatType *Rat)
 {
   /* erase from screen and memory */
   if (PCB->RatOn)
@@ -342,8 +337,8 @@ RemoveRat (RatTypePtr Rat)
 struct rlp_info
 {
   jmp_buf env;
-  LineTypePtr line;
-  PointTypePtr point;
+  LineType *line;
+  PointType *point;
 };
 static int
 remove_point (const BoxType * b, void *cl)
@@ -374,7 +369,7 @@ remove_point (const BoxType * b, void *cl)
  * removes a line point, or a line if the selected point is the end
  */
 static void *
-RemoveLinePoint (LayerTypePtr Layer, LineTypePtr Line, PointTypePtr Point)
+RemoveLinePoint (LayerType *Layer, LineType *Line, PointType *Point)
 {
   PointType other;
   struct rlp_info info;
@@ -399,7 +394,7 @@ RemoveLinePoint (LayerTypePtr Layer, LineTypePtr Line, PointTypePtr Point)
  * removes a line from a layer 
  */
 void *
-RemoveLine (LayerTypePtr Layer, LineTypePtr Line)
+RemoveLine (LayerType *Layer, LineType *Line)
 {
   /* erase from screen */
   if (Layer->On)
@@ -416,7 +411,7 @@ RemoveLine (LayerTypePtr Layer, LineTypePtr Line)
  * removes an arc from a layer 
  */
 void *
-RemoveArc (LayerTypePtr Layer, ArcTypePtr Arc)
+RemoveArc (LayerType *Layer, ArcType *Arc)
 {
   /* erase from screen */
   if (Layer->On)
@@ -433,7 +428,7 @@ RemoveArc (LayerTypePtr Layer, ArcTypePtr Arc)
  * removes a text from a layer
  */
 void *
-RemoveText (LayerTypePtr Layer, TextTypePtr Text)
+RemoveText (LayerType *Layer, TextType *Text)
 {
   /* erase from screen */
   if (Layer->On)
@@ -450,7 +445,7 @@ RemoveText (LayerTypePtr Layer, TextTypePtr Text)
  * removes a polygon from a layer
  */
 void *
-RemovePolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
+RemovePolygon (LayerType *Layer, PolygonType *Polygon)
 {
   /* erase from screen */
   if (Layer->On)
@@ -468,8 +463,8 @@ RemovePolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
  * If removing the outer contour, it removes the whole polygon.
  */
 static void *
-RemovePolygonContour (LayerTypePtr Layer,
-                      PolygonTypePtr Polygon,
+RemovePolygonContour (LayerType *Layer,
+                      PolygonType *Polygon,
                       Cardinal contour)
 {
   Cardinal contour_start, contour_end, contour_points;
@@ -518,8 +513,8 @@ RemovePolygonContour (LayerTypePtr Layer,
  * removes a polygon-point from a polygon
  */
 static void *
-RemovePolygonPoint (LayerTypePtr Layer,
-		    PolygonTypePtr Polygon, PointTypePtr Point)
+RemovePolygonPoint (LayerType *Layer,
+		    PolygonType *Polygon, PointType *Point)
 {
   Cardinal point_idx;
   Cardinal i;
@@ -572,7 +567,7 @@ RemovePolygonPoint (LayerTypePtr Layer,
  * removes an element
  */
 void *
-RemoveElement (ElementTypePtr Element)
+RemoveElement (ElementType *Element)
 {
   /* erase from screen */
   if ((PCB->ElementOn || PCB->PinOn) &&
@@ -649,7 +644,7 @@ DeleteRats (bool selected)
  * allocated memory is destroyed assumed to already be erased
  */
 void *
-DestroyObject (DataTypePtr Target, int Type, void *Ptr1,
+DestroyObject (DataType *Target, int Type, void *Ptr1,
 	       void *Ptr2, void *Ptr3)
 {
   DestroyTarget = Target;
diff --git a/src/remove.h b/src/remove.h
index 1fc8890..f1f4596 100644
--- a/src/remove.h
+++ b/src/remove.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for remove routines
@@ -40,16 +39,16 @@
 	(VIA_TYPE | LINEPOINT_TYPE | LINE_TYPE | TEXT_TYPE | ELEMENT_TYPE |	\
 	POLYGONPOINT_TYPE | POLYGON_TYPE | RATLINE_TYPE | ARC_TYPE)
 
-void *RemoveLine (LayerTypePtr, LineTypePtr);
-void *RemoveArc (LayerTypePtr, ArcTypePtr);
-void *RemovePolygon (LayerTypePtr, PolygonTypePtr);
-void *RemoveText (LayerTypePtr, TextTypePtr);
-void *RemoveElement (ElementTypePtr);
+void *RemoveLine (LayerType *, LineType *);
+void *RemoveArc (LayerType *, ArcType *);
+void *RemovePolygon (LayerType *, PolygonType *);
+void *RemoveText (LayerType *, TextType *);
+void *RemoveElement (ElementType *);
 void ClearRemoveList (void);
-void RemovePCB (PCBTypePtr);
+void RemovePCB (PCBType *);
 bool RemoveSelected (void);
 bool DeleteRats (bool);
 void *RemoveObject (int, void *, void *, void *);
-void *DestroyObject (DataTypePtr, int, void *, void *, void *);
+void *DestroyObject (DataType *, int, void *, void *, void *);
 
 #endif
diff --git a/src/report.c b/src/report.c
index d461bd2..fe75421 100644
--- a/src/report.c
+++ b/src/report.c
@@ -70,7 +70,7 @@
 static int
 ReportDrills (int argc, char **argv, Coord x, Coord y)
 {
-  DrillInfoTypePtr AllDrills;
+  DrillInfoType *AllDrills;
   Cardinal n;
   char *stringlist, *thestring;
   int total_drills = 0;
@@ -91,8 +91,8 @@ ReportDrills (int argc, char **argv, Coord x, Coord y)
      |  And even that probably isn't going to work in all cases.
    */
   sprintf (stringlist,
-	   "There are %d different drill sizes used in this layout, %d holes total\n\n"
-	   "Drill Diam. (%s)\t# of Pins\t# of Vias\t# of Elements\t# Unplated\n",
+	   _("There are %d different drill sizes used in this layout, %d holes total\n\n"
+	   "Drill Diam. (%s)\t# of Pins\t# of Vias\t# of Elements\t# Unplated\n"),
 	   AllDrills->DrillN, total_drills, Settings.grid_unit->suffix);
   thestring = stringlist;
   while (*thestring != '\0')
@@ -111,17 +111,17 @@ ReportDrills (int argc, char **argv, Coord x, Coord y)
     }
   FreeDrillInfo (AllDrills);
   /* create dialog box */
-  gui->report_dialog ("Drill Report", stringlist);
+  gui->report_dialog (_("Drill Report"), stringlist);
 
   free (stringlist);
   return 0;
 }
 
 
-static const char reportdialog_syntax[] = "ReportDialog()";
+static const char reportdialog_syntax[] = N_("ReportDialog()");
 
 static const char reportdialog_help[] =
-  "Report on the object under the crosshair";
+  N_("Report on the object under the crosshair");
 
 /* %start-doc actions ReportDialog
 
@@ -145,7 +145,7 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
     {
     case VIA_TYPE:
       {
-	PinTypePtr via;
+	PinType *via;
 #ifndef NDEBUG
 	if (gui->shift_is_pressed ())
 	  {
@@ -153,24 +153,24 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 	    return 0;
 	  }
 #endif
-	via = (PinTypePtr) ptr2;
+	via = (PinType *) ptr2;
 	if (TEST_FLAG (HOLEFLAG, via))
-	  pcb_sprintf (&report[0], "%m+VIA ID# %ld; Flags:%s\n"
+	  pcb_sprintf (&report[0], _("%m+VIA ID# %ld; Flags:%s\n"
 		   "(X,Y) = %$mD.\n"
 		   "It is a pure hole of diameter %$mS.\n"
 		   "Name = \"%s\"."
-		   "%s", USER_UNITMASK, via->ID, flags_to_string (via->Flags, VIA_TYPE),
+		   "%s"), USER_UNITMASK, via->ID, flags_to_string (via->Flags, VIA_TYPE),
 		   via->X, via->Y, via->DrillingHole, EMPTY (via->Name),
-		   TEST_FLAG (LOCKFLAG, via) ? "It is LOCKED.\n" : "");
+		   TEST_FLAG (LOCKFLAG, via) ? _("It is LOCKED.\n") : "");
 	else
-	  pcb_sprintf (&report[0], "%m+VIA ID# %ld;  Flags:%s\n"
+	  pcb_sprintf (&report[0], _("%m+VIA ID# %ld;  Flags:%s\n"
 		   "(X,Y) = %$mD.\n"
 		   "Copper width = %$mS. Drill width = %$mS.\n"
 		   "Clearance width in polygons = %$mS.\n"
 		   "Annulus = %$mS.\n"
 		   "Solder mask hole = %$mS (gap = %$mS).\n"
 		   "Name = \"%s\"."
-		   "%s", USER_UNITMASK, via->ID, flags_to_string (via->Flags, VIA_TYPE),
+		   "%s"), USER_UNITMASK, via->ID, flags_to_string (via->Flags, VIA_TYPE),
 		   via->X, via->Y,
 		   via->Thickness,
 		   via->DrillingHole,
@@ -179,13 +179,13 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 		   via->Mask,
 		   (via->Mask - via->Thickness) / 2,
 		   EMPTY (via->Name), TEST_FLAG (LOCKFLAG, via) ?
-		   "It is LOCKED.\n" : "");
+		   _("It is LOCKED.\n") : "");
 	break;
       }
     case PIN_TYPE:
       {
-	PinTypePtr Pin;
-	ElementTypePtr element;
+	PinType *Pin;
+	ElementType *element;
 #ifndef NDEBUG
 	if (gui->shift_is_pressed ())
 	  {
@@ -193,8 +193,8 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 	    return 0;
 	  }
 #endif
-	Pin = (PinTypePtr) ptr2;
-	element = (ElementTypePtr) ptr1;
+	Pin = (PinType *) ptr2;
+	element = (ElementType *) ptr1;
 
 	PIN_LOOP (element);
 	{
@@ -203,24 +203,24 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 	}
 	END_LOOP;
 	if (TEST_FLAG (HOLEFLAG, Pin))
-	  pcb_sprintf (&report[0], "%m+PIN ID# %ld; Flags:%s\n"
+	  pcb_sprintf (&report[0], _("%m+PIN ID# %ld; Flags:%s\n"
 		   "(X,Y) = %$mD.\n"
 		   "It is a mounting hole. Drill width = %$mS.\n"
 		   "It is owned by element %$mS.\n"
-		   "%s", USER_UNITMASK, Pin->ID, flags_to_string (Pin->Flags, PIN_TYPE),
+		   "%s"), USER_UNITMASK, Pin->ID, flags_to_string (Pin->Flags, PIN_TYPE),
 		   Pin->X, Pin->Y, Pin->DrillingHole,
 		   EMPTY (element->Name[1].TextString),
-		   TEST_FLAG (LOCKFLAG, Pin) ? "It is LOCKED.\n" : "");
+		   TEST_FLAG (LOCKFLAG, Pin) ? _("It is LOCKED.\n") : "");
 	else
 	  pcb_sprintf (&report[0],
-		   "%m+PIN ID# %ld;  Flags:%s\n" "(X,Y) = %$mD.\n"
+		   _("%m+PIN ID# %ld;  Flags:%s\n" "(X,Y) = %$mD.\n"
 		   "Copper width = %$mS. Drill width = %$mS.\n"
 		   "Clearance width to Polygon = %$mS.\n"
 		   "Annulus = %$mS.\n"
 		   "Solder mask hole = %$mS (gap = %$mS).\n"
 		   "Name = \"%s\".\n"
 		   "It is owned by element %s\n as pin number %s.\n"
-		   "%s", USER_UNITMASK,
+		   "%s"), USER_UNITMASK,
 		   Pin->ID, flags_to_string (Pin->Flags, PIN_TYPE),
 		   Pin->X, Pin->Y, Pin->Thickness,
 		   Pin->DrillingHole,
@@ -230,40 +230,40 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 		   (Pin->Mask - Pin->Thickness) / 2,
 		   EMPTY (Pin->Name),
 		   EMPTY (element->Name[1].TextString), EMPTY (Pin->Number),
-		   TEST_FLAG (LOCKFLAG, Pin) ? "It is LOCKED.\n" : "");
+		   TEST_FLAG (LOCKFLAG, Pin) ? _("It is LOCKED.\n") : "");
 	break;
       }
     case LINE_TYPE:
       {
-	LineTypePtr line;
+	LineType *line;
 #ifndef NDEBUG
 	if (gui->shift_is_pressed ())
 	  {
-	    LayerTypePtr layer = (LayerTypePtr) ptr1;
+	    LayerType *layer = (LayerType *) ptr1;
 	    __r_dump_tree (layer->line_tree->root, 0);
 	    return 0;
 	  }
 #endif
-	line = (LineTypePtr) ptr2;
-	pcb_sprintf (&report[0], "%m+LINE ID# %ld;  Flags:%s\n"
+	line = (LineType *) ptr2;
+	pcb_sprintf (&report[0], _("%m+LINE ID# %ld;  Flags:%s\n"
 		 "FirstPoint(X,Y)  = %$mD, ID = %ld.\n"
 		 "SecondPoint(X,Y) = %$mD, ID = %ld.\n"
 		 "Width = %$mS.\nClearance width in polygons = %$mS.\n"
 		 "It is on layer %d\n"
 		 "and has name \"%s\".\n"
-		 "%s", USER_UNITMASK,
+		 "%s"), USER_UNITMASK,
 		 line->ID, flags_to_string (line->Flags, LINE_TYPE),
 		 line->Point1.X, line->Point1.Y, line->Point1.ID,
 		 line->Point2.X, line->Point2.Y, line->Point2.ID,
 		 line->Thickness, line->Clearance / 2,
-		 GetLayerNumber (PCB->Data, (LayerTypePtr) ptr1),
+		 GetLayerNumber (PCB->Data, (LayerType *) ptr1),
 		 UNKNOWN (line->Number),
-		 TEST_FLAG (LOCKFLAG, line) ? "It is LOCKED.\n" : "");
+		 TEST_FLAG (LOCKFLAG, line) ? _("It is LOCKED.\n") : "");
 	break;
       }
     case RATLINE_TYPE:
       {
-	RatTypePtr line;
+	RatType *line;
 #ifndef NDEBUG
 	if (gui->shift_is_pressed ())
 	  {
@@ -271,12 +271,12 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 	    return 0;
 	  }
 #endif
-	line = (RatTypePtr) ptr2;
-	pcb_sprintf (&report[0], "%m+RAT-LINE ID# %ld;  Flags:%s\n"
+	line = (RatType *) ptr2;
+	pcb_sprintf (&report[0], _("%m+RAT-LINE ID# %ld;  Flags:%s\n"
 		 "FirstPoint(X,Y)  = %$mD; ID = %ld; "
 		 "connects to layer group %d.\n"
 		 "SecondPoint(X,Y) = %$mD; ID = %ld; "
-		 "connects to layer group %d.\n",
+		 "connects to layer group %d.\n"),
 		 USER_UNITMASK, line->ID, flags_to_string (line->Flags, LINE_TYPE),
 		 line->Point1.X, line->Point1.Y,
 		 line->Point1.ID, line->group1,
@@ -286,20 +286,20 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
       }
     case ARC_TYPE:
       {
-	ArcTypePtr Arc;
-	BoxTypePtr box;
+	ArcType *Arc;
+	BoxType *box;
 #ifndef NDEBUG
 	if (gui->shift_is_pressed ())
 	  {
-	    LayerTypePtr layer = (LayerTypePtr) ptr1;
+	    LayerType *layer = (LayerType *) ptr1;
 	    __r_dump_tree (layer->arc_tree->root, 0);
 	    return 0;
 	  }
 #endif
-	Arc = (ArcTypePtr) ptr2;
+	Arc = (ArcType *) ptr2;
 	box = GetArcEnds (Arc);
 
-	pcb_sprintf (&report[0], "%m+ARC ID# %ld;  Flags:%s\n"
+	pcb_sprintf (&report[0], _("%m+ARC ID# %ld;  Flags:%s\n"
 		 "CenterPoint(X,Y) = %$mD.\n"
 		 "Radius = %$mS, Thickness = %$mS.\n"
 		 "Clearance width in polygons = %$mS.\n"
@@ -307,7 +307,7 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 		 "Bounding Box is %$mD, %$mD.\n"
 		 "That makes the end points at %$mD and %$mD.\n"
 		 "It is on layer %d.\n"
-		 "%s", USER_UNITMASK, Arc->ID, flags_to_string (Arc->Flags, ARC_TYPE),
+		 "%s"), USER_UNITMASK, Arc->ID, flags_to_string (Arc->Flags, ARC_TYPE),
 		 Arc->X, Arc->Y,
 		 Arc->Width, Arc->Thickness,
 		 Arc->Clearance / 2, Arc->StartAngle, Arc->Delta,
@@ -315,43 +315,43 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 		 Arc->BoundingBox.X2, Arc->BoundingBox.Y2,
 		 box->X1, box->Y1,
 		 box->X2, box->Y2,
-		 GetLayerNumber (PCB->Data, (LayerTypePtr) ptr1),
-		 TEST_FLAG (LOCKFLAG, Arc) ? "It is LOCKED.\n" : "");
+		 GetLayerNumber (PCB->Data, (LayerType *) ptr1),
+		 TEST_FLAG (LOCKFLAG, Arc) ? _("It is LOCKED.\n") : "");
 	break;
       }
     case POLYGON_TYPE:
       {
-	PolygonTypePtr Polygon;
+	PolygonType *Polygon;
 #ifndef NDEBUG
 	if (gui->shift_is_pressed ())
 	  {
-	    LayerTypePtr layer = (LayerTypePtr) ptr1;
+	    LayerType *layer = (LayerType *) ptr1;
 	    __r_dump_tree (layer->polygon_tree->root, 0);
 	    return 0;
 	  }
 #endif
-	Polygon = (PolygonTypePtr) ptr2;
+	Polygon = (PolygonType *) ptr2;
 
-	pcb_sprintf (&report[0], "%m+POLYGON ID# %ld;  Flags:%s\n"
+	pcb_sprintf (&report[0], _("%m+POLYGON ID# %ld;  Flags:%s\n"
 		 "Its bounding box is %$mD %$mD.\n"
 		 "It has %d points and could store %d more\n"
 		 "  without using more memory.\n"
 		 "It has %d holes and resides on layer %d.\n"
-		 "%s", USER_UNITMASK, Polygon->ID,
+		 "%s"), USER_UNITMASK, Polygon->ID,
 		 flags_to_string (Polygon->Flags, POLYGON_TYPE),
 		 Polygon->BoundingBox.X1, Polygon->BoundingBox.Y1,
 		 Polygon->BoundingBox.X2, Polygon->BoundingBox.Y2,
 		 Polygon->PointN, Polygon->PointMax - Polygon->PointN,
 		 Polygon->HoleIndexN,
-		 GetLayerNumber (PCB->Data, (LayerTypePtr) ptr1),
-		 TEST_FLAG (LOCKFLAG, Polygon) ? "It is LOCKED.\n" : "");
+		 GetLayerNumber (PCB->Data, (LayerType *) ptr1),
+		 TEST_FLAG (LOCKFLAG, Polygon) ? _("It is LOCKED.\n") : "");
 	break;
       }
     case PAD_TYPE:
       {
 	Coord len;
-	PadTypePtr Pad;
-	ElementTypePtr element;
+	PadType *Pad;
+	ElementType *element;
 #ifndef NDEBUG
 	if (gui->shift_is_pressed ())
 	  {
@@ -359,8 +359,8 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 	    return 0;
 	  }
 #endif
-	Pad = (PadTypePtr) ptr2;
-	element = (ElementTypePtr) ptr1;
+	Pad = (PadType *) ptr2;
+	element = (ElementType *) ptr1;
 
 	PAD_LOOP (element);
 	{
@@ -371,7 +371,7 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 	}
 	END_LOOP;
 	len = Distance (Pad->Point1.X, Pad->Point1.Y, Pad->Point2.X, Pad->Point2.Y);
-	pcb_sprintf (&report[0], "%m+PAD ID# %ld;  Flags:%s\n"
+	pcb_sprintf (&report[0], _("%m+PAD ID# %ld;  Flags:%s\n"
 		 "FirstPoint(X,Y)  = %$mD; ID = %ld.\n"
 		 "SecondPoint(X,Y) = %$mD; ID = %ld.\n"
 		 "Width = %$mS.  Length = %$mS.\n"
@@ -381,7 +381,7 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 		 "It is owned by SMD element %s\n"
 		 "  as pin number %s and is on the %s\n"
 		 "side of the board.\n"
-		 "%s", USER_UNITMASK, Pad->ID,
+		 "%s"), USER_UNITMASK, Pad->ID,
 		 flags_to_string (Pad->Flags, PAD_TYPE),
 		 Pad->Point1.X, Pad->Point1.Y, Pad->Point1.ID,
 		 Pad->Point2.X, Pad->Point2.Y, Pad->Point2.ID,
@@ -393,13 +393,13 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 		 EMPTY (element->Name[1].TextString),
 		 EMPTY (Pad->Number),
 		 TEST_FLAG (ONSOLDERFLAG,
-			    Pad) ? "solder (bottom)" : "component",
-		 TEST_FLAG (LOCKFLAG, Pad) ? "It is LOCKED.\n" : "");
+			    Pad) ? _("solder (bottom)") : _("component"),
+		 TEST_FLAG (LOCKFLAG, Pad) ? _("It is LOCKED.\n") : "");
 	break;
       }
     case ELEMENT_TYPE:
       {
-	ElementTypePtr element;
+	ElementType *element;
 #ifndef NDEBUG
 	if (gui->shift_is_pressed ())
 	  {
@@ -407,8 +407,8 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 	    return 0;
 	  }
 #endif
-	element = (ElementTypePtr) ptr2;
-	pcb_sprintf (&report[0], "%m+ELEMENT ID# %ld;  Flags:%s\n"
+	element = (ElementType *) ptr2;
+	pcb_sprintf (&report[0], _("%m+ELEMENT ID# %ld;  Flags:%s\n"
 		 "BoundingBox %$mD %$mD.\n"
 		 "Descriptive Name \"%s\".\n"
 		 "Name on board \"%s\".\n"
@@ -416,7 +416,7 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 		 "It is %$mS tall and is located at (X,Y) = %$mD %s.\n"
 		 "Mark located at point (X,Y) = %$mD.\n"
 		 "It is on the %s side of the board.\n"
-		 "%s", USER_UNITMASK,
+		 "%s"), USER_UNITMASK,
 		 element->ID, flags_to_string (element->Flags, ELEMENT_TYPE),
 		 element->BoundingBox.X1, element->BoundingBox.Y1,
 		 element->BoundingBox.X2, element->BoundingBox.Y2,
@@ -425,17 +425,17 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 		 EMPTY (element->Name[2].TextString),
 		 SCALE_TEXT (FONT_CAPHEIGHT, element->Name[1].Scale),
 		 element->Name[1].X, element->Name[1].Y,
-		 TEST_FLAG (HIDENAMEFLAG, element) ? ",\n  but it's hidden" : "",
+		 TEST_FLAG (HIDENAMEFLAG, element) ? _(",\n  but it's hidden") : "",
 		 element->MarkX, element->MarkY,
-		 TEST_FLAG (ONSOLDERFLAG, element) ? "solder (bottom)" : "component",
-		 TEST_FLAG (LOCKFLAG, element) ? "It is LOCKED.\n" : "");
+		 TEST_FLAG (ONSOLDERFLAG, element) ? _("solder (bottom)") : _("component"),
+		 TEST_FLAG (LOCKFLAG, element) ? _("It is LOCKED.\n") : "");
 	break;
       }
     case TEXT_TYPE:
 #ifndef NDEBUG
       if (gui->shift_is_pressed ())
 	{
-	  LayerTypePtr layer = (LayerTypePtr) ptr1;
+	  LayerType *layer = (LayerType *) ptr1;
 	  __r_dump_tree (layer->text_tree->root, 0);
 	  return 0;
 	}
@@ -443,7 +443,7 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
     case ELEMENTNAME_TYPE:
       {
 	char laynum[32];
-	TextTypePtr text;
+	TextType *text;
 #ifndef NDEBUG
 	if (gui->shift_is_pressed ())
 	  {
@@ -451,37 +451,38 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 	    return 0;
 	  }
 #endif
-	text = (TextTypePtr) ptr2;
+	text = (TextType *) ptr2;
 
 	if (type == TEXT_TYPE)
-	  sprintf (laynum, "It is on layer %d.",
-		   GetLayerNumber (PCB->Data, (LayerTypePtr) ptr1));
-	pcb_sprintf (&report[0], "%m+TEXT ID# %ld;  Flags:%s\n"
+	  sprintf (laynum, _("It is on layer %d."),
+		   GetLayerNumber (PCB->Data, (LayerType *) ptr1));
+	pcb_sprintf (&report[0], _("%m+TEXT ID# %ld;  Flags:%s\n"
 		 "Located at (X,Y) = %$mD.\n"
 		 "Characters are %$mS tall.\n"
 		 "Value is \"%s\".\n"
 		 "Direction is %d.\n"
 		 "The bounding box is %$mD %$mD.\n"
 		 "%s\n"
-		 "%s", USER_UNITMASK, text->ID, flags_to_string (text->Flags, TEXT_TYPE),
+		 "%s"), USER_UNITMASK, text->ID, flags_to_string (text->Flags, TEXT_TYPE),
 		 text->X, text->Y, SCALE_TEXT (FONT_CAPHEIGHT, text->Scale),
 		 text->TextString, text->Direction,
 		 text->BoundingBox.X1, text->BoundingBox.Y1,
 		 text->BoundingBox.X2, text->BoundingBox.Y2,
-		 (type == TEXT_TYPE) ? laynum : "It is an element name.",
-		 TEST_FLAG (LOCKFLAG, text) ? "It is LOCKED.\n" : "");
+		 (type == TEXT_TYPE) ? laynum : _("It is an element name."),
+		 TEST_FLAG (LOCKFLAG, text) ? _("It is LOCKED.\n") : "");
 	break;
       }
     case LINEPOINT_TYPE:
     case POLYGONPOINT_TYPE:
       {
-	PointTypePtr point = (PointTypePtr) ptr2;
-	pcb_sprintf (&report[0], "%m+POINT ID# %ld.\n"
+	PointType *point = (PointType *) ptr2;
+	pcb_sprintf (&report[0], _("%m+POINT ID# %ld.\n"
 		 "Located at (X,Y) = %$mD.\n"
-		 "It belongs to a %s on layer %d.\n", USER_UNITMASK, point->ID,
+		 "It belongs to a %s on layer %d.\n"), USER_UNITMASK, point->ID,
 		 point->X, point->Y,
-		 (type == LINEPOINT_TYPE) ? "line" : "polygon",
-		 GetLayerNumber (PCB->Data, (LayerTypePtr) ptr1));
+		 (type == LINEPOINT_TYPE) ?
+		     C_("report", "line") : C_("report", "polygon"),
+		 GetLayerNumber (PCB->Data, (LayerType *) ptr1));
 	break;
       }
     case NO_TYPE:
@@ -489,7 +490,7 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
       break;
 
     default:
-      sprintf (&report[0], "Unknown\n");
+      sprintf (&report[0], _("Unknown\n"));
       break;
     }
 
@@ -499,7 +500,7 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
       return 1;
     }
   /* create dialog box */
-  gui->report_dialog ("Report", &report[0]);
+  gui->report_dialog (_("Report"), &report[0]);
 
   return 0;
 }
@@ -512,14 +513,14 @@ ReportFoundPins (int argc, char **argv, Coord x, Coord y)
   int col = 0;
 
   DSClearString (&list);
-  DSAddString (&list, "The following pins/pads are FOUND:\n");
+  DSAddString (&list, _("The following pins/pads are FOUND:\n"));
   ELEMENT_LOOP (PCB->Data);
   {
     PIN_LOOP (element);
     {
       if (TEST_FLAG (FOUNDFLAG, pin))
 	{
-	  sprintf (temp, "%s-%s,%c",
+	  sprintf (temp, _("%s-%s,%c"),
 		   NAMEONPCB_NAME (element),
 		   pin->Number,
 		   ((col++ % (COLUMNS + 1)) == COLUMNS) ? '\n' : ' ');
@@ -531,7 +532,7 @@ ReportFoundPins (int argc, char **argv, Coord x, Coord y)
     {
       if (TEST_FLAG (FOUNDFLAG, pad))
 	{
-	  sprintf (temp, "%s-%s,%c",
+	  sprintf (temp, _("%s-%s,%c"),
 		   NAMEONPCB_NAME (element), pad->Number,
 		   ((col++ % (COLUMNS + 1)) == COLUMNS) ? '\n' : ' ');
 	  DSAddString (&list, temp);
@@ -541,12 +542,12 @@ ReportFoundPins (int argc, char **argv, Coord x, Coord y)
   }
   END_LOOP;
 
-  gui->report_dialog ("Report", list.Data);
+  gui->report_dialog (_("Report"), list.Data);
   return 0;
 }
 
 /* Assumes that we start with a blank connection state,
- * e.g. ResetConnections() has been run.
+ * e.g. ClearFlagOnAllObjects() has been run.
  * Does not add its own changes to the undo system
  */
 static double
@@ -560,7 +561,7 @@ XYtoNetLength (Coord x, Coord y, int *found)
   /* NB: The third argument here, 'false' ensures LookupConnection
    *     does not add its changes to the undo system.
    */
-  LookupConnection (x, y, false, PCB->Grid, FOUNDFLAG);
+  LookupConnection (x, y, false, PCB->Grid, FOUNDFLAG, true);
 
   ALLLINE_LOOP (PCB->Data);
   {
@@ -604,10 +605,10 @@ ReportAllNetLengths (int argc, char **argv, Coord x, Coord y)
    *
    * After this, we don't add any changes to the undo system, but
    * ensure we get back to a point where we can Undo() our changes
-   * by resetting the connections with ResetConnections() before
+   * by resetting the connections with ClearFlagOnAllObjects() before
    * calling Undo() at the end of the procedure.
    */
-  ResetConnections (true);
+  ClearFlagOnAllObjects (true, FOUNDFLAG);
   IncrementUndoSerialNumber ();
 
   for (ni = 0; ni < PCB->NetlistLib.MenuN; ni++)
@@ -669,14 +670,14 @@ ReportAllNetLengths (int argc, char **argv, Coord x, Coord y)
           length = XYtoNetLength (x, y, &found);
 
           /* Reset connectors for the next lookup */
-          ResetConnections (false);
+          ClearFlagOnAllObjects (false, FOUNDFLAG);
 
-          pcb_sprintf(buf, "%$m*", units_name, length);
-          gui->log("Net %s length %s\n", netname, buf);
+          pcb_sprintf(buf, _("%$m*"), units_name, length);
+          gui->log(_("Net %s length %s\n"), netname, buf);
         }
     }
 
-  ResetConnections (false);
+  ClearFlagOnAllObjects (false, FOUNDFLAG);
   Undo (true);
   return 0;
 }
@@ -688,26 +689,26 @@ ReportNetLength (int argc, char **argv, Coord x, Coord y)
   char *netname = 0;
   int found = 0;
 
-  gui->get_coords ("Click on a connection", &x, &y);
+  gui->get_coords (_("Click on a connection"), &x, &y);
 
   /* Reset all connection flags and save an undo-state to get back
    * to the state the board was in when we started this function.
    *
    * After this, we don't add any changes to the undo system, but
    * ensure we get back to a point where we can Undo() our changes
-   * by resetting the connections with ResetConnections() before
+   * by resetting the connections with ClearFlagOnAllObjects() before
    * calling Undo() at the end of the procedure.
    */
-  ResetConnections (true);
+  ClearFlagOnAllObjects (true, FOUNDFLAG);
   IncrementUndoSerialNumber ();
 
   length = XYtoNetLength (x, y, &found);
 
   if (!found)
     {
-      ResetConnections (false);
+      ClearFlagOnAllObjects (false, FOUNDFLAG);
       Undo (true);
-      gui->log ("No net under cursor.\n");
+      gui->log (_("No net under cursor.\n"));
       return 1;
     }
 
@@ -724,7 +725,7 @@ ReportNetLength (int argc, char **argv, Coord x, Coord y)
 
 	  if (ename && pname)
 	    {
-	      n = Concat (ename, "-", pname, NULL);
+	      n = Concat (ename, _("-"), pname, NULL);
 	      for (ni = 0; ni < PCB->NetlistLib.MenuN; ni++)
 		for (nei = 0; nei < PCB->NetlistLib.Menu[ni].EntryN; nei++)
 		  {
@@ -749,7 +750,7 @@ ReportNetLength (int argc, char **argv, Coord x, Coord y)
 
 	  if (ename && pname)
 	    {
-	      n = Concat (ename, "-", pname, NULL);
+	      n = Concat (ename, _("-"), pname, NULL);
 	      for (ni = 0; ni < PCB->NetlistLib.MenuN; ni++)
 		for (nei = 0; nei < PCB->NetlistLib.Menu[ni].EntryN; nei++)
 		  {
@@ -767,16 +768,16 @@ ReportNetLength (int argc, char **argv, Coord x, Coord y)
   END_LOOP;
 
 got_net_name:
-  ResetConnections (false);
+  ClearFlagOnAllObjects (false, FOUNDFLAG);
   Undo (true);
 
   {
     char buf[50];
-    pcb_sprintf(buf, "%$m*", Settings.grid_unit->suffix, length);
+    pcb_sprintf(buf, _("%$m*"), Settings.grid_unit->suffix, length);
     if (netname)
-      gui->log ("Net \"%s\" length: %s\n", netname, buf);
+      gui->log (_("Net \"%s\" length: %s\n"), netname, buf);
     else
-      gui->log ("Net length: %s\n", buf);
+      gui->log (_("Net length: %s\n"), buf);
   }
 
   return 0;
@@ -887,7 +888,7 @@ ReportNetLengthByName (char *tofind, int x, int y)
 
   if (!net_found)
     {
-      gui->log ("No net named %s\n", tofind);
+      gui->log (_("No net named %s\n"), tofind);
       return 1;
     }
 
@@ -901,35 +902,35 @@ ReportNetLengthByName (char *tofind, int x, int y)
    *
    * After this, we don't add any changes to the undo system, but
    * ensure we get back to a point where we can Undo() our changes
-   * by resetting the connections with ResetConnections() before
+   * by resetting the connections with ClearFlagOnAllObjects() before
    * calling Undo() when we are finished.
    */
-  ResetConnections (true);
+  ClearFlagOnAllObjects (true, FOUNDFLAG);
   IncrementUndoSerialNumber ();
 
   length = XYtoNetLength (x, y, &found);
   netname = net->Name + 2;
 
-  ResetConnections (false);
+  ClearFlagOnAllObjects (false, FOUNDFLAG);
   Undo (true);
 
   if (!found)
     {
       if (net_found)
-        gui->log ("Net found, but no lines or arcs were flagged.\n");
+        gui->log (_("Net found, but no lines or arcs were flagged.\n"));
       else
-        gui->log ("Net not found.\n");
+        gui->log (_("Net not found.\n"));
 
       return 1;
     }
 
   {
     char buf[50];
-    pcb_sprintf(buf, "%$m*", Settings.grid_unit->suffix, length);
+    pcb_sprintf(buf, _("%$m*"), Settings.grid_unit->suffix, length);
     if (netname)
-      gui->log ("Net \"%s\" length: %s\n", netname, buf);
+      gui->log (_("Net \"%s\" length: %s\n"), netname, buf);
     else
-      gui->log ("Net length: %s\n", buf);
+      gui->log (_("Net length: %s\n"), buf);
   }
 
   return 0;
@@ -940,9 +941,10 @@ ReportNetLengthByName (char *tofind, int x, int y)
  * syntax: 
  */
 
-static const char report_syntax[] = "Report(Object|DrillReport|FoundPins|NetLength|AllNetLengths|[,name])";
+static const char report_syntax[] =
+  N_("Report(Object|DrillReport|FoundPins|NetLength|AllNetLengths|[,name])");
 
-static const char report_help[] = "Produce various report.";
+static const char report_help[] = N_("Produce various report.");
 
 /* %start-doc actions Report
 
@@ -980,7 +982,7 @@ Report (int argc, char **argv, Coord x, Coord y)
     AUSAGE (report);
   else if (strcasecmp (argv[0], "Object") == 0)
     {
-      gui->get_coords ("Click on an object", &x, &y);
+      gui->get_coords (_("Click on an object"), &x, &y);
       return ReportDialog (argc - 1, argv + 1, x, y);
     }
   else if (strcasecmp (argv[0], "DrillReport") == 0)
@@ -1001,7 +1003,7 @@ Report (int argc, char **argv, Coord x, Coord y)
 }
 
 HID_Action report_action_list[] = {
-  {"ReportObject", "Click on an object", ReportDialog,
+  {"ReportObject", N_("Click on an object"), ReportDialog,
    reportdialog_help, reportdialog_syntax}
   ,
   {"Report", 0, Report,
diff --git a/src/report.h b/src/report.h
index 6d0184e..c995cde 100644
--- a/src/report.h
+++ b/src/report.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 #ifndef PCB_REPORT_H
diff --git a/src/res_lex.c b/src/res_lex.c
index 1470e02..1cdc06e 100644
--- a/src/res_lex.c
+++ b/src/res_lex.c
@@ -507,8 +507,7 @@ int res_flex_debug = 0;
 #define YY_RESTORE_YY_MORE_OFFSET
 char *restext;
 #line 1 "res_lex.l"
-/* $Id$ */
-#line 4 "res_lex.l"
+#line 2 "res_lex.l"
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -526,8 +525,6 @@ char *restext;
 #include <dmalloc.h>
 #endif
 
-RCSID("$Id$");
-
 #define YY_NO_INPUT
 #define YY_INPUT(buf,result,max_size) { result = res_parse_getchars(buf, max_size); }
  
@@ -538,7 +535,7 @@ RCSID("$Id$");
 extern int res_lineno;
 extern int res_parse_getchars(char *buf, int max_size);
 
-#line 542 "res_lex.c"
+#line 539 "res_lex.c"
 
 #define INITIAL 0
 
@@ -720,10 +717,10 @@ YY_DECL
 	register char *yy_cp, *yy_bp;
 	register int yy_act;
     
-#line 44 "res_lex.l"
+#line 40 "res_lex.l"
 
 
-#line 727 "res_lex.c"
+#line 724 "res_lex.c"
 
 	if ( !(yy_init) )
 		{
@@ -819,7 +816,7 @@ do_action:	/* This label is used only to access EOF actions. */
 case 1:
 /* rule 1 can match eol */
 YY_RULE_SETUP
-#line 46 "res_lex.l"
+#line 42 "res_lex.l"
 { reslval.sval = strdup(restext+1);
 		  reslval.sval[strlen(reslval.sval) - 1] = 0;
 		  return STRING; }
@@ -827,7 +824,7 @@ YY_RULE_SETUP
 case 2:
 /* rule 2 can match eol */
 YY_RULE_SETUP
-#line 50 "res_lex.l"
+#line 46 "res_lex.l"
 { reslval.sval = strdup(restext+1);
 		  reslval.sval[strlen(reslval.sval) - 1] = 0;
 		  return STRING; }
@@ -835,39 +832,39 @@ YY_RULE_SETUP
 case 3:
 /* rule 3 can match eol */
 YY_RULE_SETUP
-#line 54 "res_lex.l"
+#line 50 "res_lex.l"
 { res_lineno++; }
 	YY_BREAK
 case 4:
 /* rule 4 can match eol */
 YY_RULE_SETUP
-#line 55 "res_lex.l"
+#line 51 "res_lex.l"
 { if (restext[0] == '\n') res_lineno++; }
 	YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 57 "res_lex.l"
+#line 53 "res_lex.l"
 { reslval.sval = strdup(restext);
 		  	  return INCLUDE; }
 	YY_BREAK
 case 6:
 /* rule 6 can match eol */
 YY_RULE_SETUP
-#line 60 "res_lex.l"
+#line 56 "res_lex.l"
 { reslval.sval = strdup(restext);
 		  	  return STRING; }
 	YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 63 "res_lex.l"
+#line 59 "res_lex.l"
 { return restext[0]; }
 	YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 65 "res_lex.l"
+#line 61 "res_lex.l"
 ECHO;
 	YY_BREAK
-#line 871 "res_lex.c"
+#line 868 "res_lex.c"
 case YY_STATE_EOF(INITIAL):
 	yyterminate();
 
@@ -1877,7 +1874,7 @@ void resfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 65 "res_lex.l"
+#line 61 "res_lex.l"
 
 
 
diff --git a/src/res_lex.l b/src/res_lex.l
index 5e08666..dd4dadd 100644
--- a/src/res_lex.l
+++ b/src/res_lex.l
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 %{
 
 #ifdef HAVE_CONFIG_H
@@ -18,8 +16,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID("$Id$");
-
 #define YY_NO_INPUT
 #define YY_INPUT(buf,result,max_size) { result = res_parse_getchars(buf, max_size); }
  
diff --git a/src/res_parse.c b/src/res_parse.c
index 5fe923b..97c4cbe 100644
--- a/src/res_parse.c
+++ b/src/res_parse.c
@@ -1,9 +1,8 @@
-/* A Bison parser, made by GNU Bison 2.4.3.  */
+/* A Bison parser, made by GNU Bison 2.5.  */
 
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* Bison implementation for Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2009, 2010 Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -45,7 +44,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.4.3"
+#define YYBISON_VERSION "2.5"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -74,8 +73,8 @@
 
 /* Copy the first part of user declarations.  */
 
-/* Line 189 of yacc.c  */
-#line 3 "res_parse.y"
+/* Line 268 of yacc.c  */
+#line 1 "res_parse.y"
 
 
 #ifdef HAVE_CONFIG_H
@@ -102,21 +101,18 @@
 #include <dmalloc.h>
 #endif
 
-
-RCSID("$Id$");
-
 static Resource *parsed_res;
 static Resource *current_res;
 
-int reserror(char *);
+int reserror(const char *);
 int reslex();
 
 #define f(x) current_res->flags |= x
 
 
 
-/* Line 189 of yacc.c  */
-#line 120 "res_parse.c"
+/* Line 268 of yacc.c  */
+#line 116 "res_parse.c"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
@@ -158,8 +154,8 @@ int reslex();
 typedef union YYSTYPE
 {
 
-/* Line 214 of yacc.c  */
-#line 45 "res_parse.y"
+/* Line 293 of yacc.c  */
+#line 40 "res_parse.y"
 
   int ival;
   char *sval;
@@ -167,8 +163,8 @@ typedef union YYSTYPE
 
 
 
-/* Line 214 of yacc.c  */
-#line 172 "res_parse.c"
+/* Line 293 of yacc.c  */
+#line 168 "res_parse.c"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -179,8 +175,8 @@ typedef union YYSTYPE
 /* Copy the second part of user declarations.  */
 
 
-/* Line 264 of yacc.c  */
-#line 184 "res_parse.c"
+/* Line 343 of yacc.c  */
+#line 180 "res_parse.c"
 
 #ifdef short
 # undef short
@@ -283,11 +279,11 @@ YYID (yyi)
 #    define alloca _alloca
 #   else
 #    define YYSTACK_ALLOC alloca
-#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#     ifndef _STDLIB_H
-#      define _STDLIB_H 1
+#     ifndef EXIT_SUCCESS
+#      define EXIT_SUCCESS 0
 #     endif
 #    endif
 #   endif
@@ -310,24 +306,24 @@ YYID (yyi)
 #  ifndef YYSTACK_ALLOC_MAXIMUM
 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
 #  endif
-#  if (defined __cplusplus && ! defined _STDLIB_H \
+#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
        && ! ((defined YYMALLOC || defined malloc) \
 	     && (defined YYFREE || defined free)))
 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   ifndef _STDLIB_H
-#    define _STDLIB_H 1
+#   ifndef EXIT_SUCCESS
+#    define EXIT_SUCCESS 0
 #   endif
 #  endif
 #  ifndef YYMALLOC
 #   define YYMALLOC malloc
-#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+#   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
 #  ifndef YYFREE
 #   define YYFREE free
-#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+#   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 void free (void *); /* INFRINGES ON USER NAME SPACE */
 #   endif
@@ -356,23 +352,7 @@ union yyalloc
      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
       + YYSTACK_GAP_MAXIMUM)
 
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if defined __GNUC__ && 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count)		\
-      do					\
-	{					\
-	  YYSIZE_T yyi;				\
-	  for (yyi = 0; yyi < (Count); yyi++)	\
-	    (To)[yyi] = (From)[yyi];		\
-	}					\
-      while (YYID (0))
-#  endif
-# endif
+# define YYCOPY_NEEDED 1
 
 /* Relocate STACK from its old location to the new one.  The
    local variables YYSIZE and YYSTACKSIZE give the old and new number of
@@ -392,6 +372,26 @@ union yyalloc
 
 #endif
 
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)		\
+      do					\
+	{					\
+	  YYSIZE_T yyi;				\
+	  for (yyi = 0; yyi < (Count); yyi++)	\
+	    (To)[yyi] = (From)[yyi];		\
+	}					\
+      while (YYID (0))
+#  endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  3
 /* YYLAST -- Last index in YYTABLE.  */
@@ -465,8 +465,8 @@ static const yytype_int8 yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint8 yyrline[] =
 {
-       0,    57,    57,    57,    62,    62,    67,    67,    69,    70,
-      71,    72,    73,    74
+       0,    52,    52,    52,    57,    57,    62,    62,    64,    65,
+      66,    67,    68,    69
 };
 #endif
 
@@ -503,8 +503,8 @@ static const yytype_uint8 yyr2[] =
        1,     1,     3,     1
 };
 
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
-   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
+/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
+   Performed when YYTABLE doesn't specify something else to do.  Zero
    means the default is an error.  */
 static const yytype_uint8 yydefact[] =
 {
@@ -535,8 +535,7 @@ static const yytype_int8 yypgoto[] =
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
    positive, shift that token.  If negative, reduce the rule which
-   number is the opposite.  If zero, do what YYDEFACT says.
-   If YYTABLE_NINF, syntax error.  */
+   number is the opposite.  If YYTABLE_NINF, syntax error.  */
 #define YYTABLE_NINF -8
 static const yytype_int8 yytable[] =
 {
@@ -545,6 +544,12 @@ static const yytype_int8 yytable[] =
       11,    16,    17,     0,     0,    15
 };
 
+#define yypact_value_is_default(yystate) \
+  ((yystate) == (-1))
+
+#define yytable_value_is_error(yytable_value) \
+  YYID (0)
+
 static const yytype_int8 yycheck[] =
 {
        0,     1,     0,     3,     4,     5,     6,     0,     1,     5,
@@ -593,7 +598,6 @@ do								\
     {								\
       yychar = (Token);						\
       yylval = (Value);						\
-      yytoken = YYTRANSLATE (yychar);				\
       YYPOPSTACK (1);						\
       goto yybackup;						\
     }								\
@@ -635,19 +639,10 @@ while (YYID (0))
 #endif
 
 
-/* YY_LOCATION_PRINT -- Print the location on the stream.
-   This macro was not mandated originally: define only if we know
-   we won't break user code: when these are the locations we know.  */
+/* This macro is provided for backward compatibility. */
 
 #ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
-#  define YY_LOCATION_PRINT(File, Loc)			\
-     fprintf (File, "%d.%d-%d.%d",			\
-	      (Loc).first_line, (Loc).first_column,	\
-	      (Loc).last_line,  (Loc).last_column)
-# else
-#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
 #endif
 
 
@@ -839,7 +834,6 @@ int yydebug;
 # define YYMAXDEPTH 10000
 #endif
 
-

 
 #if YYERROR_VERBOSE
 
@@ -942,115 +936,142 @@ yytnamerr (char *yyres, const char *yystr)
 }
 # endif
 
-/* Copy into YYRESULT an error message about the unexpected token
-   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
-   including the terminating null byte.  If YYRESULT is null, do not
-   copy anything; just return the number of bytes that would be
-   copied.  As a special case, return 0 if an ordinary "syntax error"
-   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
-   size calculation.  */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
-{
-  int yyn = yypact[yystate];
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+   about the unexpected token YYTOKEN for the state stack whose top is
+   YYSSP.
 
-  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
-    return 0;
-  else
+   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
+   not large enough to hold the message.  In that case, also set
+   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
+   required number of bytes is too large to store.  */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+                yytype_int16 *yyssp, int yytoken)
+{
+  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
+  YYSIZE_T yysize = yysize0;
+  YYSIZE_T yysize1;
+  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+  /* Internationalized format string. */
+  const char *yyformat = 0;
+  /* Arguments of yyformat. */
+  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+  /* Number of reported tokens (one for the "unexpected", one per
+     "expected"). */
+  int yycount = 0;
+
+  /* There are many possibilities here to consider:
+     - Assume YYFAIL is not used.  It's too flawed to consider.  See
+       <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
+       for details.  YYERROR is fine as it does not invoke this
+       function.
+     - If this state is a consistent state with a default action, then
+       the only way this function was invoked is if the default action
+       is an error action.  In that case, don't check for expected
+       tokens because there are none.
+     - The only way there can be no lookahead present (in yychar) is if
+       this state is a consistent state with a default action.  Thus,
+       detecting the absence of a lookahead is sufficient to determine
+       that there is no unexpected or expected token to report.  In that
+       case, just report a simple "syntax error".
+     - Don't assume there isn't a lookahead just because this state is a
+       consistent state with a default action.  There might have been a
+       previous inconsistent state, consistent state with a non-default
+       action, or user semantic action that manipulated yychar.
+     - Of course, the expected token list depends on states to have
+       correct lookahead information, and it depends on the parser not
+       to perform extra reductions after fetching a lookahead from the
+       scanner and before detecting a syntax error.  Thus, state merging
+       (from LALR or IELR) and default reductions corrupt the expected
+       token list.  However, the list is correct for canonical LR with
+       one exception: it will still contain any token that will not be
+       accepted due to an error action in a later state.
+  */
+  if (yytoken != YYEMPTY)
     {
-      int yytype = YYTRANSLATE (yychar);
-      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
-      YYSIZE_T yysize = yysize0;
-      YYSIZE_T yysize1;
-      int yysize_overflow = 0;
-      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
-      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
-      int yyx;
-
-# if 0
-      /* This is so xgettext sees the translatable formats that are
-	 constructed on the fly.  */
-      YY_("syntax error, unexpected %s");
-      YY_("syntax error, unexpected %s, expecting %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
-      char *yyfmt;
-      char const *yyf;
-      static char const yyunexpected[] = "syntax error, unexpected %s";
-      static char const yyexpecting[] = ", expecting %s";
-      static char const yyor[] = " or %s";
-      char yyformat[sizeof yyunexpected
-		    + sizeof yyexpecting - 1
-		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
-		       * (sizeof yyor - 1))];
-      char const *yyprefix = yyexpecting;
-
-      /* Start YYX at -YYN if negative to avoid negative indexes in
-	 YYCHECK.  */
-      int yyxbegin = yyn < 0 ? -yyn : 0;
-
-      /* Stay within bounds of both yycheck and yytname.  */
-      int yychecklim = YYLAST - yyn + 1;
-      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
-      int yycount = 1;
-
-      yyarg[0] = yytname[yytype];
-      yyfmt = yystpcpy (yyformat, yyunexpected);
-
-      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
-	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-	  {
-	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
-	      {
-		yycount = 1;
-		yysize = yysize0;
-		yyformat[sizeof yyunexpected - 1] = '\0';
-		break;
-	      }
-	    yyarg[yycount++] = yytname[yyx];
-	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
-	    yysize_overflow |= (yysize1 < yysize);
-	    yysize = yysize1;
-	    yyfmt = yystpcpy (yyfmt, yyprefix);
-	    yyprefix = yyor;
-	  }
+      int yyn = yypact[*yyssp];
+      yyarg[yycount++] = yytname[yytoken];
+      if (!yypact_value_is_default (yyn))
+        {
+          /* Start YYX at -YYN if negative to avoid negative indexes in
+             YYCHECK.  In other words, skip the first -YYN actions for
+             this state because they are default actions.  */
+          int yyxbegin = yyn < 0 ? -yyn : 0;
+          /* Stay within bounds of both yycheck and yytname.  */
+          int yychecklim = YYLAST - yyn + 1;
+          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+          int yyx;
+
+          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+                && !yytable_value_is_error (yytable[yyx + yyn]))
+              {
+                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+                  {
+                    yycount = 1;
+                    yysize = yysize0;
+                    break;
+                  }
+                yyarg[yycount++] = yytname[yyx];
+                yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+                if (! (yysize <= yysize1
+                       && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+                  return 2;
+                yysize = yysize1;
+              }
+        }
+    }
 
-      yyf = YY_(yyformat);
-      yysize1 = yysize + yystrlen (yyf);
-      yysize_overflow |= (yysize1 < yysize);
-      yysize = yysize1;
+  switch (yycount)
+    {
+# define YYCASE_(N, S)                      \
+      case N:                               \
+        yyformat = S;                       \
+      break
+      YYCASE_(0, YY_("syntax error"));
+      YYCASE_(1, YY_("syntax error, unexpected %s"));
+      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+    }
 
-      if (yysize_overflow)
-	return YYSIZE_MAXIMUM;
+  yysize1 = yysize + yystrlen (yyformat);
+  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+    return 2;
+  yysize = yysize1;
 
-      if (yyresult)
-	{
-	  /* Avoid sprintf, as that infringes on the user's name space.
-	     Don't have undefined behavior even if the translation
-	     produced a string with the wrong number of "%s"s.  */
-	  char *yyp = yyresult;
-	  int yyi = 0;
-	  while ((*yyp = *yyf) != '\0')
-	    {
-	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
-		{
-		  yyp += yytnamerr (yyp, yyarg[yyi++]);
-		  yyf += 2;
-		}
-	      else
-		{
-		  yyp++;
-		  yyf++;
-		}
-	    }
-	}
-      return yysize;
+  if (*yymsg_alloc < yysize)
+    {
+      *yymsg_alloc = 2 * yysize;
+      if (! (yysize <= *yymsg_alloc
+             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+      return 1;
     }
+
+  /* Avoid sprintf, as that infringes on the user's name space.
+     Don't have undefined behavior even if the translation
+     produced a string with the wrong number of "%s"s.  */
+  {
+    char *yyp = *yymsg;
+    int yyi = 0;
+    while ((*yyp = *yyformat) != '\0')
+      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+        {
+          yyp += yytnamerr (yyp, yyarg[yyi++]);
+          yyformat += 2;
+        }
+      else
+        {
+          yyp++;
+          yyformat++;
+        }
+  }
+  return 0;
 }
 #endif /* YYERROR_VERBOSE */
-

 
 /*-----------------------------------------------.
 | Release the memory associated to this symbol.  |
@@ -1083,6 +1104,7 @@ yydestruct (yymsg, yytype, yyvaluep)
     }
 }
 
+
 /* Prevent warnings from -Wmissing-prototypes.  */
 #ifdef YYPARSE_PARAM
 #if defined __STDC__ || defined __cplusplus
@@ -1109,10 +1131,9 @@ YYSTYPE yylval;
 int yynerrs;
 
 
-
-/*-------------------------.
-| yyparse or yypush_parse.  |
-`-------------------------*/
+/*----------.
+| yyparse.  |
+`----------*/
 
 #ifdef YYPARSE_PARAM
 #if (defined __STDC__ || defined __C99__FUNC__ \
@@ -1136,8 +1157,6 @@ yyparse ()
 #endif
 #endif
 {
-
-
     int yystate;
     /* Number of tokens to shift before error messages enabled.  */
     int yyerrstatus;
@@ -1292,7 +1311,7 @@ yybackup:
 
   /* First try to decide what to do without reference to lookahead token.  */
   yyn = yypact[yystate];
-  if (yyn == YYPACT_NINF)
+  if (yypact_value_is_default (yyn))
     goto yydefault;
 
   /* Not known => get a lookahead token if don't already have one.  */
@@ -1323,8 +1342,8 @@ yybackup:
   yyn = yytable[yyn];
   if (yyn <= 0)
     {
-      if (yyn == 0 || yyn == YYTABLE_NINF)
-	goto yyerrlab;
+      if (yytable_value_is_error (yyn))
+        goto yyerrlab;
       yyn = -yyn;
       goto yyreduce;
     }
@@ -1379,66 +1398,77 @@ yyreduce:
     {
         case 2:
 
-/* Line 1464 of yacc.c  */
-#line 57 "res_parse.y"
+/* Line 1806 of yacc.c  */
+#line 52 "res_parse.y"
     { current_res = parsed_res = resource_create(NULL); }
     break;
 
   case 4:
 
-/* Line 1464 of yacc.c  */
-#line 62 "res_parse.y"
+/* Line 1806 of yacc.c  */
+#line 57 "res_parse.y"
     { current_res = resource_create(current_res); }
     break;
 
   case 5:
 
-/* Line 1464 of yacc.c  */
-#line 64 "res_parse.y"
+/* Line 1806 of yacc.c  */
+#line 59 "res_parse.y"
     { (yyval.rval) = current_res; current_res = current_res->parent; }
     break;
 
   case 8:
 
-/* Line 1464 of yacc.c  */
-#line 69 "res_parse.y"
+/* Line 1806 of yacc.c  */
+#line 64 "res_parse.y"
     { resource_add_val(current_res, 0, (yyvsp[(1) - (1)].sval), 0); f(FLAG_V); }
     break;
 
   case 9:
 
-/* Line 1464 of yacc.c  */
-#line 70 "res_parse.y"
+/* Line 1806 of yacc.c  */
+#line 65 "res_parse.y"
     { resource_add_val(current_res, (yyvsp[(1) - (3)].sval), (yyvsp[(3) - (3)].sval), 0); f(FLAG_NV); }
     break;
 
   case 10:
 
-/* Line 1464 of yacc.c  */
-#line 71 "res_parse.y"
+/* Line 1806 of yacc.c  */
+#line 66 "res_parse.y"
     { resource_add_val(current_res, 0, (yyvsp[(1) - (1)].sval), 0); f(FLAG_S); }
     break;
 
   case 11:
 
-/* Line 1464 of yacc.c  */
-#line 72 "res_parse.y"
+/* Line 1806 of yacc.c  */
+#line 67 "res_parse.y"
     { resource_add_val(current_res, 0, 0, (yyvsp[(1) - (1)].rval)); f(FLAG_S); }
     break;
 
   case 12:
 
-/* Line 1464 of yacc.c  */
-#line 73 "res_parse.y"
+/* Line 1806 of yacc.c  */
+#line 68 "res_parse.y"
     { resource_add_val(current_res, (yyvsp[(1) - (3)].sval), 0, (yyvsp[(3) - (3)].rval)); f(FLAG_NS); }
     break;
 
 
 
-/* Line 1464 of yacc.c  */
-#line 1440 "res_parse.c"
+/* Line 1806 of yacc.c  */
+#line 1459 "res_parse.c"
       default: break;
     }
+  /* User semantic actions sometimes alter yychar, and that requires
+     that yytoken be updated with the new translation.  We take the
+     approach of translating immediately before every use of yytoken.
+     One alternative is translating here after every semantic action,
+     but that translation would be missed if the semantic action invokes
+     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
+     incorrect destructor might then be invoked immediately.  In the
+     case of YYERROR or YYBACKUP, subsequent parser actions might lead
+     to an incorrect destructor call or verbose syntax error message
+     before the lookahead is translated.  */
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
 
   YYPOPSTACK (yylen);
@@ -1466,6 +1496,10 @@ yyreduce:
 | yyerrlab -- here on detecting error |
 `------------------------------------*/
 yyerrlab:
+  /* Make sure we have latest lookahead translation.  See comments at
+     user semantic actions for why this is necessary.  */
+  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
   /* If not already recovering from an error, report this error.  */
   if (!yyerrstatus)
     {
@@ -1473,37 +1507,36 @@ yyerrlab:
 #if ! YYERROR_VERBOSE
       yyerror (YY_("syntax error"));
 #else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+                                        yyssp, yytoken)
       {
-	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
-	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
-	  {
-	    YYSIZE_T yyalloc = 2 * yysize;
-	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
-	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
-	    if (yymsg != yymsgbuf)
-	      YYSTACK_FREE (yymsg);
-	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
-	    if (yymsg)
-	      yymsg_alloc = yyalloc;
-	    else
-	      {
-		yymsg = yymsgbuf;
-		yymsg_alloc = sizeof yymsgbuf;
-	      }
-	  }
-
-	if (0 < yysize && yysize <= yymsg_alloc)
-	  {
-	    (void) yysyntax_error (yymsg, yystate, yychar);
-	    yyerror (yymsg);
-	  }
-	else
-	  {
-	    yyerror (YY_("syntax error"));
-	    if (yysize != 0)
-	      goto yyexhaustedlab;
-	  }
+        char const *yymsgp = YY_("syntax error");
+        int yysyntax_error_status;
+        yysyntax_error_status = YYSYNTAX_ERROR;
+        if (yysyntax_error_status == 0)
+          yymsgp = yymsg;
+        else if (yysyntax_error_status == 1)
+          {
+            if (yymsg != yymsgbuf)
+              YYSTACK_FREE (yymsg);
+            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+            if (!yymsg)
+              {
+                yymsg = yymsgbuf;
+                yymsg_alloc = sizeof yymsgbuf;
+                yysyntax_error_status = 2;
+              }
+            else
+              {
+                yysyntax_error_status = YYSYNTAX_ERROR;
+                yymsgp = yymsg;
+              }
+          }
+        yyerror (yymsgp);
+        if (yysyntax_error_status == 2)
+          goto yyexhaustedlab;
       }
+# undef YYSYNTAX_ERROR
 #endif
     }
 
@@ -1562,7 +1595,7 @@ yyerrlab1:
   for (;;)
     {
       yyn = yypact[yystate];
-      if (yyn != YYPACT_NINF)
+      if (!yypact_value_is_default (yyn))
 	{
 	  yyn += YYTERROR;
 	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
@@ -1621,8 +1654,13 @@ yyexhaustedlab:
 
 yyreturn:
   if (yychar != YYEMPTY)
-     yydestruct ("Cleanup: discarding lookahead",
-		 yytoken, &yylval);
+    {
+      /* Make sure we have latest lookahead translation.  See comments at
+         user semantic actions for why this is necessary.  */
+      yytoken = YYTRANSLATE (yychar);
+      yydestruct ("Cleanup: discarding lookahead",
+                  yytoken, &yylval);
+    }
   /* Do not reclaim the symbols of the rule which action triggered
      this YYABORT or YYACCEPT.  */
   YYPOPSTACK (yylen);
@@ -1647,13 +1685,13 @@ yyreturn:
 
 
 
-/* Line 1684 of yacc.c  */
-#line 77 "res_parse.y"
+/* Line 2067 of yacc.c  */
+#line 72 "res_parse.y"
 
 
-static const char *res_filename = 0;
-static FILE *res_file = 0;
-static const char **res_strings = 0;
+static const char *res_filename = NULL;
+static FILE *res_file = NULL;
+static const char **res_strings = NULL;
 static int res_string_idx = 0;
 int res_lineno;
 
@@ -1690,17 +1728,16 @@ resource_parse(const char *filename, const char **strings)
   res_lineno = 1;
   if (filename)
     {
-      res_filename = filename;
       res_file = fopen (filename, "r");
       if (res_file == NULL)
 	{
 	  perror(filename);
-	  return 0;
+	  return NULL;
 	}
+      res_filename = filename;
     }
   else if (strings)
     {
-      res_filename = NULL;
       res_strings = strings;
       res_string_idx = 0;
     }
@@ -1710,11 +1747,15 @@ resource_parse(const char *filename, const char **strings)
   yydebug = 1;
 #endif
   if (resparse())
-    return 0;
+    parsed_res = NULL;
   if (filename)
-    fclose (res_file);
+    {
+      fclose (res_file);
+      res_filename = NULL;
+      res_file = NULL;
+    }
   else
-    res_strings = 0;
+    res_strings = NULL;
   return parsed_res;
 }
 
@@ -1766,7 +1807,7 @@ resource_subres(const Resource *res, const char *name)
 }
 
 int
-reserror(char *str)
+reserror(const char *str)
 {
   fprintf(stderr, "Error: %s around line %d: %s\n",
 	  res_file ? res_filename : "internal strings",
diff --git a/src/res_parse.h b/src/res_parse.h
index 9c066bc..6911308 100644
--- a/src/res_parse.h
+++ b/src/res_parse.h
@@ -1,9 +1,8 @@
-/* A Bison parser, made by GNU Bison 2.4.3.  */
+/* A Bison parser, made by GNU Bison 2.5.  */
 
-/* Skeleton interface for Bison's Yacc-like parsers in C
+/* Bison interface for Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2009, 2010 Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -53,8 +52,8 @@
 typedef union YYSTYPE
 {
 
-/* Line 1685 of yacc.c  */
-#line 45 "res_parse.y"
+/* Line 2068 of yacc.c  */
+#line 40 "res_parse.y"
 
   int ival;
   char *sval;
@@ -62,8 +61,8 @@ typedef union YYSTYPE
 
 
 
-/* Line 1685 of yacc.c  */
-#line 67 "res_parse.h"
+/* Line 2068 of yacc.c  */
+#line 66 "res_parse.h"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
diff --git a/src/res_parse.y b/src/res_parse.y
index efc44a0..a72fee7 100644
--- a/src/res_parse.y
+++ b/src/res_parse.y
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 %{
 
 #ifdef HAVE_CONFIG_H
@@ -26,13 +24,10 @@
 #include <dmalloc.h>
 #endif
 
-
-RCSID("$Id$");
-
 static Resource *parsed_res;
 static Resource *current_res;
 
-int reserror(char *);
+int reserror(const char *);
 int reslex();
 
 #define f(x) current_res->flags |= x
@@ -76,9 +71,9 @@ res_item
 
 %%
 
-static const char *res_filename = 0;
-static FILE *res_file = 0;
-static const char **res_strings = 0;
+static const char *res_filename = NULL;
+static FILE *res_file = NULL;
+static const char **res_strings = NULL;
 static int res_string_idx = 0;
 int res_lineno;
 
@@ -115,17 +110,16 @@ resource_parse(const char *filename, const char **strings)
   res_lineno = 1;
   if (filename)
     {
-      res_filename = filename;
       res_file = fopen (filename, "r");
       if (res_file == NULL)
 	{
 	  perror(filename);
-	  return 0;
+	  return NULL;
 	}
+      res_filename = filename;
     }
   else if (strings)
     {
-      res_filename = NULL;
       res_strings = strings;
       res_string_idx = 0;
     }
@@ -135,11 +129,15 @@ resource_parse(const char *filename, const char **strings)
   yydebug = 1;
 #endif
   if (resparse())
-    return 0;
+    parsed_res = NULL;
   if (filename)
-    fclose (res_file);
+    {
+      fclose (res_file);
+      res_filename = NULL;
+      res_file = NULL;
+    }
   else
-    res_strings = 0;
+    res_strings = NULL;
   return parsed_res;
 }
 
@@ -191,7 +189,7 @@ resource_subres(const Resource *res, const char *name)
 }
 
 int
-reserror(char *str)
+reserror(const char *str)
 {
   fprintf(stderr, "Error: %s around line %d: %s\n",
 	  res_file ? res_filename : "internal strings",
diff --git a/src/resource.h b/src/resource.h
index 119d615..9385e6a 100644
--- a/src/resource.h
+++ b/src/resource.h
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 #ifndef PCB_RESOURCE_H
 #define PCB_RESOURCE_H
 
diff --git a/src/rotate.c b/src/rotate.c
index 11b8fd9..fb23ba1 100644
--- a/src/rotate.c
+++ b/src/rotate.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -56,19 +54,14 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
-
-
-
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static void *RotateText (LayerTypePtr, TextTypePtr);
-static void *RotateArc (LayerTypePtr, ArcTypePtr);
-static void *RotateElement (ElementTypePtr);
-static void *RotateElementName (ElementTypePtr);
-static void *RotateLinePoint (LayerTypePtr, LineTypePtr, PointTypePtr);
+static void *RotateText (LayerType *, TextType *);
+static void *RotateArc (LayerType *, ArcType *);
+static void *RotateElement (ElementType *);
+static void *RotateElementName (ElementType *);
+static void *RotateLinePoint (LayerType *, LineType *, PointType *);
 
 /* ----------------------------------------------------------------------
  * some local identifiers
@@ -94,7 +87,7 @@ static ObjectFunctionType RotateFunctions = {
  * rotates a point in 90 degree steps
  */
 void
-RotatePointLowLevel (PointTypePtr Point, Coord X, Coord Y, unsigned Number)
+RotatePointLowLevel (PointType *Point, Coord X, Coord Y, unsigned Number)
 {
   ROTATE (Point->X, Point->Y, X, Y, Number);
 }
@@ -103,7 +96,7 @@ RotatePointLowLevel (PointTypePtr Point, Coord X, Coord Y, unsigned Number)
  * rotates a line in 90 degree steps
  */
 void
-RotateLineLowLevel (LineTypePtr Line, Coord X, Coord Y, unsigned Number)
+RotateLineLowLevel (LineType *Line, Coord X, Coord Y, unsigned Number)
 {
   ROTATE (Line->Point1.X, Line->Point1.Y, X, Y, Number);
   ROTATE (Line->Point2.X, Line->Point2.Y, X, Y, Number);
@@ -138,7 +131,7 @@ RotateLineLowLevel (LineTypePtr Line, Coord X, Coord Y, unsigned Number)
  * is done by the drawing routines
  */
 void
-RotateTextLowLevel (TextTypePtr Text, Coord X, Coord Y, unsigned Number)
+RotateTextLowLevel (TextType *Text, Coord X, Coord Y, unsigned Number)
 {
   BYTE number;
 
@@ -157,7 +150,7 @@ RotateTextLowLevel (TextTypePtr Text, Coord X, Coord Y, unsigned Number)
  * rotates a polygon in 90 degree steps
  */
 void
-RotatePolygonLowLevel (PolygonTypePtr Polygon, Coord X, Coord Y, unsigned Number)
+RotatePolygonLowLevel (PolygonType *Polygon, Coord X, Coord Y, unsigned Number)
 {
   POLYGONPOINT_LOOP (Polygon);
   {
@@ -171,13 +164,13 @@ RotatePolygonLowLevel (PolygonTypePtr Polygon, Coord X, Coord Y, unsigned Number
  * rotates a text object and redraws it
  */
 static void *
-RotateText (LayerTypePtr Layer, TextTypePtr Text)
+RotateText (LayerType *Layer, TextType *Text)
 {
   EraseText (Layer, Text);
   RestoreToPolygon (PCB->Data, TEXT_TYPE, Layer, Text);
-  r_delete_entry (Layer->text_tree, (BoxTypePtr) Text);
+  r_delete_entry (Layer->text_tree, (BoxType *) Text);
   RotateTextLowLevel (Text, CenterX, CenterY, Number);
-  r_insert_entry (Layer->text_tree, (BoxTypePtr) Text, 0);
+  r_insert_entry (Layer->text_tree, (BoxType *) Text, 0);
   ClearFromPolygon (PCB->Data, TEXT_TYPE, Layer, Text);
   DrawText (Layer, Text);
   Draw ();
@@ -188,7 +181,7 @@ RotateText (LayerTypePtr Layer, TextTypePtr Text)
  * rotates an arc
  */
 void
-RotateArcLowLevel (ArcTypePtr Arc, Coord X, Coord Y, unsigned Number)
+RotateArcLowLevel (ArcType *Arc, Coord X, Coord Y, unsigned Number)
 {
   Coord save;
 
@@ -204,13 +197,15 @@ RotateArcLowLevel (ArcTypePtr Arc, Coord X, Coord Y, unsigned Number)
       Arc->Height = save;
     }
   RotateBoxLowLevel (&Arc->BoundingBox, X, Y, Number);
+  ROTATE (Arc->Point1.X, Arc->Point1.Y, X, Y, Number);
+  ROTATE (Arc->Point2.X, Arc->Point2.Y, X, Y, Number);
 }
 
 /* ---------------------------------------------------------------------------
  * rotate an element in 90 degree steps
  */
 void
-RotateElementLowLevel (DataTypePtr Data, ElementTypePtr Element,
+RotateElementLowLevel (DataType *Data, ElementType *Element,
 		       Coord X, Coord Y, unsigned Number)
 {
   /* solder side objects need a different orientation */
@@ -263,28 +258,28 @@ RotateElementLowLevel (DataTypePtr Data, ElementTypePtr Element,
  * rotates a line's point
  */
 static void *
-RotateLinePoint (LayerTypePtr Layer, LineTypePtr Line, PointTypePtr Point)
+RotateLinePoint (LayerType *Layer, LineType *Line, PointType *Point)
 {
   EraseLine (Line);
   if (Layer)
     {
       RestoreToPolygon (PCB->Data, LINE_TYPE, Layer, Line);
-      r_delete_entry (Layer->line_tree, (BoxTypePtr) Line);
+      r_delete_entry (Layer->line_tree, (BoxType *) Line);
     }
   else
-    r_delete_entry (PCB->Data->rat_tree, (BoxTypePtr) Line);
+    r_delete_entry (PCB->Data->rat_tree, (BoxType *) Line);
   RotatePointLowLevel (Point, CenterX, CenterY, Number);
   SetLineBoundingBox (Line);
   if (Layer)
     {
-      r_insert_entry (Layer->line_tree, (BoxTypePtr) Line, 0);
+      r_insert_entry (Layer->line_tree, (BoxType *) Line, 0);
       ClearFromPolygon (PCB->Data, LINE_TYPE, Layer, Line);
       DrawLine (Layer, Line);
     }
   else
     {
-      r_insert_entry (PCB->Data->rat_tree, (BoxTypePtr) Line, 0);
-      DrawRat ((RatTypePtr) Line);
+      r_insert_entry (PCB->Data->rat_tree, (BoxType *) Line, 0);
+      DrawRat ((RatType *) Line);
     }
   Draw ();
   return (Line);
@@ -294,12 +289,12 @@ RotateLinePoint (LayerTypePtr Layer, LineTypePtr Line, PointTypePtr Point)
  * rotates an arc
  */
 static void *
-RotateArc (LayerTypePtr Layer, ArcTypePtr Arc)
+RotateArc (LayerType *Layer, ArcType *Arc)
 {
   EraseArc (Arc);
-  r_delete_entry (Layer->arc_tree, (BoxTypePtr) Arc);
+  r_delete_entry (Layer->arc_tree, (BoxType *) Arc);
   RotateArcLowLevel (Arc, CenterX, CenterY, Number);
-  r_insert_entry (Layer->arc_tree, (BoxTypePtr) Arc, 0);
+  r_insert_entry (Layer->arc_tree, (BoxType *) Arc, 0);
   DrawArc (Layer, Arc);
   Draw ();
   return (Arc);
@@ -309,7 +304,7 @@ RotateArc (LayerTypePtr Layer, ArcTypePtr Arc)
  * rotates an element
  */
 static void *
-RotateElement (ElementTypePtr Element)
+RotateElement (ElementType *Element)
 {
   EraseElement (Element);
   RotateElementLowLevel (PCB->Data, Element, CenterX, CenterY, Number);
@@ -322,7 +317,7 @@ RotateElement (ElementTypePtr Element)
  * rotates the name of an element
  */
 static void *
-RotateElementName (ElementTypePtr Element)
+RotateElementName (ElementType *Element)
 {
   EraseElementName (Element);
   ELEMENTTEXT_LOOP (Element);
@@ -341,7 +336,7 @@ RotateElementName (ElementTypePtr Element)
  * rotates a box in 90 degree steps 
  */
 void
-RotateBoxLowLevel (BoxTypePtr Box, Coord X, Coord Y, unsigned Number)
+RotateBoxLowLevel (BoxType *Box, Coord X, Coord Y, unsigned Number)
 {
   Coord x1 = Box->X1, y1 = Box->Y1, x2 = Box->X2, y2 = Box->Y2;
 
@@ -361,7 +356,7 @@ void *
 RotateObject (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
 	      Coord X, Coord Y, unsigned Steps)
 {
-  RubberbandTypePtr ptr;
+  RubberbandType *ptr;
   void *ptr2;
   bool changed = false;
 
@@ -397,7 +392,7 @@ RotateObject (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
       else
 	{
 	  r_insert_entry (PCB->Data->rat_tree, (BoxType *) ptr->Line, 0);
-	  DrawRat ((RatTypePtr) ptr->Line);
+	  DrawRat ((RatType *) ptr->Line);
 	}
       Crosshair.AttachedObject.RubberbandN--;
       ptr++;
@@ -422,7 +417,7 @@ RotateScreenObject (Coord X, Coord Y, unsigned Steps)
   if ((type = SearchScreen (X, Y, ROTATE_TYPES, &ptr1, &ptr2,
 			    &ptr3)) != NO_TYPE)
     {
-      if (TEST_FLAG (LOCKFLAG, (ArcTypePtr) ptr2))
+      if (TEST_FLAG (LOCKFLAG, (ArcType *) ptr2))
 	{
 	  Message (_("Sorry, the object is locked\n"));
 	  return;
diff --git a/src/rotate.h b/src/rotate.h
index 7748b19..85a9361 100644
--- a/src/rotate.h
+++ b/src/rotate.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for transform routines
@@ -55,17 +54,17 @@
 #define	ROTATE_VIA_LOWLEVEL(v,x0,y0,n)	ROTATE((v)->X,(v)->Y,(x0),(y0),(n))
 #define	ROTATE_PIN_LOWLEVEL(p,x0,y0,n)	ROTATE((p)->X,(p)->Y,(x0),(y0),(n))
 #define	ROTATE_PAD_LOWLEVEL(p,x0,y0,n)	\
-	RotateLineLowLevel(((LineTypePtr) (p)),(x0),(y0),(n))
+	RotateLineLowLevel(((LineType *) (p)),(x0),(y0),(n))
 
 #define	ROTATE_TYPES	(ELEMENT_TYPE | TEXT_TYPE | ELEMENTNAME_TYPE | ARC_TYPE)
 
 
-void RotateLineLowLevel (LineTypePtr, Coord, Coord, unsigned);
-void RotateArcLowLevel (ArcTypePtr, Coord, Coord, unsigned);
-void RotateBoxLowLevel (BoxTypePtr, Coord, Coord, unsigned);
-void RotateTextLowLevel (TextTypePtr, Coord, Coord, unsigned);
-void RotatePolygonLowLevel (PolygonTypePtr, Coord, Coord, unsigned);
-void RotateElementLowLevel (DataTypePtr, ElementTypePtr, Coord, Coord, unsigned);
+void RotateLineLowLevel (LineType *, Coord, Coord, unsigned);
+void RotateArcLowLevel (ArcType *, Coord, Coord, unsigned);
+void RotateBoxLowLevel (BoxType *, Coord, Coord, unsigned);
+void RotateTextLowLevel (TextType *, Coord, Coord, unsigned);
+void RotatePolygonLowLevel (PolygonType *, Coord, Coord, unsigned);
+void RotateElementLowLevel (DataType *, ElementType *, Coord, Coord, unsigned);
 void *RotateObject (int, void *, void *, void *, Coord, Coord,
 		    unsigned);
 void RotateScreenObject (Coord, Coord, unsigned);
diff --git a/src/rtree.c b/src/rtree.c
index 680be3d..6558427 100644
--- a/src/rtree.c
+++ b/src/rtree.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -53,9 +51,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
-
 #define SLOW_ASSERTS
 /* All rectangles are closed on the bottom left and open on the
  * top right. i.e. they contain one corner point, but not the other.
diff --git a/src/rtree.h b/src/rtree.h
index cb23307..d44de09 100644
--- a/src/rtree.h
+++ b/src/rtree.h
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
diff --git a/src/rubberband.c b/src/rubberband.c
index 4fe166c..cd2c4f6 100644
--- a/src/rubberband.c
+++ b/src/rubberband.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -59,36 +57,33 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
-
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static void CheckPadForRubberbandConnection (PadTypePtr);
-static void CheckPinForRubberbandConnection (PinTypePtr);
-static void CheckLinePointForRubberbandConnection (LayerTypePtr,
-						   LineTypePtr,
-						   PointTypePtr,
+static void CheckPadForRubberbandConnection (PadType *);
+static void CheckPinForRubberbandConnection (PinType *);
+static void CheckLinePointForRubberbandConnection (LayerType *,
+						   LineType *,
+						   PointType *,
 						   bool);
-static void CheckPolygonForRubberbandConnection (LayerTypePtr,
-						 PolygonTypePtr);
-static void CheckLinePointForRat (LayerTypePtr, PointTypePtr);
+static void CheckPolygonForRubberbandConnection (LayerType *,
+						 PolygonType *);
+static void CheckLinePointForRat (LayerType *, PointType *);
 static int rubber_callback (const BoxType * b, void *cl);
 
 struct rubber_info
 {
   Coord radius;
   Coord X, Y;
-  LineTypePtr line;
+  LineType *line;
   BoxType box;
-  LayerTypePtr layer;
+  LayerType *layer;
 };
 
 static int
 rubber_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct rubber_info *i = (struct rubber_info *) cl;
   double x, y, rad, dist1, dist2;
   Coord t;
@@ -224,7 +219,7 @@ rubber_callback (const BoxType * b, void *cl)
  * the line is added to the 'rubberband' list
  */
 static void
-CheckPadForRubberbandConnection (PadTypePtr Pad)
+CheckPadForRubberbandConnection (PadType *Pad)
 {
   Coord half = Pad->Thickness / 2;
   Cardinal i, group;
@@ -257,60 +252,60 @@ struct rinfo
 {
   int type;
   Cardinal group;
-  PinTypePtr pin;
-  PadTypePtr pad;
-  PointTypePtr point;
+  PinType *pin;
+  PadType *pad;
+  PointType *point;
 };
 
 static int
 rat_callback (const BoxType * box, void *cl)
 {
-  RatTypePtr rat = (RatTypePtr) box;
+  RatType *rat = (RatType *) box;
   struct rinfo *i = (struct rinfo *) cl;
 
   switch (i->type)
     {
     case PIN_TYPE:
       if (rat->Point1.X == i->pin->X && rat->Point1.Y == i->pin->Y)
-	CreateNewRubberbandEntry (NULL, (LineTypePtr) rat, &rat->Point1);
+	CreateNewRubberbandEntry (NULL, (LineType *) rat, &rat->Point1);
       else if (rat->Point2.X == i->pin->X && rat->Point2.Y == i->pin->Y)
-	CreateNewRubberbandEntry (NULL, (LineTypePtr) rat, &rat->Point2);
+	CreateNewRubberbandEntry (NULL, (LineType *) rat, &rat->Point2);
       break;
     case PAD_TYPE:
       if (rat->Point1.X == i->pad->Point1.X &&
 	  rat->Point1.Y == i->pad->Point1.Y && rat->group1 == i->group)
-	CreateNewRubberbandEntry (NULL, (LineTypePtr) rat, &rat->Point1);
+	CreateNewRubberbandEntry (NULL, (LineType *) rat, &rat->Point1);
       else
 	if (rat->Point2.X == i->pad->Point1.X &&
 	    rat->Point2.Y == i->pad->Point1.Y && rat->group2 == i->group)
-	CreateNewRubberbandEntry (NULL, (LineTypePtr) rat, &rat->Point2);
+	CreateNewRubberbandEntry (NULL, (LineType *) rat, &rat->Point2);
       else
 	if (rat->Point1.X == i->pad->Point2.X &&
 	    rat->Point1.Y == i->pad->Point2.Y && rat->group1 == i->group)
-	CreateNewRubberbandEntry (NULL, (LineTypePtr) rat, &rat->Point1);
+	CreateNewRubberbandEntry (NULL, (LineType *) rat, &rat->Point1);
       else
 	if (rat->Point2.X == i->pad->Point2.X &&
 	    rat->Point2.Y == i->pad->Point2.Y && rat->group2 == i->group)
-	CreateNewRubberbandEntry (NULL, (LineTypePtr) rat, &rat->Point2);
+	CreateNewRubberbandEntry (NULL, (LineType *) rat, &rat->Point2);
       else
 	if (rat->Point1.X == (i->pad->Point1.X + i->pad->Point2.X) / 2 &&
 	    rat->Point1.Y == (i->pad->Point1.Y + i->pad->Point2.Y) / 2 &&
 	    rat->group1 == i->group)
-	CreateNewRubberbandEntry (NULL, (LineTypePtr) rat, &rat->Point1);
+	CreateNewRubberbandEntry (NULL, (LineType *) rat, &rat->Point1);
       else
 	if (rat->Point2.X == (i->pad->Point1.X + i->pad->Point2.X) / 2 &&
 	    rat->Point2.Y == (i->pad->Point1.Y + i->pad->Point2.Y) / 2 &&
 	    rat->group2 == i->group)
-	CreateNewRubberbandEntry (NULL, (LineTypePtr) rat, &rat->Point2);
+	CreateNewRubberbandEntry (NULL, (LineType *) rat, &rat->Point2);
       break;
     case LINEPOINT_TYPE:
       if (rat->group1 == i->group &&
 	  rat->Point1.X == i->point->X && rat->Point1.Y == i->point->Y)
-	CreateNewRubberbandEntry (NULL, (LineTypePtr) rat, &rat->Point1);
+	CreateNewRubberbandEntry (NULL, (LineType *) rat, &rat->Point1);
       else
 	if (rat->group2 == i->group &&
 	    rat->Point2.X == i->point->X && rat->Point2.Y == i->point->Y)
-	CreateNewRubberbandEntry (NULL, (LineTypePtr) rat, &rat->Point2);
+	CreateNewRubberbandEntry (NULL, (LineType *) rat, &rat->Point2);
       break;
     default:
       Message ("hace: bad rubber-rat lookup callback\n");
@@ -319,7 +314,7 @@ rat_callback (const BoxType * box, void *cl)
 }
 
 static void
-CheckPadForRat (PadTypePtr Pad)
+CheckPadForRat (PadType *Pad)
 {
   struct rinfo info;
   Cardinal i;
@@ -334,7 +329,7 @@ CheckPadForRat (PadTypePtr Pad)
 }
 
 static void
-CheckPinForRat (PinTypePtr Pin)
+CheckPinForRat (PinType *Pin)
 {
   struct rinfo info;
 
@@ -345,7 +340,7 @@ CheckPinForRat (PinTypePtr Pin)
 }
 
 static void
-CheckLinePointForRat (LayerTypePtr Layer, PointTypePtr Point)
+CheckLinePointForRat (LayerType *Layer, PointType *Point)
 {
   struct rinfo info;
   info.group = GetLayerGroupNumberByPointer (Layer);
@@ -365,7 +360,7 @@ CheckLinePointForRat (LayerTypePtr Layer, PointTypePtr Point)
  * of failures that are immediately recognized
  */
 static void
-CheckPinForRubberbandConnection (PinTypePtr Pin)
+CheckPinForRubberbandConnection (PinType *Pin)
 {
   struct rubber_info info;
   Cardinal n;
@@ -399,9 +394,9 @@ CheckPinForRubberbandConnection (PinTypePtr Pin)
  * the scanned line is added to the 'rubberband' list
  */
 static void
-CheckLinePointForRubberbandConnection (LayerTypePtr Layer,
-				       LineTypePtr Line,
-				       PointTypePtr LinePoint,
+CheckLinePointForRubberbandConnection (LayerType *Layer,
+				       LineType *Line,
+				       PointType *LinePoint,
 				       bool Exact)
 {
   Cardinal group;
@@ -436,8 +431,8 @@ CheckLinePointForRubberbandConnection (LayerTypePtr Layer,
  * the scanned line is added to the 'rubberband' list
  */
 static void
-CheckPolygonForRubberbandConnection (LayerTypePtr Layer,
-				     PolygonTypePtr Polygon)
+CheckPolygonForRubberbandConnection (LayerType *Layer,
+				     PolygonType *Polygon)
 {
   Cardinal group;
 
@@ -490,7 +485,7 @@ LookupRubberbandLines (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
     {
     case ELEMENT_TYPE:
       {
-	ElementTypePtr element = (ElementTypePtr) Ptr1;
+	ElementType *element = (ElementType *) Ptr1;
 
 	/* square pins are handled as if they are round. Speed
 	 * and readability is more important then the few %
@@ -511,8 +506,8 @@ LookupRubberbandLines (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 
     case LINE_TYPE:
       {
-	LayerTypePtr layer = (LayerTypePtr) Ptr1;
-	LineTypePtr line = (LineTypePtr) Ptr2;
+	LayerType *layer = (LayerType *) Ptr1;
+	LineType *line = (LineType *) Ptr2;
 	if (GetLayerNumber (PCB->Data, layer) < max_copper_layer)
 	  {
 	    CheckLinePointForRubberbandConnection (layer, line,
@@ -524,20 +519,20 @@ LookupRubberbandLines (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
       }
 
     case LINEPOINT_TYPE:
-      if (GetLayerNumber (PCB->Data, (LayerTypePtr) Ptr1) < max_copper_layer)
-	CheckLinePointForRubberbandConnection ((LayerTypePtr) Ptr1,
-					       (LineTypePtr) Ptr2,
-					       (PointTypePtr) Ptr3, true);
+      if (GetLayerNumber (PCB->Data, (LayerType *) Ptr1) < max_copper_layer)
+	CheckLinePointForRubberbandConnection ((LayerType *) Ptr1,
+					       (LineType *) Ptr2,
+					       (PointType *) Ptr3, true);
       break;
 
     case VIA_TYPE:
-      CheckPinForRubberbandConnection ((PinTypePtr) Ptr1);
+      CheckPinForRubberbandConnection ((PinType *) Ptr1);
       break;
 
     case POLYGON_TYPE:
-      if (GetLayerNumber (PCB->Data, (LayerTypePtr) Ptr1) < max_copper_layer)
-	CheckPolygonForRubberbandConnection ((LayerTypePtr) Ptr1,
-					     (PolygonTypePtr) Ptr2);
+      if (GetLayerNumber (PCB->Data, (LayerType *) Ptr1) < max_copper_layer)
+	CheckPolygonForRubberbandConnection ((LayerType *) Ptr1,
+					     (PolygonType *) Ptr2);
       break;
     }
 }
@@ -549,7 +544,7 @@ LookupRatLines (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
     {
     case ELEMENT_TYPE:
       {
-	ElementTypePtr element = (ElementTypePtr) Ptr1;
+	ElementType *element = (ElementType *) Ptr1;
 
 	PIN_LOOP (element);
 	{
@@ -566,8 +561,8 @@ LookupRatLines (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 
     case LINE_TYPE:
       {
-	LayerTypePtr layer = (LayerTypePtr) Ptr1;
-	LineTypePtr line = (LineTypePtr) Ptr2;
+	LayerType *layer = (LayerType *) Ptr1;
+	LineType *line = (LineType *) Ptr2;
 
 	CheckLinePointForRat (layer, &line->Point1);
 	CheckLinePointForRat (layer, &line->Point2);
@@ -575,11 +570,11 @@ LookupRatLines (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
       }
 
     case LINEPOINT_TYPE:
-      CheckLinePointForRat ((LayerTypePtr) Ptr1, (PointTypePtr) Ptr3);
+      CheckLinePointForRat ((LayerType *) Ptr1, (PointType *) Ptr3);
       break;
 
     case VIA_TYPE:
-      CheckPinForRat ((PinTypePtr) Ptr1);
+      CheckPinForRat ((PinType *) Ptr1);
       break;
     }
 }
diff --git a/src/rubberband.h b/src/rubberband.h
index 9e671bf..e281f3f 100644
--- a/src/rubberband.h
+++ b/src/rubberband.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for rubberband routines
diff --git a/src/search.c b/src/search.c
index 60e8dde..5f4ea5e 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -54,46 +52,43 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
-
 /* ---------------------------------------------------------------------------
  * some local identifiers
  */
 static double PosX, PosY;		/* search position for subroutines */
 static Coord SearchRadius;
 static BoxType SearchBox;
-static LayerTypePtr SearchLayer;
+static LayerType *SearchLayer;
 
 /* ---------------------------------------------------------------------------
  * some local prototypes.  The first parameter includes LOCKED_TYPE if we
  * want to include locked types in the search.
  */
-static bool SearchLineByLocation (int, LayerTypePtr *, LineTypePtr *,
-				     LineTypePtr *);
-static bool SearchArcByLocation (int, LayerTypePtr *, ArcTypePtr *,
-				    ArcTypePtr *);
-static bool SearchRatLineByLocation (int, RatTypePtr *, RatTypePtr *,
-					RatTypePtr *);
-static bool SearchTextByLocation (int, LayerTypePtr *, TextTypePtr *,
-				     TextTypePtr *);
-static bool SearchPolygonByLocation (int, LayerTypePtr *, PolygonTypePtr *,
-					PolygonTypePtr *);
-static bool SearchPinByLocation (int, ElementTypePtr *, PinTypePtr *,
-				    PinTypePtr *);
-static bool SearchPadByLocation (int, ElementTypePtr *, PadTypePtr *,
-				    PadTypePtr *, bool);
-static bool SearchViaByLocation (int, PinTypePtr *, PinTypePtr *,
-				    PinTypePtr *);
-static bool SearchElementNameByLocation (int, ElementTypePtr *,
-					    TextTypePtr *, TextTypePtr *,
+static bool SearchLineByLocation (int, LayerType **, LineType **,
+				     LineType **);
+static bool SearchArcByLocation (int, LayerType **, ArcType **,
+				    ArcType **);
+static bool SearchRatLineByLocation (int, RatType **, RatType **,
+					RatType **);
+static bool SearchTextByLocation (int, LayerType **, TextType **,
+				     TextType **);
+static bool SearchPolygonByLocation (int, LayerType **, PolygonType **,
+					PolygonType **);
+static bool SearchPinByLocation (int, ElementType **, PinType **,
+				    PinType **);
+static bool SearchPadByLocation (int, ElementType **, PadType **,
+				    PadType **, bool);
+static bool SearchViaByLocation (int, PinType **, PinType **,
+				    PinType **);
+static bool SearchElementNameByLocation (int, ElementType **,
+					    TextType **, TextType **,
 					    bool);
-static bool SearchLinePointByLocation (int, LayerTypePtr *, LineTypePtr *,
-					  PointTypePtr *);
-static bool SearchPointByLocation (int, LayerTypePtr *, PolygonTypePtr *,
-				      PointTypePtr *);
-static bool SearchElementByLocation (int, ElementTypePtr *,
-					ElementTypePtr *, ElementTypePtr *,
+static bool SearchLinePointByLocation (int, LayerType **, LineType **,
+					  PointType **);
+static bool SearchPointByLocation (int, LayerType **, PolygonType **,
+				      PointType **);
+static bool SearchElementByLocation (int, ElementType **,
+					ElementType **, ElementType **,
 					bool);
 
 /* ---------------------------------------------------------------------------
@@ -106,13 +101,15 @@ struct ans_info
   double area;
   jmp_buf env;
   int locked;			/* This will be zero or LOCKFLAG */
+  bool found_anything;
+  double nearest_sq_dist;
 };
 
 static int
 pinorvia_callback (const BoxType * box, void *cl)
 {
   struct ans_info *i = (struct ans_info *) cl;
-  PinTypePtr pin = (PinTypePtr) box;
+  PinType *pin = (PinType *) box;
   AnyObjectType *ptr1 = pin->Element ? pin->Element : pin;
 
   if (TEST_FLAG (i->locked, ptr1))
@@ -127,8 +124,8 @@ pinorvia_callback (const BoxType * box, void *cl)
 }
 
 static bool
-SearchViaByLocation (int locked, PinTypePtr * Via, PinTypePtr * Dummy1,
-		     PinTypePtr * Dummy2)
+SearchViaByLocation (int locked, PinType ** Via, PinType ** Dummy1,
+		     PinType ** Dummy2)
 {
   struct ans_info info;
 
@@ -155,8 +152,8 @@ SearchViaByLocation (int locked, PinTypePtr * Via, PinTypePtr * Dummy1,
  * starts with the newest element
  */
 static bool
-SearchPinByLocation (int locked, ElementTypePtr * Element, PinTypePtr * Pin,
-		     PinTypePtr * Dummy)
+SearchPinByLocation (int locked, ElementType ** Element, PinType ** Pin,
+		     PinType ** Dummy)
 {
   struct ans_info info;
 
@@ -179,22 +176,31 @@ SearchPinByLocation (int locked, ElementTypePtr * Element, PinTypePtr * Pin,
 static int
 pad_callback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   struct ans_info *i = (struct ans_info *) cl;
   AnyObjectType *ptr1 = pad->Element;
+  double sq_dist;
 
-  if (TEST_FLAG (i->locked, ptr1))
+  /* Reject locked pads, backside pads (if !BackToo), and non-hit pads */
+  if (TEST_FLAG (i->locked, ptr1) ||
+      (!FRONT (pad) && !i->BackToo) ||
+      !IsPointInPad (PosX, PosY, SearchRadius, pad))
     return 0;
 
-  if (FRONT (pad) || i->BackToo)
+  /* Determine how close our test-position was to the center of the pad  */
+  sq_dist = (PosX - (pad->Point1.X + (pad->Point2.X - pad->Point1.X) / 2)) *
+            (PosX - (pad->Point1.X + (pad->Point2.X - pad->Point1.X) / 2)) +
+            (PosY - (pad->Point1.Y + (pad->Point2.Y - pad->Point1.Y) / 2)) *
+            (PosY - (pad->Point1.Y + (pad->Point2.Y - pad->Point1.Y) / 2));
+
+  /* If this was the closest hit so far, record it */
+  if (!i->found_anything || sq_dist < i->nearest_sq_dist)
     {
-      if (IsPointInPad (PosX, PosY, SearchRadius, pad))
-	    {
-	      *i->ptr1 = ptr1;
-	      *i->ptr2 = *i->ptr3 = pad;
-	      longjmp (i->env, 1);
-	    }
-	}
+      *i->ptr1 = ptr1;
+      *i->ptr2 = *i->ptr3 = pad;
+      i->found_anything = true;
+      i->nearest_sq_dist = sq_dist;
+    }
   return 0;
 }
 
@@ -203,8 +209,8 @@ pad_callback (const BoxType * b, void *cl)
  * starts with the newest element
  */
 static bool
-SearchPadByLocation (int locked, ElementTypePtr * Element, PadTypePtr * Pad,
-		     PadTypePtr * Dummy, bool BackToo)
+SearchPadByLocation (int locked, ElementType ** Element, PadType ** Pad,
+		     PadType ** Dummy, bool BackToo)
 {
   struct ans_info info;
 
@@ -216,11 +222,9 @@ SearchPadByLocation (int locked, ElementTypePtr * Element, PadTypePtr * Pad,
   info.ptr3 = (void **) Dummy;
   info.locked = (locked & LOCKED_TYPE) ? 0 : LOCKFLAG;
   info.BackToo = (BackToo && PCB->InvisibleObjectsOn);
-  if (setjmp (info.env) == 0)
-    r_search (PCB->Data->pad_tree, &SearchBox, NULL, pad_callback, &info);
-  else
-    return true;
-  return false;
+  info.found_anything = false;
+  r_search (PCB->Data->pad_tree, &SearchBox, NULL, pad_callback, &info);
+  return info.found_anything;
 }
 
 /* ---------------------------------------------------------------------------
@@ -229,8 +233,8 @@ SearchPadByLocation (int locked, ElementTypePtr * Element, PadTypePtr * Pad,
 
 struct line_info
 {
-  LineTypePtr *Line;
-  PointTypePtr *Point;
+  LineType **Line;
+  PointType **Point;
   double least;
   jmp_buf env;
   int locked;
@@ -240,28 +244,28 @@ static int
 line_callback (const BoxType * box, void *cl)
 {
   struct line_info *i = (struct line_info *) cl;
-  LineTypePtr l = (LineTypePtr) box;
+  LineType *l = (LineType *) box;
 
   if (TEST_FLAG (i->locked, l))
     return 0;
 
-  if (!IsPointInPad (PosX, PosY, SearchRadius, (PadTypePtr)l))
+  if (!IsPointInPad (PosX, PosY, SearchRadius, (PadType *)l))
     return 0;
   *i->Line = l;
-  *i->Point = (PointTypePtr) l;
+  *i->Point = (PointType *) l;
   longjmp (i->env, 1);
   return 1;			/* never reached */
 }
 
 
 static bool
-SearchLineByLocation (int locked, LayerTypePtr * Layer, LineTypePtr * Line,
-		      LineTypePtr * Dummy)
+SearchLineByLocation (int locked, LayerType ** Layer, LineType ** Line,
+		      LineType ** Dummy)
 {
   struct line_info info;
 
   info.Line = Line;
-  info.Point = (PointTypePtr *) Dummy;
+  info.Point = (PointType **) Dummy;
   info.locked = (locked & LOCKED_TYPE) ? 0 : LOCKFLAG;
 
   *Layer = SearchLayer;
@@ -277,7 +281,7 @@ SearchLineByLocation (int locked, LayerTypePtr * Layer, LineTypePtr * Line,
 static int
 rat_callback (const BoxType * box, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) box;
+  LineType *line = (LineType *) box;
   struct ans_info *i = (struct ans_info *) cl;
 
   if (TEST_FLAG (i->locked, line))
@@ -298,8 +302,8 @@ rat_callback (const BoxType * box, void *cl)
  * searches rat lines if they are visible
  */
 static bool
-SearchRatLineByLocation (int locked, RatTypePtr * Line, RatTypePtr * Dummy1,
-			 RatTypePtr * Dummy2)
+SearchRatLineByLocation (int locked, RatType ** Line, RatType ** Dummy1,
+			 RatType ** Dummy2)
 {
   struct ans_info info;
 
@@ -321,7 +325,9 @@ SearchRatLineByLocation (int locked, RatTypePtr * Line, RatTypePtr * Dummy1,
  */
 struct arc_info
 {
-  ArcTypePtr *Arc, *Dummy;
+  ArcType **Arc, **Dummy;
+  PointType **Point;
+  double least;
   jmp_buf env;
   int locked;
 };
@@ -330,7 +336,7 @@ static int
 arc_callback (const BoxType * box, void *cl)
 {
   struct arc_info *i = (struct arc_info *) cl;
-  ArcTypePtr a = (ArcTypePtr) box;
+  ArcType *a = (ArcType *) box;
 
   if (TEST_FLAG (i->locked, a))
     return 0;
@@ -345,8 +351,8 @@ arc_callback (const BoxType * box, void *cl)
 
 
 static bool
-SearchArcByLocation (int locked, LayerTypePtr * Layer, ArcTypePtr * Arc,
-		     ArcTypePtr * Dummy)
+SearchArcByLocation (int locked, LayerType ** Layer, ArcType ** Arc,
+		     ArcType ** Dummy)
 {
   struct arc_info info;
 
@@ -366,7 +372,7 @@ SearchArcByLocation (int locked, LayerTypePtr * Layer, ArcTypePtr * Arc,
 static int
 text_callback (const BoxType * box, void *cl)
 {
-  TextTypePtr text = (TextTypePtr) box;
+  TextType *text = (TextType *) box;
   struct ans_info *i = (struct ans_info *) cl;
 
   if (TEST_FLAG (i->locked, text))
@@ -384,8 +390,8 @@ text_callback (const BoxType * box, void *cl)
  * searches text on the SearchLayer
  */
 static bool
-SearchTextByLocation (int locked, LayerTypePtr * Layer, TextTypePtr * Text,
-		      TextTypePtr * Dummy)
+SearchTextByLocation (int locked, LayerType ** Layer, TextType ** Text,
+		      TextType ** Dummy)
 {
   struct ans_info info;
 
@@ -406,7 +412,7 @@ SearchTextByLocation (int locked, LayerTypePtr * Layer, TextTypePtr * Text,
 static int
 polygon_callback (const BoxType * box, void *cl)
 {
-  PolygonTypePtr polygon = (PolygonTypePtr) box;
+  PolygonType *polygon = (PolygonType *) box;
   struct ans_info *i = (struct ans_info *) cl;
 
   if (TEST_FLAG (i->locked, polygon))
@@ -425,8 +431,8 @@ polygon_callback (const BoxType * box, void *cl)
  * searches a polygon on the SearchLayer 
  */
 static bool
-SearchPolygonByLocation (int locked, LayerTypePtr * Layer,
-			 PolygonTypePtr * Polygon, PolygonTypePtr * Dummy)
+SearchPolygonByLocation (int locked, LayerType ** Layer,
+			 PolygonType ** Polygon, PolygonType ** Dummy)
 {
   struct ans_info info;
 
@@ -447,7 +453,7 @@ SearchPolygonByLocation (int locked, LayerTypePtr * Layer,
 static int
 linepoint_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct line_info *i = (struct line_info *) cl;
   int ret_val = 0;
   double d;
@@ -480,8 +486,8 @@ linepoint_callback (const BoxType * b, void *cl)
  * searches a line-point on all the search layer
  */
 static bool
-SearchLinePointByLocation (int locked, LayerTypePtr * Layer,
-			   LineTypePtr * Line, PointTypePtr * Point)
+SearchLinePointByLocation (int locked, LayerType ** Layer,
+			   LineType ** Line, PointType ** Point)
 {
   struct line_info info;
   *Layer = SearchLayer;
@@ -496,13 +502,63 @@ SearchLinePointByLocation (int locked, LayerTypePtr * Layer,
   return false;
 }
 
+static int
+arcpoint_callback (const BoxType * b, void *cl)
+{
+  ArcType *arc = (ArcType *) b;
+  struct arc_info *i = (struct arc_info *) cl;
+  int ret_val = 0;
+  double d;
+
+  if (TEST_FLAG (i->locked, arc))
+    return 0;
+
+  d = Distance (PosX, PosY, arc->Point1.X, arc->Point1.Y);
+  if (d < i->least)
+    {
+      i->least = d;
+      *i->Arc = arc;
+      *i->Point = &arc->Point1;
+      ret_val = 1;
+    }
+
+  d = Distance (PosX, PosY, arc->Point2.X, arc->Point2.Y);
+  if (d < i->least)
+    {
+      i->least = d;
+      *i->Arc = arc;
+      *i->Point = &arc->Point2;
+      ret_val = 1;
+    }
+  return ret_val;
+}
+
+/* ---------------------------------------------------------------------------
+ * searches an arc-point on all the search layer
+ */
+static bool
+SearchArcPointByLocation (int locked, LayerType **Layer,
+                          ArcType **arc, PointType **Point)
+{
+  struct arc_info info;
+  *Layer = SearchLayer;
+  info.Arc = arc;
+  info.Point = Point;
+  *Point = NULL;
+  info.least = MAX_ARC_POINT_DISTANCE + SearchRadius;
+  info.locked = (locked & LOCKED_TYPE) ? 0 : LOCKFLAG;
+  if (r_search
+      (SearchLayer->arc_tree, &SearchBox, NULL, arcpoint_callback, &info))
+    return true;
+  return false;
+}
 /* ---------------------------------------------------------------------------
  * searches a polygon-point on all layers that are switched on
  * in layerstack order
  */
 static bool
-SearchPointByLocation (int locked, LayerTypePtr * Layer,
-		       PolygonTypePtr * Polygon, PointTypePtr * Point)
+SearchPointByLocation (int locked, LayerType ** Layer,
+		       PolygonType ** Polygon, PointType ** Point)
 {
   double d, least;
   bool found = false;
@@ -533,9 +589,9 @@ SearchPointByLocation (int locked, LayerTypePtr * Layer,
 static int
 name_callback (const BoxType * box, void *cl)
 {
-  TextTypePtr text = (TextTypePtr) box;
+  TextType *text = (TextType *) box;
   struct ans_info *i = (struct ans_info *) cl;
-  ElementTypePtr element = (ElementTypePtr) text->Element;
+  ElementType *element = (ElementType *) text->Element;
   double newarea;
 
   if (TEST_FLAG (i->locked, text))
@@ -563,8 +619,8 @@ name_callback (const BoxType * box, void *cl)
  * the search starts with the last element and goes back to the beginning
  */
 static bool
-SearchElementNameByLocation (int locked, ElementTypePtr * Element,
-			     TextTypePtr * Text, TextTypePtr * Dummy,
+SearchElementNameByLocation (int locked, ElementType ** Element,
+			     TextType ** Text, TextType ** Dummy,
 			     bool BackToo)
 {
   struct ans_info info;
@@ -588,7 +644,7 @@ SearchElementNameByLocation (int locked, ElementTypePtr * Element,
 static int
 element_callback (const BoxType * box, void *cl)
 {
-  ElementTypePtr element = (ElementTypePtr) box;
+  ElementType *element = (ElementType *) box;
   struct ans_info *i = (struct ans_info *) cl;
   double newarea;
 
@@ -618,8 +674,8 @@ element_callback (const BoxType * box, void *cl)
  */
 static bool
 SearchElementByLocation (int locked,
-			 ElementTypePtr * Element,
-			 ElementTypePtr * Dummy1, ElementTypePtr * Dummy2,
+			 ElementType ** Element,
+			 ElementType ** Dummy1, ElementType ** Dummy2,
 			 bool BackToo)
 {
   struct ans_info info;
@@ -645,7 +701,7 @@ SearchElementByLocation (int locked,
  * checks if a point is on a pin
  */
 bool
-IsPointOnPin (Coord X, Coord Y, Coord Radius, PinTypePtr pin)
+IsPointOnPin (Coord X, Coord Y, Coord Radius, PinType *pin)
 {
   Coord t = PIN_SIZE (pin) / 2;
   if (TEST_FLAG (SQUAREFLAG, pin))
@@ -668,7 +724,7 @@ IsPointOnPin (Coord X, Coord Y, Coord Radius, PinTypePtr pin)
  * checks if a rat-line end is on a PV
  */
 bool
-IsPointOnLineEnd (Coord X, Coord Y, RatTypePtr Line)
+IsPointOnLineEnd (Coord X, Coord Y, RatType *Line)
 {
   if (((X == Line->Point1.X) && (Y == Line->Point1.Y)) ||
       ((X == Line->Point2.X) && (Y == Line->Point2.Y)))
@@ -709,7 +765,7 @@ IsPointOnLineEnd (Coord X, Coord Y, RatTypePtr Line)
  * by pythagorean theorem.
  */
 bool
-IsPointOnLine (Coord X, Coord Y, Coord Radius, LineTypePtr Line)
+IsPointOnLine (Coord X, Coord Y, Coord Radius, LineType *Line)
 {
   double D1, D2, L;
 
@@ -736,7 +792,7 @@ IsPointOnLine (Coord X, Coord Y, Coord Radius, LineTypePtr Line)
  * checks if a line crosses a rectangle
  */
 bool
-IsLineInRectangle (Coord X1, Coord Y1, Coord X2, Coord Y2, LineTypePtr Line)
+IsLineInRectangle (Coord X1, Coord Y1, Coord X2, Coord Y2, LineType *Line)
 {
   LineType line;
 
@@ -781,7 +837,7 @@ IsLineInRectangle (Coord X1, Coord Y1, Coord X2, Coord Y2, LineTypePtr Line)
 }
 
 static int /*checks if a point (of null radius) is in a slanted rectangle*/
-IsPointInQuadrangle(PointType p[4], PointTypePtr l)
+IsPointInQuadrangle(PointType p[4], PointType *l)
 {
   Coord dx, dy, x, y;
   double prod0, prod1;
@@ -812,7 +868,7 @@ IsPointInQuadrangle(PointType p[4], PointTypePtr l)
  * Note: actually this quadrangle is a slanted rectangle
  */
 bool
-IsLineInQuadrangle (PointType p[4], LineTypePtr Line)
+IsLineInQuadrangle (PointType p[4], LineType *Line)
 {
   LineType line;
 
@@ -853,7 +909,7 @@ IsLineInQuadrangle (PointType p[4], LineTypePtr Line)
  * checks if an arc crosses a square
  */
 bool
-IsArcInRectangle (Coord X1, Coord Y1, Coord X2, Coord Y2, ArcTypePtr Arc)
+IsArcInRectangle (Coord X1, Coord Y1, Coord X2, Coord Y2, ArcType *Arc)
 {
   LineType line;
 
@@ -897,7 +953,7 @@ IsArcInRectangle (Coord X1, Coord Y1, Coord X2, Coord Y2, ArcTypePtr Arc)
  * Written to enable arbitrary pad directions; for rounded pads, too.
  */
 bool
-IsPointInPad (Coord X, Coord Y, Coord Radius, PadTypePtr Pad)
+IsPointInPad (Coord X, Coord Y, Coord Radius, PadType *Pad)
 {
   double r, Sin, Cos;
   Coord x; 
@@ -971,7 +1027,7 @@ IsPointInPad (Coord X, Coord Y, Coord Radius, PadTypePtr Pad)
 }
 
 bool
-IsPointInBox (Coord X, Coord Y, BoxTypePtr box, Coord Radius)
+IsPointInBox (Coord X, Coord Y, BoxType *box, Coord Radius)
 {
   Coord width, height, range;
 
@@ -1020,7 +1076,7 @@ IsPointInBox (Coord X, Coord Y, BoxTypePtr box, Coord Radius)
  *       the radius.
  */
 bool
-IsPointOnArc (Coord X, Coord Y, Coord Radius, ArcTypePtr Arc)
+IsPointOnArc (Coord X, Coord Y, Coord Radius, ArcType *Arc)
 {
   /* Calculate angle of point from arc center */
   double p_dist = Distance (X, Y, Arc->X, Arc->Y);
@@ -1133,47 +1189,47 @@ SearchObjectByLocation (unsigned Type,
 
   if (Type & RATLINE_TYPE && PCB->RatOn &&
       SearchRatLineByLocation (locked,
-			       (RatTypePtr *) Result1,
-			       (RatTypePtr *) Result2,
-			       (RatTypePtr *) Result3))
+			       (RatType **) Result1,
+			       (RatType **) Result2,
+			       (RatType **) Result3))
     return (RATLINE_TYPE);
 
   if (Type & VIA_TYPE &&
       SearchViaByLocation (locked,
-			   (PinTypePtr *) Result1,
-			   (PinTypePtr *) Result2, (PinTypePtr *) Result3))
+			   (PinType **) Result1,
+			   (PinType **) Result2, (PinType **) Result3))
     return (VIA_TYPE);
 
   if (Type & PIN_TYPE &&
       SearchPinByLocation (locked,
-			   (ElementTypePtr *) pr1,
-			   (PinTypePtr *) pr2, (PinTypePtr *) pr3))
+			   (ElementType **) pr1,
+			   (PinType **) pr2, (PinType **) pr3))
     HigherAvail = PIN_TYPE;
 
   if (!HigherAvail && Type & PAD_TYPE &&
       SearchPadByLocation (locked,
-			   (ElementTypePtr *) pr1,
-			   (PadTypePtr *) pr2, (PadTypePtr *) pr3, false))
+			   (ElementType **) pr1,
+			   (PadType **) pr2, (PadType **) pr3, false))
     HigherAvail = PAD_TYPE;
 
   if (!HigherAvail && Type & ELEMENTNAME_TYPE &&
       SearchElementNameByLocation (locked,
-				   (ElementTypePtr *) pr1,
-				   (TextTypePtr *) pr2, (TextTypePtr *) pr3,
+				   (ElementType **) pr1,
+				   (TextType **) pr2, (TextType **) pr3,
 				   false))
     {
-      BoxTypePtr box = &((TextTypePtr) r2)->BoundingBox;
+      BoxType *box = &((TextType *) r2)->BoundingBox;
       HigherBound = (double) (box->X2 - box->X1) * (double) (box->Y2 - box->Y1);
       HigherAvail = ELEMENTNAME_TYPE;
     }
 
   if (!HigherAvail && Type & ELEMENT_TYPE &&
       SearchElementByLocation (locked,
-			       (ElementTypePtr *) pr1,
-			       (ElementTypePtr *) pr2,
-			       (ElementTypePtr *) pr3, false))
+			       (ElementType **) pr1,
+			       (ElementType **) pr2,
+			       (ElementType **) pr3, false))
     {
-      BoxTypePtr box = &((ElementTypePtr) r1)->BoundingBox;
+      BoxType *box = &((ElementType *) r1)->BoundingBox;
       HigherBound = (double) (box->X2 - box->X1) * (double) (box->Y2 - box->Y1);
       HigherAvail = ELEMENT_TYPE;
     }
@@ -1195,50 +1251,58 @@ SearchObjectByLocation (unsigned Type,
 	  if ((HigherAvail & (PIN_TYPE | PAD_TYPE)) == 0 &&
 	      Type & POLYGONPOINT_TYPE &&
 	      SearchPointByLocation (locked,
-				     (LayerTypePtr *) Result1,
-				     (PolygonTypePtr *) Result2,
-				     (PointTypePtr *) Result3))
+				     (LayerType **) Result1,
+				     (PolygonType **) Result2,
+				     (PointType **) Result3))
 	    return (POLYGONPOINT_TYPE);
 
 	  if ((HigherAvail & (PIN_TYPE | PAD_TYPE)) == 0 &&
 	      Type & LINEPOINT_TYPE &&
 	      SearchLinePointByLocation (locked,
-					 (LayerTypePtr *) Result1,
-					 (LineTypePtr *) Result2,
-					 (PointTypePtr *) Result3))
+					 (LayerType **) Result1,
+					 (LineType **) Result2,
+					 (PointType **) Result3))
 	    return (LINEPOINT_TYPE);
 
 	  if ((HigherAvail & (PIN_TYPE | PAD_TYPE)) == 0 && Type & LINE_TYPE
 	      && SearchLineByLocation (locked,
-				       (LayerTypePtr *) Result1,
-				       (LineTypePtr *) Result2,
-				       (LineTypePtr *) Result3))
+				       (LayerType **) Result1,
+				       (LineType **) Result2,
+				       (LineType **) Result3))
 	    return (LINE_TYPE);
 
+	    if ((HigherAvail & (PIN_TYPE | PAD_TYPE)) == 0 &&
+	      Type & ARCPOINT_TYPE &&
+	      SearchArcPointByLocation (locked,
+					(LayerType **) Result1,
+					(ArcType **) Result2,
+					(PointType **) Result3))
+	    return (ARCPOINT_TYPE);
+
 	  if ((HigherAvail & (PIN_TYPE | PAD_TYPE)) == 0 && Type & ARC_TYPE &&
 	      SearchArcByLocation (locked,
-				   (LayerTypePtr *) Result1,
-				   (ArcTypePtr *) Result2,
-				   (ArcTypePtr *) Result3))
+				   (LayerType **) Result1,
+				   (ArcType **) Result2,
+				   (ArcType **) Result3))
 	    return (ARC_TYPE);
 
 	  if ((HigherAvail & (PIN_TYPE | PAD_TYPE)) == 0 && Type & TEXT_TYPE
 	      && SearchTextByLocation (locked,
-				       (LayerTypePtr *) Result1,
-				       (TextTypePtr *) Result2,
-				       (TextTypePtr *) Result3))
+				       (LayerType **) Result1,
+				       (TextType **) Result2,
+				       (TextType **) Result3))
 	    return (TEXT_TYPE);
 
 	  if (Type & POLYGON_TYPE &&
 	      SearchPolygonByLocation (locked,
-				       (LayerTypePtr *) Result1,
-				       (PolygonTypePtr *) Result2,
-				       (PolygonTypePtr *) Result3))
+				       (LayerType **) Result1,
+				       (PolygonType **) Result2,
+				       (PolygonType **) Result3))
 	    {
 	      if (HigherAvail)
 		{
-		  BoxTypePtr box =
-		    &(*(PolygonTypePtr *) Result2)->BoundingBox;
+		  BoxType *box =
+		    &(*(PolygonType **) Result2)->BoundingBox;
 		  double area =
 		    (double) (box->X2 - box->X1) * (double) (box->X2 - box->X1);
 		  if (HigherBound < area)
@@ -1290,23 +1354,23 @@ SearchObjectByLocation (unsigned Type,
 
   if (Type & PAD_TYPE &&
       SearchPadByLocation (locked,
-			   (ElementTypePtr *) Result1,
-			   (PadTypePtr *) Result2, (PadTypePtr *) Result3,
+			   (ElementType **) Result1,
+			   (PadType **) Result2, (PadType **) Result3,
 			   true))
     return (PAD_TYPE);
 
   if (Type & ELEMENTNAME_TYPE &&
       SearchElementNameByLocation (locked,
-				   (ElementTypePtr *) Result1,
-				   (TextTypePtr *) Result2,
-				   (TextTypePtr *) Result3, true))
+				   (ElementType **) Result1,
+				   (TextType **) Result2,
+				   (TextType **) Result3, true))
     return (ELEMENTNAME_TYPE);
 
   if (Type & ELEMENT_TYPE &&
       SearchElementByLocation (locked,
-			       (ElementTypePtr *) Result1,
-			       (ElementTypePtr *) Result2,
-			       (ElementTypePtr *) Result3, true))
+			       (ElementType **) Result1,
+			       (ElementType **) Result2,
+			       (ElementType **) Result3, true))
     return (ELEMENT_TYPE);
 
   return (NO_TYPE);
@@ -1321,7 +1385,7 @@ SearchObjectByLocation (unsigned Type,
  * A type value is returned too which is NO_TYPE if no objects has been found.
  */
 int
-SearchObjectByID (DataTypePtr Base,
+SearchObjectByID (DataType *Base,
 		  void **Result1, void **Result2, void **Result3, int ID,
 		  int type)
 {
@@ -1522,10 +1586,10 @@ SearchObjectByID (DataTypePtr Base,
  * searches for an element by its board name.
  * The function returns a pointer to the element, NULL if not found
  */
-ElementTypePtr
-SearchElementByName (DataTypePtr Base, char *Name)
+ElementType *
+SearchElementByName (DataType *Base, char *Name)
 {
-  ElementTypePtr result = NULL;
+  ElementType *result = NULL;
 
   ELEMENT_LOOP (Base);
   {
diff --git a/src/search.h b/src/search.h
index b1a6196..bdf460e 100644
--- a/src/search.h
+++ b/src/search.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for search routines
@@ -50,7 +49,7 @@
 	(POINT_IN_BOX((l)->Point1.X,(l)->Point1.Y,(b)) &&	\
 	POINT_IN_BOX((l)->Point2.X,(l)->Point2.Y,(b)))
 
-#define	PAD_IN_BOX(p,b)	LINE_IN_BOX((LineTypePtr)(p),(b))
+#define	PAD_IN_BOX(p,b)	LINE_IN_BOX((LineType *)(p),(b))
 
 #define	BOX_IN_BOX(b1,b)	\
 	((b1)->X1 >= (b)->X1 && (b1)->X2 <= (b)->X2 &&	\
@@ -71,19 +70,19 @@
 /* ---------------------------------------------------------------------------
  * prototypes
  */
-bool IsPointOnLine (Coord, Coord, Coord, LineTypePtr);
-bool IsPointOnPin (Coord, Coord, Coord, PinTypePtr);
-bool IsPointOnArc (Coord, Coord, Coord, ArcTypePtr);
-bool IsPointOnLineEnd (Coord, Coord, RatTypePtr);
-bool IsLineInRectangle (Coord, Coord, Coord, Coord, LineTypePtr);
-bool IsLineInQuadrangle (PointType p[4], LineTypePtr Line);
-bool IsArcInRectangle (Coord, Coord, Coord, Coord, ArcTypePtr);
-bool IsPointInPad (Coord, Coord, Coord, PadTypePtr);
-bool IsPointInBox (Coord, Coord, BoxTypePtr, Coord);
+bool IsPointOnLine (Coord, Coord, Coord, LineType *);
+bool IsPointOnPin (Coord, Coord, Coord, PinType *);
+bool IsPointOnArc (Coord, Coord, Coord, ArcType *);
+bool IsPointOnLineEnd (Coord, Coord, RatType *);
+bool IsLineInRectangle (Coord, Coord, Coord, Coord, LineType *);
+bool IsLineInQuadrangle (PointType p[4], LineType * Line);
+bool IsArcInRectangle (Coord, Coord, Coord, Coord, ArcType *);
+bool IsPointInPad (Coord, Coord, Coord, PadType *);
+bool IsPointInBox (Coord, Coord, BoxType *, Coord);
 int SearchObjectByLocation (unsigned, void **, void **, void **, Coord, Coord, Coord);
 int SearchScreen (Coord, Coord, int, void **, void **, void **);
 int SearchScreenGridSlop (Coord, Coord, int, void **, void **, void **);
-int SearchObjectByID (DataTypePtr, void **, void **, void **, int, int);
-ElementTypePtr SearchElementByName (DataTypePtr, char *);
+int SearchObjectByID (DataType *, void **, void **, void **, int, int);
+ElementType * SearchElementByName (DataType *, char *);
 
 #endif
diff --git a/src/select.c b/src/select.c
index 96db234..1762c76 100644
--- a/src/select.c
+++ b/src/select.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -59,8 +57,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 /* ---------------------------------------------------------------------------
  * toggles the selection of any kind of object
  * the different types are defined by search.h
@@ -69,28 +65,28 @@ bool
 SelectObject (void)
 {
   void *ptr1, *ptr2, *ptr3;
-  LayerTypePtr layer;
+  LayerType *layer;
   int type;
 
   bool changed = true;
 
   type = SearchScreen (Crosshair.X, Crosshair.Y, SELECT_TYPES,
 		       &ptr1, &ptr2, &ptr3);
-  if (type == NO_TYPE || TEST_FLAG (LOCKFLAG, (PinTypePtr) ptr2))
+  if (type == NO_TYPE || TEST_FLAG (LOCKFLAG, (PinType *) ptr2))
     return (false);
   switch (type)
     {
     case VIA_TYPE:
       AddObjectToFlagUndoList (VIA_TYPE, ptr1, ptr1, ptr1);
-      TOGGLE_FLAG (SELECTEDFLAG, (PinTypePtr) ptr1);
-      DrawVia ((PinTypePtr) ptr1);
+      TOGGLE_FLAG (SELECTEDFLAG, (PinType *) ptr1);
+      DrawVia ((PinType *) ptr1);
       break;
 
     case LINE_TYPE:
       {
-	LineType *line = (LineTypePtr) ptr2;
+	LineType *line = (LineType *) ptr2;
 
-	layer = (LayerTypePtr) ptr1;
+	layer = (LayerType *) ptr1;
 	AddObjectToFlagUndoList (LINE_TYPE, ptr1, ptr2, ptr2);
 	TOGGLE_FLAG (SELECTEDFLAG, line);
 	DrawLine (layer, line);
@@ -99,7 +95,7 @@ SelectObject (void)
 
     case RATLINE_TYPE:
       {
-	RatTypePtr rat = (RatTypePtr) ptr2;
+	RatType *rat = (RatType *) ptr2;
 
 	AddObjectToFlagUndoList (RATLINE_TYPE, ptr1, ptr1, ptr1);
 	TOGGLE_FLAG (SELECTEDFLAG, rat);
@@ -109,9 +105,9 @@ SelectObject (void)
 
     case ARC_TYPE:
       {
-	ArcType *arc = (ArcTypePtr) ptr2;
+	ArcType *arc = (ArcType *) ptr2;
 
-	layer = (LayerTypePtr) ptr1;
+	layer = (LayerType *) ptr1;
 	AddObjectToFlagUndoList (ARC_TYPE, ptr1, ptr2, ptr2);
 	TOGGLE_FLAG (SELECTEDFLAG, arc);
 	DrawArc (layer, arc);
@@ -120,9 +116,9 @@ SelectObject (void)
 
     case TEXT_TYPE:
       {
-	TextType *text = (TextTypePtr) ptr2;
+	TextType *text = (TextType *) ptr2;
 
-	layer = (LayerTypePtr) ptr1;
+	layer = (LayerType *) ptr1;
 	AddObjectToFlagUndoList (TEXT_TYPE, ptr1, ptr2, ptr2);
 	TOGGLE_FLAG (SELECTEDFLAG, text);
 	DrawText (layer, text);
@@ -131,9 +127,9 @@ SelectObject (void)
 
     case POLYGON_TYPE:
       {
-	PolygonType *poly = (PolygonTypePtr) ptr2;
+	PolygonType *poly = (PolygonType *) ptr2;
 
-	layer = (LayerTypePtr) ptr1;
+	layer = (LayerType *) ptr1;
 	AddObjectToFlagUndoList (POLYGON_TYPE, ptr1, ptr2, ptr2);
 	TOGGLE_FLAG (SELECTEDFLAG, poly);
 	DrawPolygon (layer, poly);
@@ -143,19 +139,19 @@ SelectObject (void)
 
     case PIN_TYPE:
       AddObjectToFlagUndoList (PIN_TYPE, ptr1, ptr2, ptr2);
-      TOGGLE_FLAG (SELECTEDFLAG, (PinTypePtr) ptr2);
-      DrawPin ((PinTypePtr) ptr2);
+      TOGGLE_FLAG (SELECTEDFLAG, (PinType *) ptr2);
+      DrawPin ((PinType *) ptr2);
       break;
 
     case PAD_TYPE:
       AddObjectToFlagUndoList (PAD_TYPE, ptr1, ptr2, ptr2);
-      TOGGLE_FLAG (SELECTEDFLAG, (PadTypePtr) ptr2);
-      DrawPad ((PadTypePtr) ptr2);
+      TOGGLE_FLAG (SELECTEDFLAG, (PadType *) ptr2);
+      DrawPad ((PadType *) ptr2);
       break;
 
     case ELEMENTNAME_TYPE:
       {
-	ElementTypePtr element = (ElementTypePtr) ptr1;
+	ElementType *element = (ElementType *) ptr1;
 
 	/* select all names of the element */
 	ELEMENTTEXT_LOOP (element);
@@ -170,7 +166,7 @@ SelectObject (void)
 
     case ELEMENT_TYPE:
       {
-	ElementTypePtr element = (ElementTypePtr) ptr1;
+	ElementType *element = (ElementType *) ptr1;
 
 	/* select all pins and names of the element */
 	PIN_LOOP (element);
@@ -213,22 +209,22 @@ SelectObject (void)
 
 /* ----------------------------------------------------------------------
  * selects/unselects all visible objects within the passed box
- * Flag determines if the block is to be selected or unselected
+ * "select" determines if the block is to be selected or unselected
  * returns true if the state of any object has changed
  */
 bool
-SelectBlock (BoxTypePtr Box, bool Flag)
+SelectBlock (BoxType *Box, bool select)
 {
   bool changed = false;
 
-  if (PCB->RatOn || !Flag)
+  if (PCB->RatOn || !select)
     RAT_LOOP (PCB->Data);
   {
-    if (LINE_IN_BOX ((LineTypePtr) line, Box) &&
-	!TEST_FLAG (LOCKFLAG, line) && TEST_FLAG (SELECTEDFLAG, line) != Flag)
+    if (LINE_IN_BOX ((LineType *) line, Box) &&
+	!TEST_FLAG (LOCKFLAG, line) && TEST_FLAG (SELECTEDFLAG, line) != select)
       {
 	AddObjectToFlagUndoList (RATLINE_TYPE, line, line, line);
-	ASSIGN_FLAG (SELECTEDFLAG, Flag, line);
+	ASSIGN_FLAG (SELECTEDFLAG, select, line);
 	if (PCB->RatOn)
 	  DrawRat (line);
 	changed = true;
@@ -241,26 +237,26 @@ SelectBlock (BoxTypePtr Box, bool Flag)
   {
     if (layer == & PCB->Data->SILKLAYER)
       {
-	if (! (PCB->ElementOn || !Flag))
+	if (! (PCB->ElementOn || !select))
 	  continue;
       }
     else if (layer == & PCB->Data->BACKSILKLAYER)
       {
-	if (! (PCB->InvisibleObjectsOn || !Flag))
+	if (! (PCB->InvisibleObjectsOn || !select))
 	  continue;
       }
     else
-      if (! (layer->On || !Flag))
+      if (! (layer->On || !select))
 	continue;
 
     LINE_LOOP (layer);
     {
       if (LINE_IN_BOX (line, Box)
 	  && !TEST_FLAG (LOCKFLAG, line)
-	  && TEST_FLAG (SELECTEDFLAG, line) != Flag)
+	  && TEST_FLAG (SELECTEDFLAG, line) != select)
 	{
 	  AddObjectToFlagUndoList (LINE_TYPE, layer, line, line);
-	  ASSIGN_FLAG (SELECTEDFLAG, Flag, line);
+	  ASSIGN_FLAG (SELECTEDFLAG, select, line);
 	  if (layer->On)
 	    DrawLine (layer, line);
 	  changed = true;
@@ -271,10 +267,10 @@ SelectBlock (BoxTypePtr Box, bool Flag)
     {
       if (ARC_IN_BOX (arc, Box)
 	  && !TEST_FLAG (LOCKFLAG, arc)
-	  && TEST_FLAG (SELECTEDFLAG, arc) != Flag)
+	  && TEST_FLAG (SELECTEDFLAG, arc) != select)
 	{
 	  AddObjectToFlagUndoList (ARC_TYPE, layer, arc, arc);
-	  ASSIGN_FLAG (SELECTEDFLAG, Flag, arc);
+	  ASSIGN_FLAG (SELECTEDFLAG, select, arc);
 	  if (layer->On)
 	    DrawArc (layer, arc);
 	  changed = true;
@@ -283,14 +279,14 @@ SelectBlock (BoxTypePtr Box, bool Flag)
     END_LOOP;
     TEXT_LOOP (layer);
     {
-      if (!Flag || TEXT_IS_VISIBLE(PCB, layer, text))
+      if (!select || TEXT_IS_VISIBLE(PCB, layer, text))
 	{
 	  if (TEXT_IN_BOX (text, Box)
 	      && !TEST_FLAG (LOCKFLAG, text)
-	      && TEST_FLAG (SELECTEDFLAG, text) != Flag)
+	      && TEST_FLAG (SELECTEDFLAG, text) != select)
 	    {
 	      AddObjectToFlagUndoList (TEXT_TYPE, layer, text, text);
-	      ASSIGN_FLAG (SELECTEDFLAG, Flag, text);
+	      ASSIGN_FLAG (SELECTEDFLAG, select, text);
 	      if (TEXT_IS_VISIBLE(PCB, layer, text))
 		DrawText (layer, text);
 	      changed = true;
@@ -302,10 +298,10 @@ SelectBlock (BoxTypePtr Box, bool Flag)
     {
       if (POLYGON_IN_BOX (polygon, Box)
 	  && !TEST_FLAG (LOCKFLAG, polygon)
-	  && TEST_FLAG (SELECTEDFLAG, polygon) != Flag)
+	  && TEST_FLAG (SELECTEDFLAG, polygon) != select)
 	{
 	  AddObjectToFlagUndoList (POLYGON_TYPE, layer, polygon, polygon);
-	  ASSIGN_FLAG (SELECTEDFLAG, Flag, polygon);
+	  ASSIGN_FLAG (SELECTEDFLAG, select, polygon);
 	  if (layer->On)
 	    DrawPolygon (layer, polygon);
 	  changed = true;
@@ -320,7 +316,7 @@ SelectBlock (BoxTypePtr Box, bool Flag)
   {
     {
       bool gotElement = false;
-      if ((PCB->ElementOn || !Flag)
+      if ((PCB->ElementOn || !select)
 	  && !TEST_FLAG (LOCKFLAG, element)
 	  && ((TEST_FLAG (ONSOLDERFLAG, element) != 0) == SWAP_IDENT
 	      || PCB->InvisibleObjectsOn))
@@ -329,32 +325,32 @@ SelectBlock (BoxTypePtr Box, bool Flag)
 	      (&ELEMENT_TEXT (PCB, element).BoundingBox, Box)
 	      && !TEST_FLAG (LOCKFLAG, &ELEMENT_TEXT (PCB, element))
 	      && TEST_FLAG (SELECTEDFLAG,
-			    &ELEMENT_TEXT (PCB, element)) != Flag)
+			    &ELEMENT_TEXT (PCB, element)) != select)
 	    {
 	      /* select all names of element */
 	      ELEMENTTEXT_LOOP (element);
 	      {
 		AddObjectToFlagUndoList (ELEMENTNAME_TYPE,
 					 element, text, text);
-		ASSIGN_FLAG (SELECTEDFLAG, Flag, text);
+		ASSIGN_FLAG (SELECTEDFLAG, select, text);
 	      }
 	      END_LOOP;
 	      if (PCB->ElementOn)
 		DrawElementName (element);
 	      changed = true;
 	    }
-	  if ((PCB->PinOn || !Flag) && ELEMENT_IN_BOX (element, Box))
-	    if (TEST_FLAG (SELECTEDFLAG, element) != Flag)
+	  if ((PCB->PinOn || !select) && ELEMENT_IN_BOX (element, Box))
+	    if (TEST_FLAG (SELECTEDFLAG, element) != select)
 	      {
 		AddObjectToFlagUndoList (ELEMENT_TYPE,
 					 element, element, element);
-		ASSIGN_FLAG (SELECTEDFLAG, Flag, element);
+		ASSIGN_FLAG (SELECTEDFLAG, select, element);
 		PIN_LOOP (element);
 		{
-		  if (TEST_FLAG (SELECTEDFLAG, pin) != Flag)
+		  if (TEST_FLAG (SELECTEDFLAG, pin) != select)
 		    {
 		      AddObjectToFlagUndoList (PIN_TYPE, element, pin, pin);
-		      ASSIGN_FLAG (SELECTEDFLAG, Flag, pin);
+		      ASSIGN_FLAG (SELECTEDFLAG, select, pin);
 		      if (PCB->PinOn)
 			DrawPin (pin);
 		      changed = true;
@@ -363,10 +359,10 @@ SelectBlock (BoxTypePtr Box, bool Flag)
 		END_LOOP;
 		PAD_LOOP (element);
 		{
-		  if (TEST_FLAG (SELECTEDFLAG, pad) != Flag)
+		  if (TEST_FLAG (SELECTEDFLAG, pad) != select)
 		    {
 		      AddObjectToFlagUndoList (PAD_TYPE, element, pad, pad);
-		      ASSIGN_FLAG (SELECTEDFLAG, Flag, pad);
+		      ASSIGN_FLAG (SELECTEDFLAG, select, pad);
 		      if (PCB->PinOn)
 			DrawPad (pad);
 		      changed = true;
@@ -379,15 +375,15 @@ SelectBlock (BoxTypePtr Box, bool Flag)
 		gotElement = true;
 	      }
 	}
-      if ((PCB->PinOn || !Flag) && !TEST_FLAG (LOCKFLAG, element) && !gotElement)
+      if ((PCB->PinOn || !select) && !TEST_FLAG (LOCKFLAG, element) && !gotElement)
 	{
 	  PIN_LOOP (element);
 	  {
 	    if ((VIA_OR_PIN_IN_BOX (pin, Box)
-		 && TEST_FLAG (SELECTEDFLAG, pin) != Flag))
+		 && TEST_FLAG (SELECTEDFLAG, pin) != select))
 	      {
 		AddObjectToFlagUndoList (PIN_TYPE, element, pin, pin);
-		ASSIGN_FLAG (SELECTEDFLAG, Flag, pin);
+		ASSIGN_FLAG (SELECTEDFLAG, select, pin);
 		if (PCB->PinOn)
 		  DrawPin (pin);
 		changed = true;
@@ -397,13 +393,13 @@ SelectBlock (BoxTypePtr Box, bool Flag)
 	  PAD_LOOP (element);
 	  {
 	    if (PAD_IN_BOX (pad, Box)
-		&& TEST_FLAG (SELECTEDFLAG, pad) != Flag
+		&& TEST_FLAG (SELECTEDFLAG, pad) != select
 		&& (TEST_FLAG (ONSOLDERFLAG, pad) == SWAP_IDENT
 		    || PCB->InvisibleObjectsOn
-		    || !Flag))
+		    || !select))
 	      {
 		AddObjectToFlagUndoList (PAD_TYPE, element, pad, pad);
-		ASSIGN_FLAG (SELECTEDFLAG, Flag, pad);
+		ASSIGN_FLAG (SELECTEDFLAG, select, pad);
 		if (PCB->PinOn)
 		  DrawPad (pad);
 		changed = true;
@@ -415,15 +411,15 @@ SelectBlock (BoxTypePtr Box, bool Flag)
   }
   END_LOOP;
   /* end with vias */
-  if (PCB->ViaOn || !Flag)
+  if (PCB->ViaOn || !select)
     VIA_LOOP (PCB->Data);
   {
     if (VIA_OR_PIN_IN_BOX (via, Box)
 	&& !TEST_FLAG (LOCKFLAG, via)
-	&& TEST_FLAG (SELECTEDFLAG, via) != Flag)
+	&& TEST_FLAG (SELECTEDFLAG, via) != select)
       {
 	AddObjectToFlagUndoList (VIA_TYPE, via, via, via);
-	ASSIGN_FLAG (SELECTEDFLAG, Flag, via);
+	ASSIGN_FLAG (SELECTEDFLAG, select, via);
 	if (PCB->ViaOn)
 	  DrawVia (via);
 	changed = true;
@@ -442,71 +438,71 @@ SelectBlock (BoxTypePtr Box, bool Flag)
  * performs several operations on the passed object
  */
 void *
-ObjectOperation (ObjectFunctionTypePtr F,
+ObjectOperation (ObjectFunctionType *F,
 		 int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 {
   switch (Type)
     {
     case LINE_TYPE:
       if (F->Line)
-	return (F->Line ((LayerTypePtr) Ptr1, (LineTypePtr) Ptr2));
+	return (F->Line ((LayerType *) Ptr1, (LineType *) Ptr2));
       break;
 
     case ARC_TYPE:
       if (F->Arc)
-	return (F->Arc ((LayerTypePtr) Ptr1, (ArcTypePtr) Ptr2));
+	return (F->Arc ((LayerType *) Ptr1, (ArcType *) Ptr2));
       break;
 
     case LINEPOINT_TYPE:
       if (F->LinePoint)
-	return (F->LinePoint ((LayerTypePtr) Ptr1, (LineTypePtr) Ptr2,
-			      (PointTypePtr) Ptr3));
+	return (F->LinePoint ((LayerType *) Ptr1, (LineType *) Ptr2,
+			      (PointType *) Ptr3));
       break;
 
     case TEXT_TYPE:
       if (F->Text)
-	return (F->Text ((LayerTypePtr) Ptr1, (TextTypePtr) Ptr2));
+	return (F->Text ((LayerType *) Ptr1, (TextType *) Ptr2));
       break;
 
     case POLYGON_TYPE:
       if (F->Polygon)
-	return (F->Polygon ((LayerTypePtr) Ptr1, (PolygonTypePtr) Ptr2));
+	return (F->Polygon ((LayerType *) Ptr1, (PolygonType *) Ptr2));
       break;
 
     case POLYGONPOINT_TYPE:
       if (F->Point)
-	return (F->Point ((LayerTypePtr) Ptr1, (PolygonTypePtr) Ptr2,
-			  (PointTypePtr) Ptr3));
+	return (F->Point ((LayerType *) Ptr1, (PolygonType *) Ptr2,
+			  (PointType *) Ptr3));
       break;
 
     case VIA_TYPE:
       if (F->Via)
-	return (F->Via ((PinTypePtr) Ptr1));
+	return (F->Via ((PinType *) Ptr1));
       break;
 
     case ELEMENT_TYPE:
       if (F->Element)
-	return (F->Element ((ElementTypePtr) Ptr1));
+	return (F->Element ((ElementType *) Ptr1));
       break;
 
     case PIN_TYPE:
       if (F->Pin)
-	return (F->Pin ((ElementTypePtr) Ptr1, (PinTypePtr) Ptr2));
+	return (F->Pin ((ElementType *) Ptr1, (PinType *) Ptr2));
       break;
 
     case PAD_TYPE:
       if (F->Pad)
-	return (F->Pad ((ElementTypePtr) Ptr1, (PadTypePtr) Ptr2));
+	return (F->Pad ((ElementType *) Ptr1, (PadType *) Ptr2));
       break;
 
     case ELEMENTNAME_TYPE:
       if (F->ElementName)
-	return (F->ElementName ((ElementTypePtr) Ptr1));
+	return (F->ElementName ((ElementType *) Ptr1));
       break;
 
     case RATLINE_TYPE:
       if (F->Rat)
-	return (F->Rat ((RatTypePtr) Ptr1));
+	return (F->Rat ((RatType *) Ptr1));
       break;
     }
   return (NULL);
@@ -519,7 +515,7 @@ ObjectOperation (ObjectFunctionTypePtr F,
  * returns true if anything has changed
  */
 bool
-SelectedOperation (ObjectFunctionTypePtr F, bool Reset, int type)
+SelectedOperation (ObjectFunctionType *F, bool Reset, int type)
 {
   bool changed = false;
 
@@ -704,24 +700,26 @@ SelectedOperation (ObjectFunctionTypePtr F, bool Reset, int type)
 }
 
 /* ----------------------------------------------------------------------
- * selects/unselects all objects which were found during a connection scan
- * Flag determines if they are to be selected or unselected
+ * selects/unselects all objects which have (any of) the specified flag(s)
+ * set. (Typically the FOUNDFLAG, assigned during a connection scan).
+ * "select" determines if they are to be selected or unselected
+ *
  * returns true if the state of any object has changed
  *
  * text objects and elements cannot be selected by this routine
  */
 bool
-SelectConnection (bool Flag)
+SelectByFlag (int flag, bool select)
 {
   bool changed = false;
 
   if (PCB->RatOn)
     RAT_LOOP (PCB->Data);
   {
-    if (TEST_FLAG (FOUNDFLAG, line))
+    if (TEST_FLAG (flag, line))
       {
 	AddObjectToFlagUndoList (RATLINE_TYPE, line, line, line);
-	ASSIGN_FLAG (SELECTEDFLAG, Flag, line);
+	ASSIGN_FLAG (SELECTEDFLAG, select, line);
 	DrawRat (line);
 	changed = true;
       }
@@ -730,10 +728,10 @@ SelectConnection (bool Flag)
 
   VISIBLELINE_LOOP (PCB->Data);
   {
-    if (TEST_FLAG (FOUNDFLAG, line) && !TEST_FLAG (LOCKFLAG, line))
+    if (TEST_FLAG (flag, line) && !TEST_FLAG (LOCKFLAG, line))
       {
 	AddObjectToFlagUndoList (LINE_TYPE, layer, line, line);
-	ASSIGN_FLAG (SELECTEDFLAG, Flag, line);
+	ASSIGN_FLAG (SELECTEDFLAG, select, line);
 	DrawLine (layer, line);
 	changed = true;
       }
@@ -741,10 +739,10 @@ SelectConnection (bool Flag)
   ENDALL_LOOP;
   VISIBLEARC_LOOP (PCB->Data);
   {
-    if (TEST_FLAG (FOUNDFLAG, arc) && !TEST_FLAG (LOCKFLAG, arc))
+    if (TEST_FLAG (flag, arc) && !TEST_FLAG (LOCKFLAG, arc))
       {
 	AddObjectToFlagUndoList (ARC_TYPE, layer, arc, arc);
-	ASSIGN_FLAG (SELECTEDFLAG, Flag, arc);
+	ASSIGN_FLAG (SELECTEDFLAG, select, arc);
 	DrawArc (layer, arc);
 	changed = true;
       }
@@ -752,10 +750,10 @@ SelectConnection (bool Flag)
   ENDALL_LOOP;
   VISIBLEPOLYGON_LOOP (PCB->Data);
   {
-    if (TEST_FLAG (FOUNDFLAG, polygon) && !TEST_FLAG (LOCKFLAG, polygon))
+    if (TEST_FLAG (flag, polygon) && !TEST_FLAG (LOCKFLAG, polygon))
       {
 	AddObjectToFlagUndoList (POLYGON_TYPE, layer, polygon, polygon);
-	ASSIGN_FLAG (SELECTEDFLAG, Flag, polygon);
+	ASSIGN_FLAG (SELECTEDFLAG, select, polygon);
 	DrawPolygon (layer, polygon);
 	changed = true;
       }
@@ -766,10 +764,10 @@ SelectConnection (bool Flag)
     {
       ALLPIN_LOOP (PCB->Data);
       {
-	if (!TEST_FLAG (LOCKFLAG, element) && TEST_FLAG (FOUNDFLAG, pin))
+	if (!TEST_FLAG (LOCKFLAG, element) && TEST_FLAG (flag, pin))
 	  {
 	    AddObjectToFlagUndoList (PIN_TYPE, element, pin, pin);
-	    ASSIGN_FLAG (SELECTEDFLAG, Flag, pin);
+	    ASSIGN_FLAG (SELECTEDFLAG, select, pin);
 	    DrawPin (pin);
 	    changed = true;
 	  }
@@ -777,10 +775,10 @@ SelectConnection (bool Flag)
       ENDALL_LOOP;
       ALLPAD_LOOP (PCB->Data);
       {
-	if (!TEST_FLAG (LOCKFLAG, element) && TEST_FLAG (FOUNDFLAG, pad))
+	if (!TEST_FLAG (LOCKFLAG, element) && TEST_FLAG (flag, pad))
 	  {
 	    AddObjectToFlagUndoList (PAD_TYPE, element, pad, pad);
-	    ASSIGN_FLAG (SELECTEDFLAG, Flag, pad);
+	    ASSIGN_FLAG (SELECTEDFLAG, select, pad);
 	    DrawPad (pad);
 	    changed = true;
 	  }
@@ -791,10 +789,10 @@ SelectConnection (bool Flag)
   if (PCB->ViaOn)
     VIA_LOOP (PCB->Data);
   {
-    if (TEST_FLAG (FOUNDFLAG, via) && !TEST_FLAG (LOCKFLAG, via))
+    if (TEST_FLAG (flag, via) && !TEST_FLAG (LOCKFLAG, via))
       {
 	AddObjectToFlagUndoList (VIA_TYPE, via, via, via);
-	ASSIGN_FLAG (SELECTEDFLAG, Flag, via);
+	ASSIGN_FLAG (SELECTEDFLAG, select, via);
 	DrawVia (via);
 	changed = true;
       }
@@ -827,7 +825,7 @@ regexec_match_all (const  regex_t  *preg,  const  char  *string)
 #endif
 
 bool
-SelectObjectByName (int Type, char *Pattern, bool Flag)
+SelectObjectByName (int Type, char *Pattern, bool select)
 {
   bool changed = false;
 
@@ -869,10 +867,10 @@ SelectObjectByName (int Type, char *Pattern, bool Flag)
 	&& TEXT_IS_VISIBLE (PCB, layer, text)
 	&& text->TextString
 	&& REGEXEC (text->TextString)
-	&& TEST_FLAG (SELECTEDFLAG, text) != Flag)
+	&& TEST_FLAG (SELECTEDFLAG, text) != select)
       {
 	AddObjectToFlagUndoList (TEXT_TYPE, layer, text, text);
-	ASSIGN_FLAG (SELECTEDFLAG, Flag, text);
+	ASSIGN_FLAG (SELECTEDFLAG, select, text);
 	DrawText (layer, text);
 	changed = true;
       }
@@ -885,29 +883,29 @@ SelectObjectByName (int Type, char *Pattern, bool Flag)
     if (!TEST_FLAG (LOCKFLAG, element)
 	&& ((TEST_FLAG (ONSOLDERFLAG, element) != 0) == SWAP_IDENT
 	    || PCB->InvisibleObjectsOn)
-	&& TEST_FLAG (SELECTEDFLAG, element) != Flag)
+	&& TEST_FLAG (SELECTEDFLAG, element) != select)
       {
 	String name = ELEMENT_NAME (PCB, element);
 	if (name && REGEXEC (name))
 	  {
 	    AddObjectToFlagUndoList (ELEMENT_TYPE, element, element, element);
-	    ASSIGN_FLAG (SELECTEDFLAG, Flag, element);
+	    ASSIGN_FLAG (SELECTEDFLAG, select, element);
 	    PIN_LOOP (element);
 	    {
 	      AddObjectToFlagUndoList (PIN_TYPE, element, pin, pin);
-	      ASSIGN_FLAG (SELECTEDFLAG, Flag, pin);
+	      ASSIGN_FLAG (SELECTEDFLAG, select, pin);
 	    }
 	    END_LOOP;
 	    PAD_LOOP (element);
 	    {
 	      AddObjectToFlagUndoList (PAD_TYPE, element, pad, pad);
-	      ASSIGN_FLAG (SELECTEDFLAG, Flag, pad);
+	      ASSIGN_FLAG (SELECTEDFLAG, select, pad);
 	    }
 	    END_LOOP;
 	    ELEMENTTEXT_LOOP (element);
 	    {
 	      AddObjectToFlagUndoList (ELEMENTNAME_TYPE, element, text, text);
-	      ASSIGN_FLAG (SELECTEDFLAG, Flag, text);
+	      ASSIGN_FLAG (SELECTEDFLAG, select, text);
 	    }
 	    END_LOOP;
 	    DrawElementName (element);
@@ -922,10 +920,10 @@ SelectObjectByName (int Type, char *Pattern, bool Flag)
   {
     if (!TEST_FLAG (LOCKFLAG, element)
 	&& pin->Name && REGEXEC (pin->Name)
-	&& TEST_FLAG (SELECTEDFLAG, pin) != Flag)
+	&& TEST_FLAG (SELECTEDFLAG, pin) != select)
       {
 	AddObjectToFlagUndoList (PIN_TYPE, element, pin, pin);
-	ASSIGN_FLAG (SELECTEDFLAG, Flag, pin);
+	ASSIGN_FLAG (SELECTEDFLAG, select, pin);
 	DrawPin (pin);
 	changed = true;
       }
@@ -937,11 +935,11 @@ SelectObjectByName (int Type, char *Pattern, bool Flag)
     if (!TEST_FLAG (LOCKFLAG, element)
 	&& ((TEST_FLAG (ONSOLDERFLAG, pad) != 0) == SWAP_IDENT
 	    || PCB->InvisibleObjectsOn)
-	&& TEST_FLAG (SELECTEDFLAG, pad) != Flag)
+	&& TEST_FLAG (SELECTEDFLAG, pad) != select)
       if (pad->Name && REGEXEC (pad->Name))
 	{
 	  AddObjectToFlagUndoList (PAD_TYPE, element, pad, pad);
-	  ASSIGN_FLAG (SELECTEDFLAG, Flag, pad);
+	  ASSIGN_FLAG (SELECTEDFLAG, select, pad);
 	  DrawPad (pad);
 	  changed = true;
 	}
@@ -952,10 +950,10 @@ SelectObjectByName (int Type, char *Pattern, bool Flag)
   {
     if (!TEST_FLAG (LOCKFLAG, via)
 	&& via->Name
-	&& REGEXEC (via->Name) && TEST_FLAG (SELECTEDFLAG, via) != Flag)
+	&& REGEXEC (via->Name) && TEST_FLAG (SELECTEDFLAG, via) != select)
       {
 	AddObjectToFlagUndoList (VIA_TYPE, via, via, via);
-	ASSIGN_FLAG (SELECTEDFLAG, Flag, via);
+	ASSIGN_FLAG (SELECTEDFLAG, select, via);
 	DrawVia (via);
 	changed = true;
       }
@@ -964,7 +962,7 @@ SelectObjectByName (int Type, char *Pattern, bool Flag)
   if (Type & NET_TYPE)
     {
       InitConnectionLookup ();
-      changed = ResetConnections (true) || changed;
+      changed = ClearFlagOnAllObjects (true, FOUNDFLAG) || changed;
 
       MENU_LOOP (&PCB->NetlistLib);
       {
@@ -979,13 +977,13 @@ SelectObjectByName (int Type, char *Pattern, bool Flag)
             for (i = menu->EntryN, entry = menu->Entry; i; i--, entry++)
               if (SeekPad (entry, &conn, false))
                 RatFindHook (conn.type, conn.ptr1, conn.ptr2, conn.ptr2,
-                             true, true);
+                             true, FOUNDFLAG, true);
           }
       }
       END_LOOP;
 
-      changed = SelectConnection (Flag) || changed;
-      changed = ResetConnections (false) || changed;
+      changed = SelectByFlag (FOUNDFLAG, select) || changed;
+      changed = ClearFlagOnAllObjects (false, FOUNDFLAG) || changed;
       FreeConnectionLookupMemory ();
     }
 
diff --git a/src/select.h b/src/select.h
index f3edde6..40e475d 100644
--- a/src/select.h
+++ b/src/select.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for select routines
@@ -38,10 +37,10 @@
 	 PIN_TYPE | PAD_TYPE | ELEMENTNAME_TYPE | RATLINE_TYPE | ARC_TYPE)
 
 bool SelectObject (void);
-bool SelectBlock (BoxTypePtr, bool);
-bool SelectedOperation (ObjectFunctionTypePtr, bool, int);
-void *ObjectOperation (ObjectFunctionTypePtr, int, void *, void *, void *);
-bool SelectConnection (bool);
+bool SelectBlock (BoxType *, bool);
+bool SelectedOperation (ObjectFunctionType *, bool, int);
+void *ObjectOperation (ObjectFunctionType *, int, void *, void *, void *);
+bool SelectByFlag (int flag, bool select);
 
 #if defined(HAVE_REGCOMP) || defined(HAVE_RE_COMP)
 bool SelectObjectByName (int, char *, bool);
diff --git a/src/set.c b/src/set.c
index 1f86adb..324e625 100644
--- a/src/set.c
+++ b/src/set.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -53,15 +51,15 @@
 #include "error.h"
 #include "find.h"
 #include "misc.h"
+#include "move.h"
 #include "set.h"
 #include "undo.h"
+#include "pcb-printf.h"
 
 #ifdef HAVE_LIBDMALLOC
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 static int mode_position = 0;
 static int mode_stack[MAX_MODESTACK_DEPTH];
 
@@ -71,6 +69,7 @@ static int mode_stack[MAX_MODESTACK_DEPTH];
 void
 SetGrid (Coord Grid, bool align)
 {
+  char *grid_string;
   if (Grid >= 1 && Grid <= MAX_GRID)
     {
       if (align)
@@ -79,6 +78,10 @@ SetGrid (Coord Grid, bool align)
 	  PCB->GridOffsetY = Crosshair.Y % Grid;
 	}
       PCB->Grid = Grid;
+      grid_string = pcb_g_strdup_printf ("%mr", Grid);
+      if (grid_string)
+        AttributePut (PCB, "PCB::grid::size", grid_string);
+      g_free (grid_string);
       if (Settings.DrawGrid)
 	Redraw ();
     }
@@ -282,6 +285,13 @@ SetMode (int Mode)
       Settings.Mode = Mode;
       AdjustAttachedObjects ();
     }
+  /* Cancel rubberband move */
+  else if (Settings.Mode == MOVE_MODE)
+    MoveObjectAndRubberband (Crosshair.AttachedObject.Type,
+                             Crosshair.AttachedObject.Ptr1,
+                             Crosshair.AttachedObject.Ptr2,
+                             Crosshair.AttachedObject.Ptr3,
+                             0, 0);
   else
     {
       if (Settings.Mode == ARC_MODE || Settings.Mode == LINE_MODE)
@@ -290,7 +300,7 @@ SetMode (int Mode)
       Crosshair.AttachedLine.State = STATE_FIRST;
       if (Mode == LINE_MODE && TEST_FLAG (AUTODRCFLAG, PCB))
 	{
-	  if (ResetConnections (true))
+	  if (ClearFlagOnAllObjects (true, CONNECTEDFLAG | FOUNDFLAG))
 	    {
 	      IncrementUndoSerialNumber ();
 	      Draw ();
diff --git a/src/set.h b/src/set.h
index 4bfe6ec..9978619 100644
--- a/src/set.h
+++ b/src/set.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for update routines
@@ -35,7 +34,6 @@
 
 void SetTextScale (int);
 void SetGrid (Coord, bool);
-void SetZoom (double);
 void SetLineSize (Coord);
 void SetViaSize (Coord, bool);
 void SetViaDrillingHole (Coord, bool);
@@ -46,7 +44,6 @@ void SetMode (int);
 void SetCrosshairRangeToBuffer (void);
 void SetRouteStyle (char *);
 void SetLocalRef (Coord, Coord, bool);
-void RedrawZoom (Coord, Coord);
 void SaveMode (void);
 void RestoreMode (void);
 void pcb_use_route_style (RouteStyleType *);
diff --git a/src/strflags.c b/src/strflags.c
index 8f4912c..f29da5b 100644
--- a/src/strflags.c
+++ b/src/strflags.c
@@ -1,4 +1,3 @@
-/* $Id$ */
 /*
  *                            COPYRIGHT
  *
@@ -54,8 +53,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 /* Because all the macros expect it, that's why.  */
 typedef struct
 {
@@ -111,7 +108,8 @@ static FlagBitsType object_flagbits[] = {
   { LOCKFLAG, N ("lock"), ALL_TYPES },
   { EDGE2FLAG, N ("edge2"), ALL_TYPES },
   { FULLPOLYFLAG, N ("fullpoly"), POLYGON_TYPE},
-  { NOPASTEFLAG, N ("nopaste"), PAD_TYPE }
+  { NOPASTEFLAG, N ("nopaste"), PAD_TYPE },
+  { CONNECTEDFLAG, N ("connected"), ALL_TYPES }
 };
 
 static FlagBitsType pcb_flagbits[] = {
diff --git a/src/strflags.h b/src/strflags.h
index da16b64..a5f5b44 100644
--- a/src/strflags.h
+++ b/src/strflags.h
@@ -1,4 +1,3 @@
-/* $Id$ */
 /*
  *                            COPYRIGHT
  *
diff --git a/src/thermal.c b/src/thermal.c
index 03fee24..2f91d7d 100644
--- a/src/thermal.c
+++ b/src/thermal.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -75,9 +73,7 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
-static PCBTypePtr pcb;
+static PCBType *pcb;
 
 struct cent
 {
@@ -126,7 +122,7 @@ diag_line (Coord X, Coord Y, Coord l, Coord w, bool rt)
 }
 
 static POLYAREA *
-square_therm (PinTypePtr pin, Cardinal style)
+square_therm (PinType *pin, Cardinal style)
 {
   POLYAREA *p, *p2;
   PLINE *c;
@@ -360,7 +356,7 @@ square_therm (PinTypePtr pin, Cardinal style)
 }
 
 static POLYAREA *
-oct_therm (PinTypePtr pin, Cardinal style)
+oct_therm (PinType *pin, Cardinal style)
 {
   POLYAREA *p, *p2, *m;
   Coord t = 0.5 * pcb->ThermScale * pin->Clearance;
@@ -406,7 +402,7 @@ oct_therm (PinTypePtr pin, Cardinal style)
  *
  */
 POLYAREA *
-ThermPoly (PCBTypePtr p, PinTypePtr pin, Cardinal laynum)
+ThermPoly (PCBType *p, PinType *pin, Cardinal laynum)
 {
   ArcType a;
   POLYAREA *pa, *arc;
diff --git a/src/thermal.h b/src/thermal.h
index 67c04e0..c476420 100644
--- a/src/thermal.h
+++ b/src/thermal.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for thermal routines
@@ -41,6 +40,6 @@
 #include "global.h"
 #include "mymem.h"
 
-POLYAREA * ThermPoly (PCBTypePtr, PinTypePtr, Cardinal);
+POLYAREA * ThermPoly (PCBType *, PinType *, Cardinal);
 
 #endif
diff --git a/src/toporouter.c b/src/toporouter.c
index e5310b0..33c8e84 100644
--- a/src/toporouter.c
+++ b/src/toporouter.c
@@ -1,9 +1,10 @@
 /*
  *                            COPYRIGHT
  *
- *  Topological Autorouter for 
+ *  Topological Autorouter for
  *  PCB, interactive printed circuit board design
  *  Copyright (C) 2009 Anthony Blake
+ *  Copyright (C) 2009-2011 PCB Contributors (see ChangeLog for details)
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -27,9 +28,9 @@
  *                 This is *EXPERIMENTAL* code.
  *
  *  As the code is experimental, the algorithms and code
- *  are likely to change. Which means it isn't documented  
+ *  are likely to change. Which means it isn't documented
  *  or optimized. If you would like to learn about Topological
- *  Autorouters, the following papers are good starting points: 
+ *  Autorouters, the following papers are good starting points:
  *
  * This file implements a topological autorouter, and uses techniques from the
  * following publications:
@@ -57,6 +58,11 @@
 #include "toporouter.h"
 #include "pcb-printf.h"
 
+#define BOARD_EDGE_RESOLUTION MIL_TO_COORD (100.)
+#define VIA_COST_AS_DISTANCE  MIL_TO_COORD (100.)
+#define ROAR_DETOUR_THRESHOLD MIL_TO_COORD (10.)
+
+
 static void 
 toporouter_edge_init (toporouter_edge_t *edge)
 {
@@ -336,7 +342,7 @@ toporouter_draw_vertex(gpointer item, gpointer data)
       cairo_arc(dc->cr, 
           tv->v.p.x * dc->s + MARGIN, 
           tv->v.p.y * dc->s + MARGIN, 
-          500. * dc->s, 0, 2 * M_PI);
+          MIL_TO_COORD (5.) * dc->s, 0, 2 * M_PI);
       cairo_fill(dc->cr);
 
     }else if(tv->flags & VERTEX_FLAG_GREEN) {
@@ -344,7 +350,7 @@ toporouter_draw_vertex(gpointer item, gpointer data)
       cairo_arc(dc->cr, 
           tv->v.p.x * dc->s + MARGIN, 
           tv->v.p.y * dc->s + MARGIN, 
-          500. * dc->s, 0, 2 * M_PI);
+          MIL_TO_COORD (5.) * dc->s, 0, 2 * M_PI);
       cairo_fill(dc->cr);
     
     }else if(tv->flags & VERTEX_FLAG_BLUE) {
@@ -352,7 +358,7 @@ toporouter_draw_vertex(gpointer item, gpointer data)
       cairo_arc(dc->cr, 
           tv->v.p.x * dc->s + MARGIN, 
           tv->v.p.y * dc->s + MARGIN, 
-          500. * dc->s, 0, 2 * M_PI);
+          MIL_TO_COORD (5.) * dc->s, 0, 2 * M_PI);
       cairo_fill(dc->cr);
 
 
@@ -404,7 +410,7 @@ toporouter_draw_vertex(gpointer item, gpointer data)
             cairo_arc(dc->cr, 
                 tv->v.p.x * dc->s + MARGIN, 
                 tv->v.p.y * dc->s + MARGIN, 
-                400. * dc->s, 0, 2 * M_PI);
+                MIL_TO_COORD (4.) * dc->s, 0, 2 * M_PI);
             cairo_fill(dc->cr);
 
             break;
@@ -418,14 +424,14 @@ toporouter_draw_vertex(gpointer item, gpointer data)
         cairo_arc(dc->cr, 
             tv->v.p.x * dc->s + MARGIN, 
             tv->v.p.y * dc->s + MARGIN, 
-            500. * dc->s, 0, 2 * M_PI);
+            MIL_TO_COORD (5.) * dc->s, 0, 2 * M_PI);
         cairo_fill(dc->cr);
       }else if(tv->flags & VERTEX_FLAG_RED) {
         cairo_set_source_rgba(dc->cr, 1., 0., 0., 0.8f);
         cairo_arc(dc->cr, 
             tv->v.p.x * dc->s + MARGIN, 
             tv->v.p.y * dc->s + MARGIN, 
-            500. * dc->s, 0, 2 * M_PI);
+            MIL_TO_COORD (5.) * dc->s, 0, 2 * M_PI);
         cairo_fill(dc->cr);
 
       }else if(tv->flags & VERTEX_FLAG_GREEN) {
@@ -433,7 +439,7 @@ toporouter_draw_vertex(gpointer item, gpointer data)
         cairo_arc(dc->cr, 
             tv->v.p.x * dc->s + MARGIN, 
             tv->v.p.y * dc->s + MARGIN, 
-            500. * dc->s, 0, 2 * M_PI);
+            MIL_TO_COORD (5.) * dc->s, 0, 2 * M_PI);
         cairo_fill(dc->cr);
       }
 
@@ -697,73 +703,20 @@ vertex_net_keepaway(toporouter_vertex_t *v)
   if(!box || !box->cluster) return Settings.Keepaway;
   return cluster_keepaway(box->cluster);
 }
-/*
-void
-print_trace (void)
-{
-  void *array[10];
-  size_t size;
-  char **strings;
-  size_t i;
-
-  size = backtrace (array, 10);
-  strings = backtrace_symbols (array, size);
-
-  printf ("Obtained %zd stack frames.\n", size);
-
-  for (i = 0; i < size; i++)
-    printf ("%s\n", strings[i]);
 
-  free (strings);
-}
-*/
 /* fills in x and y with coordinates of point from a towards b of distance d */
-void
-point_from_point_to_point(toporouter_vertex_t *a, toporouter_vertex_t *b, gdouble d, gdouble *x, gdouble *y)
-{
-  gdouble dx = vx(b) - vx(a);
-  gdouble dy = vy(b) - vy(a);
-  gdouble theta = atan(fabs(dy/dx));
-
-//#ifdef DEBUG_EXPORT  
-  if(!finite(theta)) {
-//    printf("!finte(theta): a = %f,%f b = %f,%f d = %f\n", vx(a), vy(a), vx(b), vy(b), d);
-//    print_trace();
-    //TODO: this shouldn't happen, fix the hack
-    *x = vx(a);
-    *y = vy(a);
-    return;
-  }
-//#endif
-
-  g_assert(finite(theta));
-
-  *x = vx(a); *y = vy(a);
-
-  if( dx >= 0. ) {
-
-    if( dy >= 0. ) {
-      *x += d * cos(theta);
-      *y += d * sin(theta);
-    }else{
-      *x += d * cos(theta);
-      *y -= d * sin(theta);
-    }
-
-  }else{
-    
-    if( dy >= 0. ) {
-      *x -= d * cos(theta);
-      *y += d * sin(theta);
-    }else{
-      *x -= d * cos(theta);
-      *y -= d * sin(theta);
-    }
+static void
+point_from_point_to_point (toporouter_vertex_t *a,
+                           toporouter_vertex_t *b,
+                           double d,
+                           double *x, double *y)
+{
+  double theta = atan2 (vy(b) - vy(a), vx(b) - vx(a));
 
-  }
+  *x = vx(a) + d * cos (theta);
+  *y = vy(a) + d * sin (theta);
 }
 
-
 static inline gint
 coord_wind(gdouble ax, gdouble ay, gdouble bx, gdouble by, gdouble cx, gdouble cy) 
 {
@@ -799,129 +752,31 @@ tvertex_wind(toporouter_vertex_t  *a, toporouter_vertex_t  *b, toporouter_vertex
   return point_wind(GTS_POINT(a), GTS_POINT(b), GTS_POINT(c));
 }
 
-int 
-sloppy_point_wind(GtsPoint *a, GtsPoint *b, GtsPoint *c) 
-{
-  gdouble rval, dx1, dx2, dy1, dy2;
-  dx1 = b->x - a->x; dy1 = b->y - a->y;
-  dx2 = c->x - b->x; dy2 = c->y - b->y;
-  rval = (dx1*dy2)-(dy1*dx2);
-  return (rval > 10.) ? 1 : ((rval < -10.) ? -1 : 0);
-}
-
-static inline int
-sloppy_vertex_wind(GtsVertex *a, GtsVertex *b, GtsVertex *c) 
-{
-  return point_wind(GTS_POINT(a), GTS_POINT(b), GTS_POINT(c));
-}
-
-/* moves vertex v d units in the direction of vertex p */
-void
-coord_move_towards_coord_values(gdouble ax, gdouble ay, gdouble px, gdouble py, gdouble d, gdouble *x, gdouble *y) 
-{
-  gdouble dx = px - ax;
-  gdouble dy = py - ay;
-  gdouble theta = atan(fabs(dy/dx));
-
-
-  if(!finite(theta)) {
-    printf("!finite(theta) a = %f,%f p = %f,%f d = %f\n", 
-        ax, ay, px, py, d);
-
-  }
-
-  g_assert(finite(theta));
-
-  if( dx >= 0. ) {
-
-    if( dy >= 0. ) {
-      *x = ax + (d * cos(theta));
-      *y = ay + (d * sin(theta));
-    }else{
-      *x = ax + (d * cos(theta));
-      *y = ay - (d * sin(theta));
-    }
-
-  }else{
-    
-    if( dy >= 0. ) {
-      *x = ax - (d * cos(theta));
-      *y = ay + (d * sin(theta));
-    }else{
-      *x = ax - (d * cos(theta));
-      *y = ay - (d * sin(theta));
-    }
-
-  }
-
-}
-
 /* moves vertex v d units in the direction of vertex p */
-void
-vertex_move_towards_point_values(GtsVertex *v, gdouble px, gdouble py, gdouble d, gdouble *x, gdouble *y) 
+static void
+coord_move_towards_coord_values (double ax, double ay,
+                                 double px, double py,
+                                 double d,
+                                 double *x, double *y)
 {
-  gdouble dx = px - GTS_POINT(v)->x;
-  gdouble dy = py - GTS_POINT(v)->y;
-  gdouble theta = atan(fabs(dy/dx));
-
-  g_assert(finite(theta));
-
-  if( dx >= 0. ) {
-
-    if( dy >= 0. ) {
-      *x = GTS_POINT(v)->x + (d * cos(theta));
-      *y = GTS_POINT(v)->y + (d * sin(theta));
-    }else{
-      *x = GTS_POINT(v)->x + (d * cos(theta));
-      *y = GTS_POINT(v)->y - (d * sin(theta));
-    }
-
-  }else{
-    
-    if( dy >= 0. ) {
-      *x = GTS_POINT(v)->x - (d * cos(theta));
-      *y = GTS_POINT(v)->y + (d * sin(theta));
-    }else{
-      *x = GTS_POINT(v)->x - (d * cos(theta));
-      *y = GTS_POINT(v)->y - (d * sin(theta));
-    }
-
-  }
+  double theta = atan2 (py - ay, px - ax);
 
+  *x = ax + d * cos (theta);
+  *y = ay + d * sin (theta);
 }
 
 /* moves vertex v d units in the direction of vertex p */
-void
-vertex_move_towards_vertex_values(GtsVertex *v, GtsVertex *p, gdouble d, gdouble *x, gdouble *y) 
+static void
+vertex_move_towards_vertex_values (GtsVertex *v,
+                                   GtsVertex *p,
+                                   double d,
+                                   double *x, double *y)
 {
-  gdouble dx = GTS_POINT(p)->x - GTS_POINT(v)->x;
-  gdouble dy = GTS_POINT(p)->y - GTS_POINT(v)->y;
-  gdouble theta = atan(fabs(dy/dx));
-
-  g_assert(finite(theta));
-
-  if( dx >= 0. ) {
-
-    if( dy >= 0. ) {
-      *x = GTS_POINT(v)->x + (d * cos(theta));
-      *y = GTS_POINT(v)->y + (d * sin(theta));
-    }else{
-      *x = GTS_POINT(v)->x + (d * cos(theta));
-      *y = GTS_POINT(v)->y - (d * sin(theta));
-    }
-
-  }else{
-    
-    if( dy >= 0. ) {
-      *x = GTS_POINT(v)->x - (d * cos(theta));
-      *y = GTS_POINT(v)->y + (d * sin(theta));
-    }else{
-      *x = GTS_POINT(v)->x - (d * cos(theta));
-      *y = GTS_POINT(v)->y - (d * sin(theta));
-    }
-
-  }
+  double theta = atan2 (GTS_POINT(p)->y - GTS_POINT(v)->y,
+                        GTS_POINT(p)->x - GTS_POINT(v)->x);
 
+  *x = GTS_POINT(v)->x + d * cos (theta);
+  *y = GTS_POINT(v)->y + d * sin (theta);
 }
 
 #define tv_on_layer(v,l) (l == TOPOROUTER_BBOX(TOPOROUTER_VERTEX(v)->boxes->data)->layer)
@@ -1029,7 +884,7 @@ toporouter_draw_cluster(toporouter_t *r, drawing_context_t *dc, toporouter_clust
 
 //  if(box->point && vz(box->point) == layer) {
 //    cairo_set_source_rgba(dc->cr, red, green, blue, 0.8f);
-//    cairo_arc(dc->cr, vx(box->point) * dc->s + MARGIN, vy(box->point) * dc->s + MARGIN, 500. * dc->s, 0, 2 * M_PI);
+//    cairo_arc(dc->cr, vx(box->point) * dc->s + MARGIN, vy(box->point) * dc->s + MARGIN, MIL_TO_COORD (5.) * dc->s, 0, 2 * M_PI);
 //    cairo_fill(dc->cr);
 //  }
 
@@ -1076,7 +931,7 @@ toporouter_draw_surface(toporouter_t *r, GtsSurface *s, char *filename, int w, i
           cairo_arc(dc->cr, 
               tv->v.p.x * dc->s + MARGIN, 
               tv->v.p.y * dc->s + MARGIN, 
-              500. * dc->s, 0, 2 * M_PI);
+              MIL_TO_COORD (5.) * dc->s, 0, 2 * M_PI);
           cairo_fill(dc->cr);
 
         }else if(tv->flags & VERTEX_FLAG_GREEN) {
@@ -1084,7 +939,7 @@ toporouter_draw_surface(toporouter_t *r, GtsSurface *s, char *filename, int w, i
           cairo_arc(dc->cr, 
               tv->v.p.x * dc->s + MARGIN, 
               tv->v.p.y * dc->s + MARGIN, 
-              500. * dc->s, 0, 2 * M_PI);
+              MIL_TO_COORD (5.) * dc->s, 0, 2 * M_PI);
           cairo_fill(dc->cr);
 
         }else if(tv->flags & VERTEX_FLAG_BLUE) {
@@ -1092,7 +947,7 @@ toporouter_draw_surface(toporouter_t *r, GtsSurface *s, char *filename, int w, i
           cairo_arc(dc->cr, 
               tv->v.p.x * dc->s + MARGIN, 
               tv->v.p.y * dc->s + MARGIN, 
-              500. * dc->s, 0, 2 * M_PI);
+              MIL_TO_COORD (5.) * dc->s, 0, 2 * M_PI);
           cairo_fill(dc->cr);
 
         } 
@@ -1102,7 +957,7 @@ toporouter_draw_surface(toporouter_t *r, GtsSurface *s, char *filename, int w, i
           cairo_arc(dc->cr, 
               tv->v.p.x * dc->s + MARGIN, 
               tv->v.p.y * dc->s + MARGIN, 
-              500. * dc->s, 0, 2 * M_PI);
+              MIL_TO_COORD (5.) * dc->s, 0, 2 * M_PI);
           cairo_fill(dc->cr);
 
 
@@ -1191,14 +1046,14 @@ toporouter_draw_surface(toporouter_t *r, GtsSurface *s, char *filename, int w, i
           cairo_arc(dc->cr, 
               tv->v.p.x * dc->s + MARGIN, 
               tv->v.p.y * dc->s + MARGIN, 
-              500. * dc->s, 0, 2 * M_PI);
+              MIL_TO_COORD (5.) * dc->s, 0, 2 * M_PI);
           cairo_fill(dc->cr);
         }else if(tv->flags & VERTEX_FLAG_RED) {
           cairo_set_source_rgba(dc->cr, 1., 0., 0., 0.8f);
           cairo_arc(dc->cr, 
               tv->v.p.x * dc->s + MARGIN, 
               tv->v.p.y * dc->s + MARGIN, 
-              500. * dc->s, 0, 2 * M_PI);
+              MIL_TO_COORD (5.) * dc->s, 0, 2 * M_PI);
           cairo_fill(dc->cr);
 
         }else if(tv->flags & VERTEX_FLAG_GREEN) {
@@ -1206,14 +1061,14 @@ toporouter_draw_surface(toporouter_t *r, GtsSurface *s, char *filename, int w, i
           cairo_arc(dc->cr, 
               tv->v.p.x * dc->s + MARGIN, 
               tv->v.p.y * dc->s + MARGIN, 
-              500. * dc->s, 0, 2 * M_PI);
+              MIL_TO_COORD (5.) * dc->s, 0, 2 * M_PI);
           cairo_fill(dc->cr);
         }else{
           cairo_set_source_rgba(dc->cr, 1., 1., 1., 0.8f);
           cairo_arc(dc->cr, 
               tv->v.p.x * dc->s + MARGIN, 
               tv->v.p.y * dc->s + MARGIN, 
-              500. * dc->s, 0, 2 * M_PI);
+              MIL_TO_COORD (5.) * dc->s, 0, 2 * M_PI);
           cairo_fill(dc->cr);
         }
         i = i->next;
@@ -1251,26 +1106,19 @@ groupcount(void)
 void
 toporouter_free(toporouter_t *r)
 {
-  struct timeval endtime;  
-  int secs, usecs;
+  struct timeval endtime;
+  double time_delta;
 
   int i;
   for(i=0;i<groupcount();i++) {
     toporouter_layer_free(&r->layers[i]);
   }
 
+  gettimeofday (&endtime, NULL);
+  time_delta = endtime.tv_sec - r->starttime.tv_sec +
+               (endtime.tv_usec - r->starttime.tv_usec) / 1000000.;
 
-  gettimeofday(&endtime, NULL);  
-
-  secs = (int)(endtime.tv_sec - r->starttime.tv_sec);
-  usecs = (int)((endtime.tv_usec - r->starttime.tv_usec) / 1000);
-
-  if(usecs < 0) {
-    secs -= 1;
-    usecs += 1000;
-  }
-
-  Message(_("Elapsed time: %d.%02d seconds\n"), secs, usecs);
+  Message(_("Elapsed time: %.2f seconds\n"), time_delta);
   free(r->layers);  
   free(r);
 
@@ -1286,20 +1134,7 @@ wind(toporouter_spoint_t *p1, toporouter_spoint_t *p2, toporouter_spoint_t *p3)
   dx1 = p2->x - p1->x; dy1 = p2->y - p1->y;
   dx2 = p3->x - p2->x; dy2 = p3->y - p2->y;
   rval = (dx1*dy2)-(dy1*dx2);
-  return (rval > 0.0001) ? 1 : ((rval < -0.0001) ? -1 : 0);
-}
-
-/* wind_double:
- * returns 1,0,-1 for counterclockwise, collinear or clockwise, respectively.
- */
-int 
-wind_double(gdouble p1_x, gdouble p1_y, gdouble p2_x, gdouble p2_y, gdouble p3_x, gdouble p3_y) 
-{
-  double rval, dx1, dx2, dy1, dy2;
-  dx1 = p2_x - p1_x; dy1 = p2_y - p1_y;
-  dx2 = p3_x - p2_x; dy2 = p3_y - p2_y;
-  rval = (dx1*dy2)-(dy1*dx2);
-  return (rval > 0.0001) ? 1 : ((rval < -0.0001) ? -1 : 0);
+  return (rval > 0.0001) ? 1 : ((rval < -0.0001) ? -1 : 0); /* XXX: Depends on PCB coordinate scaling */
 }
 
 static inline void
@@ -1321,104 +1156,75 @@ print_toporouter_vertex(toporouter_vertex_t *tv)
 
 /**
  * vertices_on_line:
- * Given vertex a, gradient m, and radius r: 
+ * Given vertex a, gradient m, and radius r:
  *
  * Return vertices on line of a & m at r from a
  */ 
-void
-vertices_on_line(toporouter_spoint_t *a, gdouble m, gdouble r, toporouter_spoint_t *b0, toporouter_spoint_t *b1)
+static void
+vertices_on_line (toporouter_spoint_t *a,
+                  double m,
+                  double r,
+                  toporouter_spoint_t *b0,
+                  toporouter_spoint_t *b1)
 {
 
-  gdouble c, temp;
-  
-  if(m == INFINITY || m == -INFINITY) {
-    b0->y = a->y + r;
-    b1->y = a->y - r;
+  double c, dx;
+
+  if (m == INFINITY || m == -INFINITY) {
 
     b0->x = a->x;
+    b0->y = a->y + r;
+
     b1->x = a->x;
-  
+    b1->y = a->y - r;
+
     return;
   }
 
-  c = a->y - (m * a->x);
+  c = a->y - m * a->x;
+  dx = r / sqrt (1 + pow (m, 2));
 
-  temp = sqrt( pow(r, 2) / ( 1 + pow(m, 2) ) );
-
-  b0->x = a->x + temp;
-  b1->x = a->x - temp;
-  
-  b0->y = b0->x * m + c;
-  b1->y = b1->x * m + c;
+  b0->x = a->x + dx;
+  b0->y = m * b0->x + c;
 
+  b1->x = a->x - dx;
+  b1->y = m * b1->x + c;
 }
 
 /**
- * vertices_on_line:
- * Given vertex a, gradient m, and radius r: 
+ * coords_on_line:
+ * Given coordinates ax, ay, gradient m, and radius r:
  *
- * Return vertices on line of a & m at r from a
- */ 
-void
-coords_on_line(gdouble ax, gdouble ay, gdouble m, gdouble r, gdouble *b0x, gdouble *b0y, gdouble *b1x, gdouble *b1y)
+ * Return coordinates on line of a & m at r from a
+ */
+static void
+coords_on_line (double ax, gdouble ay,
+                double m,
+                double r,
+                double *b0x, double *b0y,
+                double *b1x, double *b1y)
 {
+  double c, dx;
 
-  gdouble c, temp;
-  
-  if(m == INFINITY || m == -INFINITY) {
-    *b0y = ay + r;
-    *b1y = ay - r;
+  if (m == INFINITY || m == -INFINITY) {
 
     *b0x = ax;
-    *b1x = ax;
-  
-    return;
-  }
-
-  c = ay - (m * ax);
-
-  temp = sqrt( pow(r, 2) / ( 1 + pow(m, 2) ) );
-
-  *b0x = ax + temp;
-  *b1x = ax - temp;
-  
-  *b0y = *b0x * m + c;
-  *b1y = *b1x * m + c;
-
-}
-
-/**
- * vertices_on_line:
- * Given vertex a, gradient m, and radius r: 
- *
- * Return vertices on line of a & m at r from a
- */ 
-void
-points_on_line(GtsPoint *a, gdouble m, gdouble r, GtsPoint *b0, GtsPoint *b1)
-{
+    *b0y = ay + r;
 
-  gdouble c, temp;
-  
-  if(m == INFINITY || m == -INFINITY) {
-    b0->y = a->y + r;
-    b1->y = a->y - r;
+    *b1x = ax;
+    *b1y = ay - r;
 
-    b0->x = a->x;
-    b1->x = a->x;
-  
     return;
   }
 
-  c = a->y - (m * a->x);
-
-  temp = sqrt( pow(r, 2) / ( 1 + pow(m, 2) ) );
+  c = ay - m * ax;
+  dx = r / sqrt (1 + pow (m, 2));
 
-  b0->x = a->x + temp;
-  b1->x = a->x - temp;
-  
-  b0->y = b0->x * m + c;
-  b1->y = b1->x * m + c;
+  *b0x = ax + dx;
+  *b0y = m * *b0x + c;
 
+  *b1x = ax - dx;
+  *b1y = m * *b1x + c;
 }
 
 /*
@@ -1505,34 +1311,41 @@ vertex_outside_segment(toporouter_spoint_t *a, toporouter_spoint_t *b, gdouble r
  * AB and CD must share a point interior to both segments.
  * returns TRUE if AB properly intersects CD.
  */
-gint
-coord_intersect_prop(gdouble ax, gdouble ay, gdouble bx, gdouble by, gdouble cx, gdouble cy, gdouble dx, gdouble dy)
+static bool
+coord_intersect_prop (double ax, double ay,
+                      double bx, double by,
+                      double cx, double cy,
+                      double dx, double dy)
 {
-  gint wind_abc = coord_wind(ax, ay, bx, by, cx, cy);
-  gint wind_abd = coord_wind(ax, ay, bx, by, dx, dy);
-  gint wind_cda = coord_wind(cx, cy, dx, dy, ax, ay);
-  gint wind_cdb = coord_wind(cx, cy, dx, dy, bx, by);
+  int wind_abc = coord_wind (ax, ay, bx, by, cx, cy);
+  int wind_abd = coord_wind (ax, ay, bx, by, dx, dy);
+  int wind_cda = coord_wind (cx, cy, dx, dy, ax, ay);
+  int wind_cdb = coord_wind (cx, cy, dx, dy, bx, by);
 
-  if( !wind_abc || !wind_abd || !wind_cda || !wind_cdb ) return 0;
+  /* If any of the line end-points are colinear with the other line, return false */
+  if (wind_abc == 0 || wind_abd == 0 || wind_cda == 0 || wind_cdb == 0)
+    return false;
 
-  return ( wind_abc ^ wind_abd ) && ( wind_cda ^ wind_cdb );
+  return (wind_abc != wind_abd) && (wind_cda != wind_cdb);
 }
 
 /* proper intersection:
  * AB and CD must share a point interior to both segments.
  * returns TRUE if AB properly intersects CD.
  */
-int
-point_intersect_prop(GtsPoint *a, GtsPoint *b, GtsPoint *c, GtsPoint *d) 
+static bool
+point_intersect_prop (GtsPoint *a, GtsPoint *b, GtsPoint *c, GtsPoint *d)
 {
+  int wind_abc = point_wind (a, b, c);
+  int wind_abd = point_wind (a, b, d);
+  int wind_cda = point_wind (c, d, a);
+  int wind_cdb = point_wind (c, d, b);
 
-  if( point_wind(a, b, c) == 0 || 
-      point_wind(a, b, d) == 0 ||
-      point_wind(c, d, a) == 0 || 
-      point_wind(c, d, b) == 0 ) return 0;
+  /* If any of the line end-points are colinear with the other line, return false */
+  if (wind_abc == 0 || wind_abd == 0 || wind_cda == 0 || wind_cdb == 0)
+    return false;
 
-  return ( point_wind(a, b, c) ^ point_wind(a, b, d) ) && 
-    ( point_wind(c, d, a) ^ point_wind(c, d, b) );
+  return (wind_abc != wind_abd) && (wind_cda != wind_cdb);
 }
 
 static inline int
@@ -1541,23 +1354,6 @@ vertex_intersect_prop(GtsVertex *a, GtsVertex *b, GtsVertex *c, GtsVertex *d)
   return point_intersect_prop(GTS_POINT(a), GTS_POINT(b), GTS_POINT(c), GTS_POINT(d));
 }
 
-static inline int
-tvertex_intersect_prop(toporouter_vertex_t *a, toporouter_vertex_t *b, toporouter_vertex_t *c, toporouter_vertex_t *d) 
-{
-  return point_intersect_prop(GTS_POINT(a), GTS_POINT(b), GTS_POINT(c), GTS_POINT(d));
-}
-/*
-static inline int
-tvertex_intersect(toporouter_vertex_t *a, toporouter_vertex_t *b, toporouter_vertex_t *c, toporouter_vertex_t *d) 
-{
-  if( !point_wind(GTS_POINT(a), GTS_POINT(d), GTS_POINT(b)) || !point_wind(GTS_POINT(a), GTS_POINT(c), GTS_POINT(b)) ) return 1;
-
-  return 
-    ( point_wind(GTS_POINT(a), GTS_POINT(b), GTS_POINT(c)) ^ point_wind(GTS_POINT(a), GTS_POINT(b), GTS_POINT(d)) ) && 
-    ( point_wind(GTS_POINT(c), GTS_POINT(d), GTS_POINT(a)) ^ point_wind(GTS_POINT(c), GTS_POINT(d), GTS_POINT(b)) );
-}
-*/
-
 /* intersection vertex:
  * AB and CD must share a point interior to both segments.
  * returns vertex at intersection of AB and CD.
@@ -2206,52 +2002,44 @@ read_lines(toporouter_t *r, toporouter_layer_t *l, LayerType *layer, int ln)
   return 0;
 }
 
-void
-create_board_edge(gdouble x0, gdouble y0, gdouble x1, gdouble y1, gdouble max, gint layer, GList **vlist)
+static void
+create_board_edge (double x0, double y0,
+                   double x1, double y1,
+                   int layer,
+                   GList **vlist)
 {
   GtsVertexClass *vertex_class = GTS_VERTEX_CLASS (toporouter_vertex_class ());
-  gdouble d = sqrt(pow(x0-x1,2) + pow(y0-y1,2));
-  guint n = d / max, count = 1;
-  gdouble inc = n ? d / n : d;
-  gdouble x = x0, y = y0;
+  double edge_length = sqrt (pow (x0 - x1, 2) + pow (y0 - y1, 2));
+  unsigned int vertices_per_edge = MIN (1, edge_length / BOARD_EDGE_RESOLUTION);
+  unsigned int count;
+  double inc = edge_length / vertices_per_edge;
+  double x = x0, y = y0;
 
-  *vlist = g_list_prepend(*vlist, gts_vertex_new (vertex_class, x0, y0, layer));
- 
-  while(count < n) {
-    coord_move_towards_coord_values(x0, y0, x1, y1, inc, &x, &y);
-    *vlist = g_list_prepend(*vlist, gts_vertex_new (vertex_class, x, y, layer));
+  *vlist = g_list_prepend (*vlist, gts_vertex_new (vertex_class, x, y, layer));
 
-    x0 = x; y0 = y;
-    count++;
+  for (count = 1; count < vertices_per_edge; count ++) {
+    coord_move_towards_coord_values (x, y, x1, y1, inc, &x, &y);
+    *vlist = g_list_prepend (*vlist, gts_vertex_new (vertex_class, x, y, layer));
   }
-
 }
 
 
-int
-read_board_constraints(toporouter_t *r, toporouter_layer_t *l, int layer) 
+static void
+read_board_constraints (toporouter_t *r, toporouter_layer_t *l, int layer)
 {
-//  GtsVertexClass *vertex_class = GTS_VERTEX_CLASS (toporouter_vertex_class ());
   GList *vlist = NULL;
-  toporouter_bbox_t *bbox = NULL;
-  
-  /* Add points for corners of board, and constrain those edges */
-//  vlist = g_list_prepend(NULL, gts_vertex_new (vertex_class, 0., 0., layer));
-//  vlist = g_list_prepend(vlist, gts_vertex_new (vertex_class, PCB->MaxWidth, 0., layer));
-//  vlist = g_list_prepend(vlist, gts_vertex_new (vertex_class, PCB->MaxWidth, PCB->MaxHeight, layer));
-//  vlist = g_list_prepend(vlist, gts_vertex_new (vertex_class, 0., PCB->MaxHeight, layer));
-
-  create_board_edge(0., 0., PCB->MaxWidth, 0., 10000., layer, &vlist);
-  create_board_edge(PCB->MaxWidth, 0., PCB->MaxWidth, PCB->MaxHeight, 10000., layer, &vlist);
-  create_board_edge(PCB->MaxWidth, PCB->MaxHeight, 0., PCB->MaxHeight, 10000., layer, &vlist);
-  create_board_edge(0., PCB->MaxHeight, 0., 0., 10000., layer, &vlist);
-  
-  bbox = toporouter_bbox_create(layer, vlist, BOARD, NULL);
-  r->bboxes = g_slist_prepend(r->bboxes, bbox);
-  insert_constraints_from_list(r, l, vlist, bbox);
-  g_list_free(vlist);
+  toporouter_bbox_t *bbox;
 
-  return 0;
+  /* Create points for the board edges and constrain those edges */
+  create_board_edge (0.,            0.,             PCB->MaxWidth, 0.,             layer, &vlist);
+  create_board_edge (PCB->MaxWidth, 0.,             PCB->MaxWidth, PCB->MaxHeight, layer, &vlist);
+  create_board_edge (PCB->MaxWidth, PCB->MaxHeight, 0.,            PCB->MaxHeight, layer, &vlist);
+  create_board_edge (0.,            PCB->MaxHeight, 0.,            0.,             layer, &vlist);
+
+  bbox = toporouter_bbox_create (layer, vlist, BOARD, NULL);
+  r->bboxes = g_slist_prepend (r->bboxes, bbox);
+  insert_constraints_from_list (r, l, vlist, bbox);
+  g_list_free (vlist);
 }
 
 gdouble 
@@ -2638,51 +2426,12 @@ visited_cmp(gconstpointer a, gconstpointer b)
   return 0;
 }
 
-gdouble 
-coord_xangle(gdouble ax, gdouble ay, gdouble bx, gdouble by) 
+static double
+coord_angle (double ax, double ay, double bx, double by)
 {
-  gdouble dx, dy, theta;
-
-  dx = fabs(ax - bx);
-  dy = fabs(ay - by);
-  
-  if(dx < EPSILON) {
-    theta = M_PI / 2.;
-  } else theta = atan(dy/dx);
-
-  if(by <= ay) {
-    if(bx < ax) theta = M_PI - theta;
-  }else{
-    if(bx < ax) theta += M_PI;
-    else theta = (2 * M_PI) - theta;
-  }
-  
-  return theta;  
+  return atan2 (by - ay, bx - ax);
 }
 
-gdouble 
-point_xangle(GtsPoint *a, GtsPoint *b) 
-{
-  gdouble dx, dy, theta;
-
-  dx = fabs(a->x - b->x);
-  dy = fabs(a->y - b->y);
-  
-  if(dx < EPSILON) {
-    theta = M_PI / 2.;
-  } else theta = atan(dy/dx);
-
-  if(b->y >= a->y) {
-    if(b->x < a->x) theta = M_PI - theta;
-  }else{
-    if(b->x < a->x) theta += M_PI;
-    else theta = (2 * M_PI) - theta;
-  }
-
-  return theta;  
-}
-
-
 GList *
 cluster_vertices(toporouter_t *r, toporouter_cluster_t *c)
 {
@@ -2794,7 +2543,6 @@ void
 import_clusters(toporouter_t *r)
 {
   NetListListType nets;
-  ResetConnections (false);
   nets = CollectSubnets(false);
   NETLIST_LOOP(&nets);
   {
@@ -3090,21 +2838,6 @@ angle_span(gdouble a1, gdouble a2)
 }
 
 gdouble
-region_span(toporouter_vertex_region_t *region) 
-{
-  gdouble a1,a2; 
-
-  g_assert(region->v1 != NULL);
-  g_assert(region->v2 != NULL);
-  g_assert(region->origin != NULL);
-
-  a1 = point_xangle(GTS_POINT(region->origin), GTS_POINT(region->v1));
-  a2 = point_xangle(GTS_POINT(region->origin), GTS_POINT(region->v2));
-
-  return angle_span(a1, a2);
-}
-
-gdouble
 edge_capacity(toporouter_edge_t *e)
 {
   return gts_point_distance(GTS_POINT(edge_v1(e)), GTS_POINT(edge_v2(e)));
@@ -5197,70 +4930,15 @@ routing_return:
 
 /* moves vertex v d units in the direction of vertex p */
 void
-vertex_move_towards_point(GtsVertex *v, gdouble px, gdouble py, gdouble d) 
+vertex_move_towards_vertex (GtsVertex *v,
+                            GtsVertex *p,
+                            double d)
 {
-  gdouble dx = px - GTS_POINT(v)->x;
-  gdouble dy = py - GTS_POINT(v)->y;
-  gdouble theta = atan(fabs(dy/dx));
-
-  g_assert(finite(theta));
-
-  if( dx >= 0. ) {
-
-    if( dy >= 0. ) {
-      GTS_POINT(v)->x += d * cos(theta);
-      GTS_POINT(v)->y += d * sin(theta);
-    }else{
-      GTS_POINT(v)->x += d * cos(theta);
-      GTS_POINT(v)->y -= d * sin(theta);
-    }
-
-  }else{
-    
-    if( dy >= 0. ) {
-      GTS_POINT(v)->x -= d * cos(theta);
-      GTS_POINT(v)->y += d * sin(theta);
-    }else{
-      GTS_POINT(v)->x -= d * cos(theta);
-      GTS_POINT(v)->y -= d * sin(theta);
-    }
-
-  }
-
-}
-
-/* moves vertex v d units in the direction of vertex p */
-void
-vertex_move_towards_vertex(GtsVertex *v, GtsVertex *p, gdouble d) 
-{
-  gdouble dx = GTS_POINT(p)->x - GTS_POINT(v)->x;
-  gdouble dy = GTS_POINT(p)->y - GTS_POINT(v)->y;
-  gdouble theta = atan(fabs(dy/dx));
-
-  g_assert(finite(theta));
-
-  if( dx >= 0. ) {
-
-    if( dy >= 0. ) {
-      GTS_POINT(v)->x += d * cos(theta);
-      GTS_POINT(v)->y += d * sin(theta);
-    }else{
-      GTS_POINT(v)->x += d * cos(theta);
-      GTS_POINT(v)->y -= d * sin(theta);
-    }
-
-  }else{
-    
-    if( dy >= 0. ) {
-      GTS_POINT(v)->x -= d * cos(theta);
-      GTS_POINT(v)->y += d * sin(theta);
-    }else{
-      GTS_POINT(v)->x -= d * cos(theta);
-      GTS_POINT(v)->y -= d * sin(theta);
-    }
-
-  }
+  double theta = atan2 (GTS_POINT(p)->y - GTS_POINT(v)->y,
+                        GTS_POINT(p)->x - GTS_POINT(v)->x);
 
+  GTS_POINT(v)->x += d * cos (theta);
+  GTS_POINT(v)->y += d * sin (theta);
 }
 
 
@@ -5489,14 +5167,14 @@ gdouble
 export_pcb_drawline(guint layer, guint x0, guint y0, guint x1, guint y1, guint thickness, guint keepaway) 
 {
   gdouble d = 0.;
-  LineTypePtr line;
+  LineType *line;
   line = CreateDrawnLineOnLayer( LAYER_PTR(layer), x0, y0, x1, y1, 
       thickness, keepaway, 
       MakeFlags (AUTOFLAG | (TEST_FLAG (CLEARNEWFLAG, PCB) ? CLEARLINEFLAG : 0)));
 
   if(line) {
     AddObjectToCreateUndoList (LINE_TYPE, LAYER_PTR(layer), line, line);
-    d = coord_distance((double)x0, (double)y0, (double)x1, (double)y1) / 100.;
+    d = coord_distance((double)x0, (double)y0, (double)x1, (double)y1);
   }
   return d;
 }
@@ -5519,12 +5197,16 @@ export_pcb_drawarc(guint layer, toporouter_arc_t *a, guint thickness, guint keep
 {
   gdouble sa, da, theta;
   gdouble d = 0.;
-  ArcTypePtr arc;
+  ArcType *arc;
   gint wind;
 
   wind = coord_wind(a->x0, a->y0, a->x1, a->y1, vx(a->centre), vy(a->centre));
 
-  sa = coord_xangle(a->x0, a->y0, vx(a->centre), vy(a->centre)) * 180. / M_PI;
+  /* NB: PCB's arcs have a funny coorindate system, with 0 degrees as the -ve X axis (left),
+   *     continuing clockwise, with +90 degrees being along the +ve Y axis (bottom). Because
+   *     Y+ points down, our internal angles increase clockwise from the +ve X axis.
+   */
+  sa = (M_PI - coord_angle (vx (a->centre), vy (a->centre), a->x0, a->y0)) * 180. / M_PI;
 
   theta = arc_angle(a);
 
@@ -5543,7 +5225,7 @@ export_pcb_drawarc(guint layer, toporouter_arc_t *a, guint thickness, guint keep
 
   if(arc) {
     AddObjectToCreateUndoList( ARC_TYPE, LAYER_PTR(layer), arc, arc);
-    d = a->r * theta / 100.;
+    d = a->r * theta;
   }
   
   return d;
@@ -6025,8 +5707,8 @@ check_non_intersect_vertex(gdouble x0, gdouble y0, gdouble x1, gdouble y1, topor
   }else{
     m = cartesian_gradient(x0, y0, x1, y1);
   }
-  
-  coords_on_line(vx(arcv), vy(arcv), m, 100., &tx0, &ty0, &tx1, &ty1);
+
+  coords_on_line(vx(arcv), vy(arcv), m, MIL_TO_COORD (1.), &tx0, &ty0, &tx1, &ty1);
 
   wind1 = coord_wind(tx0, ty0, tx1, ty1, line_int_x, line_int_y);
   wind2 = coord_wind(tx0, ty0, tx1, ty1, vx(opv), vy(opv)); 
@@ -6779,8 +6461,11 @@ oproute_rubberband(toporouter_t *r, GList *path)
   oproute_path_speccut(oproute);
 
 #ifdef DEBUG_RUBBERBAND
-  if(!strcmp(oproute->netlist, "  VCC3V3") && vx(oproute->term1) == 95700. && vy(oproute->term1) == 70800. &&
-    vx(oproute->term2) == 196700. && vy(oproute->term2) == 67300.)
+  if(strcmp(oproute->netlist, "  VCC3V3" == 0) &&
+     vx(oproute->term1) == MIL_TO_COORD (957.) &&
+     vy(oproute->term1) == MIL_TO_COORD (708.) &&
+     vx(oproute->term2) == MIL_TO_COORD (1967.) &&
+     vy(oproute->term2) == MIL_TO_COORD (673.))
   {
 //    printf("OPROUTE %s - %f,%f %f,%f\n", oproute->netlist, vx(oproute->term1), vy(oproute->term1), vx(oproute->term2), vy(oproute->term2));
 //    print_path(path);
@@ -6815,9 +6500,13 @@ toporouter_export(toporouter_t *r)
     i = i->next;
   }
 
-  Message(_("Reticulating splines... successful\n\n"));
-  Message(_("Wiring cost: %f inches\n"), r->wiring_score / 1000.);
-  printf("Wiring cost: %f inches\n", r->wiring_score / 1000.);
+  Message (_("Reticulating splines... successful\n\n"));
+  /* NB: We could use the %$mS specifier to print these distances, but we would
+   *     have to cast to Coord, which might overflow for complex routing when
+   *     PCB is built with Coord as a 32-bit integer.
+   */
+  Message (_("Wiring cost: %f inches\n"), COORD_TO_INCH (r->wiring_score));
+  printf (_("Wiring cost: %f inches\n"), COORD_TO_INCH (r->wiring_score));
 
   g_list_free(oproutes);
 
@@ -7751,7 +7440,7 @@ detour_router(toporouter_t *r)
 //        vx(curroute->mergebox1->point), vy(curroute->mergebox1->point),
 //        vx(curroute->mergebox2->point), vy(curroute->mergebox2->point));
 
-      if(curroute->score - curroute->detourscore > 1000.) {
+      if(curroute->score - curroute->detourscore > ROAR_DETOUR_THRESHOLD) {
         roar_detour_route(r, curroute);
       }else break;
 
@@ -7798,7 +7487,7 @@ hybrid_router(toporouter_t *r)
   failcount = rubix_router(r, failcount);
 
   Message(_("RUBIX router: %d nets remaining\n"), failcount);
-  printf("RUBIX router: %d nets remaining\n", failcount);
+  printf(_("RUBIX router: %d nets remaining\n"), failcount);
 
   r->flags |= TOPOROUTER_FLAG_GOFAR;
   
@@ -7826,6 +7515,7 @@ parse_arguments(toporouter_t *r, int argc, char **argv)
   int i, tempint;
   for(i=0;i<argc;i++) {
     if(sscanf(argv[i], "viacost=%d", &tempint)) {
+      /* XXX: We should be using PCB's generic value with unit parsing here */
       r->viacost = (double)tempint;
     }else if(sscanf(argv[i], "l%d", &tempint)) {
       gdouble *layer = (gdouble *)malloc(sizeof(gdouble));
@@ -7861,10 +7551,7 @@ toporouter_new(void)
 
   r->layers = NULL;
   r->flags = 0;
-  r->viamax     = 3;
-  r->viacost    = 10000.;
-  r->stublength = 300.;
-  r->serpintine_half_amplitude = 1500.;
+  r->viacost = VIA_COST_AS_DISTANCE;
 
   r->wiring_score = 0.;
 
@@ -7886,7 +7573,6 @@ toporouter_new(void)
   Message(_("Topological Autorouter\n"));
   Message(_("Started %s"),asctime(localtime(&ltime)));  
   Message(_("-------------------------------------\n"));
-  Message(_("Copyright 2009 Anthony Blake (tonyb33 at gmail.com)\n\n"));
   return r;
 }
 
@@ -7978,8 +7664,8 @@ escape (int argc, char **argv, Coord x, Coord y)
   ALLPAD_LOOP(PCB->Data);
   {
     if( TEST_FLAG(SELECTEDFLAG, pad) ) {
-      PinTypePtr via;
-      LineTypePtr line;
+      PinType *via;
+      LineType *line;
 
       PadType *pad0 = element->Pad->data;
       PadType *pad1 = g_list_next (element->Pad)->data;
@@ -8061,8 +7747,10 @@ escape (int argc, char **argv, Coord x, Coord y)
 }
 
 static HID_Action toporouter_action_list[] = {
-  {"Escape", "Select a set of pads", escape, "Pad escape", "Escape()"},
-  {"Toporouter", "Select net(s)", toporouter, "Topological autorouter", "Toporouter()"}
+  {"Escape", N_("Select a set of pads"), escape,
+    N_("Pad escape"), N_("Escape()")},
+  {"Toporouter", N_("Select net(s)"), toporouter,
+    N_("Topological autorouter"), N_("Toporouter()")}
 };
 
 REGISTER_ACTIONS (toporouter_action_list)
diff --git a/src/toporouter.h b/src/toporouter.h
index fcd0053..f014332 100644
--- a/src/toporouter.h
+++ b/src/toporouter.h
@@ -1,9 +1,10 @@
 /*
  *                            COPYRIGHT
  *
- *  Topological Autorouter for 
+ *  Topological Autorouter for
  *  PCB, interactive printed circuit board design
  *  Copyright (C) 2009 Anthony Blake
+ *  Copyright (C) 2009-2011 PCB Contributors (see ChangeLog for details)
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -418,10 +419,7 @@ struct _toporouter_t {
   GList *destboxes, *consumeddestboxes;
 
   /* settings: */
-  guint viamax;
   gdouble viacost;
-  gdouble stublength;
-  gdouble serpintine_half_amplitude;
 
   gdouble wiring_score;
 
diff --git a/src/undo.c b/src/undo.c
index 17bebb9..ca41c74 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -74,8 +72,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 static bool between_increment_and_restore = false;
 static bool added_undo_between_increment_and_restore = false;
 
@@ -85,14 +81,12 @@ static bool added_undo_between_increment_and_restore = false;
 typedef struct			/* information about a change command */
 {
   char *Name;
-}
-ChangeNameType, *ChangeNameTypePtr;
+} ChangeNameType;
 
 typedef struct			/* information about a move command */
 {
   Coord DX, DY;		/* movement vector */
-}
-MoveType, *MoveTypePtr;
+} MoveType;
 
 typedef struct			/* information about removed polygon points */
 {
@@ -100,42 +94,36 @@ typedef struct			/* information about removed polygon points */
   int ID;
   Cardinal Index;		/* index in a polygons array of points */
   bool last_in_contour;		/* Whether the point was the last in its contour */
-}
-RemovedPointType, *RemovedPointTypePtr;
+} RemovedPointType;
 
 typedef struct			/* information about rotation */
 {
   Coord CenterX, CenterY;	/* center of rotation */
   Cardinal Steps;		/* number of steps */
-}
-RotateType, *RotateTypePtr;
+} RotateType;
 
 typedef struct			/* information about moves between layers */
 {
   Cardinal OriginalLayer;	/* the index of the original layer */
-}
-MoveToLayerType, *MoveToLayerTypePtr;
+} MoveToLayerType;
 
 typedef struct			/* information about layer changes */
 {
   int old_index;
   int new_index;
-}
-LayerChangeType, *LayerChangeTypePtr;
+} LayerChangeType;
 
 typedef struct			/* information about poly clear/restore */
 {
   bool Clear;		/* true was clear, false was restore */
-  LayerTypePtr Layer;
-}
-ClearPolyType, *ClearPolyTypePtr;
+  LayerType *Layer;
+} ClearPolyType;
 
 typedef struct			/* information about netlist lib changes */
 {
-  LibraryTypePtr old;
-  LibraryTypePtr lib;
-}
-NetlistChangeType, *NetlistChangeTypePtr;
+  LibraryType *old;
+  LibraryType *lib;
+} NetlistChangeType;
 
 typedef struct			/* holds information about an operation */
 {
@@ -158,14 +146,13 @@ typedef struct			/* holds information about an operation */
     long int CopyID;
   }
   Data;
-}
-UndoListType, *UndoListTypePtr;
+} UndoListType;
 
 /* ---------------------------------------------------------------------------
  * some local variables
  */
-static DataTypePtr RemoveList = NULL;	/* list of removed objects */
-static UndoListTypePtr UndoList = NULL;	/* list of operations */
+static DataType *RemoveList = NULL;	/* list of removed objects */
+static UndoListType *UndoList = NULL;	/* list of operations */
 static int Serial = 1,		/* serial number */
   SavedSerial;
 static size_t UndoN, RedoN,	/* number of entries */
@@ -178,35 +165,35 @@ static bool andDraw = true;
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static UndoListTypePtr GetUndoSlot (int, int, int);
+static UndoListType *GetUndoSlot (int, int, int);
 static void DrawRecoveredObject (int, void *, void *, void *);
-static bool UndoRotate (UndoListTypePtr);
-static bool UndoChangeName (UndoListTypePtr);
-static bool UndoCopyOrCreate (UndoListTypePtr);
-static bool UndoMove (UndoListTypePtr);
-static bool UndoRemove (UndoListTypePtr);
-static bool UndoRemovePoint (UndoListTypePtr);
-static bool UndoInsertPoint (UndoListTypePtr);
-static bool UndoRemoveContour (UndoListTypePtr);
-static bool UndoInsertContour (UndoListTypePtr);
-static bool UndoMoveToLayer (UndoListTypePtr);
-static bool UndoFlag (UndoListTypePtr);
-static bool UndoMirror (UndoListTypePtr);
-static bool UndoChangeSize (UndoListTypePtr);
-static bool UndoChange2ndSize (UndoListTypePtr);
-static bool UndoChangeAngles (UndoListTypePtr);
-static bool UndoChangeClearSize (UndoListTypePtr);
-static bool UndoChangeMaskSize (UndoListTypePtr);
-static bool UndoClearPoly (UndoListTypePtr);
-static int PerformUndo (UndoListTypePtr);
+static bool UndoRotate (UndoListType *);
+static bool UndoChangeName (UndoListType *);
+static bool UndoCopyOrCreate (UndoListType *);
+static bool UndoMove (UndoListType *);
+static bool UndoRemove (UndoListType *);
+static bool UndoRemovePoint (UndoListType *);
+static bool UndoInsertPoint (UndoListType *);
+static bool UndoRemoveContour (UndoListType *);
+static bool UndoInsertContour (UndoListType *);
+static bool UndoMoveToLayer (UndoListType *);
+static bool UndoFlag (UndoListType *);
+static bool UndoMirror (UndoListType *);
+static bool UndoChangeSize (UndoListType *);
+static bool UndoChange2ndSize (UndoListType *);
+static bool UndoChangeAngles (UndoListType *);
+static bool UndoChangeClearSize (UndoListType *);
+static bool UndoChangeMaskSize (UndoListType *);
+static bool UndoClearPoly (UndoListType *);
+static int PerformUndo (UndoListType *);
 
 /* ---------------------------------------------------------------------------
  * adds a command plus some data to the undo list
  */
-static UndoListTypePtr
+static UndoListType *
 GetUndoSlot (int CommandType, int ID, int Kind)
 {
-  UndoListTypePtr ptr;
+  UndoListType *ptr;
   void *ptr1, *ptr2, *ptr3;
   int type;
   static size_t limit = UNDO_WARNING_SIZE;
@@ -224,7 +211,7 @@ GetUndoSlot (int CommandType, int ID, int Kind)
 
       UndoMax += STEP_UNDOLIST;
       size = UndoMax * sizeof (UndoListType);
-      UndoList = (UndoListTypePtr) realloc (UndoList, size);
+      UndoList = (UndoListType *) realloc (UndoList, size);
       memset (&UndoList[UndoN], 0, STEP_REMOVELIST * sizeof (UndoListType));
 
       /* ask user to flush the table because of it's size */
@@ -277,9 +264,9 @@ DrawRecoveredObject (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 {
   if (Type & (LINE_TYPE | TEXT_TYPE | POLYGON_TYPE | ARC_TYPE))
     {
-      LayerTypePtr layer;
+      LayerType *layer;
 
-      layer = LAYER_PTR (GetLayerNumber (RemoveList, (LayerTypePtr) Ptr1));
+      layer = LAYER_PTR (GetLayerNumber (RemoveList, (LayerType *) Ptr1));
       DrawObject (Type, (void *) layer, Ptr2);
     }
   else
@@ -291,7 +278,7 @@ DrawRecoveredObject (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
  * returns true if anything has been recovered
  */
 static bool
-UndoRotate (UndoListTypePtr Entry)
+UndoRotate (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -315,7 +302,7 @@ UndoRotate (UndoListTypePtr Entry)
  * returns true if anything has been recovered
  */
 static bool
-UndoClearPoly (UndoListTypePtr Entry)
+UndoClearPoly (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -339,7 +326,7 @@ UndoClearPoly (UndoListTypePtr Entry)
  * returns true if anything has been recovered
  */
 static bool
-UndoChangeName (UndoListTypePtr Entry)
+UndoChangeName (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -361,7 +348,7 @@ UndoChangeName (UndoListTypePtr Entry)
  * recovers an object from a 2ndSize change operation
  */
 static bool
-UndoChange2ndSize (UndoListTypePtr Entry)
+UndoChange2ndSize (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -372,10 +359,10 @@ UndoChange2ndSize (UndoListTypePtr Entry)
     SearchObjectByID (PCB->Data, &ptr1, &ptr2, &ptr3, Entry->ID, Entry->Kind);
   if (type != NO_TYPE)
     {
-      swap = ((PinTypePtr) ptr2)->DrillingHole;
+      swap = ((PinType *) ptr2)->DrillingHole;
       if (andDraw)
 	EraseObject (type, ptr1, ptr2);
-      ((PinTypePtr) ptr2)->DrillingHole = Entry->Data.Size;
+      ((PinType *) ptr2)->DrillingHole = Entry->Data.Size;
       Entry->Data.Size = swap;
       DrawObject (type, ptr1, ptr2);
       return (true);
@@ -387,7 +374,7 @@ UndoChange2ndSize (UndoListTypePtr Entry)
  * recovers an object from a ChangeAngles change operation
  */
 static bool
-UndoChangeAngles (UndoListTypePtr Entry)
+UndoChangeAngles (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -398,9 +385,9 @@ UndoChangeAngles (UndoListTypePtr Entry)
     SearchObjectByID (PCB->Data, &ptr1, &ptr2, &ptr3, Entry->ID, Entry->Kind);
   if (type == ARC_TYPE)
     {
-      LayerTypePtr Layer = (LayerTypePtr) ptr1;
-      ArcTypePtr a = (ArcTypePtr) ptr2;
-      r_delete_entry (Layer->arc_tree, (BoxTypePtr) a);
+      LayerType *Layer = (LayerType *) ptr1;
+      ArcType *a = (ArcType *) ptr2;
+      r_delete_entry (Layer->arc_tree, (BoxType *) a);
       old_sa = a->StartAngle;
       old_da = a->Delta;
       if (andDraw)
@@ -408,7 +395,7 @@ UndoChangeAngles (UndoListTypePtr Entry)
       a->StartAngle = Entry->Data.Move.DX;
       a->Delta = Entry->Data.Move.DY;
       SetArcBoundingBox (a);
-      r_insert_entry (Layer->arc_tree, (BoxTypePtr) a, 0);
+      r_insert_entry (Layer->arc_tree, (BoxType *) a, 0);
       Entry->Data.Move.DX = old_sa;
       Entry->Data.Move.DY = old_da;;
       DrawObject (type, ptr1, a);
@@ -421,7 +408,7 @@ UndoChangeAngles (UndoListTypePtr Entry)
  * recovers an object from a clearance size change operation
  */
 static bool
-UndoChangeClearSize (UndoListTypePtr Entry)
+UndoChangeClearSize (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -432,11 +419,11 @@ UndoChangeClearSize (UndoListTypePtr Entry)
     SearchObjectByID (PCB->Data, &ptr1, &ptr2, &ptr3, Entry->ID, Entry->Kind);
   if (type != NO_TYPE)
     {
-      swap = ((PinTypePtr) ptr2)->Clearance;
+      swap = ((PinType *) ptr2)->Clearance;
       RestoreToPolygon (PCB->Data, type, ptr1, ptr2);
       if (andDraw)
 	EraseObject (type, ptr1, ptr2);
-      ((PinTypePtr) ptr2)->Clearance = Entry->Data.Size;
+      ((PinType *) ptr2)->Clearance = Entry->Data.Size;
       ClearFromPolygon (PCB->Data, type, ptr1, ptr2);
       Entry->Data.Size = swap;
       if (andDraw)
@@ -450,7 +437,7 @@ UndoChangeClearSize (UndoListTypePtr Entry)
  * recovers an object from a mask size change operation
  */
 static bool
-UndoChangeMaskSize (UndoListTypePtr Entry)
+UndoChangeMaskSize (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -463,13 +450,13 @@ UndoChangeMaskSize (UndoListTypePtr Entry)
     {
       swap =
 	(type ==
-	 PAD_TYPE ? ((PadTypePtr) ptr2)->Mask : ((PinTypePtr) ptr2)->Mask);
+	 PAD_TYPE ? ((PadType *) ptr2)->Mask : ((PinType *) ptr2)->Mask);
       if (andDraw)
 	EraseObject (type, ptr1, ptr2);
       if (type == PAD_TYPE)
-	((PadTypePtr) ptr2)->Mask = Entry->Data.Size;
+	((PadType *) ptr2)->Mask = Entry->Data.Size;
       else
-	((PinTypePtr) ptr2)->Mask = Entry->Data.Size;
+	((PinType *) ptr2)->Mask = Entry->Data.Size;
       Entry->Data.Size = swap;
       if (andDraw)
 	DrawObject (type, ptr1, ptr2);
@@ -483,7 +470,7 @@ UndoChangeMaskSize (UndoListTypePtr Entry)
  * recovers an object from a Size change operation
  */
 static bool
-UndoChangeSize (UndoListTypePtr Entry)
+UndoChangeSize (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -496,11 +483,11 @@ UndoChangeSize (UndoListTypePtr Entry)
     {
       /* Wow! can any object be treated as a pin type for size change?? */
       /* pins, vias, lines, and arcs can. Text can't but it has it's own mechanism */
-      swap = ((PinTypePtr) ptr2)->Thickness;
+      swap = ((PinType *) ptr2)->Thickness;
       RestoreToPolygon (PCB->Data, type, ptr1, ptr2);
       if (andDraw)
 	EraseObject (type, ptr1, ptr2);
-      ((PinTypePtr) ptr2)->Thickness = Entry->Data.Size;
+      ((PinType *) ptr2)->Thickness = Entry->Data.Size;
       Entry->Data.Size = swap;
       ClearFromPolygon (PCB->Data, type, ptr1, ptr2);
       if (andDraw)
@@ -514,7 +501,7 @@ UndoChangeSize (UndoListTypePtr Entry)
  * recovers an object from a FLAG change operation
  */
 static bool
-UndoFlag (UndoListTypePtr Entry)
+UndoFlag (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -527,7 +514,7 @@ UndoFlag (UndoListTypePtr Entry)
   if (type != NO_TYPE)
     {
       FlagType f1, f2;
-      PinTypePtr pin = (PinTypePtr) ptr2;
+      PinType *pin = (PinType *) ptr2;
 
       swap = pin->Flags;
 
@@ -561,7 +548,7 @@ UndoFlag (UndoListTypePtr Entry)
  * returns true if anything has been recovered
  */
 static bool
-UndoMirror (UndoListTypePtr Entry)
+UndoMirror (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -571,7 +558,7 @@ UndoMirror (UndoListTypePtr Entry)
     SearchObjectByID (PCB->Data, &ptr1, &ptr2, &ptr3, Entry->ID, Entry->Kind);
   if (type == ELEMENT_TYPE)
     {
-      ElementTypePtr element = (ElementTypePtr) ptr3;
+      ElementType *element = (ElementType *) ptr3;
       if (andDraw)
 	EraseElement (element);
       MirrorElementCoordinates (PCB->Data, element, Entry->Data.Move.DY);
@@ -588,7 +575,7 @@ UndoMirror (UndoListTypePtr Entry)
  * returns true if anything has been recovered
  */
 static bool
-UndoCopyOrCreate (UndoListTypePtr Entry)
+UndoCopyOrCreate (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -615,7 +602,7 @@ UndoCopyOrCreate (UndoListTypePtr Entry)
  * returns true if anything has been recovered
  */
 static bool
-UndoMove (UndoListTypePtr Entry)
+UndoMove (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -639,7 +626,7 @@ UndoMove (UndoListTypePtr Entry)
  * returns true if anything has been recovered
  */
 static bool
-UndoRemove (UndoListTypePtr Entry)
+UndoRemove (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -664,7 +651,7 @@ UndoRemove (UndoListTypePtr Entry)
  * returns true if anything has been recovered
  */
 static bool
-UndoMoveToLayer (UndoListTypePtr Entry)
+UndoMoveToLayer (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type, swap;
@@ -674,7 +661,7 @@ UndoMoveToLayer (UndoListTypePtr Entry)
     SearchObjectByID (PCB->Data, &ptr1, &ptr2, &ptr3, Entry->ID, Entry->Kind);
   if (type != NO_TYPE)
     {
-      swap = GetLayerNumber (PCB->Data, (LayerTypePtr) ptr1);
+      swap = GetLayerNumber (PCB->Data, (LayerType *) ptr1);
       MoveObjectToLayer (type, ptr1, ptr2, ptr3,
 			 LAYER_PTR (Entry->Data.
 				    MoveToLayer.OriginalLayer), true);
@@ -689,10 +676,10 @@ UndoMoveToLayer (UndoListTypePtr Entry)
  * returns true on success
  */
 static bool
-UndoRemovePoint (UndoListTypePtr Entry)
+UndoRemovePoint (UndoListType *Entry)
 {
-  LayerTypePtr layer;
-  PolygonTypePtr polygon;
+  LayerType *layer;
+  PolygonType *polygon;
   void *ptr3;
   int type;
 
@@ -734,11 +721,11 @@ UndoRemovePoint (UndoListTypePtr Entry)
  * returns true on success
  */
 static bool
-UndoInsertPoint (UndoListTypePtr Entry)
+UndoInsertPoint (UndoListType *Entry)
 {
-  LayerTypePtr layer;
-  PolygonTypePtr polygon;
-  PointTypePtr pnt;
+  LayerType *layer;
+  PolygonType *polygon;
+  PointType *pnt;
   int type;
   Cardinal point_idx;
   Cardinal hole;
@@ -787,7 +774,7 @@ UndoInsertPoint (UndoListTypePtr Entry)
 }
 
 static bool
-UndoSwapCopiedObject (UndoListTypePtr Entry)
+UndoSwapCopiedObject (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   void *ptr1b, *ptr2b, *ptr3b;
@@ -822,7 +809,7 @@ UndoSwapCopiedObject (UndoListTypePtr Entry)
 
   obj = (AnyObjectType *)MoveObjectToBuffer (PCB->Data, RemoveList, type, ptr1, ptr2, ptr3);
   if (Entry->Kind == POLYGON_TYPE)
-    InitClip (PCB->Data, (LayerTypePtr)ptr1b, (PolygonType *)obj);
+    InitClip (PCB->Data, (LayerType *)ptr1b, (PolygonType *)obj);
   return (true);
 }
 
@@ -831,7 +818,7 @@ UndoSwapCopiedObject (UndoListTypePtr Entry)
  * returns true on success
  */
 static bool
-UndoRemoveContour (UndoListTypePtr Entry)
+UndoRemoveContour (UndoListType *Entry)
 {
   assert (Entry->Kind == POLYGON_TYPE);
   return UndoSwapCopiedObject (Entry);
@@ -842,7 +829,7 @@ UndoRemoveContour (UndoListTypePtr Entry)
  * returns true on success
  */
 static bool
-UndoInsertContour (UndoListTypePtr Entry)
+UndoInsertContour (UndoListType *Entry)
 {
   assert (Entry->Kind == POLYGON_TYPE);
   return UndoSwapCopiedObject (Entry);
@@ -853,9 +840,9 @@ UndoInsertContour (UndoListTypePtr Entry)
  * returns true on success
  */
 static bool
-UndoLayerChange (UndoListTypePtr Entry)
+UndoLayerChange (UndoListType *Entry)
 {
-  LayerChangeTypePtr l = &Entry->Data.LayerChange;
+  LayerChangeType *l = &Entry->Data.LayerChange;
   int tmp;
 
   tmp = l->new_index;
@@ -873,11 +860,11 @@ UndoLayerChange (UndoListTypePtr Entry)
  * returns true on success
  */
 static bool
-UndoNetlistChange (UndoListTypePtr Entry)
+UndoNetlistChange (UndoListType *Entry)
 {
-  NetlistChangeTypePtr l = & Entry->Data.NetlistChange;
+  NetlistChangeType *l = & Entry->Data.NetlistChange;
   unsigned int i, j;
-  LibraryTypePtr lib, saved;
+  LibraryType *lib, *saved;
 
   lib = l->lib;
   saved = l->old;
@@ -935,7 +922,7 @@ UndoNetlistChange (UndoListTypePtr Entry)
 int
 Undo (bool draw)
 {
-  UndoListTypePtr ptr;
+  UndoListType *ptr;
   int Types = 0;
   int unique;
   bool error_undoing = false;
@@ -1006,7 +993,7 @@ Undo (bool draw)
 }
 
 static int
-PerformUndo (UndoListTypePtr ptr)
+PerformUndo (UndoListType *ptr)
 {
   switch (ptr->Type)
     {
@@ -1121,7 +1108,7 @@ PerformUndo (UndoListTypePtr ptr)
 int
 Redo (bool draw)
 {
-  UndoListTypePtr ptr;
+  UndoListType *ptr;
   int Types = 0;
   bool error_undoing = false;
 
@@ -1227,7 +1214,7 @@ IncrementUndoSerialNumber (void)
 void
 ClearUndoList (bool Force)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (UndoN
       && (Force || gui->confirm_dialog ("OK to clear 'undo' buffer?", 0)))
@@ -1262,13 +1249,13 @@ void
 AddObjectToClearPolyUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
 			      bool clear)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
       undo = GetUndoSlot (UNDO_CLEAR, OBJECT_ID (Ptr3), Type);
       undo->Data.ClearPoly.Clear = clear;
-      undo->Data.ClearPoly.Layer = (LayerTypePtr) Ptr1;
+      undo->Data.ClearPoly.Layer = (LayerType *) Ptr1;
     }
 }
 
@@ -1279,7 +1266,7 @@ void
 AddObjectToMirrorUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
 			   Coord yoff)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
@@ -1296,7 +1283,7 @@ AddObjectToRotateUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
 			   Coord CenterX, Coord CenterY,
 			   BYTE Steps)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
@@ -1331,8 +1318,8 @@ void
 AddObjectToRemovePointUndoList (int Type,
 				void *Ptr1, void *Ptr2, Cardinal index)
 {
-  UndoListTypePtr undo;
-  PolygonTypePtr polygon = (PolygonTypePtr) Ptr2;
+  UndoListType *undo;
+  PolygonType *polygon = (PolygonType *) Ptr2;
   Cardinal hole;
   bool last_in_contour = false;
 
@@ -1382,7 +1369,7 @@ AddObjectToInsertPointUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 static void
 CopyObjectToUndoList (int undo_type, int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
   AnyObjectType *copy;
 
   if (Locked)
@@ -1425,7 +1412,7 @@ void
 AddObjectToMoveUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
 			 Coord DX, Coord DY)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
@@ -1442,7 +1429,7 @@ void
 AddObjectToChangeNameUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
 			       char *OldName)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
@@ -1457,13 +1444,13 @@ AddObjectToChangeNameUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
 void
 AddObjectToMoveToLayerUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
       undo = GetUndoSlot (UNDO_MOVETOLAYER, OBJECT_ID (Ptr3), Type);
       undo->Data.MoveToLayer.OriginalLayer =
-	GetLayerNumber (PCB->Data, (LayerTypePtr) Ptr1);
+	GetLayerNumber (PCB->Data, (LayerType *) Ptr1);
     }
 }
 
@@ -1484,12 +1471,12 @@ AddObjectToCreateUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 void
 AddObjectToFlagUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
       undo = GetUndoSlot (UNDO_FLAG, OBJECT_ID (Ptr2), Type);
-      undo->Data.Flags = ((PinTypePtr) Ptr2)->Flags;
+      undo->Data.Flags = ((PinType *) Ptr2)->Flags;
     }
 }
 
@@ -1499,7 +1486,7 @@ AddObjectToFlagUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 void
 AddObjectToSizeUndoList (int Type, void *ptr1, void *ptr2, void *ptr3)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
@@ -1508,22 +1495,22 @@ AddObjectToSizeUndoList (int Type, void *ptr1, void *ptr2, void *ptr3)
 	{
 	case PIN_TYPE:
 	case VIA_TYPE:
-	  undo->Data.Size = ((PinTypePtr) ptr2)->Thickness;
+	  undo->Data.Size = ((PinType *) ptr2)->Thickness;
 	  break;
 	case LINE_TYPE:
 	case ELEMENTLINE_TYPE:
-	  undo->Data.Size = ((LineTypePtr) ptr2)->Thickness;
+	  undo->Data.Size = ((LineType *) ptr2)->Thickness;
 	  break;
 	case TEXT_TYPE:
 	case ELEMENTNAME_TYPE:
-	  undo->Data.Size = ((TextTypePtr) ptr2)->Scale;
+	  undo->Data.Size = ((TextType *) ptr2)->Scale;
 	  break;
 	case PAD_TYPE:
-	  undo->Data.Size = ((PadTypePtr) ptr2)->Thickness;
+	  undo->Data.Size = ((PadType *) ptr2)->Thickness;
 	  break;
 	case ARC_TYPE:
 	case ELEMENTARC_TYPE:
-	  undo->Data.Size = ((ArcTypePtr) ptr2)->Thickness;
+	  undo->Data.Size = ((ArcType *) ptr2)->Thickness;
 	  break;
 	}
     }
@@ -1535,7 +1522,7 @@ AddObjectToSizeUndoList (int Type, void *ptr1, void *ptr2, void *ptr3)
 void
 AddObjectToClearSizeUndoList (int Type, void *ptr1, void *ptr2, void *ptr3)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
@@ -1544,16 +1531,16 @@ AddObjectToClearSizeUndoList (int Type, void *ptr1, void *ptr2, void *ptr3)
 	{
 	case PIN_TYPE:
 	case VIA_TYPE:
-	  undo->Data.Size = ((PinTypePtr) ptr2)->Clearance;
+	  undo->Data.Size = ((PinType *) ptr2)->Clearance;
 	  break;
 	case LINE_TYPE:
-	  undo->Data.Size = ((LineTypePtr) ptr2)->Clearance;
+	  undo->Data.Size = ((LineType *) ptr2)->Clearance;
 	  break;
 	case PAD_TYPE:
-	  undo->Data.Size = ((PadTypePtr) ptr2)->Clearance;
+	  undo->Data.Size = ((PadType *) ptr2)->Clearance;
 	  break;
 	case ARC_TYPE:
-	  undo->Data.Size = ((ArcTypePtr) ptr2)->Clearance;
+	  undo->Data.Size = ((ArcType *) ptr2)->Clearance;
 	  break;
 	}
     }
@@ -1565,7 +1552,7 @@ AddObjectToClearSizeUndoList (int Type, void *ptr1, void *ptr2, void *ptr3)
 void
 AddObjectToMaskSizeUndoList (int Type, void *ptr1, void *ptr2, void *ptr3)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
@@ -1574,10 +1561,10 @@ AddObjectToMaskSizeUndoList (int Type, void *ptr1, void *ptr2, void *ptr3)
 	{
 	case PIN_TYPE:
 	case VIA_TYPE:
-	  undo->Data.Size = ((PinTypePtr) ptr2)->Mask;
+	  undo->Data.Size = ((PinType *) ptr2)->Mask;
 	  break;
 	case PAD_TYPE:
-	  undo->Data.Size = ((PadTypePtr) ptr2)->Mask;
+	  undo->Data.Size = ((PadType *) ptr2)->Mask;
 	  break;
 	}
     }
@@ -1589,13 +1576,13 @@ AddObjectToMaskSizeUndoList (int Type, void *ptr1, void *ptr2, void *ptr3)
 void
 AddObjectTo2ndSizeUndoList (int Type, void *ptr1, void *ptr2, void *ptr3)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
       undo = GetUndoSlot (UNDO_CHANGE2NDSIZE, OBJECT_ID (ptr2), Type);
       if (Type == PIN_TYPE || Type == VIA_TYPE)
-	undo->Data.Size = ((PinTypePtr) ptr2)->DrillingHole;
+	undo->Data.Size = ((PinType *) ptr2)->DrillingHole;
     }
 }
 
@@ -1606,8 +1593,8 @@ AddObjectTo2ndSizeUndoList (int Type, void *ptr1, void *ptr2, void *ptr3)
 void
 AddObjectToChangeAnglesUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 {
-  UndoListTypePtr undo;
-  ArcTypePtr a = (ArcTypePtr) Ptr3;
+  UndoListType *undo;
+  ArcType *a = (ArcType *) Ptr3;
 
   if (!Locked)
     {
@@ -1623,7 +1610,7 @@ AddObjectToChangeAnglesUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 void
 AddLayerChangeToUndoList (int old_index, int new_index)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
@@ -1637,11 +1624,11 @@ AddLayerChangeToUndoList (int old_index, int new_index)
  * adds a netlist change to the undo list
  */
 void
-AddNetlistLibToUndoList (LibraryTypePtr lib)
+AddNetlistLibToUndoList (LibraryType *lib)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
   unsigned int i, j;
-  LibraryTypePtr old;
+  LibraryType *old;
   
   if (!Locked)
     {
@@ -1650,11 +1637,11 @@ AddNetlistLibToUndoList (LibraryTypePtr lib)
       undo->Data.NetlistChange.lib = lib;
 
       /* and what the old data is that we'll need to restore */
-      undo->Data.NetlistChange.old = (LibraryTypePtr)malloc (sizeof (LibraryTypePtr));
+      undo->Data.NetlistChange.old = (LibraryType *)malloc (sizeof (LibraryType));
       old = undo->Data.NetlistChange.old;
       old->MenuN = lib->MenuN;
       old->MenuMax = lib->MenuMax;
-      old->Menu = (LibraryMenuTypePtr)malloc (old->MenuMax * sizeof (LibraryMenuType));
+      old->Menu = (LibraryMenuType *)malloc (old->MenuMax * sizeof (LibraryMenuType));
       if (old->Menu == NULL)
 	{
 	  fprintf (stderr, "malloc() failed in %s\n", __FUNCTION__);
@@ -1678,7 +1665,7 @@ AddNetlistLibToUndoList (LibraryTypePtr lib)
 
       
 	  old->Menu[i].Entry = 
-	    (LibraryEntryTypePtr)malloc (old->Menu[i].EntryMax * sizeof (LibraryEntryType));
+	    (LibraryEntryType *)malloc (old->Menu[i].EntryMax * sizeof (LibraryEntryType));
 	  if (old->Menu[i].Entry == NULL)
 	    {
 	      fprintf (stderr, "malloc() failed in %s\n", __FUNCTION__);
diff --git a/src/undo.h b/src/undo.h
index a6cd324..18117cb 100644
--- a/src/undo.h
+++ b/src/undo.h
@@ -22,7 +22,6 @@
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  *  Thomas.Nau at rz.uni-ulm.de
  *
- *  RCS: $Id$
  */
 
 /* prototypes for undo routines
@@ -33,8 +32,9 @@
 
 #include "global.h"
 
-#define DRAW_FLAGS	(RATFLAG | SELECTEDFLAG | SQUAREFLAG \
-			| HIDENAMEFLAG | HOLEFLAG | OCTAGONFLAG | FOUNDFLAG | CLEARLINEFLAG)
+#define DRAW_FLAGS  (RATFLAG | SELECTEDFLAG | SQUAREFLAG |    \
+                     HIDENAMEFLAG | HOLEFLAG | OCTAGONFLAG |  \
+                     CONNECTEDFLAG | FOUNDFLAG | CLEARLINEFLAG)
 
 											/* different layers */
 
@@ -65,7 +65,7 @@ void AddObjectToMaskSizeUndoList (int, void *, void *, void *);
 void AddObjectToChangeAnglesUndoList (int, void *, void *, void *);
 void AddObjectToClearPolyUndoList (int, void *, void *, void *, bool);
 void AddLayerChangeToUndoList (int, int);
-void AddNetlistLibToUndoList (LibraryTypePtr);
+void AddNetlistLibToUndoList (LibraryType *);
 void LockUndo (void);
 void UnlockUndo (void);
 bool Undoing (void);
diff --git a/src/vector.c b/src/vector.c
index c039b89..aad1c62 100644
--- a/src/vector.c
+++ b/src/vector.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -51,8 +49,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
diff --git a/src/vector.h b/src/vector.h
index 344118d..b6b6de1 100644
--- a/src/vector.h
+++ b/src/vector.h
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
diff --git a/src/vendor.c b/src/vendor.c
index 2abcca0..9391404 100644
--- a/src/vendor.c
+++ b/src/vendor.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -64,8 +62,6 @@
 #include <dmalloc.h>
 #endif
 
-RCSID ("$Id$");
-
 static void add_to_drills (char *);
 static void apply_vendor_map (void);
 static void process_skips (Resource *);
@@ -105,10 +101,10 @@ static int rounding_method = ROUND_UP;
 
 /* ************************************************************ */
 
-static const char apply_vendor_syntax[] = "ApplyVendor()";
+static const char apply_vendor_syntax[] = N_("ApplyVendor()");
 
 static const char apply_vendor_help[] =
-  "Applies the currently loaded vendor drill table to the current design.";
+  N_("Applies the currently loaded vendor drill table to the current design.");
 
 /* %start-doc actions ApplyVendor
 @cindex vendor map 
@@ -129,10 +125,10 @@ ActionApplyVendor (int argc, char **argv, Coord x, Coord y)
 
 /* ************************************************************ */
 
-static const char toggle_vendor_syntax[] = "ToggleVendor()";
+static const char toggle_vendor_syntax[] = N_("ToggleVendor()");
 
 static const char toggle_vendor_help[] =
-  "Toggles the state of automatic drill size mapping.";
+  N_("Toggles the state of automatic drill size mapping.");
 
 /* %start-doc actions ToggleVendor
 
@@ -160,10 +156,10 @@ ActionToggleVendor (int argc, char **argv, Coord x, Coord y)
 
 /* ************************************************************ */
 
-static const char enable_vendor_syntax[] = "EnableVendor()";
+static const char enable_vendor_syntax[] = N_("EnableVendor()");
 
 static const char enable_vendor_help[] =
-  "Enables automatic drill size mapping.";
+  N_("Enables automatic drill size mapping.");
 
 /* %start-doc actions EnableVendor
 
@@ -188,10 +184,10 @@ ActionEnableVendor (int argc, char **argv, Coord x, Coord y)
 
 /* ************************************************************ */
 
-static const char disable_vendor_syntax[] = "DisableVendor()";
+static const char disable_vendor_syntax[] = N_("DisableVendor()");
 
 static const char disable_vendor_help[] =
-  "Disables automatic drill size mapping.";
+  N_("Disables automatic drill size mapping.");
 
 /* %start-doc actions DisableVendor
 
@@ -214,10 +210,10 @@ ActionDisableVendor (int argc, char **argv, Coord x, Coord y)
 
 /* ************************************************************ */
 
-static const char unload_vendor_syntax[] = "UnloadVendor()";
+static const char unload_vendor_syntax[] = N_("UnloadVendor()");
 
 static const char unload_vendor_help[] =
-  "Unloads the current vendor drill mapping table.";
+  N_("Unloads the current vendor drill mapping table.");
 
 /* %start-doc actions UnloadVendor
 
@@ -246,10 +242,10 @@ ActionUnloadVendor (int argc, char **argv, Coord x, Coord y)
 
 /* ************************************************************ */
 
-static const char load_vendor_syntax[] = "LoadVendorFrom(filename)";
+static const char load_vendor_syntax[] = N_("LoadVendorFrom(filename)");
 
 static const char load_vendor_help[] =
-  "Loads the specified vendor resource file.";
+  N_("Loads the specified vendor resource file.");
 
 /* %start-doc actions LoadVendorFrom
 
@@ -343,7 +339,7 @@ ActionLoadVendorFrom (int argc, char **argv, Coord x, Coord y)
     }
   else
     {
-      Message ("\"%s\" is not a supported units.  Defaulting to inch\n",
+      Message (_("\"%s\" is not a supported units.  Defaulting to inch\n"),
 	       sval);
       sf = INCH_TO_COORD(1);
     }
@@ -373,8 +369,8 @@ ActionLoadVendorFrom (int argc, char **argv, Coord x, Coord y)
 	    }
 	  else
 	    {
-	      Message (_
-		       ("\"%s\" is not a valid rounding type.  Defaulting to up\n"),
+	      Message (_("\"%s\" is not a valid rounding type. "
+		    "Defaulting to up\n"),
 		       sval);
 	      rounding_method = ROUND_UP;
 	    }
@@ -495,11 +491,11 @@ apply_vendor_map (void)
 		  changed++;
 		else
 		  {
-		    Message (_
-			     ("Via at %.2f, %.2f not changed.  Possible reasons:\n"
-			      "\t- pad size too small\n"
-			      "\t- new size would be too large or too small\n"),
-			     0.01 * via->X, 0.01 * via->Y);
+		    Message (_("Via at %.2f, %.2f not changed. "
+			  "Possible reasons:\n"
+			  "\t- pad size too small\n"
+			  "\t- new size would be too large or too small\n"),
+			0.01 * via->X, 0.01 * via->Y);
 		  }
 	      }
 	    else
@@ -535,11 +531,11 @@ apply_vendor_map (void)
 			changed++;
 		      else
 			{
-			  Message (_
-				   ("Pin %s (%s) at %.2f, %.2f (element %s, %s, %s) not changed.\n"
-				    "\tPossible reasons:\n"
-				    "\t- pad size too small\n"
-				    "\t- new size would be too large or too small\n"),
+			  Message (_("Pin %s (%s) at %.2f, %.2f "
+				"(element %s, %s, %s) not changed.\n"
+				"\tPossible reasons:\n"
+				"\t- pad size too small\n"
+				"\t- new size would be too large or too small\n"),
 				   UNKNOWN (pin->Number), UNKNOWN (pin->Name),
 				   0.01 * pin->X, 0.01 * pin->Y,
 				   UNKNOWN (NAMEONPCB_NAME (element)),
@@ -549,8 +545,7 @@ apply_vendor_map (void)
 		    }
 		  else
 		    {
-		      Message (_
-			       ("Locked pin at %-6.2f, %-6.2f not changed.\n"),
+		      Message (_("Locked pin at %-6.2f, %-6.2f not changed.\n"),
 			       0.01 * pin->X, 0.01 * pin->Y);
 		    }
 		}
@@ -582,8 +577,8 @@ apply_vendor_map (void)
 	      changed++;
 	      PCB->RouteStyle[i].Hole =
 		vendorDrillMap (PCB->RouteStyle[i].Hole);
-	      Message (_
-		       ("Adjusted %s routing style via hole size to be %6.2f mils\n"),
+	      Message (_("Adjusted %s routing style via hole size to be "
+		    "%6.2f mils\n"),
 		       PCB->RouteStyle[i].Name,
 		       0.01 * PCB->RouteStyle[i].Hole);
 	      if (PCB->RouteStyle[i].Diameter <
@@ -591,8 +586,8 @@ apply_vendor_map (void)
 		{
 		  PCB->RouteStyle[i].Diameter =
 		    PCB->RouteStyle[i].Hole + MIN_PINORVIACOPPER;
-		  Message (_
-			   ("Increased %s routing style via diameter to %6.2f mils\n"),
+		  Message (_("Increased %s routing style via diameter to "
+			"%6.2f mils\n"),
 			   PCB->RouteStyle[i].Name,
 			   0.01 * PCB->RouteStyle[i].Diameter);
 		}
@@ -700,7 +695,7 @@ add_to_drills (char *sval)
   if ((vendor_drills = (int *)realloc (vendor_drills,
 				n_vendor_drills * sizeof (int))) == NULL)
     {
-      fprintf (stderr, "realloc() failed to allocate %ld bytes\n",
+      fprintf (stderr, _("realloc() failed to allocate %ld bytes\n"),
 	       (unsigned long) n_vendor_drills * sizeof (int));
       return;
     }
@@ -762,7 +757,7 @@ process_skips (Resource * res)
 	  sval = res->v[i].subres->v[0].value;
 	  if (sval == NULL)
 	    {
-	      Message ("Error:  null skip value\n");
+	      Message (_("Error:  null skip value\n"));
 	    }
 	  else
 	    {
@@ -798,7 +793,7 @@ process_skips (Resource * res)
 					      (*cnt) * sizeof (char *))) ==
 			  NULL)
 			{
-			  fprintf (stderr, "realloc() failed\n");
+			  fprintf (stderr, _("realloc() failed\n"));
 			  exit (-1);
 			}
 		      (*lst)[*cnt - 1] = strdup (sval);
@@ -815,7 +810,7 @@ process_skips (Resource * res)
 }
 
 bool
-vendorIsElementMappable (ElementTypePtr element)
+vendorIsElementMappable (ElementType *element)
 {
   int i;
   int noskip;
@@ -830,8 +825,8 @@ vendorIsElementMappable (ElementTypePtr element)
 	   0)
 	  || rematch (ignore_refdes[i], UNKNOWN (NAMEONPCB_NAME (element))))
 	{
-	  Message (_
-		   ("Vendor mapping skipped because refdes = %s matches %s\n"),
+	  Message (_("Vendor mapping skipped because "
+		"refdes = %s matches %s\n"),
 		   UNKNOWN (NAMEONPCB_NAME (element)), ignore_refdes[i]);
 	  noskip = 0;
 	}
@@ -842,8 +837,8 @@ vendorIsElementMappable (ElementTypePtr element)
 	if ((NSTRCMP (UNKNOWN (VALUE_NAME (element)), ignore_value[i]) == 0)
 	    || rematch (ignore_value[i], UNKNOWN (VALUE_NAME (element))))
 	  {
-	    Message (_
-		     ("Vendor mapping skipped because value = %s matches %s\n"),
+	    Message (_("Vendor mapping skipped because "
+		  "value = %s matches %s\n"),
 		     UNKNOWN (VALUE_NAME (element)), ignore_value[i]);
 	    noskip = 0;
 	  }
@@ -857,8 +852,8 @@ vendorIsElementMappable (ElementTypePtr element)
 	    || rematch (ignore_descr[i],
 			UNKNOWN (DESCRIPTION_NAME (element))))
 	  {
-	    Message (_
-		     ("Vendor mapping skipped because descr = %s matches %s\n"),
+	    Message (_("Vendor mapping skipped because "
+		  "descr = %s matches %s\n"),
 		     UNKNOWN (DESCRIPTION_NAME (element)), ignore_descr[i]);
 	    noskip = 0;
 	  }
@@ -898,7 +893,7 @@ rematch (const char *re, const char *s)
       char errorstring[128];
 
       regerror (result, &compiled, errorstring, sizeof (errorstring));
-      Message ("regexp error: %s\n", errorstring);
+      Message (_("regexp error: %s\n"), errorstring);
       regfree (&compiled);
       return (false);
     }
@@ -918,7 +913,7 @@ rematch (const char *re, const char *s)
   /* compile the regular expression */
   if ((rslt = re_comp (re)) != NULL)
     {
-      Message ("re_comp error: %s\n", rslt);
+      Message (_("re_comp error: %s\n"), rslt);
       return (false);
     }
 
@@ -935,7 +930,7 @@ rematch (const char *re, const char *s)
       break;
 
     default:
-      Message ("re_exec error\n");
+      Message (_("re_exec error\n"));
       break;
     }
 
@@ -966,13 +961,14 @@ HID_Action vendor_action_list[] = {
 };
 
 REGISTER_ACTIONS (vendor_action_list)
-     static int vendor_get_enabled (int unused)
+
+static int vendor_get_enabled (void *data)
 {
   return vendorMapEnable;
 }
 
 HID_Flag vendor_flag_list[] = {
-  {"VendorMapOn", vendor_get_enabled, 0}
+  {"VendorMapOn", vendor_get_enabled, NULL}
 };
 
 REGISTER_FLAGS (vendor_flag_list)
diff --git a/src/vendor.h b/src/vendor.h
index aba4148..26e3dc5 100644
--- a/src/vendor.h
+++ b/src/vendor.h
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /*
  *                            COPYRIGHT
  *
@@ -26,6 +24,6 @@
 #define PCB_VENDOR_H
 
 int vendorDrillMap (int);
-bool vendorIsElementMappable (ElementTypePtr);
+bool vendorIsElementMappable (ElementType *);
 
 #endif /* __VENDOR_H__ */
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 7a4f80d..8a53f5c 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -72,6 +89,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	install-pdf-recursive install-ps-recursive install-recursive \
 	installcheck-recursive installdirs-recursive pdf-recursive \
 	ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
   distclean-recursive maintainer-clean-recursive
 AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
@@ -112,6 +134,7 @@ ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -124,7 +147,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -190,6 +212,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -298,6 +324,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -580,14 +608,15 @@ check-TESTS: $(TESTS)
 	  fi; \
 	  dashes=`echo "$$dashes" | sed s/./=/g`; \
 	  if test "$$failed" -eq 0; then \
-	    echo "$$grn$$dashes"; \
+	    col="$$grn"; \
 	  else \
-	    echo "$$red$$dashes"; \
+	    col="$$red"; \
 	  fi; \
-	  echo "$$banner"; \
-	  test -z "$$skipped" || echo "$$skipped"; \
-	  test -z "$$report" || echo "$$report"; \
-	  echo "$$dashes$$std"; \
+	  echo "$${col}$$dashes$${std}"; \
+	  echo "$${col}$$banner$${std}"; \
+	  test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+	  test -z "$$report" || echo "$${col}$$report$${std}"; \
+	  echo "$${col}$$dashes$${std}"; \
 	  test "$$failed" -eq 0; \
 	else :; fi
 
@@ -623,13 +652,10 @@ distdir: $(DISTFILES)
 	done
 	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(MKDIR_P) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
+	    $(am__make_dryrun) \
+	      || test -d "$(distdir)/$$subdir" \
+	      || $(MKDIR_P) "$(distdir)/$$subdir" \
+	      || exit 1; \
 	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
 	    $(am__relativize); \
 	    new_distdir=$$reldir; \
@@ -666,10 +692,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/Makefile.in b/tests/golden/Makefile.in
index f16f3fb..be9f42d 100644
--- a/tests/golden/Makefile.in
+++ b/tests/golden/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -71,6 +88,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	install-pdf-recursive install-ps-recursive install-recursive \
 	installcheck-recursive installdirs-recursive pdf-recursive \
 	ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
   distclean-recursive maintainer-clean-recursive
 AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
@@ -109,6 +131,7 @@ ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -121,7 +144,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -187,6 +209,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -295,6 +321,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -538,13 +566,10 @@ distdir: $(DISTFILES)
 	done
 	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(MKDIR_P) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
+	    $(am__make_dryrun) \
+	      || test -d "$(distdir)/$$subdir" \
+	      || $(MKDIR_P) "$(distdir)/$$subdir" \
+	      || exit 1; \
 	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
 	    $(am__relativize); \
 	    new_distdir=$$reldir; \
@@ -579,10 +604,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/hid_bom1/Makefile.am b/tests/golden/hid_bom1/Makefile.am
index 496b3f3..9f185cd 100644
--- a/tests/golden/hid_bom1/Makefile.am
+++ b/tests/golden/hid_bom1/Makefile.am
@@ -3,4 +3,3 @@
 EXTRA_DIST= \
 	bom_general.bom \
 	bom_general.xy
-
diff --git a/tests/golden/hid_bom1/Makefile.in b/tests/golden/hid_bom1/Makefile.in
index 634ad2b..051714e 100644
--- a/tests/golden/hid_bom1/Makefile.in
+++ b/tests/golden/hid_bom1/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -362,10 +390,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/hid_bom1/bom_general.bom b/tests/golden/hid_bom1/bom_general.bom
index e069ea1..6db3c23 100644
--- a/tests/golden/hid_bom1/bom_general.bom
+++ b/tests/golden/hid_bom1/bom_general.bom
@@ -1,10 +1,9 @@
-# $Id$
 # PcbBOM Version 1.0
-# Date: Wed Jun 24 21:42:21 2009 UTC
-# Author: Dan McMahill
+# Date: Sa 03 Aug 2013 16:28:56 GMT UTC
+# Author: Markus Hitter
 # Title: Basic BOM/XY Test - PCB BOM
 # Quantity, Description, Value, RefDes
 # --------------------------------------------
-8,"Standard SMT resistor, capacitor etc","RESC3216N",R90_TOP R180_TOP R270_TOP R0_TOP R270_BOT R180_BOT R90_BOT R0_BOT 
-8,"Dual in-line package, narrow (300 mil)","DIP8",UDIP90_TOP UDIP180_TOP UDIP270_TOP UDIP0_TOP UDIP270_BOT UDIP180_BOT UDIP90_BOT UDIP0_BOT 
-8,"Small outline package, narrow (150mil)","SO8",USO90_TOP USO180_TOP USO270_TOP USO0_TOP USO270_BOT USO180_BOT USO90_BOT USO0_BOT 
+8,"Standard SMT resistor, capacitor etc","RESC3216N",R0_BOT R90_BOT R180_BOT R270_BOT R0_TOP R270_TOP R180_TOP R90_TOP 
+8,"Small outline package, narrow (150mil)","SO8",USO0_BOT USO90_BOT USO180_BOT USO270_BOT USO0_TOP USO270_TOP USO180_TOP USO90_TOP 
+8,"Dual in-line package, narrow (300 mil)","DIP8",UDIP0_BOT UDIP90_BOT UDIP180_BOT UDIP270_BOT UDIP0_TOP UDIP270_TOP UDIP180_TOP UDIP90_TOP 
diff --git a/tests/golden/hid_bom1/bom_general.xy b/tests/golden/hid_bom1/bom_general.xy
index dfcd7de..d7a3b72 100644
--- a/tests/golden/hid_bom1/bom_general.xy
+++ b/tests/golden/hid_bom1/bom_general.xy
@@ -1,32 +1,31 @@
-# $Id$
 # PcbXY Version 1.0
-# Date: Wed Jun 24 21:42:21 2009 UTC
-# Author: Dan McMahill
+# Date: Sa 03 Aug 2013 16:28:56 GMT UTC
+# Author: Markus Hitter
 # Title: Basic BOM/XY Test - PCB X-Y
 # RefDes, Description, Value, X, Y, rotation, top/bottom
-# X,Y in mils.  rotation in degrees.
+# X,Y in mil.  rotation in degrees.
 # --------------------------------------------
-R90_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",1700.00,4300.00,90,top
-R180_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",1300.00,4300.00,180,top
-R270_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",1000.00,4300.00,270,top
+R0_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",600.00,3900.00,180,bottom
+R90_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",1000.00,3900.00,270,bottom
+R180_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",1300.00,3900.00,0,bottom
+R270_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",1700.00,3900.00,90,bottom
+USO0_BOT,"Small outline package, narrow (150mil)","SO8",600.00,2600.00,180,bottom
+USO90_BOT,"Small outline package, narrow (150mil)","SO8",1000.00,2600.00,270,bottom
+USO180_BOT,"Small outline package, narrow (150mil)","SO8",1300.00,2600.00,0,bottom
+USO270_BOT,"Small outline package, narrow (150mil)","SO8",1700.00,2600.00,90,bottom
+UDIP0_BOT,"Dual in-line package, narrow (300 mil)","DIP8",550.00,650.00,180,bottom
+UDIP90_BOT,"Dual in-line package, narrow (300 mil)","DIP8",1250.00,650.00,270,bottom
+UDIP180_BOT,"Dual in-line package, narrow (300 mil)","DIP8",1950.00,650.00,0,bottom
+UDIP270_BOT,"Dual in-line package, narrow (300 mil)","DIP8",2650.00,650.00,90,bottom
+USO0_TOP,"Small outline package, narrow (150mil)","SO8",600.00,3200.00,0,top
+USO270_TOP,"Small outline package, narrow (150mil)","SO8",1000.00,3200.00,90,top
+USO180_TOP,"Small outline package, narrow (150mil)","SO8",1300.00,3200.00,180,top
+USO90_TOP,"Small outline package, narrow (150mil)","SO8",1700.00,3200.00,270,top
+UDIP0_TOP,"Dual in-line package, narrow (300 mil)","DIP8",550.00,1450.00,0,top
+UDIP270_TOP,"Dual in-line package, narrow (300 mil)","DIP8",1250.00,1450.00,90,top
+UDIP180_TOP,"Dual in-line package, narrow (300 mil)","DIP8",1950.00,1450.00,180,top
+UDIP90_TOP,"Dual in-line package, narrow (300 mil)","DIP8",2650.00,1450.00,270,top
 R0_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",600.00,4300.00,0,top
-UDIP90_TOP,"Dual in-line package, narrow (300 mil)","DIP8",2650.00,1450.00,180,top
-UDIP180_TOP,"Dual in-line package, narrow (300 mil)","DIP8",1950.00,1450.00,270,top
-UDIP270_TOP,"Dual in-line package, narrow (300 mil)","DIP8",1250.00,1450.00,0,top
-UDIP0_TOP,"Dual in-line package, narrow (300 mil)","DIP8",550.00,1450.00,90,top
-USO90_TOP,"Small outline package, narrow (150mil)","SO8",1700.00,3200.00,180,top
-USO180_TOP,"Small outline package, narrow (150mil)","SO8",1300.00,3200.00,270,top
-USO270_TOP,"Small outline package, narrow (150mil)","SO8",1000.00,3200.00,0,top
-USO0_TOP,"Small outline package, narrow (150mil)","SO8",600.00,3200.00,90,top
-UDIP270_BOT,"Dual in-line package, narrow (300 mil)","DIP8",2650.00,650.00,270,bottom
-UDIP180_BOT,"Dual in-line package, narrow (300 mil)","DIP8",1950.00,650.00,180,bottom
-UDIP90_BOT,"Dual in-line package, narrow (300 mil)","DIP8",1250.00,650.00,90,bottom
-UDIP0_BOT,"Dual in-line package, narrow (300 mil)","DIP8",550.00,650.00,0,bottom
-USO270_BOT,"Small outline package, narrow (150mil)","SO8",1700.00,2600.00,270,bottom
-USO180_BOT,"Small outline package, narrow (150mil)","SO8",1300.00,2600.00,180,bottom
-USO90_BOT,"Small outline package, narrow (150mil)","SO8",1000.00,2600.00,90,bottom
-USO0_BOT,"Small outline package, narrow (150mil)","SO8",600.00,2600.00,0,bottom
-R270_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",1700.00,3900.00,270,bottom
-R180_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",1300.00,3900.00,180,bottom
-R90_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",1000.00,3900.00,90,bottom
-R0_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",600.00,3900.00,0,bottom
+R270_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",1000.00,4300.00,90,top
+R180_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",1300.00,4300.00,180,top
+R90_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",1700.00,4300.00,270,top
diff --git a/tests/golden/hid_bom2/Makefile.am b/tests/golden/hid_bom2/Makefile.am
index 9abeff1..547d3a2 100644
--- a/tests/golden/hid_bom2/Makefile.am
+++ b/tests/golden/hid_bom2/Makefile.am
@@ -1,5 +1,5 @@
 ## -*- makefile -*-
 
 EXTRA_DIST= \
-	bom_general.xy \
-	test.bom
+	test.bom \
+	bom_general.xy
diff --git a/tests/golden/hid_bom2/Makefile.in b/tests/golden/hid_bom2/Makefile.in
index af9f2cf..2550ecf 100644
--- a/tests/golden/hid_bom2/Makefile.in
+++ b/tests/golden/hid_bom2/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -275,8 +303,8 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = \
-	bom_general.xy \
-	test.bom
+	test.bom \
+	bom_general.xy
 
 all: all-am
 
@@ -362,10 +390,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/hid_bom2/bom_general.xy b/tests/golden/hid_bom2/bom_general.xy
index c2c9ea2..597a151 100644
--- a/tests/golden/hid_bom2/bom_general.xy
+++ b/tests/golden/hid_bom2/bom_general.xy
@@ -1,32 +1,31 @@
-# $Id$
 # PcbXY Version 1.0
-# Date: Wed Jun 24 21:42:22 2009 UTC
-# Author: Dan McMahill
+# Date: Sa 03 Aug 2013 16:29:00 GMT UTC
+# Author: Markus Hitter
 # Title: Basic BOM/XY Test - PCB X-Y
 # RefDes, Description, Value, X, Y, rotation, top/bottom
-# X,Y in mils.  rotation in degrees.
+# X,Y in mil.  rotation in degrees.
 # --------------------------------------------
-R90_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",1700.00,4300.00,90,top
-R180_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",1300.00,4300.00,180,top
-R270_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",1000.00,4300.00,270,top
+R0_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",600.00,3900.00,180,bottom
+R90_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",1000.00,3900.00,270,bottom
+R180_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",1300.00,3900.00,0,bottom
+R270_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",1700.00,3900.00,90,bottom
+USO0_BOT,"Small outline package, narrow (150mil)","SO8",600.00,2600.00,180,bottom
+USO90_BOT,"Small outline package, narrow (150mil)","SO8",1000.00,2600.00,270,bottom
+USO180_BOT,"Small outline package, narrow (150mil)","SO8",1300.00,2600.00,0,bottom
+USO270_BOT,"Small outline package, narrow (150mil)","SO8",1700.00,2600.00,90,bottom
+UDIP0_BOT,"Dual in-line package, narrow (300 mil)","DIP8",550.00,650.00,180,bottom
+UDIP90_BOT,"Dual in-line package, narrow (300 mil)","DIP8",1250.00,650.00,270,bottom
+UDIP180_BOT,"Dual in-line package, narrow (300 mil)","DIP8",1950.00,650.00,0,bottom
+UDIP270_BOT,"Dual in-line package, narrow (300 mil)","DIP8",2650.00,650.00,90,bottom
+USO0_TOP,"Small outline package, narrow (150mil)","SO8",600.00,3200.00,0,top
+USO270_TOP,"Small outline package, narrow (150mil)","SO8",1000.00,3200.00,90,top
+USO180_TOP,"Small outline package, narrow (150mil)","SO8",1300.00,3200.00,180,top
+USO90_TOP,"Small outline package, narrow (150mil)","SO8",1700.00,3200.00,270,top
+UDIP0_TOP,"Dual in-line package, narrow (300 mil)","DIP8",550.00,1450.00,0,top
+UDIP270_TOP,"Dual in-line package, narrow (300 mil)","DIP8",1250.00,1450.00,90,top
+UDIP180_TOP,"Dual in-line package, narrow (300 mil)","DIP8",1950.00,1450.00,180,top
+UDIP90_TOP,"Dual in-line package, narrow (300 mil)","DIP8",2650.00,1450.00,270,top
 R0_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",600.00,4300.00,0,top
-UDIP90_TOP,"Dual in-line package, narrow (300 mil)","DIP8",2650.00,1450.00,180,top
-UDIP180_TOP,"Dual in-line package, narrow (300 mil)","DIP8",1950.00,1450.00,270,top
-UDIP270_TOP,"Dual in-line package, narrow (300 mil)","DIP8",1250.00,1450.00,0,top
-UDIP0_TOP,"Dual in-line package, narrow (300 mil)","DIP8",550.00,1450.00,90,top
-USO90_TOP,"Small outline package, narrow (150mil)","SO8",1700.00,3200.00,180,top
-USO180_TOP,"Small outline package, narrow (150mil)","SO8",1300.00,3200.00,270,top
-USO270_TOP,"Small outline package, narrow (150mil)","SO8",1000.00,3200.00,0,top
-USO0_TOP,"Small outline package, narrow (150mil)","SO8",600.00,3200.00,90,top
-UDIP270_BOT,"Dual in-line package, narrow (300 mil)","DIP8",2650.00,650.00,270,bottom
-UDIP180_BOT,"Dual in-line package, narrow (300 mil)","DIP8",1950.00,650.00,180,bottom
-UDIP90_BOT,"Dual in-line package, narrow (300 mil)","DIP8",1250.00,650.00,90,bottom
-UDIP0_BOT,"Dual in-line package, narrow (300 mil)","DIP8",550.00,650.00,0,bottom
-USO270_BOT,"Small outline package, narrow (150mil)","SO8",1700.00,2600.00,270,bottom
-USO180_BOT,"Small outline package, narrow (150mil)","SO8",1300.00,2600.00,180,bottom
-USO90_BOT,"Small outline package, narrow (150mil)","SO8",1000.00,2600.00,90,bottom
-USO0_BOT,"Small outline package, narrow (150mil)","SO8",600.00,2600.00,0,bottom
-R270_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",1700.00,3900.00,270,bottom
-R180_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",1300.00,3900.00,180,bottom
-R90_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",1000.00,3900.00,90,bottom
-R0_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",600.00,3900.00,0,bottom
+R270_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",1000.00,4300.00,90,top
+R180_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",1300.00,4300.00,180,top
+R90_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",1700.00,4300.00,270,top
diff --git a/tests/golden/hid_bom2/test.bom b/tests/golden/hid_bom2/test.bom
index c2677f5..cc5f5c3 100644
--- a/tests/golden/hid_bom2/test.bom
+++ b/tests/golden/hid_bom2/test.bom
@@ -1,10 +1,9 @@
-# $Id$
 # PcbBOM Version 1.0
-# Date: Wed Jun 24 21:42:22 2009 UTC
-# Author: Dan McMahill
+# Date: Sa 03 Aug 2013 16:29:00 GMT UTC
+# Author: Markus Hitter
 # Title: Basic BOM/XY Test - PCB BOM
 # Quantity, Description, Value, RefDes
 # --------------------------------------------
-8,"Standard SMT resistor, capacitor etc","RESC3216N",R90_TOP R180_TOP R270_TOP R0_TOP R270_BOT R180_BOT R90_BOT R0_BOT 
-8,"Dual in-line package, narrow (300 mil)","DIP8",UDIP90_TOP UDIP180_TOP UDIP270_TOP UDIP0_TOP UDIP270_BOT UDIP180_BOT UDIP90_BOT UDIP0_BOT 
-8,"Small outline package, narrow (150mil)","SO8",USO90_TOP USO180_TOP USO270_TOP USO0_TOP USO270_BOT USO180_BOT USO90_BOT USO0_BOT 
+8,"Standard SMT resistor, capacitor etc","RESC3216N",R0_BOT R90_BOT R180_BOT R270_BOT R0_TOP R270_TOP R180_TOP R90_TOP 
+8,"Small outline package, narrow (150mil)","SO8",USO0_BOT USO90_BOT USO180_BOT USO270_BOT USO0_TOP USO270_TOP USO180_TOP USO90_TOP 
+8,"Dual in-line package, narrow (300 mil)","DIP8",UDIP0_BOT UDIP90_BOT UDIP180_BOT UDIP270_BOT UDIP0_TOP UDIP270_TOP UDIP180_TOP UDIP90_TOP 
diff --git a/tests/golden/hid_bom3/Makefile.in b/tests/golden/hid_bom3/Makefile.in
index bca0a51..18b2275 100644
--- a/tests/golden/hid_bom3/Makefile.in
+++ b/tests/golden/hid_bom3/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -362,10 +390,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/hid_bom3/bom_general.bom b/tests/golden/hid_bom3/bom_general.bom
index c2677f5..1296435 100644
--- a/tests/golden/hid_bom3/bom_general.bom
+++ b/tests/golden/hid_bom3/bom_general.bom
@@ -1,10 +1,9 @@
-# $Id$
 # PcbBOM Version 1.0
-# Date: Wed Jun 24 21:42:22 2009 UTC
-# Author: Dan McMahill
+# Date: Sa 03 Aug 2013 16:29:02 GMT UTC
+# Author: Markus Hitter
 # Title: Basic BOM/XY Test - PCB BOM
 # Quantity, Description, Value, RefDes
 # --------------------------------------------
-8,"Standard SMT resistor, capacitor etc","RESC3216N",R90_TOP R180_TOP R270_TOP R0_TOP R270_BOT R180_BOT R90_BOT R0_BOT 
-8,"Dual in-line package, narrow (300 mil)","DIP8",UDIP90_TOP UDIP180_TOP UDIP270_TOP UDIP0_TOP UDIP270_BOT UDIP180_BOT UDIP90_BOT UDIP0_BOT 
-8,"Small outline package, narrow (150mil)","SO8",USO90_TOP USO180_TOP USO270_TOP USO0_TOP USO270_BOT USO180_BOT USO90_BOT USO0_BOT 
+8,"Standard SMT resistor, capacitor etc","RESC3216N",R0_BOT R90_BOT R180_BOT R270_BOT R0_TOP R270_TOP R180_TOP R90_TOP 
+8,"Small outline package, narrow (150mil)","SO8",USO0_BOT USO90_BOT USO180_BOT USO270_BOT USO0_TOP USO270_TOP USO180_TOP USO90_TOP 
+8,"Dual in-line package, narrow (300 mil)","DIP8",UDIP0_BOT UDIP90_BOT UDIP180_BOT UDIP270_BOT UDIP0_TOP UDIP270_TOP UDIP180_TOP UDIP90_TOP 
diff --git a/tests/golden/hid_bom3/test.xy b/tests/golden/hid_bom3/test.xy
index c2c9ea2..52c3488 100644
--- a/tests/golden/hid_bom3/test.xy
+++ b/tests/golden/hid_bom3/test.xy
@@ -1,32 +1,31 @@
-# $Id$
 # PcbXY Version 1.0
-# Date: Wed Jun 24 21:42:22 2009 UTC
-# Author: Dan McMahill
+# Date: Sa 03 Aug 2013 16:29:02 GMT UTC
+# Author: Markus Hitter
 # Title: Basic BOM/XY Test - PCB X-Y
 # RefDes, Description, Value, X, Y, rotation, top/bottom
-# X,Y in mils.  rotation in degrees.
+# X,Y in mil.  rotation in degrees.
 # --------------------------------------------
-R90_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",1700.00,4300.00,90,top
-R180_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",1300.00,4300.00,180,top
-R270_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",1000.00,4300.00,270,top
+R0_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",600.00,3900.00,180,bottom
+R90_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",1000.00,3900.00,270,bottom
+R180_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",1300.00,3900.00,0,bottom
+R270_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",1700.00,3900.00,90,bottom
+USO0_BOT,"Small outline package, narrow (150mil)","SO8",600.00,2600.00,180,bottom
+USO90_BOT,"Small outline package, narrow (150mil)","SO8",1000.00,2600.00,270,bottom
+USO180_BOT,"Small outline package, narrow (150mil)","SO8",1300.00,2600.00,0,bottom
+USO270_BOT,"Small outline package, narrow (150mil)","SO8",1700.00,2600.00,90,bottom
+UDIP0_BOT,"Dual in-line package, narrow (300 mil)","DIP8",550.00,650.00,180,bottom
+UDIP90_BOT,"Dual in-line package, narrow (300 mil)","DIP8",1250.00,650.00,270,bottom
+UDIP180_BOT,"Dual in-line package, narrow (300 mil)","DIP8",1950.00,650.00,0,bottom
+UDIP270_BOT,"Dual in-line package, narrow (300 mil)","DIP8",2650.00,650.00,90,bottom
+USO0_TOP,"Small outline package, narrow (150mil)","SO8",600.00,3200.00,0,top
+USO270_TOP,"Small outline package, narrow (150mil)","SO8",1000.00,3200.00,90,top
+USO180_TOP,"Small outline package, narrow (150mil)","SO8",1300.00,3200.00,180,top
+USO90_TOP,"Small outline package, narrow (150mil)","SO8",1700.00,3200.00,270,top
+UDIP0_TOP,"Dual in-line package, narrow (300 mil)","DIP8",550.00,1450.00,0,top
+UDIP270_TOP,"Dual in-line package, narrow (300 mil)","DIP8",1250.00,1450.00,90,top
+UDIP180_TOP,"Dual in-line package, narrow (300 mil)","DIP8",1950.00,1450.00,180,top
+UDIP90_TOP,"Dual in-line package, narrow (300 mil)","DIP8",2650.00,1450.00,270,top
 R0_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",600.00,4300.00,0,top
-UDIP90_TOP,"Dual in-line package, narrow (300 mil)","DIP8",2650.00,1450.00,180,top
-UDIP180_TOP,"Dual in-line package, narrow (300 mil)","DIP8",1950.00,1450.00,270,top
-UDIP270_TOP,"Dual in-line package, narrow (300 mil)","DIP8",1250.00,1450.00,0,top
-UDIP0_TOP,"Dual in-line package, narrow (300 mil)","DIP8",550.00,1450.00,90,top
-USO90_TOP,"Small outline package, narrow (150mil)","SO8",1700.00,3200.00,180,top
-USO180_TOP,"Small outline package, narrow (150mil)","SO8",1300.00,3200.00,270,top
-USO270_TOP,"Small outline package, narrow (150mil)","SO8",1000.00,3200.00,0,top
-USO0_TOP,"Small outline package, narrow (150mil)","SO8",600.00,3200.00,90,top
-UDIP270_BOT,"Dual in-line package, narrow (300 mil)","DIP8",2650.00,650.00,270,bottom
-UDIP180_BOT,"Dual in-line package, narrow (300 mil)","DIP8",1950.00,650.00,180,bottom
-UDIP90_BOT,"Dual in-line package, narrow (300 mil)","DIP8",1250.00,650.00,90,bottom
-UDIP0_BOT,"Dual in-line package, narrow (300 mil)","DIP8",550.00,650.00,0,bottom
-USO270_BOT,"Small outline package, narrow (150mil)","SO8",1700.00,2600.00,270,bottom
-USO180_BOT,"Small outline package, narrow (150mil)","SO8",1300.00,2600.00,180,bottom
-USO90_BOT,"Small outline package, narrow (150mil)","SO8",1000.00,2600.00,90,bottom
-USO0_BOT,"Small outline package, narrow (150mil)","SO8",600.00,2600.00,0,bottom
-R270_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",1700.00,3900.00,270,bottom
-R180_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",1300.00,3900.00,180,bottom
-R90_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",1000.00,3900.00,90,bottom
-R0_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",600.00,3900.00,0,bottom
+R270_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",1000.00,4300.00,90,top
+R180_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",1300.00,4300.00,180,top
+R90_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",1700.00,4300.00,270,top
diff --git a/tests/golden/hid_bom4/Makefile.in b/tests/golden/hid_bom4/Makefile.in
index b50ed53..3e0582a 100644
--- a/tests/golden/hid_bom4/Makefile.in
+++ b/tests/golden/hid_bom4/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -362,10 +390,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/hid_bom4/bom_general.bom b/tests/golden/hid_bom4/bom_general.bom
index bb246f5..de49769 100644
--- a/tests/golden/hid_bom4/bom_general.bom
+++ b/tests/golden/hid_bom4/bom_general.bom
@@ -1,10 +1,9 @@
-# $Id$
 # PcbBOM Version 1.0
-# Date: Wed Jun 24 21:42:23 2009 UTC
-# Author: Dan McMahill
+# Date: Sa 03 Aug 2013 16:29:04 GMT UTC
+# Author: Markus Hitter
 # Title: Basic BOM/XY Test - PCB BOM
 # Quantity, Description, Value, RefDes
 # --------------------------------------------
-8,"Standard SMT resistor, capacitor etc","RESC3216N",R90_TOP R180_TOP R270_TOP R0_TOP R270_BOT R180_BOT R90_BOT R0_BOT 
-8,"Dual in-line package, narrow (300 mil)","DIP8",UDIP90_TOP UDIP180_TOP UDIP270_TOP UDIP0_TOP UDIP270_BOT UDIP180_BOT UDIP90_BOT UDIP0_BOT 
-8,"Small outline package, narrow (150mil)","SO8",USO90_TOP USO180_TOP USO270_TOP USO0_TOP USO270_BOT USO180_BOT USO90_BOT USO0_BOT 
+8,"Standard SMT resistor, capacitor etc","RESC3216N",R0_BOT R90_BOT R180_BOT R270_BOT R0_TOP R270_TOP R180_TOP R90_TOP 
+8,"Small outline package, narrow (150mil)","SO8",USO0_BOT USO90_BOT USO180_BOT USO270_BOT USO0_TOP USO270_TOP USO180_TOP USO90_TOP 
+8,"Dual in-line package, narrow (300 mil)","DIP8",UDIP0_BOT UDIP90_BOT UDIP180_BOT UDIP270_BOT UDIP0_TOP UDIP270_TOP UDIP180_TOP UDIP90_TOP 
diff --git a/tests/golden/hid_bom4/bom_general.xy b/tests/golden/hid_bom4/bom_general.xy
index fb1350e..dd42291 100644
--- a/tests/golden/hid_bom4/bom_general.xy
+++ b/tests/golden/hid_bom4/bom_general.xy
@@ -1,32 +1,31 @@
-# $Id$
 # PcbXY Version 1.0
-# Date: Wed Jun 24 21:42:23 2009 UTC
-# Author: Dan McMahill
+# Date: Sa 03 Aug 2013 16:29:04 GMT UTC
+# Author: Markus Hitter
 # Title: Basic BOM/XY Test - PCB X-Y
 # RefDes, Description, Value, X, Y, rotation, top/bottom
 # X,Y in mm.  rotation in degrees.
 # --------------------------------------------
-R90_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",43.18,109.22,90,top
-R180_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",33.02,109.22,180,top
-R270_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",25.40,109.22,270,top
+R0_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",15.24,99.06,180,bottom
+R90_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",25.40,99.06,270,bottom
+R180_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",33.02,99.06,0,bottom
+R270_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",43.18,99.06,90,bottom
+USO0_BOT,"Small outline package, narrow (150mil)","SO8",15.24,66.04,180,bottom
+USO90_BOT,"Small outline package, narrow (150mil)","SO8",25.40,66.04,270,bottom
+USO180_BOT,"Small outline package, narrow (150mil)","SO8",33.02,66.04,0,bottom
+USO270_BOT,"Small outline package, narrow (150mil)","SO8",43.18,66.04,90,bottom
+UDIP0_BOT,"Dual in-line package, narrow (300 mil)","DIP8",13.97,16.51,180,bottom
+UDIP90_BOT,"Dual in-line package, narrow (300 mil)","DIP8",31.75,16.51,270,bottom
+UDIP180_BOT,"Dual in-line package, narrow (300 mil)","DIP8",49.53,16.51,0,bottom
+UDIP270_BOT,"Dual in-line package, narrow (300 mil)","DIP8",67.31,16.51,90,bottom
+USO0_TOP,"Small outline package, narrow (150mil)","SO8",15.24,81.28,0,top
+USO270_TOP,"Small outline package, narrow (150mil)","SO8",25.40,81.28,90,top
+USO180_TOP,"Small outline package, narrow (150mil)","SO8",33.02,81.28,180,top
+USO90_TOP,"Small outline package, narrow (150mil)","SO8",43.18,81.28,270,top
+UDIP0_TOP,"Dual in-line package, narrow (300 mil)","DIP8",13.97,36.83,0,top
+UDIP270_TOP,"Dual in-line package, narrow (300 mil)","DIP8",31.75,36.83,90,top
+UDIP180_TOP,"Dual in-line package, narrow (300 mil)","DIP8",49.53,36.83,180,top
+UDIP90_TOP,"Dual in-line package, narrow (300 mil)","DIP8",67.31,36.83,270,top
 R0_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",15.24,109.22,0,top
-UDIP90_TOP,"Dual in-line package, narrow (300 mil)","DIP8",67.31,36.83,180,top
-UDIP180_TOP,"Dual in-line package, narrow (300 mil)","DIP8",49.53,36.83,270,top
-UDIP270_TOP,"Dual in-line package, narrow (300 mil)","DIP8",31.75,36.83,0,top
-UDIP0_TOP,"Dual in-line package, narrow (300 mil)","DIP8",13.97,36.83,90,top
-USO90_TOP,"Small outline package, narrow (150mil)","SO8",43.18,81.28,180,top
-USO180_TOP,"Small outline package, narrow (150mil)","SO8",33.02,81.28,270,top
-USO270_TOP,"Small outline package, narrow (150mil)","SO8",25.40,81.28,0,top
-USO0_TOP,"Small outline package, narrow (150mil)","SO8",15.24,81.28,90,top
-UDIP270_BOT,"Dual in-line package, narrow (300 mil)","DIP8",67.31,16.51,270,bottom
-UDIP180_BOT,"Dual in-line package, narrow (300 mil)","DIP8",49.53,16.51,180,bottom
-UDIP90_BOT,"Dual in-line package, narrow (300 mil)","DIP8",31.75,16.51,90,bottom
-UDIP0_BOT,"Dual in-line package, narrow (300 mil)","DIP8",13.97,16.51,0,bottom
-USO270_BOT,"Small outline package, narrow (150mil)","SO8",43.18,66.04,270,bottom
-USO180_BOT,"Small outline package, narrow (150mil)","SO8",33.02,66.04,180,bottom
-USO90_BOT,"Small outline package, narrow (150mil)","SO8",25.40,66.04,90,bottom
-USO0_BOT,"Small outline package, narrow (150mil)","SO8",15.24,66.04,0,bottom
-R270_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",43.18,99.06,270,bottom
-R180_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",33.02,99.06,180,bottom
-R90_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",25.40,99.06,90,bottom
-R0_BOT,"Standard SMT resistor, capacitor etc","RESC3216N",15.24,99.06,0,bottom
+R270_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",25.40,109.22,90,top
+R180_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",33.02,109.22,180,top
+R90_TOP,"Standard SMT resistor, capacitor etc","RESC3216N",43.18,109.22,270,top
diff --git a/tests/golden/hid_gcode1/Makefile.am b/tests/golden/hid_gcode1/Makefile.am
index b07c896..3f307e6 100644
--- a/tests/golden/hid_gcode1/Makefile.am
+++ b/tests/golden/hid_gcode1/Makefile.am
@@ -1,6 +1,7 @@
 ## -*- makefile -*-
 
 EXTRA_DIST= \
-	gcode_oneline.gcode.bottom.cnc \
-	gcode_oneline.gcode.drill.cnc \
-	gcode_oneline.gcode.top.cnc
+	gcode_oneline-0.8890.drill.gcode \
+	gcode_oneline-bottom.gcode \
+	gcode_oneline-outline.gcode \
+	gcode_oneline-top.gcode
diff --git a/tests/golden/hid_gcode1/Makefile.in b/tests/golden/hid_gcode1/Makefile.in
index 5e97710..04c9b50 100644
--- a/tests/golden/hid_gcode1/Makefile.in
+++ b/tests/golden/hid_gcode1/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -275,9 +303,10 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = \
-	gcode_oneline.gcode.bottom.cnc \
-	gcode_oneline.gcode.drill.cnc \
-	gcode_oneline.gcode.top.cnc
+	gcode_oneline-0.8890.drill.gcode \
+	gcode_oneline-bottom.gcode \
+	gcode_oneline-outline.gcode \
+	gcode_oneline-top.gcode
 
 all: all-am
 
@@ -363,10 +392,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/hid_gcode1/gcode_oneline-0.8890.drill.gcode b/tests/golden/hid_gcode1/gcode_oneline-0.8890.drill.gcode
new file mode 100644
index 0000000..366c766
--- /dev/null
+++ b/tests/golden/hid_gcode1/gcode_oneline-0.8890.drill.gcode
@@ -0,0 +1,14 @@
+(Created by G-code exporter)
+(Fri Nov  2 00:02:36 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Drill file: 1 drills)
+(Drill diameter: 0.889000 mm)
+#100=2.000000  (safe Z)
+#104=-2.000000  (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F50.000000
+G0 Z#100
+G81 X27.940000 Y12.700000 Z#104 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode1/gcode_oneline.gcode.bottom.cnc b/tests/golden/hid_gcode1/gcode_oneline-bottom.gcode
similarity index 64%
rename from tests/golden/hid_gcode1/gcode_oneline.gcode.bottom.cnc
rename to tests/golden/hid_gcode1/gcode_oneline-bottom.gcode
index 2031270..05869ab 100644
--- a/tests/golden/hid_gcode1/gcode_oneline.gcode.bottom.cnc
+++ b/tests/golden/hid_gcode1/gcode_oneline-bottom.gcode
@@ -1,16 +1,21 @@
 (Created by G-code exporter)
-( Tue Mar  9 17:31:54 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
+(Fri Nov  2 00:02:36 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Accuracy 600 dpi)
+(Tool diameter: 0.200000 mm)
 #100=2.000000  (safe Z)
 #101=-0.050000  (cutting depth)
+#102=25.000000  (plunge feedrate)
+#103=50.000000  (feedrate)
+(with predrilling)
 (---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G21 G90 G64 P0.003 M3 S3000 M7
 G0 Z#100
 (polygon 1)
 G0 X27.770667 Y13.546667    (start point)
-G1 Z#101
+G1 Z#101 F#102
+F#103
 G1 X27.559000 Y13.462000
 G1 X27.305000 Y13.292667
 G1 X7.450667 Y13.292667
@@ -30,5 +35,9 @@ G1 X28.194000 Y13.504333
 G1 X27.770667 Y13.546667
 G0 Z#100
 (polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
+(predrilling)
+F#102
+G81 X27.940000 Y12.700000 Z#101 R#100
+(1 predrills)
+(milling distance 45.38mm = 1.79in)
 M5 M9 M2
diff --git a/tests/golden/hid_gcode1/gcode_oneline-outline.gcode b/tests/golden/hid_gcode1/gcode_oneline-outline.gcode
new file mode 100644
index 0000000..e6907b2
--- /dev/null
+++ b/tests/golden/hid_gcode1/gcode_oneline-outline.gcode
@@ -0,0 +1,23 @@
+(Created by G-code exporter)
+(Fri Nov  2 00:02:36 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Outline mill file)
+(Tool diameter: 1.000000 mm)
+#100=2.000000  (safe Z)
+#105=-1.000000  (mill depth)
+#106=25.000000  (mill plunge feedrate)
+#107=50.000000  (mill feedrate)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7
+G0 Z#100
+G0 X51.300000 Y-0.500000
+G1 Z#105 F#106
+G1 X-0.500000 Y-0.500000 F#107
+G1 X-0.500000 Y25.900000
+G1 X51.300000 Y25.900000
+G1 X51.300000 Y-0.500000
+G0 Z#100
+M5 M9 M2
+(end, total distance G0 3.00 mm = 0.12 in)
+(     total distance G1 159.40 mm = 6.28 in)
diff --git a/tests/golden/hid_gcode7/gcode_oneline.gcode.top.cnc b/tests/golden/hid_gcode1/gcode_oneline-top.gcode
similarity index 69%
rename from tests/golden/hid_gcode7/gcode_oneline.gcode.top.cnc
rename to tests/golden/hid_gcode1/gcode_oneline-top.gcode
index 4c64804..97f7715 100644
--- a/tests/golden/hid_gcode7/gcode_oneline.gcode.top.cnc
+++ b/tests/golden/hid_gcode1/gcode_oneline-top.gcode
@@ -1,16 +1,21 @@
 (Created by G-code exporter)
-( Tue Mar  9 17:45:08 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
+(Fri Nov  2 00:02:35 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Accuracy 600 dpi)
+(Tool diameter: 0.200000 mm)
 #100=2.000000  (safe Z)
 #101=-0.050000  (cutting depth)
+#102=25.000000  (plunge feedrate)
+#103=50.000000  (feedrate)
+(no predrilling)
 (---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G21 G90 G64 P0.003 M3 S3000 M7
 G0 Z#100
 (polygon 1)
 G0 X22.733000 Y13.546667    (start point)
-G1 Z#101
+G1 Z#101 F#102
+F#103
 G1 X22.521333 Y13.462000
 G1 X22.267333 Y13.292667
 G1 X2.413000 Y13.292667
@@ -30,5 +35,5 @@ G1 X23.156333 Y13.504333
 G1 X22.733000 Y13.546667
 G0 Z#100
 (polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
+(milling distance 45.38mm = 1.79in)
 M5 M9 M2
diff --git a/tests/golden/hid_gcode1/gcode_oneline.gcode.drill.cnc b/tests/golden/hid_gcode1/gcode_oneline.gcode.drill.cnc
deleted file mode 100644
index 63f6a2d..0000000
--- a/tests/golden/hid_gcode1/gcode_oneline.gcode.drill.cnc
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar  9 17:31:54 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000  (safe Z)
-#101=-2.000000  (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode10/Makefile.am b/tests/golden/hid_gcode10/Makefile.am
index b07c896..7d51964 100644
--- a/tests/golden/hid_gcode10/Makefile.am
+++ b/tests/golden/hid_gcode10/Makefile.am
@@ -1,6 +1,7 @@
 ## -*- makefile -*-
 
 EXTRA_DIST= \
-	gcode_oneline.gcode.bottom.cnc \
-	gcode_oneline.gcode.drill.cnc \
-	gcode_oneline.gcode.top.cnc
+	gcode_oneline-bottom.gcode \
+	gcode_oneline-drillmill.gcode \
+	gcode_oneline-outline.gcode \
+	gcode_oneline-top.gcode
diff --git a/tests/golden/hid_gcode10/Makefile.in b/tests/golden/hid_gcode10/Makefile.in
index 7f6bc09..7fe32c3 100644
--- a/tests/golden/hid_gcode10/Makefile.in
+++ b/tests/golden/hid_gcode10/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -275,9 +303,10 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = \
-	gcode_oneline.gcode.bottom.cnc \
-	gcode_oneline.gcode.drill.cnc \
-	gcode_oneline.gcode.top.cnc
+	gcode_oneline-bottom.gcode \
+	gcode_oneline-drillmill.gcode \
+	gcode_oneline-outline.gcode \
+	gcode_oneline-top.gcode
 
 all: all-am
 
@@ -363,10 +392,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/hid_gcode10/gcode_oneline.gcode.bottom.cnc b/tests/golden/hid_gcode10/gcode_oneline-bottom.gcode
similarity index 66%
rename from tests/golden/hid_gcode10/gcode_oneline.gcode.bottom.cnc
rename to tests/golden/hid_gcode10/gcode_oneline-bottom.gcode
index 19a703d..d864875 100644
--- a/tests/golden/hid_gcode10/gcode_oneline.gcode.bottom.cnc
+++ b/tests/golden/hid_gcode10/gcode_oneline-bottom.gcode
@@ -1,16 +1,21 @@
 (Created by G-code exporter)
-( Tue Mar  9 17:45:32 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
+(Fri Nov  2 00:03:20 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Accuracy 600 dpi)
+(Tool diameter: 0.000200 mm)
 #100=0.002000  (safe Z)
 #101=-0.000050  (cutting depth)
+#102=0.025000  (plunge feedrate)
+#103=0.050000  (feedrate)
+(with predrilling)
 (---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G21 G90 G64 P0.003 M3 S3000 M7
 G0 Z#100
 (polygon 1)
 G0 X27.770667 Y13.462000    (start point)
-G1 Z#101
+G1 Z#101 F#102
+F#103
 G1 X27.516667 Y13.335000
 G1 X27.347333 Y13.208000
 G1 X7.408333 Y13.165667
@@ -30,5 +35,8 @@ G1 X28.024667 Y13.462000
 G1 X27.770667 Y13.462000
 G0 Z#100
 (polygon end, distance 44.84)
-(end, total distance 44.84mm = 1.77in)
+(predrilling)
+F#102
+(0 predrills)
+(milling distance 44.84mm = 1.77in)
 M5 M9 M2
diff --git a/tests/golden/hid_gcode10/gcode_oneline-drillmill.gcode b/tests/golden/hid_gcode10/gcode_oneline-drillmill.gcode
new file mode 100644
index 0000000..ce13e4a
--- /dev/null
+++ b/tests/golden/hid_gcode10/gcode_oneline-drillmill.gcode
@@ -0,0 +1,26 @@
+(Created by G-code exporter)
+(Fri Nov 23 00:31:48 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Drillmill file)
+(Tool diameter: 0.001000 mm)
+#100=0.002000  (safe Z)
+#105=-0.001000  (mill depth)
+#106=0.025000  (mill plunge feedrate)
+#107=0.050000  (mill feedrate)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7
+G0 X27.940000 Y12.700000
+G1 Z#105 F#106
+F#107
+G1 X28.384000 Y12.700000
+G1 X28.216829 Y13.047133
+G1 X27.841201 Y13.132868
+G1 X27.539970 Y12.892644
+G1 X27.539970 Y12.507356
+G1 X27.841201 Y12.267132
+G1 X28.216829 Y12.352867
+G1 X28.384000 Y12.700000
+G0 X27.940000 Y12.700000
+G0 Z#100
+M5 M9 M2
diff --git a/tests/golden/hid_gcode10/gcode_oneline-outline.gcode b/tests/golden/hid_gcode10/gcode_oneline-outline.gcode
new file mode 100644
index 0000000..5be0d3f
--- /dev/null
+++ b/tests/golden/hid_gcode10/gcode_oneline-outline.gcode
@@ -0,0 +1,23 @@
+(Created by G-code exporter)
+(Fri Nov  2 00:03:20 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Outline mill file)
+(Tool diameter: 0.001000 mm)
+#100=0.002000  (safe Z)
+#105=-0.001000  (mill depth)
+#106=0.025000  (mill plunge feedrate)
+#107=0.050000  (mill feedrate)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7
+G0 Z#100
+G0 X50.800500 Y-0.000500
+G1 Z#105 F#106
+G1 X-0.000500 Y-0.000500 F#107
+G1 X-0.000500 Y25.400500
+G1 X50.800500 Y25.400500
+G1 X50.800500 Y-0.000500
+G0 Z#100
+M5 M9 M2
+(end, total distance G0 0.00 mm = 0.00 in)
+(     total distance G1 152.41 mm = 6.00 in)
diff --git a/tests/golden/hid_gcode10/gcode_oneline.gcode.top.cnc b/tests/golden/hid_gcode10/gcode_oneline-top.gcode
similarity index 69%
rename from tests/golden/hid_gcode10/gcode_oneline.gcode.top.cnc
rename to tests/golden/hid_gcode10/gcode_oneline-top.gcode
index a1d48bd..aa5de79 100644
--- a/tests/golden/hid_gcode10/gcode_oneline.gcode.top.cnc
+++ b/tests/golden/hid_gcode10/gcode_oneline-top.gcode
@@ -1,16 +1,21 @@
 (Created by G-code exporter)
-( Tue Mar  9 17:45:28 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
+(Fri Nov  2 00:03:20 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Accuracy 600 dpi)
+(Tool diameter: 0.000200 mm)
 #100=0.002000  (safe Z)
 #101=-0.000050  (cutting depth)
+#102=0.025000  (plunge feedrate)
+#103=0.050000  (feedrate)
+(no predrilling)
 (---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G21 G90 G64 P0.003 M3 S3000 M7
 G0 Z#100
 (polygon 1)
 G0 X22.733000 Y13.462000    (start point)
-G1 Z#101
+G1 Z#101 F#102
+F#103
 G1 X22.479000 Y13.335000
 G1 X22.309667 Y13.208000
 G1 X2.370667 Y13.165667
@@ -30,5 +35,5 @@ G1 X22.987000 Y13.462000
 G1 X22.733000 Y13.462000
 G0 Z#100
 (polygon end, distance 44.84)
-(end, total distance 44.84mm = 1.77in)
+(milling distance 44.84mm = 1.77in)
 M5 M9 M2
diff --git a/tests/golden/hid_gcode10/gcode_oneline.gcode.drill.cnc b/tests/golden/hid_gcode10/gcode_oneline.gcode.drill.cnc
deleted file mode 100644
index 7deace0..0000000
--- a/tests/golden/hid_gcode10/gcode_oneline.gcode.drill.cnc
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar  9 17:45:32 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=0.002000  (safe Z)
-#101=-0.002000  (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode11/Makefile.am b/tests/golden/hid_gcode11/Makefile.am
index b07c896..bb664fe 100644
--- a/tests/golden/hid_gcode11/Makefile.am
+++ b/tests/golden/hid_gcode11/Makefile.am
@@ -1,6 +1,7 @@
 ## -*- makefile -*-
 
 EXTRA_DIST= \
-	gcode_oneline.gcode.bottom.cnc \
-	gcode_oneline.gcode.drill.cnc \
-	gcode_oneline.gcode.top.cnc
+	gcode_oneline-0.0350.drill.gcode \
+	gcode_oneline-bottom.gcode \
+	gcode_oneline-outline.gcode \
+	gcode_oneline-top.gcode
diff --git a/tests/golden/hid_gcode11/Makefile.in b/tests/golden/hid_gcode11/Makefile.in
index 1a4bee6..2cb0d4a 100644
--- a/tests/golden/hid_gcode11/Makefile.in
+++ b/tests/golden/hid_gcode11/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -275,9 +303,10 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = \
-	gcode_oneline.gcode.bottom.cnc \
-	gcode_oneline.gcode.drill.cnc \
-	gcode_oneline.gcode.top.cnc
+	gcode_oneline-0.0350.drill.gcode \
+	gcode_oneline-bottom.gcode \
+	gcode_oneline-outline.gcode \
+	gcode_oneline-top.gcode
 
 all: all-am
 
@@ -363,10 +392,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/hid_gcode11/gcode_oneline-0.0350.drill.gcode b/tests/golden/hid_gcode11/gcode_oneline-0.0350.drill.gcode
new file mode 100644
index 0000000..7325255
--- /dev/null
+++ b/tests/golden/hid_gcode11/gcode_oneline-0.0350.drill.gcode
@@ -0,0 +1,14 @@
+(Created by G-code exporter)
+(Fri Nov  2 00:03:23 2012)
+(Units: inch)
+(Board size: 2.00 x 1.00 inches)
+(Drill file: 1 drills)
+(Drill diameter: 0.035000 inch)
+#100=2.000000  (safe Z)
+#104=-2.000000  (drill depth)
+(---------------------------------)
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F50.000000
+G0 Z#100
+G81 X1.100000 Y0.500000 Z#104 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode11/gcode_oneline.gcode.bottom.cnc b/tests/golden/hid_gcode11/gcode_oneline-bottom.gcode
similarity index 72%
rename from tests/golden/hid_gcode11/gcode_oneline.gcode.bottom.cnc
rename to tests/golden/hid_gcode11/gcode_oneline-bottom.gcode
index c144b05..8ff53cc 100644
--- a/tests/golden/hid_gcode11/gcode_oneline.gcode.bottom.cnc
+++ b/tests/golden/hid_gcode11/gcode_oneline-bottom.gcode
@@ -1,16 +1,21 @@
 (Created by G-code exporter)
-( Tue Mar  9 17:45:55 2010 )
-(600 dpi)
-(Unit: inch)
-(Board size: 2.00x1.00 inches)
+(Fri Nov  2 00:03:23 2012)
+(Units: inch)
+(Board size: 2.00 x 1.00 inches)
+(Accuracy 600 dpi)
+(Tool diameter: 0.200000 inch)
 #100=2.000000  (safe Z)
 #101=-0.050000  (cutting depth)
+#102=25.000000  (plunge feedrate)
+#103=50.000000  (feedrate)
+(with predrilling)
 (---------------------------------)
-G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
+G17 G20 G90 G64 P0.003 M3 S3000 M7
 G0 Z#100
 (polygon 1)
 G0 X1.085000 Y0.630000    (start point)
-G1 Z#101
+G1 Z#101 F#102
+F#103
 G1 X1.063333 Y0.625000
 G1 X1.055000 Y0.621667
 G1 X0.276667 Y0.618333
@@ -45,5 +50,9 @@ G1 X1.121667 Y0.628333
 G1 X1.085000 Y0.630000
 G0 Z#100
 (polygon end, distance 2.39)
-(end, total distance 60.74mm = 2.39in)
+(predrilling)
+F#102
+G81 X1.100000 Y0.500000 Z#101 R#100
+(1 predrills)
+(milling distance 60.74mm = 2.39in)
 M5 M9 M2
diff --git a/tests/golden/hid_gcode11/gcode_oneline-outline.gcode b/tests/golden/hid_gcode11/gcode_oneline-outline.gcode
new file mode 100644
index 0000000..62e1306
--- /dev/null
+++ b/tests/golden/hid_gcode11/gcode_oneline-outline.gcode
@@ -0,0 +1,23 @@
+(Created by G-code exporter)
+(Fri Nov  2 00:03:23 2012)
+(Units: inch)
+(Board size: 2.00 x 1.00 inches)
+(Outline mill file)
+(Tool diameter: 1.000000 inch)
+#100=2.000000  (safe Z)
+#105=-1.000000  (mill depth)
+#106=25.000000  (mill plunge feedrate)
+#107=50.000000  (mill feedrate)
+(---------------------------------)
+G17 G20 G90 G64 P0.003 M3 S3000 M7
+G0 Z#100
+G0 X2.500000 Y-0.500000
+G1 Z#105 F#106
+G1 X-0.500000 Y-0.500000 F#107
+G1 X-0.500000 Y1.500000
+G1 X2.500000 Y1.500000
+G1 X2.500000 Y-0.500000
+G0 Z#100
+M5 M9 M2
+(end, total distance G0 76.20 mm = 3.00 in)
+(     total distance G1 330.20 mm = 13.00 in)
diff --git a/tests/golden/hid_gcode11/gcode_oneline.gcode.top.cnc b/tests/golden/hid_gcode11/gcode_oneline-top.gcode
similarity index 74%
rename from tests/golden/hid_gcode11/gcode_oneline.gcode.top.cnc
rename to tests/golden/hid_gcode11/gcode_oneline-top.gcode
index ddf7394..67e712a 100644
--- a/tests/golden/hid_gcode11/gcode_oneline.gcode.top.cnc
+++ b/tests/golden/hid_gcode11/gcode_oneline-top.gcode
@@ -1,16 +1,21 @@
 (Created by G-code exporter)
-( Tue Mar  9 17:45:43 2010 )
-(600 dpi)
-(Unit: inch)
-(Board size: 2.00x1.00 inches)
+(Fri Nov  2 00:03:23 2012)
+(Units: inch)
+(Board size: 2.00 x 1.00 inches)
+(Accuracy 600 dpi)
+(Tool diameter: 0.200000 inch)
 #100=2.000000  (safe Z)
 #101=-0.050000  (cutting depth)
+#102=25.000000  (plunge feedrate)
+#103=50.000000  (feedrate)
+(no predrilling)
 (---------------------------------)
-G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
+G17 G20 G90 G64 P0.003 M3 S3000 M7
 G0 Z#100
 (polygon 1)
 G0 X0.886667 Y0.630000    (start point)
-G1 Z#101
+G1 Z#101 F#102
+F#103
 G1 X0.865000 Y0.625000
 G1 X0.856667 Y0.621667
 G1 X0.078333 Y0.618333
@@ -41,5 +46,5 @@ G1 X0.923333 Y0.628333
 G1 X0.886667 Y0.630000
 G0 Z#100
 (polygon end, distance 2.38)
-(end, total distance 60.56mm = 2.38in)
+(milling distance 60.56mm = 2.38in)
 M5 M9 M2
diff --git a/tests/golden/hid_gcode11/gcode_oneline.gcode.drill.cnc b/tests/golden/hid_gcode11/gcode_oneline.gcode.drill.cnc
deleted file mode 100644
index 37b9668..0000000
--- a/tests/golden/hid_gcode11/gcode_oneline.gcode.drill.cnc
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar  9 17:45:55 2010 )
-(Unit: inch)
-(Board size: 2.00x1.00 inches)
-#100=2.000000  (safe Z)
-#101=-2.000000  (drill depth)
-(---------------------------------)
-G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
-G81 X1.100000 Y0.500000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode2/Makefile.am b/tests/golden/hid_gcode2/Makefile.am
index a771564..2feacfd 100644
--- a/tests/golden/hid_gcode2/Makefile.am
+++ b/tests/golden/hid_gcode2/Makefile.am
@@ -1,6 +1,7 @@
 ## -*- makefile -*-
 
 EXTRA_DIST= \
-	out.bottom.cnc \
-	out.drill.cnc \
-	out.top.cnc
+	out-0.8890.drill.gcode \
+	out-bottom.gcode \
+	out-outline.gcode \
+	out-top.gcode
diff --git a/tests/golden/hid_gcode2/Makefile.in b/tests/golden/hid_gcode2/Makefile.in
index 4526b18..edca4e0 100644
--- a/tests/golden/hid_gcode2/Makefile.in
+++ b/tests/golden/hid_gcode2/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -275,9 +303,10 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = \
-	out.bottom.cnc \
-	out.drill.cnc \
-	out.top.cnc
+	out-0.8890.drill.gcode \
+	out-bottom.gcode \
+	out-outline.gcode \
+	out-top.gcode
 
 all: all-am
 
@@ -363,10 +392,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/hid_gcode2/out-0.8890.drill.gcode b/tests/golden/hid_gcode2/out-0.8890.drill.gcode
new file mode 100644
index 0000000..1fac536
--- /dev/null
+++ b/tests/golden/hid_gcode2/out-0.8890.drill.gcode
@@ -0,0 +1,14 @@
+(Created by G-code exporter)
+(Fri Nov  2 00:02:55 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Drill file: 1 drills)
+(Drill diameter: 0.889000 mm)
+#100=2.000000  (safe Z)
+#104=-2.000000  (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F50.000000
+G0 Z#100
+G81 X27.940000 Y12.700000 Z#104 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode7/gcode_oneline.gcode.bottom.cnc b/tests/golden/hid_gcode2/out-bottom.gcode
similarity index 64%
rename from tests/golden/hid_gcode7/gcode_oneline.gcode.bottom.cnc
rename to tests/golden/hid_gcode2/out-bottom.gcode
index b92e532..f29592a 100644
--- a/tests/golden/hid_gcode7/gcode_oneline.gcode.bottom.cnc
+++ b/tests/golden/hid_gcode2/out-bottom.gcode
@@ -1,16 +1,21 @@
 (Created by G-code exporter)
-( Tue Mar  9 17:45:12 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
+(Fri Nov  2 00:02:55 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Accuracy 600 dpi)
+(Tool diameter: 0.200000 mm)
 #100=2.000000  (safe Z)
 #101=-0.050000  (cutting depth)
+#102=25.000000  (plunge feedrate)
+#103=50.000000  (feedrate)
+(with predrilling)
 (---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G21 G90 G64 P0.003 M3 S3000 M7
 G0 Z#100
 (polygon 1)
 G0 X27.770667 Y13.546667    (start point)
-G1 Z#101
+G1 Z#101 F#102
+F#103
 G1 X27.559000 Y13.462000
 G1 X27.305000 Y13.292667
 G1 X7.450667 Y13.292667
@@ -30,5 +35,9 @@ G1 X28.194000 Y13.504333
 G1 X27.770667 Y13.546667
 G0 Z#100
 (polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
+(predrilling)
+F#102
+G81 X27.940000 Y12.700000 Z#101 R#100
+(1 predrills)
+(milling distance 45.38mm = 1.79in)
 M5 M9 M2
diff --git a/tests/golden/hid_gcode2/out-outline.gcode b/tests/golden/hid_gcode2/out-outline.gcode
new file mode 100644
index 0000000..d41ad79
--- /dev/null
+++ b/tests/golden/hid_gcode2/out-outline.gcode
@@ -0,0 +1,23 @@
+(Created by G-code exporter)
+(Fri Nov  2 00:02:55 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Outline mill file)
+(Tool diameter: 1.000000 mm)
+#100=2.000000  (safe Z)
+#105=-1.000000  (mill depth)
+#106=25.000000  (mill plunge feedrate)
+#107=50.000000  (mill feedrate)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7
+G0 Z#100
+G0 X51.300000 Y-0.500000
+G1 Z#105 F#106
+G1 X-0.500000 Y-0.500000 F#107
+G1 X-0.500000 Y25.900000
+G1 X51.300000 Y25.900000
+G1 X51.300000 Y-0.500000
+G0 Z#100
+M5 M9 M2
+(end, total distance G0 3.00 mm = 0.12 in)
+(     total distance G1 159.40 mm = 6.28 in)
diff --git a/tests/golden/hid_gcode8/gcode_oneline.gcode.top.cnc b/tests/golden/hid_gcode2/out-top.gcode
similarity index 69%
rename from tests/golden/hid_gcode8/gcode_oneline.gcode.top.cnc
rename to tests/golden/hid_gcode2/out-top.gcode
index a57aeb7..f59876e 100644
--- a/tests/golden/hid_gcode8/gcode_oneline.gcode.top.cnc
+++ b/tests/golden/hid_gcode2/out-top.gcode
@@ -1,16 +1,21 @@
 (Created by G-code exporter)
-( Tue Mar  9 17:45:16 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
+(Fri Nov  2 00:02:55 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Accuracy 600 dpi)
+(Tool diameter: 0.200000 mm)
 #100=2.000000  (safe Z)
 #101=-0.050000  (cutting depth)
+#102=25.000000  (plunge feedrate)
+#103=50.000000  (feedrate)
+(no predrilling)
 (---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G21 G90 G64 P0.003 M3 S3000 M7
 G0 Z#100
 (polygon 1)
 G0 X22.733000 Y13.546667    (start point)
-G1 Z#101
+G1 Z#101 F#102
+F#103
 G1 X22.521333 Y13.462000
 G1 X22.267333 Y13.292667
 G1 X2.413000 Y13.292667
@@ -30,5 +35,5 @@ G1 X23.156333 Y13.504333
 G1 X22.733000 Y13.546667
 G0 Z#100
 (polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
+(milling distance 45.38mm = 1.79in)
 M5 M9 M2
diff --git a/tests/golden/hid_gcode2/out.drill.cnc b/tests/golden/hid_gcode2/out.drill.cnc
deleted file mode 100644
index f7c6d78..0000000
--- a/tests/golden/hid_gcode2/out.drill.cnc
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar  9 17:35:19 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000  (safe Z)
-#101=-2.000000  (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode3/Makefile.am b/tests/golden/hid_gcode3/Makefile.am
index b07c896..3f307e6 100644
--- a/tests/golden/hid_gcode3/Makefile.am
+++ b/tests/golden/hid_gcode3/Makefile.am
@@ -1,6 +1,7 @@
 ## -*- makefile -*-
 
 EXTRA_DIST= \
-	gcode_oneline.gcode.bottom.cnc \
-	gcode_oneline.gcode.drill.cnc \
-	gcode_oneline.gcode.top.cnc
+	gcode_oneline-0.8890.drill.gcode \
+	gcode_oneline-bottom.gcode \
+	gcode_oneline-outline.gcode \
+	gcode_oneline-top.gcode
diff --git a/tests/golden/hid_gcode3/Makefile.in b/tests/golden/hid_gcode3/Makefile.in
index aa887ad..d107e27 100644
--- a/tests/golden/hid_gcode3/Makefile.in
+++ b/tests/golden/hid_gcode3/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -275,9 +303,10 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = \
-	gcode_oneline.gcode.bottom.cnc \
-	gcode_oneline.gcode.drill.cnc \
-	gcode_oneline.gcode.top.cnc
+	gcode_oneline-0.8890.drill.gcode \
+	gcode_oneline-bottom.gcode \
+	gcode_oneline-outline.gcode \
+	gcode_oneline-top.gcode
 
 all: all-am
 
@@ -363,10 +392,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/hid_gcode3/gcode_oneline-0.8890.drill.gcode b/tests/golden/hid_gcode3/gcode_oneline-0.8890.drill.gcode
new file mode 100644
index 0000000..1b6dddb
--- /dev/null
+++ b/tests/golden/hid_gcode3/gcode_oneline-0.8890.drill.gcode
@@ -0,0 +1,14 @@
+(Created by G-code exporter)
+(Fri Nov  2 00:02:58 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Drill file: 1 drills)
+(Drill diameter: 0.889000 mm)
+#100=2.000000  (safe Z)
+#104=-2.000000  (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F50.000000
+G0 Z#100
+G81 X27.940000 Y12.700000 Z#104 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode3/gcode_oneline-bottom.gcode b/tests/golden/hid_gcode3/gcode_oneline-bottom.gcode
new file mode 100644
index 0000000..573b43e
--- /dev/null
+++ b/tests/golden/hid_gcode3/gcode_oneline-bottom.gcode
@@ -0,0 +1,49 @@
+(Created by G-code exporter)
+(Fri Nov  2 00:02:58 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Accuracy 1200 dpi)
+(Tool diameter: 0.200000 mm)
+#100=2.000000  (safe Z)
+#101=-0.050000  (cutting depth)
+#102=25.000000  (plunge feedrate)
+#103=50.000000  (feedrate)
+(with predrilling)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7
+G0 Z#100
+(polygon 1)
+G0 X27.813000 Y13.546667    (start point)
+G1 Z#101 F#102
+F#103
+G1 X27.664833 Y13.504333
+G1 X27.495500 Y13.419667
+G1 X27.347333 Y13.313833
+G1 X7.450667 Y13.292667
+G1 X7.260167 Y13.208000
+G1 X7.090833 Y13.038667
+G1 X7.006167 Y12.848167
+G1 X7.006167 Y12.530667
+G1 X7.090833 Y12.340167
+G1 X7.260167 Y12.170833
+G1 X7.450667 Y12.086167
+G1 X27.347333 Y12.065000
+G1 X27.495500 Y11.959167
+G1 X27.728333 Y11.853333
+G1 X28.130500 Y11.853333
+G1 X28.448000 Y12.001500
+G1 X28.638500 Y12.213167
+G1 X28.765500 Y12.488333
+G1 X28.765500 Y12.890500
+G1 X28.638500 Y13.165667
+G1 X28.448000 Y13.377333
+G1 X28.130500 Y13.525500
+G1 X27.813000 Y13.546667
+G0 Z#100
+(polygon end, distance 45.39)
+(predrilling)
+F#102
+G81 X27.940000 Y12.700000 Z#101 R#100
+(1 predrills)
+(milling distance 45.39mm = 1.79in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode3/gcode_oneline-outline.gcode b/tests/golden/hid_gcode3/gcode_oneline-outline.gcode
new file mode 100644
index 0000000..6c3ee33
--- /dev/null
+++ b/tests/golden/hid_gcode3/gcode_oneline-outline.gcode
@@ -0,0 +1,23 @@
+(Created by G-code exporter)
+(Fri Nov  2 00:02:58 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Outline mill file)
+(Tool diameter: 1.000000 mm)
+#100=2.000000  (safe Z)
+#105=-1.000000  (mill depth)
+#106=25.000000  (mill plunge feedrate)
+#107=50.000000  (mill feedrate)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7
+G0 Z#100
+G0 X51.300000 Y-0.500000
+G1 Z#105 F#106
+G1 X-0.500000 Y-0.500000 F#107
+G1 X-0.500000 Y25.900000
+G1 X51.300000 Y25.900000
+G1 X51.300000 Y-0.500000
+G0 Z#100
+M5 M9 M2
+(end, total distance G0 3.00 mm = 0.12 in)
+(     total distance G1 159.40 mm = 6.28 in)
diff --git a/tests/golden/hid_gcode3/gcode_oneline-top.gcode b/tests/golden/hid_gcode3/gcode_oneline-top.gcode
new file mode 100644
index 0000000..01c333b
--- /dev/null
+++ b/tests/golden/hid_gcode3/gcode_oneline-top.gcode
@@ -0,0 +1,45 @@
+(Created by G-code exporter)
+(Fri Nov  2 00:02:58 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Accuracy 1200 dpi)
+(Tool diameter: 0.200000 mm)
+#100=2.000000  (safe Z)
+#101=-0.050000  (cutting depth)
+#102=25.000000  (plunge feedrate)
+#103=50.000000  (feedrate)
+(no predrilling)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7
+G0 Z#100
+(polygon 1)
+G0 X22.754167 Y13.546667    (start point)
+G1 Z#101 F#102
+F#103
+G1 X22.606000 Y13.504333
+G1 X22.436667 Y13.419667
+G1 X22.288500 Y13.313833
+G1 X2.391833 Y13.292667
+G1 X2.201333 Y13.208000
+G1 X2.032000 Y13.038667
+G1 X1.947333 Y12.848167
+G1 X1.947333 Y12.530667
+G1 X2.032000 Y12.340167
+G1 X2.201333 Y12.170833
+G1 X2.391833 Y12.086167
+G1 X22.288500 Y12.065000
+G1 X22.436667 Y11.959167
+G1 X22.669500 Y11.853333
+G1 X23.071667 Y11.853333
+G1 X23.389167 Y12.001500
+G1 X23.579667 Y12.213167
+G1 X23.706667 Y12.488333
+G1 X23.706667 Y12.890500
+G1 X23.579667 Y13.165667
+G1 X23.389167 Y13.377333
+G1 X23.071667 Y13.525500
+G1 X22.754167 Y13.546667
+G0 Z#100
+(polygon end, distance 45.39)
+(milling distance 45.39mm = 1.79in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode3/gcode_oneline.gcode.bottom.cnc b/tests/golden/hid_gcode3/gcode_oneline.gcode.bottom.cnc
deleted file mode 100644
index e67b085..0000000
--- a/tests/golden/hid_gcode3/gcode_oneline.gcode.bottom.cnc
+++ /dev/null
@@ -1,40 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar  9 17:36:04 2010 )
-(1200 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000  (safe Z)
-#101=-0.050000  (cutting depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G0 Z#100
-(polygon 1)
-G0 X27.813000 Y13.546667    (start point)
-G1 Z#101
-G1 X27.664833 Y13.504333
-G1 X27.453167 Y13.398500
-G1 X27.326167 Y13.292667
-G1 X7.535333 Y13.292667
-G1 X7.323667 Y13.229167
-G1 X7.069667 Y12.975167
-G1 X7.006167 Y12.763500
-G1 X7.006167 Y12.615333
-G1 X7.069667 Y12.403667
-G1 X7.323667 Y12.149667
-G1 X7.535333 Y12.086167
-G1 X27.326167 Y12.086167
-G1 X27.495500 Y11.959167
-G1 X27.728333 Y11.853333
-G1 X28.130500 Y11.853333
-G1 X28.448000 Y12.001500
-G1 X28.638500 Y12.213167
-G1 X28.765500 Y12.488333
-G1 X28.765500 Y12.890500
-G1 X28.638500 Y13.165667
-G1 X28.448000 Y13.377333
-G1 X28.130500 Y13.525500
-G1 X27.813000 Y13.546667
-G0 Z#100
-(polygon end, distance 45.35)
-(end, total distance 45.35mm = 1.79in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode3/gcode_oneline.gcode.drill.cnc b/tests/golden/hid_gcode3/gcode_oneline.gcode.drill.cnc
deleted file mode 100644
index e7be01d..0000000
--- a/tests/golden/hid_gcode3/gcode_oneline.gcode.drill.cnc
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar  9 17:36:04 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000  (safe Z)
-#101=-2.000000  (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode3/gcode_oneline.gcode.top.cnc b/tests/golden/hid_gcode3/gcode_oneline.gcode.top.cnc
deleted file mode 100644
index d7c8c9f..0000000
--- a/tests/golden/hid_gcode3/gcode_oneline.gcode.top.cnc
+++ /dev/null
@@ -1,40 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar  9 17:35:46 2010 )
-(1200 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000  (safe Z)
-#101=-0.050000  (cutting depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G0 Z#100
-(polygon 1)
-G0 X22.754167 Y13.546667    (start point)
-G1 Z#101
-G1 X22.606000 Y13.504333
-G1 X22.394333 Y13.398500
-G1 X22.267333 Y13.292667
-G1 X2.476500 Y13.292667
-G1 X2.264833 Y13.229167
-G1 X2.010833 Y12.975167
-G1 X1.947333 Y12.763500
-G1 X1.947333 Y12.615333
-G1 X2.010833 Y12.403667
-G1 X2.264833 Y12.149667
-G1 X2.476500 Y12.086167
-G1 X22.267333 Y12.086167
-G1 X22.436667 Y11.959167
-G1 X22.669500 Y11.853333
-G1 X23.071667 Y11.853333
-G1 X23.389167 Y12.001500
-G1 X23.579667 Y12.213167
-G1 X23.706667 Y12.488333
-G1 X23.706667 Y12.890500
-G1 X23.579667 Y13.165667
-G1 X23.389167 Y13.377333
-G1 X23.071667 Y13.525500
-G1 X22.754167 Y13.546667
-G0 Z#100
-(polygon end, distance 45.35)
-(end, total distance 45.35mm = 1.79in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode4/Makefile.am b/tests/golden/hid_gcode4/Makefile.am
index b07c896..3f307e6 100644
--- a/tests/golden/hid_gcode4/Makefile.am
+++ b/tests/golden/hid_gcode4/Makefile.am
@@ -1,6 +1,7 @@
 ## -*- makefile -*-
 
 EXTRA_DIST= \
-	gcode_oneline.gcode.bottom.cnc \
-	gcode_oneline.gcode.drill.cnc \
-	gcode_oneline.gcode.top.cnc
+	gcode_oneline-0.8890.drill.gcode \
+	gcode_oneline-bottom.gcode \
+	gcode_oneline-outline.gcode \
+	gcode_oneline-top.gcode
diff --git a/tests/golden/hid_gcode4/Makefile.in b/tests/golden/hid_gcode4/Makefile.in
index 5e5573c..0821f8b 100644
--- a/tests/golden/hid_gcode4/Makefile.in
+++ b/tests/golden/hid_gcode4/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -275,9 +303,10 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = \
-	gcode_oneline.gcode.bottom.cnc \
-	gcode_oneline.gcode.drill.cnc \
-	gcode_oneline.gcode.top.cnc
+	gcode_oneline-0.8890.drill.gcode \
+	gcode_oneline-bottom.gcode \
+	gcode_oneline-outline.gcode \
+	gcode_oneline-top.gcode
 
 all: all-am
 
@@ -363,10 +392,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/hid_gcode4/gcode_oneline-0.8890.drill.gcode b/tests/golden/hid_gcode4/gcode_oneline-0.8890.drill.gcode
new file mode 100644
index 0000000..bb9de36
--- /dev/null
+++ b/tests/golden/hid_gcode4/gcode_oneline-0.8890.drill.gcode
@@ -0,0 +1,14 @@
+(Created by G-code exporter)
+(Fri Nov  2 00:03:01 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Drill file: 1 drills)
+(Drill diameter: 0.889000 mm)
+#100=2.000000  (safe Z)
+#104=-2.000000  (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F50.000000
+G0 Z#100
+G81 X27.940000 Y12.700000 Z#104 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode4/gcode_oneline.gcode.bottom.cnc b/tests/golden/hid_gcode4/gcode_oneline-bottom.gcode
similarity index 61%
rename from tests/golden/hid_gcode4/gcode_oneline.gcode.bottom.cnc
rename to tests/golden/hid_gcode4/gcode_oneline-bottom.gcode
index d049972..7047347 100644
--- a/tests/golden/hid_gcode4/gcode_oneline.gcode.bottom.cnc
+++ b/tests/golden/hid_gcode4/gcode_oneline-bottom.gcode
@@ -1,16 +1,21 @@
 (Created by G-code exporter)
-( Tue Mar  9 17:36:12 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
+(Fri Nov  2 00:03:01 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Accuracy 600 dpi)
+(Tool diameter: 0.200000 mm)
 #100=2.000000  (safe Z)
-#101=5.000000  (cutting depth)
+#101=0.500000  (cutting depth)
+#102=25.000000  (plunge feedrate)
+#103=50.000000  (feedrate)
+(with predrilling)
 (---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G21 G90 G64 P0.003 M3 S3000 M7
 G0 Z#100
 (polygon 1)
 G0 X27.770667 Y13.546667    (start point)
-G1 Z#101
+G1 Z#101 F#102
+F#103
 G1 X27.559000 Y13.462000
 G1 X27.305000 Y13.292667
 G1 X7.450667 Y13.292667
@@ -30,5 +35,9 @@ G1 X28.194000 Y13.504333
 G1 X27.770667 Y13.546667
 G0 Z#100
 (polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
+(predrilling)
+F#102
+G81 X27.940000 Y12.700000 Z#101 R#100
+(1 predrills)
+(milling distance 45.38mm = 1.79in)
 M5 M9 M2
diff --git a/tests/golden/hid_gcode4/gcode_oneline-outline.gcode b/tests/golden/hid_gcode4/gcode_oneline-outline.gcode
new file mode 100644
index 0000000..fbc10ea
--- /dev/null
+++ b/tests/golden/hid_gcode4/gcode_oneline-outline.gcode
@@ -0,0 +1,23 @@
+(Created by G-code exporter)
+(Fri Nov  2 00:03:01 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Outline mill file)
+(Tool diameter: 1.000000 mm)
+#100=2.000000  (safe Z)
+#105=-1.000000  (mill depth)
+#106=25.000000  (mill plunge feedrate)
+#107=50.000000  (mill feedrate)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7
+G0 Z#100
+G0 X51.300000 Y-0.500000
+G1 Z#105 F#106
+G1 X-0.500000 Y-0.500000 F#107
+G1 X-0.500000 Y25.900000
+G1 X51.300000 Y25.900000
+G1 X51.300000 Y-0.500000
+G0 Z#100
+M5 M9 M2
+(end, total distance G0 3.00 mm = 0.12 in)
+(     total distance G1 159.40 mm = 6.28 in)
diff --git a/tests/golden/hid_gcode4/gcode_oneline.gcode.top.cnc b/tests/golden/hid_gcode4/gcode_oneline-top.gcode
similarity index 65%
rename from tests/golden/hid_gcode4/gcode_oneline.gcode.top.cnc
rename to tests/golden/hid_gcode4/gcode_oneline-top.gcode
index 78e64a5..1f12382 100644
--- a/tests/golden/hid_gcode4/gcode_oneline.gcode.top.cnc
+++ b/tests/golden/hid_gcode4/gcode_oneline-top.gcode
@@ -1,16 +1,21 @@
 (Created by G-code exporter)
-( Tue Mar  9 17:36:08 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
+(Fri Nov  2 00:03:01 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Accuracy 600 dpi)
+(Tool diameter: 0.200000 mm)
 #100=2.000000  (safe Z)
-#101=5.000000  (cutting depth)
+#101=0.500000  (cutting depth)
+#102=25.000000  (plunge feedrate)
+#103=50.000000  (feedrate)
+(no predrilling)
 (---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G21 G90 G64 P0.003 M3 S3000 M7
 G0 Z#100
 (polygon 1)
 G0 X22.733000 Y13.546667    (start point)
-G1 Z#101
+G1 Z#101 F#102
+F#103
 G1 X22.521333 Y13.462000
 G1 X22.267333 Y13.292667
 G1 X2.413000 Y13.292667
@@ -30,5 +35,5 @@ G1 X23.156333 Y13.504333
 G1 X22.733000 Y13.546667
 G0 Z#100
 (polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
+(milling distance 45.38mm = 1.79in)
 M5 M9 M2
diff --git a/tests/golden/hid_gcode4/gcode_oneline.gcode.drill.cnc b/tests/golden/hid_gcode4/gcode_oneline.gcode.drill.cnc
deleted file mode 100644
index c648655..0000000
--- a/tests/golden/hid_gcode4/gcode_oneline.gcode.drill.cnc
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar  9 17:36:12 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000  (safe Z)
-#101=-2.000000  (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode5/Makefile.am b/tests/golden/hid_gcode5/Makefile.am
index b07c896..3f307e6 100644
--- a/tests/golden/hid_gcode5/Makefile.am
+++ b/tests/golden/hid_gcode5/Makefile.am
@@ -1,6 +1,7 @@
 ## -*- makefile -*-
 
 EXTRA_DIST= \
-	gcode_oneline.gcode.bottom.cnc \
-	gcode_oneline.gcode.drill.cnc \
-	gcode_oneline.gcode.top.cnc
+	gcode_oneline-0.8890.drill.gcode \
+	gcode_oneline-bottom.gcode \
+	gcode_oneline-outline.gcode \
+	gcode_oneline-top.gcode
diff --git a/tests/golden/hid_gcode5/Makefile.in b/tests/golden/hid_gcode5/Makefile.in
index 2acc94d..4ca732b 100644
--- a/tests/golden/hid_gcode5/Makefile.in
+++ b/tests/golden/hid_gcode5/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -275,9 +303,10 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = \
-	gcode_oneline.gcode.bottom.cnc \
-	gcode_oneline.gcode.drill.cnc \
-	gcode_oneline.gcode.top.cnc
+	gcode_oneline-0.8890.drill.gcode \
+	gcode_oneline-bottom.gcode \
+	gcode_oneline-outline.gcode \
+	gcode_oneline-top.gcode
 
 all: all-am
 
@@ -363,10 +392,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/hid_gcode5/gcode_oneline-0.8890.drill.gcode b/tests/golden/hid_gcode5/gcode_oneline-0.8890.drill.gcode
new file mode 100644
index 0000000..c78582f
--- /dev/null
+++ b/tests/golden/hid_gcode5/gcode_oneline-0.8890.drill.gcode
@@ -0,0 +1,14 @@
+(Created by G-code exporter)
+(Fri Nov  2 00:03:04 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Drill file: 1 drills)
+(Drill diameter: 0.889000 mm)
+#100=10.000000  (safe Z)
+#104=-2.000000  (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F50.000000
+G0 Z#100
+G81 X27.940000 Y12.700000 Z#104 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode5/gcode_oneline.gcode.bottom.cnc b/tests/golden/hid_gcode5/gcode_oneline-bottom.gcode
similarity index 64%
rename from tests/golden/hid_gcode5/gcode_oneline.gcode.bottom.cnc
rename to tests/golden/hid_gcode5/gcode_oneline-bottom.gcode
index 8041f98..3230534 100644
--- a/tests/golden/hid_gcode5/gcode_oneline.gcode.bottom.cnc
+++ b/tests/golden/hid_gcode5/gcode_oneline-bottom.gcode
@@ -1,16 +1,21 @@
 (Created by G-code exporter)
-( Tue Mar  9 18:06:42 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
+(Fri Nov  2 00:03:04 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Accuracy 600 dpi)
+(Tool diameter: 0.200000 mm)
 #100=10.000000  (safe Z)
 #101=-0.050000  (cutting depth)
+#102=25.000000  (plunge feedrate)
+#103=50.000000  (feedrate)
+(with predrilling)
 (---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G21 G90 G64 P0.003 M3 S3000 M7
 G0 Z#100
 (polygon 1)
 G0 X27.770667 Y13.546667    (start point)
-G1 Z#101
+G1 Z#101 F#102
+F#103
 G1 X27.559000 Y13.462000
 G1 X27.305000 Y13.292667
 G1 X7.450667 Y13.292667
@@ -30,5 +35,9 @@ G1 X28.194000 Y13.504333
 G1 X27.770667 Y13.546667
 G0 Z#100
 (polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
+(predrilling)
+F#102
+G81 X27.940000 Y12.700000 Z#101 R#100
+(1 predrills)
+(milling distance 45.38mm = 1.79in)
 M5 M9 M2
diff --git a/tests/golden/hid_gcode5/gcode_oneline-outline.gcode b/tests/golden/hid_gcode5/gcode_oneline-outline.gcode
new file mode 100644
index 0000000..aca75b7
--- /dev/null
+++ b/tests/golden/hid_gcode5/gcode_oneline-outline.gcode
@@ -0,0 +1,23 @@
+(Created by G-code exporter)
+(Fri Nov  2 00:03:04 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Outline mill file)
+(Tool diameter: 1.000000 mm)
+#100=10.000000  (safe Z)
+#105=-1.000000  (mill depth)
+#106=25.000000  (mill plunge feedrate)
+#107=50.000000  (mill feedrate)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7
+G0 Z#100
+G0 X51.300000 Y-0.500000
+G1 Z#105 F#106
+G1 X-0.500000 Y-0.500000 F#107
+G1 X-0.500000 Y25.900000
+G1 X51.300000 Y25.900000
+G1 X51.300000 Y-0.500000
+G0 Z#100
+M5 M9 M2
+(end, total distance G0 11.00 mm = 0.43 in)
+(     total distance G1 167.40 mm = 6.59 in)
diff --git a/tests/golden/hid_gcode5/gcode_oneline.gcode.top.cnc b/tests/golden/hid_gcode5/gcode_oneline-top.gcode
similarity index 69%
rename from tests/golden/hid_gcode5/gcode_oneline.gcode.top.cnc
rename to tests/golden/hid_gcode5/gcode_oneline-top.gcode
index e3bbd7e..4b72c4d 100644
--- a/tests/golden/hid_gcode5/gcode_oneline.gcode.top.cnc
+++ b/tests/golden/hid_gcode5/gcode_oneline-top.gcode
@@ -1,16 +1,21 @@
 (Created by G-code exporter)
-( Tue Mar  9 18:06:40 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
+(Fri Nov  2 00:03:04 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Accuracy 600 dpi)
+(Tool diameter: 0.200000 mm)
 #100=10.000000  (safe Z)
 #101=-0.050000  (cutting depth)
+#102=25.000000  (plunge feedrate)
+#103=50.000000  (feedrate)
+(no predrilling)
 (---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G21 G90 G64 P0.003 M3 S3000 M7
 G0 Z#100
 (polygon 1)
 G0 X22.733000 Y13.546667    (start point)
-G1 Z#101
+G1 Z#101 F#102
+F#103
 G1 X22.521333 Y13.462000
 G1 X22.267333 Y13.292667
 G1 X2.413000 Y13.292667
@@ -30,5 +35,5 @@ G1 X23.156333 Y13.504333
 G1 X22.733000 Y13.546667
 G0 Z#100
 (polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
+(milling distance 45.38mm = 1.79in)
 M5 M9 M2
diff --git a/tests/golden/hid_gcode5/gcode_oneline.gcode.drill.cnc b/tests/golden/hid_gcode5/gcode_oneline.gcode.drill.cnc
deleted file mode 100644
index 77d8d60..0000000
--- a/tests/golden/hid_gcode5/gcode_oneline.gcode.drill.cnc
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar  9 18:06:42 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=10.000000  (safe Z)
-#101=-2.000000  (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode6/Makefile.am b/tests/golden/hid_gcode6/Makefile.am
index b07c896..3f307e6 100644
--- a/tests/golden/hid_gcode6/Makefile.am
+++ b/tests/golden/hid_gcode6/Makefile.am
@@ -1,6 +1,7 @@
 ## -*- makefile -*-
 
 EXTRA_DIST= \
-	gcode_oneline.gcode.bottom.cnc \
-	gcode_oneline.gcode.drill.cnc \
-	gcode_oneline.gcode.top.cnc
+	gcode_oneline-0.8890.drill.gcode \
+	gcode_oneline-bottom.gcode \
+	gcode_oneline-outline.gcode \
+	gcode_oneline-top.gcode
diff --git a/tests/golden/hid_gcode6/Makefile.in b/tests/golden/hid_gcode6/Makefile.in
index 53acd75..db81e81 100644
--- a/tests/golden/hid_gcode6/Makefile.in
+++ b/tests/golden/hid_gcode6/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -275,9 +303,10 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = \
-	gcode_oneline.gcode.bottom.cnc \
-	gcode_oneline.gcode.drill.cnc \
-	gcode_oneline.gcode.top.cnc
+	gcode_oneline-0.8890.drill.gcode \
+	gcode_oneline-bottom.gcode \
+	gcode_oneline-outline.gcode \
+	gcode_oneline-top.gcode
 
 all: all-am
 
@@ -363,10 +392,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/hid_gcode6/gcode_oneline-0.8890.drill.gcode b/tests/golden/hid_gcode6/gcode_oneline-0.8890.drill.gcode
new file mode 100644
index 0000000..8af6f0b
--- /dev/null
+++ b/tests/golden/hid_gcode6/gcode_oneline-0.8890.drill.gcode
@@ -0,0 +1,14 @@
+(Created by G-code exporter)
+(Fri Nov  2 00:03:08 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Drill file: 1 drills)
+(Drill diameter: 0.889000 mm)
+#100=2.000000  (safe Z)
+#104=-2.000000  (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F50.000000
+G0 Z#100
+G81 X27.940000 Y12.700000 Z#104 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode6/gcode_oneline-bottom.gcode b/tests/golden/hid_gcode6/gcode_oneline-bottom.gcode
new file mode 100644
index 0000000..9cf95e6
--- /dev/null
+++ b/tests/golden/hid_gcode6/gcode_oneline-bottom.gcode
@@ -0,0 +1,42 @@
+(Created by G-code exporter)
+(Sun Mar 16 18:27:36 2014)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Accuracy 600 dpi)
+(Tool diameter: 0.400000 mm)
+#100=2.000000  (safe Z)
+#101=-0.050000  (cutting depth)
+#102=25.000000  (plunge feedrate)
+#103=50.000000  (feedrate)
+(with predrilling)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7
+G0 Z#100
+(polygon 1)
+G0 X27.728333 Y13.631333    (start point)
+G1 Z#101 F#102
+F#103
+G1 X27.347333 Y13.419667
+G1 X7.493000 Y13.419667
+G1 X7.112000 Y13.250333
+G1 X6.900333 Y12.911667
+G1 X6.900333 Y12.446000
+G1 X7.112000 Y12.107333
+G1 X7.493000 Y11.938000
+G1 X27.305000 Y11.938000
+G1 X27.770667 Y11.726333
+G1 X28.194000 Y11.768667
+G1 X28.575000 Y12.022667
+G1 X28.829000 Y12.403667
+G1 X28.829000 Y12.954000
+G1 X28.575000 Y13.335000
+G1 X28.194000 Y13.589000
+G1 X27.728333 Y13.631333
+G0 Z#100
+(polygon end, distance 45.99)
+(predrilling)
+F#102
+G81 X27.940000 Y12.700000 Z#101 R#100
+(1 predrills)
+(milling distance 45.99mm = 1.81in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode6/gcode_oneline-outline.gcode b/tests/golden/hid_gcode6/gcode_oneline-outline.gcode
new file mode 100644
index 0000000..c335b69
--- /dev/null
+++ b/tests/golden/hid_gcode6/gcode_oneline-outline.gcode
@@ -0,0 +1,23 @@
+(Created by G-code exporter)
+(Fri Nov  2 00:03:08 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Outline mill file)
+(Tool diameter: 1.000000 mm)
+#100=2.000000  (safe Z)
+#105=-1.000000  (mill depth)
+#106=25.000000  (mill plunge feedrate)
+#107=50.000000  (mill feedrate)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7
+G0 Z#100
+G0 X51.300000 Y-0.500000
+G1 Z#105 F#106
+G1 X-0.500000 Y-0.500000 F#107
+G1 X-0.500000 Y25.900000
+G1 X51.300000 Y25.900000
+G1 X51.300000 Y-0.500000
+G0 Z#100
+M5 M9 M2
+(end, total distance G0 3.00 mm = 0.12 in)
+(     total distance G1 159.40 mm = 6.28 in)
diff --git a/tests/golden/hid_gcode6/gcode_oneline-top.gcode b/tests/golden/hid_gcode6/gcode_oneline-top.gcode
new file mode 100644
index 0000000..c73773e
--- /dev/null
+++ b/tests/golden/hid_gcode6/gcode_oneline-top.gcode
@@ -0,0 +1,38 @@
+(Created by G-code exporter)
+(Sun Mar 16 18:27:36 2014)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Accuracy 600 dpi)
+(Tool diameter: 0.400000 mm)
+#100=2.000000  (safe Z)
+#101=-0.050000  (cutting depth)
+#102=25.000000  (plunge feedrate)
+#103=50.000000  (feedrate)
+(no predrilling)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7
+G0 Z#100
+(polygon 1)
+G0 X22.690667 Y13.631333    (start point)
+G1 Z#101 F#102
+F#103
+G1 X22.309667 Y13.419667
+G1 X2.455333 Y13.419667
+G1 X2.074333 Y13.250333
+G1 X1.862667 Y12.911667
+G1 X1.862667 Y12.446000
+G1 X2.074333 Y12.107333
+G1 X2.455333 Y11.938000
+G1 X22.267333 Y11.938000
+G1 X22.733000 Y11.726333
+G1 X23.156333 Y11.768667
+G1 X23.537333 Y12.022667
+G1 X23.791333 Y12.403667
+G1 X23.791333 Y12.954000
+G1 X23.537333 Y13.335000
+G1 X23.156333 Y13.589000
+G1 X22.690667 Y13.631333
+G0 Z#100
+(polygon end, distance 45.99)
+(milling distance 45.99mm = 1.81in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode6/gcode_oneline.gcode.bottom.cnc b/tests/golden/hid_gcode6/gcode_oneline.gcode.bottom.cnc
deleted file mode 100644
index 7d33799..0000000
--- a/tests/golden/hid_gcode6/gcode_oneline.gcode.bottom.cnc
+++ /dev/null
@@ -1,43 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar  9 17:45:05 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000  (safe Z)
-#101=-0.050000  (cutting depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G0 Z#100
-(polygon 1)
-G0 X0.000000 Y25.400000    (start point)
-G1 Z#101
-G1 X0.000000 Y0.000000
-G1 X37.295667 Y0.000000
-G1 X38.057667 Y0.635000
-G1 X39.073667 Y1.524000
-G1 X39.962667 Y2.540000
-G1 X40.597667 Y3.302000
-G1 X41.486667 Y4.656667
-G1 X41.952333 Y5.503333
-G1 X42.418000 Y6.477000
-G1 X42.883667 Y7.704667
-G1 X43.264667 Y9.017000
-G1 X43.518667 Y10.329333
-G1 X43.645667 Y11.514667
-G1 X43.645667 Y13.843000
-G1 X43.518667 Y15.028333
-G1 X43.264667 Y16.340667
-G1 X42.883667 Y17.653000
-G1 X42.418000 Y18.880667
-G1 X41.952333 Y19.854333
-G1 X41.486667 Y20.701000
-G1 X40.597667 Y22.055667
-G1 X39.962667 Y22.817667
-G1 X39.073667 Y23.833667
-G1 X38.057667 Y24.722667
-G1 X37.253333 Y25.400000
-G1 X0.000000 Y25.400000
-G0 Z#100
-(polygon end, distance 129.45)
-(end, total distance 129.45mm = 5.10in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode6/gcode_oneline.gcode.drill.cnc b/tests/golden/hid_gcode6/gcode_oneline.gcode.drill.cnc
deleted file mode 100644
index 6b44265..0000000
--- a/tests/golden/hid_gcode6/gcode_oneline.gcode.drill.cnc
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar  9 17:45:05 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000  (safe Z)
-#101=-2.000000  (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode6/gcode_oneline.gcode.top.cnc b/tests/golden/hid_gcode6/gcode_oneline.gcode.top.cnc
deleted file mode 100644
index 7dfd6a0..0000000
--- a/tests/golden/hid_gcode6/gcode_oneline.gcode.top.cnc
+++ /dev/null
@@ -1,43 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar  9 17:39:31 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000  (safe Z)
-#101=-0.050000  (cutting depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G0 Z#100
-(polygon 1)
-G0 X0.000000 Y25.400000    (start point)
-G1 Z#101
-G1 X0.000000 Y0.000000
-G1 X32.258000 Y0.000000
-G1 X33.020000 Y0.635000
-G1 X34.036000 Y1.524000
-G1 X34.925000 Y2.540000
-G1 X35.560000 Y3.302000
-G1 X36.449000 Y4.656667
-G1 X36.914667 Y5.503333
-G1 X37.380333 Y6.477000
-G1 X37.846000 Y7.704667
-G1 X38.227000 Y9.017000
-G1 X38.481000 Y10.329333
-G1 X38.608000 Y11.514667
-G1 X38.608000 Y13.843000
-G1 X38.481000 Y15.028333
-G1 X38.227000 Y16.340667
-G1 X37.846000 Y17.653000
-G1 X37.380333 Y18.880667
-G1 X36.914667 Y19.854333
-G1 X36.449000 Y20.701000
-G1 X35.560000 Y22.055667
-G1 X34.925000 Y22.817667
-G1 X34.036000 Y23.833667
-G1 X33.020000 Y24.722667
-G1 X32.215667 Y25.400000
-G1 X0.000000 Y25.400000
-G0 Z#100
-(polygon end, distance 119.38)
-(end, total distance 119.38mm = 4.70in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode7/Makefile.am b/tests/golden/hid_gcode7/Makefile.am
index b07c896..3f307e6 100644
--- a/tests/golden/hid_gcode7/Makefile.am
+++ b/tests/golden/hid_gcode7/Makefile.am
@@ -1,6 +1,7 @@
 ## -*- makefile -*-
 
 EXTRA_DIST= \
-	gcode_oneline.gcode.bottom.cnc \
-	gcode_oneline.gcode.drill.cnc \
-	gcode_oneline.gcode.top.cnc
+	gcode_oneline-0.8890.drill.gcode \
+	gcode_oneline-bottom.gcode \
+	gcode_oneline-outline.gcode \
+	gcode_oneline-top.gcode
diff --git a/tests/golden/hid_gcode7/Makefile.in b/tests/golden/hid_gcode7/Makefile.in
index 771f1ad..848effa 100644
--- a/tests/golden/hid_gcode7/Makefile.in
+++ b/tests/golden/hid_gcode7/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -275,9 +303,10 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = \
-	gcode_oneline.gcode.bottom.cnc \
-	gcode_oneline.gcode.drill.cnc \
-	gcode_oneline.gcode.top.cnc
+	gcode_oneline-0.8890.drill.gcode \
+	gcode_oneline-bottom.gcode \
+	gcode_oneline-outline.gcode \
+	gcode_oneline-top.gcode
 
 all: all-am
 
@@ -363,10 +392,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/hid_gcode7/gcode_oneline-0.8890.drill.gcode b/tests/golden/hid_gcode7/gcode_oneline-0.8890.drill.gcode
new file mode 100644
index 0000000..17041f4
--- /dev/null
+++ b/tests/golden/hid_gcode7/gcode_oneline-0.8890.drill.gcode
@@ -0,0 +1,14 @@
+(Created by G-code exporter)
+(Fri Nov  2 00:03:11 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Drill file: 1 drills)
+(Drill diameter: 0.889000 mm)
+#100=2.000000  (safe Z)
+#104=7.000000  (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F50.000000
+G0 Z#100
+G81 X27.940000 Y12.700000 Z#104 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode2/out.bottom.cnc b/tests/golden/hid_gcode7/gcode_oneline-bottom.gcode
similarity index 64%
rename from tests/golden/hid_gcode2/out.bottom.cnc
rename to tests/golden/hid_gcode7/gcode_oneline-bottom.gcode
index c3b0526..3ea0cff 100644
--- a/tests/golden/hid_gcode2/out.bottom.cnc
+++ b/tests/golden/hid_gcode7/gcode_oneline-bottom.gcode
@@ -1,16 +1,21 @@
 (Created by G-code exporter)
-( Tue Mar  9 17:35:19 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
+(Fri Nov  2 00:03:11 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Accuracy 600 dpi)
+(Tool diameter: 0.200000 mm)
 #100=2.000000  (safe Z)
 #101=-0.050000  (cutting depth)
+#102=25.000000  (plunge feedrate)
+#103=50.000000  (feedrate)
+(with predrilling)
 (---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G21 G90 G64 P0.003 M3 S3000 M7
 G0 Z#100
 (polygon 1)
 G0 X27.770667 Y13.546667    (start point)
-G1 Z#101
+G1 Z#101 F#102
+F#103
 G1 X27.559000 Y13.462000
 G1 X27.305000 Y13.292667
 G1 X7.450667 Y13.292667
@@ -30,5 +35,9 @@ G1 X28.194000 Y13.504333
 G1 X27.770667 Y13.546667
 G0 Z#100
 (polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
+(predrilling)
+F#102
+G81 X27.940000 Y12.700000 Z#101 R#100
+(1 predrills)
+(milling distance 45.38mm = 1.79in)
 M5 M9 M2
diff --git a/tests/golden/hid_gcode7/gcode_oneline-outline.gcode b/tests/golden/hid_gcode7/gcode_oneline-outline.gcode
new file mode 100644
index 0000000..cef26f7
--- /dev/null
+++ b/tests/golden/hid_gcode7/gcode_oneline-outline.gcode
@@ -0,0 +1,23 @@
+(Created by G-code exporter)
+(Fri Nov  2 00:03:11 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Outline mill file)
+(Tool diameter: 1.000000 mm)
+#100=2.000000  (safe Z)
+#105=-1.000000  (mill depth)
+#106=25.000000  (mill plunge feedrate)
+#107=50.000000  (mill feedrate)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7
+G0 Z#100
+G0 X51.300000 Y-0.500000
+G1 Z#105 F#106
+G1 X-0.500000 Y-0.500000 F#107
+G1 X-0.500000 Y25.900000
+G1 X51.300000 Y25.900000
+G1 X51.300000 Y-0.500000
+G0 Z#100
+M5 M9 M2
+(end, total distance G0 3.00 mm = 0.12 in)
+(     total distance G1 159.40 mm = 6.28 in)
diff --git a/tests/golden/hid_gcode1/gcode_oneline.gcode.top.cnc b/tests/golden/hid_gcode7/gcode_oneline-top.gcode
similarity index 69%
rename from tests/golden/hid_gcode1/gcode_oneline.gcode.top.cnc
rename to tests/golden/hid_gcode7/gcode_oneline-top.gcode
index afd6cb2..965dc9f 100644
--- a/tests/golden/hid_gcode1/gcode_oneline.gcode.top.cnc
+++ b/tests/golden/hid_gcode7/gcode_oneline-top.gcode
@@ -1,16 +1,21 @@
 (Created by G-code exporter)
-( Tue Mar  9 17:31:51 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
+(Fri Nov  2 00:03:11 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Accuracy 600 dpi)
+(Tool diameter: 0.200000 mm)
 #100=2.000000  (safe Z)
 #101=-0.050000  (cutting depth)
+#102=25.000000  (plunge feedrate)
+#103=50.000000  (feedrate)
+(no predrilling)
 (---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G21 G90 G64 P0.003 M3 S3000 M7
 G0 Z#100
 (polygon 1)
 G0 X22.733000 Y13.546667    (start point)
-G1 Z#101
+G1 Z#101 F#102
+F#103
 G1 X22.521333 Y13.462000
 G1 X22.267333 Y13.292667
 G1 X2.413000 Y13.292667
@@ -30,5 +35,5 @@ G1 X23.156333 Y13.504333
 G1 X22.733000 Y13.546667
 G0 Z#100
 (polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
+(milling distance 45.38mm = 1.79in)
 M5 M9 M2
diff --git a/tests/golden/hid_gcode7/gcode_oneline.gcode.drill.cnc b/tests/golden/hid_gcode7/gcode_oneline.gcode.drill.cnc
deleted file mode 100644
index e8c41bf..0000000
--- a/tests/golden/hid_gcode7/gcode_oneline.gcode.drill.cnc
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar  9 17:45:12 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000  (safe Z)
-#101=70.000000  (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode8/Makefile.am b/tests/golden/hid_gcode8/Makefile.am
index b07c896..3f307e6 100644
--- a/tests/golden/hid_gcode8/Makefile.am
+++ b/tests/golden/hid_gcode8/Makefile.am
@@ -1,6 +1,7 @@
 ## -*- makefile -*-
 
 EXTRA_DIST= \
-	gcode_oneline.gcode.bottom.cnc \
-	gcode_oneline.gcode.drill.cnc \
-	gcode_oneline.gcode.top.cnc
+	gcode_oneline-0.8890.drill.gcode \
+	gcode_oneline-bottom.gcode \
+	gcode_oneline-outline.gcode \
+	gcode_oneline-top.gcode
diff --git a/tests/golden/hid_gcode8/Makefile.in b/tests/golden/hid_gcode8/Makefile.in
index cd151b7..aaa39f3 100644
--- a/tests/golden/hid_gcode8/Makefile.in
+++ b/tests/golden/hid_gcode8/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -275,9 +303,10 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = \
-	gcode_oneline.gcode.bottom.cnc \
-	gcode_oneline.gcode.drill.cnc \
-	gcode_oneline.gcode.top.cnc
+	gcode_oneline-0.8890.drill.gcode \
+	gcode_oneline-bottom.gcode \
+	gcode_oneline-outline.gcode \
+	gcode_oneline-top.gcode
 
 all: all-am
 
@@ -363,10 +392,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/hid_gcode8/gcode_oneline-0.8890.drill.gcode b/tests/golden/hid_gcode8/gcode_oneline-0.8890.drill.gcode
new file mode 100644
index 0000000..9ccac73
--- /dev/null
+++ b/tests/golden/hid_gcode8/gcode_oneline-0.8890.drill.gcode
@@ -0,0 +1,14 @@
+(Created by G-code exporter)
+(Fri Nov  2 00:03:15 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Drill file: 1 drills)
+(Drill diameter: 0.889000 mm)
+#100=2.000000  (safe Z)
+#104=-2.000000  (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F50.000000
+G0 Z#100
+G81 X27.940000 Y12.700000 Z#104 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode8/gcode_oneline.gcode.bottom.cnc b/tests/golden/hid_gcode8/gcode_oneline-bottom.gcode
similarity index 64%
rename from tests/golden/hid_gcode8/gcode_oneline.gcode.bottom.cnc
rename to tests/golden/hid_gcode8/gcode_oneline-bottom.gcode
index 286cab5..b7e1434 100644
--- a/tests/golden/hid_gcode8/gcode_oneline.gcode.bottom.cnc
+++ b/tests/golden/hid_gcode8/gcode_oneline-bottom.gcode
@@ -1,16 +1,21 @@
 (Created by G-code exporter)
-( Tue Mar  9 17:45:19 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
+(Fri Nov  2 00:03:15 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Accuracy 600 dpi)
+(Tool diameter: 0.200000 mm)
 #100=2.000000  (safe Z)
 #101=-0.050000  (cutting depth)
+#102=25.000000  (plunge feedrate)
+#103=50.000000  (feedrate)
+(with predrilling)
 (---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G21 G90 G64 P0.003 M3 S3000 M7
 G0 Z#100
 (polygon 1)
 G0 X27.770667 Y13.546667    (start point)
-G1 Z#101
+G1 Z#101 F#102
+F#103
 G1 X27.559000 Y13.462000
 G1 X27.305000 Y13.292667
 G1 X7.450667 Y13.292667
@@ -30,5 +35,9 @@ G1 X28.194000 Y13.504333
 G1 X27.770667 Y13.546667
 G0 Z#100
 (polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
+(predrilling)
+F#102
+G81 X27.940000 Y12.700000 Z#101 R#100
+(1 predrills)
+(milling distance 45.38mm = 1.79in)
 M5 M9 M2
diff --git a/tests/golden/hid_gcode8/gcode_oneline-outline.gcode b/tests/golden/hid_gcode8/gcode_oneline-outline.gcode
new file mode 100644
index 0000000..daaf6f2
--- /dev/null
+++ b/tests/golden/hid_gcode8/gcode_oneline-outline.gcode
@@ -0,0 +1,23 @@
+(Created by G-code exporter)
+(Fri Nov  2 00:03:15 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Outline mill file)
+(Tool diameter: 1.000000 mm)
+#100=2.000000  (safe Z)
+#105=-1.000000  (mill depth)
+#106=25.000000  (mill plunge feedrate)
+#107=50.000000  (mill feedrate)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7
+G0 Z#100
+G0 X51.300000 Y-0.500000
+G1 Z#105 F#106
+G1 X-0.500000 Y-0.500000 F#107
+G1 X-0.500000 Y25.900000
+G1 X51.300000 Y25.900000
+G1 X51.300000 Y-0.500000
+G0 Z#100
+M5 M9 M2
+(end, total distance G0 3.00 mm = 0.12 in)
+(     total distance G1 159.40 mm = 6.28 in)
diff --git a/tests/golden/hid_gcode2/out.top.cnc b/tests/golden/hid_gcode8/gcode_oneline-top.gcode
similarity index 69%
rename from tests/golden/hid_gcode2/out.top.cnc
rename to tests/golden/hid_gcode8/gcode_oneline-top.gcode
index ca2b079..e75ad49 100644
--- a/tests/golden/hid_gcode2/out.top.cnc
+++ b/tests/golden/hid_gcode8/gcode_oneline-top.gcode
@@ -1,16 +1,21 @@
 (Created by G-code exporter)
-( Tue Mar  9 17:35:16 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
+(Fri Nov  2 00:03:14 2012)
+(Units: mm)
+(Board size: 50.80 x 25.40 mm)
+(Accuracy 600 dpi)
+(Tool diameter: 0.200000 mm)
 #100=2.000000  (safe Z)
 #101=-0.050000  (cutting depth)
+#102=25.000000  (plunge feedrate)
+#103=50.000000  (feedrate)
+(no predrilling)
 (---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G21 G90 G64 P0.003 M3 S3000 M7
 G0 Z#100
 (polygon 1)
 G0 X22.733000 Y13.546667    (start point)
-G1 Z#101
+G1 Z#101 F#102
+F#103
 G1 X22.521333 Y13.462000
 G1 X22.267333 Y13.292667
 G1 X2.413000 Y13.292667
@@ -30,5 +35,5 @@ G1 X23.156333 Y13.504333
 G1 X22.733000 Y13.546667
 G0 Z#100
 (polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
+(milling distance 45.38mm = 1.79in)
 M5 M9 M2
diff --git a/tests/golden/hid_gcode8/gcode_oneline.gcode.drill.cnc b/tests/golden/hid_gcode8/gcode_oneline.gcode.drill.cnc
deleted file mode 100644
index 77ac526..0000000
--- a/tests/golden/hid_gcode8/gcode_oneline.gcode.drill.cnc
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar  9 17:45:19 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000  (safe Z)
-#101=-2.000000  (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode9/Makefile.am b/tests/golden/hid_gcode9/Makefile.am
index b07c896..7d51964 100644
--- a/tests/golden/hid_gcode9/Makefile.am
+++ b/tests/golden/hid_gcode9/Makefile.am
@@ -1,6 +1,7 @@
 ## -*- makefile -*-
 
 EXTRA_DIST= \
-	gcode_oneline.gcode.bottom.cnc \
-	gcode_oneline.gcode.drill.cnc \
-	gcode_oneline.gcode.top.cnc
+	gcode_oneline-bottom.gcode \
+	gcode_oneline-drillmill.gcode \
+	gcode_oneline-outline.gcode \
+	gcode_oneline-top.gcode
diff --git a/tests/golden/hid_gcode9/Makefile.in b/tests/golden/hid_gcode9/Makefile.in
index 5addb7d..68ed846 100644
--- a/tests/golden/hid_gcode9/Makefile.in
+++ b/tests/golden/hid_gcode9/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -275,9 +303,10 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = \
-	gcode_oneline.gcode.bottom.cnc \
-	gcode_oneline.gcode.drill.cnc \
-	gcode_oneline.gcode.top.cnc
+	gcode_oneline-bottom.gcode \
+	gcode_oneline-drillmill.gcode \
+	gcode_oneline-outline.gcode \
+	gcode_oneline-top.gcode
 
 all: all-am
 
@@ -363,10 +392,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/hid_gcode9/gcode_oneline.gcode.bottom.cnc b/tests/golden/hid_gcode9/gcode_oneline-bottom.gcode
similarity index 65%
rename from tests/golden/hid_gcode9/gcode_oneline.gcode.bottom.cnc
rename to tests/golden/hid_gcode9/gcode_oneline-bottom.gcode
index 49ebcd5..6133c71 100644
--- a/tests/golden/hid_gcode9/gcode_oneline.gcode.bottom.cnc
+++ b/tests/golden/hid_gcode9/gcode_oneline-bottom.gcode
@@ -1,16 +1,21 @@
 (Created by G-code exporter)
-( Tue Mar  9 17:45:25 2010 )
-(600 dpi)
-(Unit: inch)
-(Board size: 2.00x1.00 inches)
+(Fri Nov  2 00:03:17 2012)
+(Units: inch)
+(Board size: 2.00 x 1.00 inches)
+(Accuracy 600 dpi)
+(Tool diameter: 0.000200 inch)
 #100=0.002000  (safe Z)
 #101=-0.000050  (cutting depth)
+#102=0.025000  (plunge feedrate)
+#103=0.050000  (feedrate)
+(with predrilling)
 (---------------------------------)
-G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
+G17 G20 G90 G64 P0.003 M3 S3000 M7
 G0 Z#100
 (polygon 1)
 G0 X1.093333 Y0.530000    (start point)
-G1 Z#101
+G1 Z#101 F#102
+F#103
 G1 X1.083333 Y0.525000
 G1 X1.076667 Y0.520000
 G1 X0.291667 Y0.518333
@@ -30,5 +35,8 @@ G1 X1.103333 Y0.530000
 G1 X1.093333 Y0.530000
 G0 Z#100
 (polygon end, distance 1.77)
-(end, total distance 44.84mm = 1.77in)
+(predrilling)
+F#102
+(0 predrills)
+(milling distance 44.84mm = 1.77in)
 M5 M9 M2
diff --git a/tests/golden/hid_gcode9/gcode_oneline-drillmill.gcode b/tests/golden/hid_gcode9/gcode_oneline-drillmill.gcode
new file mode 100644
index 0000000..0134890
--- /dev/null
+++ b/tests/golden/hid_gcode9/gcode_oneline-drillmill.gcode
@@ -0,0 +1,26 @@
+(Created by G-code exporter)
+(Fri Nov 23 00:31:44 2012)
+(Units: inch)
+(Board size: 2.00 x 1.00 inches)
+(Drillmill file)
+(Tool diameter: 0.001000 inch)
+#100=0.002000  (safe Z)
+#105=-0.001000  (mill depth)
+#106=0.025000  (mill plunge feedrate)
+#107=0.050000  (mill feedrate)
+(---------------------------------)
+G17 G20 G90 G64 P0.003 M3 S3000 M7
+G0 X1.100000 Y0.500000
+G1 Z#105 F#106
+F#107
+G1 X1.117000 Y0.500000
+G1 X1.110599 Y0.513291
+G1 X1.096217 Y0.516574
+G1 X1.084684 Y0.507376
+G1 X1.084684 Y0.492624
+G1 X1.096217 Y0.483426
+G1 X1.110599 Y0.486709
+G1 X1.117000 Y0.500000
+G0 X1.100000 Y0.500000
+G0 Z#100
+M5 M9 M2
diff --git a/tests/golden/hid_gcode9/gcode_oneline-outline.gcode b/tests/golden/hid_gcode9/gcode_oneline-outline.gcode
new file mode 100644
index 0000000..0700368
--- /dev/null
+++ b/tests/golden/hid_gcode9/gcode_oneline-outline.gcode
@@ -0,0 +1,23 @@
+(Created by G-code exporter)
+(Fri Nov  2 00:03:17 2012)
+(Units: inch)
+(Board size: 2.00 x 1.00 inches)
+(Outline mill file)
+(Tool diameter: 0.001000 inch)
+#100=0.002000  (safe Z)
+#105=-0.001000  (mill depth)
+#106=0.025000  (mill plunge feedrate)
+#107=0.050000  (mill feedrate)
+(---------------------------------)
+G17 G20 G90 G64 P0.003 M3 S3000 M7
+G0 Z#100
+G0 X2.000500 Y-0.000500
+G1 Z#105 F#106
+G1 X-0.000500 Y-0.000500 F#107
+G1 X-0.000500 Y1.000500
+G1 X2.000500 Y1.000500
+G1 X2.000500 Y-0.000500
+G0 Z#100
+M5 M9 M2
+(end, total distance G0 0.08 mm = 0.00 in)
+(     total distance G1 152.58 mm = 6.01 in)
diff --git a/tests/golden/hid_gcode9/gcode_oneline.gcode.top.cnc b/tests/golden/hid_gcode9/gcode_oneline-top.gcode
similarity index 67%
rename from tests/golden/hid_gcode9/gcode_oneline.gcode.top.cnc
rename to tests/golden/hid_gcode9/gcode_oneline-top.gcode
index 638cec1..29275ed 100644
--- a/tests/golden/hid_gcode9/gcode_oneline.gcode.top.cnc
+++ b/tests/golden/hid_gcode9/gcode_oneline-top.gcode
@@ -1,16 +1,21 @@
 (Created by G-code exporter)
-( Tue Mar  9 17:45:22 2010 )
-(600 dpi)
-(Unit: inch)
-(Board size: 2.00x1.00 inches)
+(Fri Nov  2 00:03:17 2012)
+(Units: inch)
+(Board size: 2.00 x 1.00 inches)
+(Accuracy 600 dpi)
+(Tool diameter: 0.000200 inch)
 #100=0.002000  (safe Z)
 #101=-0.000050  (cutting depth)
+#102=0.025000  (plunge feedrate)
+#103=0.050000  (feedrate)
+(no predrilling)
 (---------------------------------)
-G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
+G17 G20 G90 G64 P0.003 M3 S3000 M7
 G0 Z#100
 (polygon 1)
 G0 X0.895000 Y0.530000    (start point)
-G1 Z#101
+G1 Z#101 F#102
+F#103
 G1 X0.885000 Y0.525000
 G1 X0.878333 Y0.520000
 G1 X0.093333 Y0.518333
@@ -30,5 +35,5 @@ G1 X0.905000 Y0.530000
 G1 X0.895000 Y0.530000
 G0 Z#100
 (polygon end, distance 1.77)
-(end, total distance 44.84mm = 1.77in)
+(milling distance 44.84mm = 1.77in)
 M5 M9 M2
diff --git a/tests/golden/hid_gcode9/gcode_oneline.gcode.drill.cnc b/tests/golden/hid_gcode9/gcode_oneline.gcode.drill.cnc
deleted file mode 100644
index c4b730a..0000000
--- a/tests/golden/hid_gcode9/gcode_oneline.gcode.drill.cnc
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar  9 17:45:25 2010 )
-(Unit: inch)
-(Board size: 2.00x1.00 inches)
-#100=0.002000  (safe Z)
-#101=-0.002000  (drill depth)
-(---------------------------------)
-G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
-G81 X1.100000 Y0.500000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gerber1/Makefile.in b/tests/golden/hid_gerber1/Makefile.in
index 8a1566b..ce07d44 100644
--- a/tests/golden/hid_gerber1/Makefile.in
+++ b/tests/golden/hid_gerber1/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -364,10 +392,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/hid_gerber2/Makefile.in b/tests/golden/hid_gerber2/Makefile.in
index c36509c..6a4cc4a 100644
--- a/tests/golden/hid_gerber2/Makefile.in
+++ b/tests/golden/hid_gerber2/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -364,10 +392,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/hid_gerber3/Makefile.in b/tests/golden/hid_gerber3/Makefile.in
index ca2c474..e3f90d3 100644
--- a/tests/golden/hid_gerber3/Makefile.in
+++ b/tests/golden/hid_gerber3/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -366,10 +394,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/hid_png1/Makefile.in b/tests/golden/hid_png1/Makefile.in
index e6aab0b..a80e1f9 100644
--- a/tests/golden/hid_png1/Makefile.in
+++ b/tests/golden/hid_png1/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -361,10 +389,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/hid_png2/Makefile.in b/tests/golden/hid_png2/Makefile.in
index 2e68da8..ec4f9ed 100644
--- a/tests/golden/hid_png2/Makefile.in
+++ b/tests/golden/hid_png2/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -361,10 +389,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/hid_png3/Makefile.in b/tests/golden/hid_png3/Makefile.in
index a5d9de9..a1b0c48 100644
--- a/tests/golden/hid_png3/Makefile.in
+++ b/tests/golden/hid_png3/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -361,10 +389,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/golden/hid_png3/gerber_oneline.png b/tests/golden/hid_png3/gerber_oneline.png
index 9c5e865..a0bf3ee 100644
Binary files a/tests/golden/hid_png3/gerber_oneline.png and b/tests/golden/hid_png3/gerber_oneline.png differ
diff --git a/tests/inputs/Makefile.in b/tests/inputs/Makefile.in
index 4bdadc1..4cc0694 100644
--- a/tests/inputs/Makefile.in
+++ b/tests/inputs/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -364,10 +392,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index e9a4ac2..95de668 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -1,7 +1,5 @@
 #!/bin/sh
 #
-# $Id: run_tests.sh,v 1.8 2009/02/17 00:42:31 danmc Exp $
-#
 # Copyright (c) 2003, 2004, 2005, 2006, 2007, 2009, 2010 Dan McMahill
 
 #  This program is free software; you can redistribute it and/or modify
@@ -148,6 +146,12 @@ while test -n "$1"
   esac
 done
 
+if test "X$regen" = "Xyes" && test $# -ne 1; then
+    echo "Please regenerate only one test at a time."
+    echo "This limitation is a safety measure."
+    exit 1
+fi
+
 ##########################################################################
 #
 # set up various tools
@@ -276,11 +280,11 @@ fi
 # test as skipped and give an error message
 #
 compare_check() {
-    fn="$1"
-    f1="$2"
-    f2="$3"
+    local fn="$1"
+    local f1="$2"
+    local f2="$3"
 
-    if test ! -f "$f2" ; then 
+    if test ! -f "$f1" ; then 
 	echo "$0:  ${fn}(): $f1 does not exist"
 	test_skipped=yes
 	return 1
@@ -303,8 +307,8 @@ compare_check() {
 #   run_diff "file1" "file2"
 #
 run_diff() {
-    f1="$1"
-    f2="$2"
+    local f1="$1"
+    local f2="$2"
     diff -U 2 $f1 $f2
     if test $? -ne 0 ; then return 1 ; fi
     return 0
@@ -317,8 +321,8 @@ run_diff() {
 
 # used to remove things like creation date from BOM files
 normalize_bom() {
-    f1="$1"
-    f2="$2"
+    local f1="$1"
+    local f2="$2"
     $AWK '
 	/^# Date:/ {print "# Date: today"; next}
 	/^# Author:/ {print "# Author: PCB"; next}
@@ -328,13 +332,12 @@ normalize_bom() {
 
 # top level function to compare BOM output
 compare_bom() {
-    f1="$1"
-    f2="$2"
+    local f1="$1"
+    local f2="$2"
     compare_check "compare_bom" "$f1" "$f2" || return 1
 
     # an example BOM file is:
 
-    #  # $Id$
     #  # PcbBOM Version 1.0
     #  # Date: Wed Jun 17 14:41:43 2009 UTC
     #  # Author: Dan McMahill
@@ -346,8 +349,8 @@ compare_bom() {
     #  8,"Small outline package, narrow (150mil)","SO8",USO90_TOP USO180_TOP USO270_TOP USO0_TOP USO270_BOT USO180_BOT USO90_BOT USO0_BOT 
 
     #  For comparison, we need to ignore changes in the Date and Author lines.
-    cf1=${tmpd}/`basename $f1` 
-    cf2=${tmpd}/`basename $f2` 
+    local cf1=${tmpd}/`basename $f1`-ref
+    local cf2=${tmpd}/`basename $f2`-out
 
     normalize_bom $f1 $cf1
     normalize_bom $f2 $cf2
@@ -361,8 +364,8 @@ compare_bom() {
 
 # used to remove things like creation date from BOM files
 normalize_xy() {
-    f1="$1"
-    f2="$2"
+    local f1="$1"
+    local f2="$2"
     $AWK '
 	/^# Date:/ {print "# Date: today"; next}
 	/^# Author:/ {print "# Author: PCB"; next}
@@ -371,9 +374,12 @@ normalize_xy() {
 }
 
 compare_xy() {
-    f1="$1"
-    f2="$2"
+    local f1="$1"
+    local f2="$2"
     compare_check "compare_xy" "$f1" "$f2" || return 1
+
+    local cf1=${tmpd}/`basename $f1`-ref
+    local cf2=${tmpd}/`basename $f2`-out
     normalize_xy "$f1" "$cf1"
     normalize_xy "$f2" "$cf2"
     run_diff "$cf1" "$cf2" || test_failed=yes
@@ -386,26 +392,25 @@ compare_xy() {
 
 # used to remove things like creation date from gcode files
 normalize_gcode() {
-    f1="$1"
-    f2="$2"
-    $AWK '
-	d == 1 {gsub(/ .* /, "Creation Date and Time"); d = 0;}
-	/^\(Created by G-code exporter\)/ {d=1}
-	{print}' \
+    local f1="$1"
+    local f2="$2"
+    # matches string such as '( Tue Mar  9 17:45:43 2010 )'
+    $AWK --posix '!/^\( *[A-Z][a-z]{2} [A-Z][a-z]{2} [0123 ][0-9] [0-9]{2}:[0-9]{2}:[0-9]{2} [0-9]{4} *\)$/' \
 	$f1 > $f2
 }
 
 compare_gcode() {
-    f1="$1"
-    f2="$2"
+    local f1="$1"
+    local f2="$2"
     compare_check "compare_gcode" "$f1" "$f2" || return 1
 
     #  For comparison, we need to ignore changes in the Date and Author lines.
-    cf1=${tmpd}/`basename $f1` 
-    cf2=${tmpd}/`basename $f2` 
+    local cf1=${tmpd}/`basename $f1`-ref
+    local cf2=${tmpd}/`basename $f2`-out
 
     normalize_gcode $f1 $cf1
     normalize_gcode $f2 $cf2
+
     run_diff "$cf1" "$cf2" || test_failed=yes
 }
 
@@ -415,8 +420,8 @@ compare_gcode() {
 #
 
 compare_rs274x() {
-    f1="$1"
-    f2="$2"
+    local f1="$1"
+    local f2="$2"
     compare_check "compare_rs274x" "$f1" "$f2" || return 1
 
     # use gerbv to export our reference RS274-X file and our generated
@@ -448,8 +453,8 @@ compare_cnc() {
 #
 
 compare_image() {
-    f1="$1"
-    f2="$2"
+    local f1="$1"
+    local f2="$2"
     compare_check "compare_image" "$f1" "$f2" || return 1
 
     # now see if the image files are the same
@@ -584,6 +589,16 @@ for t in $all_tests ; do
     #
 
     if test "X$regen" = "Xyes" ; then
+	echo    "## -*- makefile -*-"   > ${rundir}/Makefile.am
+	echo                           >> ${rundir}/Makefile.am
+	echo -n "EXTRA_DIST="          >> ${rundir}/Makefile.am
+	for f in $out_files ; do
+	    fn=`echo $f | sed 's;.*:;;g'`
+	    echo    " \\"              >> ${rundir}/Makefile.am
+	    echo -n "\t$fn"            >> ${rundir}/Makefile.am
+	done
+	echo                           >> ${rundir}/Makefile.am
+
 	echo "Regenerated ${t}"
     else
 	# compare the result to our reference file
diff --git a/tests/tests.list b/tests/tests.list
index 3433452..6c8f85d 100644
--- a/tests/tests.list
+++ b/tests/tests.list
@@ -98,25 +98,40 @@ hid_bom4 | bom_general.pcb | bom | --xy-in-mm | |  bom:bom_general.bom xy:bom_ge
 ######################################################################
 #
 # options:
-# --basename <string>            File name prefix
-# --dpi <num>                    Resolution of intermediate image (pixels/inch).
-# --mill depth <num>             Milling depth.
-# --safe Z <num>                 Safe Z for traverse move.
-# --tool radius <num>            Milling tool radius compensation.
-# --drill depth <num>            Drilling depth.
-# --measurement unit <mm|mil|um|inch>    Measurement unit
-#
-hid_gcode1 | gcode_oneline.pcb | gcode | | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc
-hid_gcode2 | gcode_oneline.pcb | gcode | --basename out | | gcode:out.top.cnc gcode:out.bottom.cnc gcode:out.drill.cnc
-hid_gcode3 | gcode_oneline.pcb | gcode | --dpi 1200 | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc
-hid_gcode4 | gcode_oneline.pcb | gcode | --mill-depth 5 | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc
-hid_gcode5 | gcode_oneline.pcb | gcode | --safe-Z 10 | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc
-hid_gcode6 | gcode_oneline.pcb | gcode | --tool-radius 15 | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc
-hid_gcode7 | gcode_oneline.pcb | gcode | --drill-depth 70 | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc
-hid_gcode8 | gcode_oneline.pcb | gcode | --measurement-unit mm | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc
-hid_gcode9 | gcode_oneline.pcb | gcode | --measurement-unit mil | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc
-hid_gcode10 | gcode_oneline.pcb | gcode | --measurement-unit um | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc
-hid_gcode11 | gcode_oneline.pcb | gcode | --measurement-unit inch | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc
+# --basename <string>            File name prefix and suffix.
+# --measurement-unit <km|m|cm|mm|um|nm|px|in|mil|cmil>
+#                                Measurement unit used in the G-code output.
+# --dpi <num>                    Accuracy of the mill path generation in pixels/inch.
+# --safe-Z <num>                 Safe Z for traverse movements of all operations.
+# --iso-mill-depth <num>         Isolation milling depth.
+# --iso-tool-diameter <num>      Isolation milling tool diameter.
+# --iso-tool-plunge <num>        Isolation milling feedrate when plunging into
+#                                the material.
+# --iso-tool-feedrate <num>      Isolation milling feedrate.
+# --predrill                     Wether to pre-drill all drill spots with the
+#                                isolation milling tool.
+# --drill-depth <num>            Drilling depth.
+# --drill-feedrate <num>         Drilling feedrate.
+# --drill-mill                   Wether to produce drill holes equal or bigger
+#                                than the milling tool diameter with the milling
+#                                tool.
+# --outline-mill-depth <num>     Milling depth when milling the outline.
+# --outline-tool-diameter <num>  Diameter of the tool used for outline milling.
+# --outline-mill-plunge <num>    Outline milling feedrate when plunging into
+#                                the material.
+# --outline-mill-feedrate <num>  Outline milling feedrate.
+# --advanced-gcode               Wether to produce G-code for advanced interpreters.
+hid_gcode1 | gcode_oneline.pcb | gcode | | | gcode:gcode_oneline-0.8890.drill.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-outline.gcode gcode:gcode_oneline-top.gcode
+hid_gcode2 | gcode_oneline.pcb | gcode | --basename out.gcode | | gcode:out-0.8890.drill.gcode gcode:out-bottom.gcode gcode:out-outline.gcode gcode:out-top.gcode
+hid_gcode3 | gcode_oneline.pcb | gcode | --dpi 1200 | | gcode:gcode_oneline-0.8890.drill.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-outline.gcode gcode:gcode_oneline-top.gcode
+hid_gcode4 | gcode_oneline.pcb | gcode | --iso-mill-depth 0.5 | | gcode:gcode_oneline-0.8890.drill.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-outline.gcode gcode:gcode_oneline-top.gcode
+hid_gcode5 | gcode_oneline.pcb | gcode | --safe-Z 10 | | gcode:gcode_oneline-0.8890.drill.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-outline.gcode gcode:gcode_oneline-top.gcode
+hid_gcode6 | gcode_oneline.pcb | gcode | --iso-tool-diameter 0.4 | | gcode:gcode_oneline-0.8890.drill.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-outline.gcode gcode:gcode_oneline-top.gcode
+hid_gcode7 | gcode_oneline.pcb | gcode | --drill-depth 7 | | gcode:gcode_oneline-0.8890.drill.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-outline.gcode gcode:gcode_oneline-top.gcode
+hid_gcode8 | gcode_oneline.pcb | gcode | --measurement-unit mm | | gcode:gcode_oneline-0.8890.drill.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-outline.gcode gcode:gcode_oneline-top.gcode
+hid_gcode9 | gcode_oneline.pcb | gcode | --measurement-unit mil | | gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drillmill.gcode gcode:gcode_oneline-outline.gcode gcode:gcode_oneline-top.gcode
+hid_gcode10 | gcode_oneline.pcb | gcode | --measurement-unit um | | gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drillmill.gcode gcode:gcode_oneline-outline.gcode gcode:gcode_oneline-top.gcode
+hid_gcode11 | gcode_oneline.pcb | gcode | --measurement-unit inch | | gcode:gcode_oneline-0.0350.drill.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-outline.gcode gcode:gcode_oneline-top.gcode
 #
 ######################################################################
 # ---------------------------------------------
@@ -161,6 +176,6 @@ hid_gerber3 | gerber_arcs.pcb | gerber | --gerberfile arcs | | gbx:arcs.bottom.g
 #
 hid_png1 | gerber_oneline.pcb | png | | | png:gerber_oneline.png
 hid_png2 | gerber_oneline.pcb | png | --outfile myfile.png | | png:myfile.png
-hid_png3 | gerber_oneline.pcb | png | --dpi 300 | | png:gerber_oneline.png
+hid_png3 | gerber_oneline.pcb | png | --dpi 600 | | png:gerber_oneline.png
 #
 
diff --git a/tools/Makefile.am b/tools/Makefile.am
index d9665a9..3900614 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -1,6 +1,3 @@
-## $Id$
-##
-
 ## XXX the tools should probably be cleaned up a bit and installed
 ## in ${exec_prefix}/bin  (by bin_SCRIPTS and bin_PROGRAMS)
 
@@ -21,7 +18,8 @@ TOOLS= \
 	tgo2pcb.tcl \
 	MergePCBPS \
 	Merge_dimPCBPS \
-	PCB2HPGL 
+	PCB2HPGL \
+	pcbdiff
 
 DIST_SCM= \
 	gnet-pcbfwd.scm
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 76193b2..ba6026b 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,6 +17,23 @@
 
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -86,17 +103,29 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(scmdatadir)" \
 	"$(DESTDIR)$(toolsdir)"
 SCRIPTS = $(bin_SCRIPTS)
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DATA = $(dist_scmdata_DATA) $(dist_tools_DATA)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -109,7 +138,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -175,6 +203,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -283,6 +315,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -317,7 +351,8 @@ TOOLS = \
 	tgo2pcb.tcl \
 	MergePCBPS \
 	Merge_dimPCBPS \
-	PCB2HPGL 
+	PCB2HPGL \
+	pcbdiff
 
 DIST_SCM = \
 	gnet-pcbfwd.scm
@@ -357,8 +392,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 install-binSCRIPTS: $(bin_SCRIPTS)
 	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
 	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
@@ -386,13 +424,14 @@ uninstall-binSCRIPTS:
 	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
 	files=`for p in $$list; do echo "$$p"; done | \
 	       sed -e 's,.*/,,;$(transform)'`; \
-	test -n "$$list" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+	dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
 install-dist_scmdataDATA: $(dist_scmdata_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(scmdatadir)" || $(MKDIR_P) "$(DESTDIR)$(scmdatadir)"
 	@list='$(dist_scmdata_DATA)'; test -n "$(scmdatadir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(scmdatadir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(scmdatadir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -406,13 +445,14 @@ uninstall-dist_scmdataDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(dist_scmdata_DATA)'; test -n "$(scmdatadir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(scmdatadir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(scmdatadir)" && rm -f $$files
+	dir='$(DESTDIR)$(scmdatadir)'; $(am__uninstall_files_from_dir)
 install-dist_toolsDATA: $(dist_tools_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(toolsdir)" || $(MKDIR_P) "$(DESTDIR)$(toolsdir)"
 	@list='$(dist_tools_DATA)'; test -n "$(toolsdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(toolsdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(toolsdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -426,9 +466,7 @@ uninstall-dist_toolsDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(dist_tools_DATA)'; test -n "$(toolsdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(toolsdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(toolsdir)" && rm -f $$files
+	dir='$(DESTDIR)$(toolsdir)'; $(am__uninstall_files_from_dir)
 tags: TAGS
 TAGS:
 
@@ -483,10 +521,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/tools/MergePCBPS b/tools/MergePCBPS
index 8785d28..8d63529 100755
--- a/tools/MergePCBPS
+++ b/tools/MergePCBPS
@@ -1,7 +1,5 @@
 #!/bin/sh
 #
-# $Id$
-#
 # merges PostScript files created by pcb (version >= 1.4.2) into
 # a single file for backward compatibility
 #
diff --git a/tools/Merge_dimPCBPS b/tools/Merge_dimPCBPS
index 08c559e..84ce3ab 100755
--- a/tools/Merge_dimPCBPS
+++ b/tools/Merge_dimPCBPS
@@ -1,7 +1,5 @@
 #!/bin/sh
 #
-# $Id$
-#
 # merges PostScript files created by pcb (version >= 1.4.2) into
 # a single file for backward compatibility
 #
diff --git a/tools/pcbdiff b/tools/pcbdiff
new file mode 100755
index 0000000..c84da34
--- /dev/null
+++ b/tools/pcbdiff
@@ -0,0 +1,80 @@
+#! /bin/sh
+
+usage ()
+{
+  echo Usage: 
+  echo \\tpcbdiff firstfile secondfile
+  echo \\tView a graphical diff of PCB files
+  echo
+  echo \\tTo use with git, just place this script in your PATH and do
+  echo \\tgit difftool -x pcbdiff ...
+  echo
+  echo \\tTo use with mercurial, add the following lines to your .hgrc:
+  echo \\t\\t[extensions]
+  echo \\t\\thgext.extdiff =
+  echo \\t\\t[extdiff]
+  echo \\t\\tcmd.pcbdiff = /PATH/TO/pcbdiff
+  echo \\tthen to invoke it, do
+  echo \\thg pcbdiff ...
+  echo
+  echo \\tTo use with subversion, place it in your PATH and do
+  echo \\tsvn diff --diff-cmd pcbdiff ...
+
+  echo \\tRequirements: Imagemagick and gschem be installed
+}
+
+PCB=`which pcb`
+if test -z "${PCB}"; then
+  MISSING=pcb
+fi
+
+CONVERT=`which convert`
+if test -z "${CONVERT}"; then
+  MISSING=convert
+fi
+
+COMPOSITE=`which composite`
+if test -z "${COMPOSITE}"; then
+  MISSING=composite
+fi
+
+VIEWER=`which display`
+if test -z "${VIEWER}"; then
+  MISSING=display
+fi
+
+if test -z "${MISSING}"; then
+  true
+else
+  echo "Binary for \"${MISSING}\" not found." >&2
+  echo "Either it is not installed, or not in your PATH" >&2
+  exit 1
+fi
+
+#In case the script was invoked with extra option arguments, throw them away
+shift `expr $# - 2`
+
+LEFTFILE="${1}"
+RIGHTFILE="${2}"
+if test -d "${LEFTFILE}" -o -d "${RIGHTFILE}"
+  then echo "ERROR: pcbdiff cannot diff entire directories"
+  exit 1
+fi
+
+LEFTPNG=`mktemp --tmpdir pcbdiff.XXXXXXXXXX`
+RIGHTPNG=`mktemp --tmpdir pcbdiff.XXXXXXXXXX`
+LEFTBNW=`mktemp --tmpdir pcbdiff.XXXXXXXXXX`
+RIGHTBNW=`mktemp --tmpdir pcbdiff.XXXXXXXXXX`
+DIFFPNG=`mktemp --tmpdir pcbdiff.XXXXXXXXXX`
+
+"${PCB}" -x png --dpi ${PCBDIFF_DPI:-200} --photo-mode --outfile ${LEFTPNG} "${LEFTFILE}"
+"${PCB}" -x png --dpi ${PCBDIFF_DPI:-200} --photo-mode --outfile ${RIGHTPNG} "${RIGHTFILE}"
+"${CONVERT}" -colorspace gray $LEFTPNG $LEFTBNW
+"${CONVERT}" -colorspace gray $RIGHTPNG $RIGHTBNW
+"${COMPOSITE}" -stereo 0 $LEFTBNW $RIGHTBNW $DIFFPNG
+"${VIEWER}" $DIFFPNG
+rm $LEFTPNG
+rm $RIGHTPNG
+rm $LEFTBNW
+rm $RIGHTBNW
+rm $DIFFPNG
diff --git a/tutorial/Makefile.am b/tutorial/Makefile.am
index 85daeac..2b9320f 100644
--- a/tutorial/Makefile.am
+++ b/tutorial/Makefile.am
@@ -1,5 +1,3 @@
-## $Id$
-
 tutdir=	@docdir@/tutorial
 tut_DATA=	${TUTORIALS}
 
diff --git a/tutorial/Makefile.in b/tutorial/Makefile.in
index fe3a812..c508172 100644
--- a/tutorial/Makefile.in
+++ b/tutorial/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,6 +16,23 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -65,6 +82,11 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -86,6 +108,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(tutdir)"
 DATA = $(tut_DATA)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -93,6 +121,7 @@ ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -105,7 +134,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -171,6 +199,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -279,6 +311,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -337,8 +371,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 install-tutDATA: $(tut_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(tutdir)" || $(MKDIR_P) "$(DESTDIR)$(tutdir)"
 	@list='$(tut_DATA)'; test -n "$(tutdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(tutdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(tutdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -352,9 +389,7 @@ uninstall-tutDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(tut_DATA)'; test -n "$(tutdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(tutdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(tutdir)" && rm -f $$files
+	dir='$(DESTDIR)$(tutdir)'; $(am__uninstall_files_from_dir)
 tags: TAGS
 TAGS:
 
@@ -409,10 +444,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/w32/Makefile.in b/w32/Makefile.in
index ff99eb8..4d49b2d 100644
--- a/w32/Makefile.in
+++ b/w32/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -64,11 +81,17 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -81,7 +104,6 @@ CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_OR_CXX = @CC_OR_CXX@
-CC_OR_CXX_FLAGS = @CC_OR_CXX_FLAGS@
 CFLAGS = @CFLAGS@
 CONVERT = @CONVERT@
 CPP = @CPP@
@@ -147,6 +169,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
 KDEDATADIR = @KDEDATADIR@
 KPSEWHICH = @KPSEWHICH@
@@ -255,6 +281,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
@@ -377,10 +405,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
 mostlyclean-generic:
 
 clean-generic:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-electronics/pcb.git



More information about the Pkg-electronics-commits mailing list